Jump to content

thescientist

Moderator
  • Posts

    8,682
  • Joined

  • Last visited

Posts posted by thescientist

  1. PHP errors are pretty clear for the most part and will include line numbers. What errors are you getting and which part don't you understand about them? You can search more information on all them, they will be documented on the PHP site.

  2. Ah yes, I remember reading all about that last week. Pretty interesting that turned into overly dramatic situation. IMO, I think NPM, Kik, and Azer all could have handled the situation better. I get the Kik had a copyright and thus their right to the name, but I wonder if most people (read developers) who stumbled upon a kik namespaced package on NPM would immediately think of the instant messaging company.

  3. do you have a question? Otherwise, this looks like a spam post. (I didn't both to click on that link as there is no immediate reason as to why I should as it related to answering a programming question)

  4. All what you did is evaluating and criticizing the little code above which is , absolutely , not what I asked for . My question was what is the difference between a normal program and a hard coded program? if we take in consideration that even a normal program has a data that is directly embedded in it like the little program above shows . Please confine yourself to the question and answer exactly what I am asking for

    I would just add that you should be more mindful of what users on the forum are trying to teach you. I understand that example may not have been immediately obvious to you, but the point was still fundamental, because in fact the example was a direct answer to your question. (using values from user input vs fixed / hardcoded / embedded / etc in the code itself). There was a better way to respond such as, "that reply is not clear to me could you expand further, I don't get xyz..". In so much that you would like people to continue helping you.

    • Like 1
  5. have you tried looking for errors in browser's console? have you added any console logging to trace the execution of your code to see the point where it may have stopped working?

     

    For future reference, I would highly recommend formatting and indenting your code in your posts, and if possible, try and whittle down the code sample to only what is needed to reproduce the issue. It's a proper problem solving technique rather than piling everything on the testing. Just tackle the problem one setup at a time and determine some sort of acceptance criteria that confidently reflects that the code is working as expected.

  6. Exactly, often times the biggest challenge to writing code is how well you actually express the code through "human" language. The second example favors using proper names for variables so you can infer what the code does now, and in six months from now when you or someone else has to return to it. It should be like reading a box, the code should speak for itself. Those are the lesson I try and take away, not the actual language syntax.

  7. These are some of my favorites, that I have taken a lot of inspiration from

     

    Note that the first 3 don't reference JavaScript at all, but I consider them to have been more helpful than the last two because it taught me more about programming at a higher level, even though I don't really code in Java (primarily JavaScript and PHP). This has made me a better developer overall because I can recognize when something feels right, versus when it doesn't (code smell), while the last two just helped me get better at only 1 language.

  8. I second JSG's recommendation in getting a better understanding of programming, patterns, design, etc from a high level view. Most of the books I have read tend to focus on Java, however that is merely based on Java being fairly ubiquitous and most web languages have similar constructs (but different syntax). However, what i take away is how things are built, and the concepts such a DRY and SOLID transcend programming languages.

     

    That said, if you are looking at programming to be more of a casual endeavor, then a JavaScript book may be all you need. If you are looking to learn backend and frontend and everything in between, a high level understanding of computer programming is recommended, in addition to books on the specific languages you are looking to pursue.

  9. Of course you are entitled to your opinion and you are free to develop in any way that you want, but to say

    I recognize the points made and some really good ones here on regards to using tables, but I just don't see the use of tables ever dying out , which appears HTML 5 is trying to go in that direction.

     

    Is just not an accurate fact.

     

    The intent by the standards team was to provide better ways to express, semantically, what developers were using tables for, with more meaningful alternatives that in and of them selves are better for all the reasons already mentioned. So just be clear that tables do have their use, however just not for the same reasons as 15 years ago, is all. The web changes and evolves and I think on the topic of tables for layout in particular, all here will agree it was for the better.

  10. You haven't added any error reporting. I would start with that. Are you making sure $_POST['domainname'] is being submitting correctly from your form? Where does the code go from there? I would add more echo statements and trace all steps of your code execution.

  11. One thing worth noting that I believe applies is SEO / page ranking. A search engine like Google will be more likely to promote a website that uses semantic elements to describe the layout of a page over one that uses something non-semantic like tables. Tags like header, nav, footer, article, h1-h6, p, etc more accurately describe the content of your page. This can also benefit users who may accessibility issues as screen readers will most likely favor content rendered semantically. Tables are, unsurprisingly, for tabular data. In the past they were all we had so we used them. The web has advanced in years to support better definitions of standards and separation of concerns, and now all you really need is some valid and semantic HTML and some well structured CSS and you can easily create a site that is responsive, easy to maintain, and scalable.

  12. JavaScript (including AJAX) runs in the browser. The browser is responsible for supporting the language spec and features. The server is what hosts the static assets (HTML / CSS / JS) and returns them in response to a request from the browser. The browser, after getting JavaScript returned, will execute it, just like it will render HTML / CSS.

  13. definitely need to see some code for this, and ideally screenshots of your network tabs showing these requests, because I'm not sure what you are trying to say.

     

     

    Are you saying your project reads a txt file from the server via AJAX and outputs the response into a <div> but that's not working on mobile?

×
×
  • Create New...