Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. A good design principle is that you should code as though the person who is going to read your code is a maniac serial killer who knows where you live...
  2. No, I did not. It's entirely dependent on what purpose your website serves.
  3. No, an API, Application Programming Interface, is for developers to use. It has nothing to do with hackers, but one would obviously not give raw access to the database. That would be incredibly insecure and downright stupid.
  4. Parse it using the DOM extension or use regular expressions.
  5. The benefit of a web service is that you can give external access to some of your data without giving direct access to your DBMS.
  6. You only need to create an API if you actually need it. It won't improve your performance though.
  7. Or you know, remove the cookie.
  8. I think you've misunderstood the mixed PHP/HTML thing. Mixed PHP/HTML thing is no problem, but mixed presentational and business logic is.
  9. Try to check out the MVC pattern. It'll solve your issues with where you should place your code.
  10. IIRC it'll give a warning that complains about the fact that you are using $this outside an object context.
  11. I agree with thorpe. I think template engines are overkill and do not add any value to the development work flow.
  12. Though of course you can use Javascript on the server-side.
  13. Only Google themselves could tell for real, but I seriously doubt this is the case. Many websites do not validate yet rank just fine. Nevertheless, you should always make sure your markup validates. Just out of wonder, what are they? I only stick with XHTML because it sounds cooler than HTML I've never actually researched the specific details. I obviously know that it's cleaner, stricter, and requires shorttags, but that's it... Well, first of all, Internet Explorer does not support XHTML at all. According to the W3C specifications, for a page to be rendered as XHTML it must be served as application/xhtml+xml, however, if you do this to Internet Explorer the user will simply be prompted to download the page because IE doesn't know what to do with it. If you serve it as text/html then it will be parsed as HTML, not XHTML, by the browser and you are as such not really using XHTML even if you have an XHTML DOCTYPE and use XHTML syntax. Secondly, due to XHTML being based on XML, you will have to deal with its draconian error handling. This means that upon finding even the slightest syntactical error in the markup, the parser will halt and present an incredibly unfriendly parse error message to the user, i.e. render the entire page useless. This of course only happens when you actually serve it as XHTML using the Content-type header though. XHTML is neither cleaner nor stricter than HTML. The HTML 4.01 Strict DTD is just as strict as the XHTML 1.0 DTD. I'm not sure what you mean by cleaner though. I don't see why it's cleaner. If you use true XHTML then you will already have blocked off the majority of internet users (i.e. users who use Internet Explorer) and you risk very easily making your pages entirely unusable to the rest of your users. If you don't serve it as XHTML then it'll not be treated as XHTML and you could just as well have written it as HTML. That's plain simply incorrect. They're both being worked on alongside each other. XHTML is in no way a replacement for HTML. There are a lot of misconceptions about XHTML and HTML based on cleanliness, strictness, newness, coolness, whateverness, etc. Most of it is entirely untrue and shows that many people do not truly understand the technologies they are using.
  14. In regards to SEO it's completely irrelevant. There are other considerations to take when choosing between XHTML and HTML though.
  15. Yes I do. To some extent anyway.
  16. I don't know how to convert it to your school system. In total, I'm about ending my thirteenth year in school, and this particular education, which spans over three years, only serves the purpose of granting access to higher education such as universities. This summer I'll start studying CS on the university. Translate that as it fits best to your country's educational system. Wikipedia says that U.S. high school ends at "12th grade", so I suppose this is late high school and early college. Anyway, this on third and last year.
  17. It differs from employer to employer. Some people have long days mixed with short days while other have it laid out more evenly. I don't work, but go to school, so my weekly schedule is very unevenly laid out and often changes. Obviously my hours in school cannot be compared with a regular full-time job though.
  18. In Denmark, a standard work week is 37 hours.
  19. As soon as you take any calculus classes you'll realize that absolutely precision is unnecessary, and indeed in many cases impossible. Which number is for instance closest to 0? 1? How about 0.1, 0.01, 0.001, etc.? Even the number you you say is the "real number" is in fact not "real" in the sense you use the word. It's just a matter of how accurate you bother to be. Anyway, check this out: http://www-cs-students.stanford.edu/~tjw/jsbn/. I haven't used it myself, but it came up on a Google search result page.
  20. Daniel0

    start LAMP

    They're distro specific and only work if there are existing init scripts available for those.
  21. Do note that it doesn't happen automatically. It's only when you are using prepared statements it'll do it.
  22. Well, the thing is that it's not "wrong", at least not syntactically. It's just not OOP. In OOP you can put an emphasis on the second "O" (oriented), that is, the code revolves around objects and their interaction with each other, it's object oriented.
  23. Oh sorry, I think I read your first message wrong. I read it as though the browser wasn't resetting, but you wanted it to. I suppose you then just could redisplay the form below the graph to the user. In that way you eliminate the problem by not having to go back in the first place.
  24. The biggest problem is that people fail to see that object oriented programming is an entirely different paradigm than imperative programming. It's not possible to do a 1:1 conversion on every single line to convert an imperatively written program to an object oriented program. In most cases it would constitute an entire rewrite.
  25. Which in return means you'll be required to go through all your code and make a lot of replacements.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.