Sorry but this is a small rant about the company I'm currently working for. I'd complain to my boss but since I've only had the job since the beginning of July and they're letting me learn PHP and MySQL on-the-fly I can't really complain too awful much.
I'm sure I mentioned a bit about this another time this forum but this company has a complete client specific website written in PHP (version 3.x or there abouts) and MySQL (some version prior to any 4.x). Every single page is written in such a way that printf's are used to output every single line of HTML. Even if it's a static line that never changes it's done this way (90% of the all of the pages are static). They also make extensive use of html table statements (no CSS whatsoever).
When I first started and noticed this practice I assumed that it was because the people that wrote the site (and still work here) only learned enough PHP to get the job done because the website is actually secondary to their actual product here. They continually complain about web pages loading slow.
When I started they new that I also did not know PHP nor MySQL and they were more than willing to allow me to learn on-the-fly. So, not realizing that they were using such old versions of PHP and MySQL I learned/am learning PHP4/5 and MySQL4. They give me my first assignment and I code it accordin to what I was learning and my own programmer preferences that had done me very well for the last 10 years in other languages. I test it out and that's when I realized what versions they were using. So I ask why they aren't using newer versions and the answer I get is because they're not convinced that the security is really all there with the newer versions.
I try to tell them that the newer versions are more secure (or at the very least just as secure) as what they're using but they don't want to change but said they would think about it for sometime in the future. That should've been my first clue as to the thought process of these people but I just didn't catch it.
I then ask why they use printf's exclusively. The answe was a two parter. First, they seem to think that printf's are more secure than any other similar statement like echo's. Second, they like the thought that they can format the output even though 90% of every page is static and does not change at all. Once again I try to tell them printf's are no more secure than any other similar statement and that echo statements I believe are a little bit faster than printf's. It was about two weeks ago that I finished my first project they gave me and I coded with echo statements. The code looked nice from a programmers perspective even though I had to use a lot of tables, especially compared to other pages with all of their printf statements and tables. For my next project I needed to grab a certain part of the page I created back then because it was basically being duplicated for this new project. For some reason or another I couldn't find the my copy of the previous web page so I grabbed the one from our webserver. When I opened it up I find out that they didn't like my echo statements and took the time to basically rewrite my nice and neat code to be all printf's and no formatting whatsoever.
The thing that really gets me is that they never said to me, "You must code all pages with printf's" and I'm the type of guy that won't do something that even appears to be a standard if it's not explicitly told to me or written down in some kind of standards manual, especially if I think it's bad coding practice.
Man! I'm going to go nuts if they actually come back and tell me to code that way. I had hoped that I would be able to stay with this company for the rest of my career but it's now beginning to look like I'm only going to stay here for a year or so. Just long enough to say that I have some good experience with PHP and MySQL so that I can go out and work for a company that actually has decent coding standards and uses at least somewhat newer versions of the languages.
Ok. Sorry, it turned out to be a long rant.
I'm sure I mentioned a bit about this another time this forum but this company has a complete client specific website written in PHP (version 3.x or there abouts) and MySQL (some version prior to any 4.x). Every single page is written in such a way that printf's are used to output every single line of HTML. Even if it's a static line that never changes it's done this way (90% of the all of the pages are static). They also make extensive use of html table statements (no CSS whatsoever).
When I first started and noticed this practice I assumed that it was because the people that wrote the site (and still work here) only learned enough PHP to get the job done because the website is actually secondary to their actual product here. They continually complain about web pages loading slow.
When I started they new that I also did not know PHP nor MySQL and they were more than willing to allow me to learn on-the-fly. So, not realizing that they were using such old versions of PHP and MySQL I learned/am learning PHP4/5 and MySQL4. They give me my first assignment and I code it accordin to what I was learning and my own programmer preferences that had done me very well for the last 10 years in other languages. I test it out and that's when I realized what versions they were using. So I ask why they aren't using newer versions and the answer I get is because they're not convinced that the security is really all there with the newer versions.
I try to tell them that the newer versions are more secure (or at the very least just as secure) as what they're using but they don't want to change but said they would think about it for sometime in the future. That should've been my first clue as to the thought process of these people but I just didn't catch it.
I then ask why they use printf's exclusively. The answe was a two parter. First, they seem to think that printf's are more secure than any other similar statement like echo's. Second, they like the thought that they can format the output even though 90% of every page is static and does not change at all. Once again I try to tell them printf's are no more secure than any other similar statement and that echo statements I believe are a little bit faster than printf's. It was about two weeks ago that I finished my first project they gave me and I coded with echo statements. The code looked nice from a programmers perspective even though I had to use a lot of tables, especially compared to other pages with all of their printf statements and tables. For my next project I needed to grab a certain part of the page I created back then because it was basically being duplicated for this new project. For some reason or another I couldn't find the my copy of the previous web page so I grabbed the one from our webserver. When I opened it up I find out that they didn't like my echo statements and took the time to basically rewrite my nice and neat code to be all printf's and no formatting whatsoever.
The thing that really gets me is that they never said to me, "You must code all pages with printf's" and I'm the type of guy that won't do something that even appears to be a standard if it's not explicitly told to me or written down in some kind of standards manual, especially if I think it's bad coding practice.
Man! I'm going to go nuts if they actually come back and tell me to code that way. I had hoped that I would be able to stay with this company for the rest of my career but it's now beginning to look like I'm only going to stay here for a year or so. Just long enough to say that I have some good experience with PHP and MySQL so that I can go out and work for a company that actually has decent coding standards and uses at least somewhat newer versions of the languages.
Ok. Sorry, it turned out to be a long rant.