3 ms·
How PHP ruined my life as a software developer
- lutusp 14y agoIt sounds like PHP is to the teens what BASIC was to the 1960s. From BASIC Considered Harmful, by Edsger Dijkstra: "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." This isn't meant to disparage the author of the linked article, who I suspect will recover from PHP -- in due time.
- pouzy 14y agoI have been moving towards new horizons for quite a while now, which made me realize where my issues came from. So yes, there is hope ! :)
- Pengwin 14y agoI mostly agree with the article, but my opinion of PHP is that it is a language that allows you to write bad code, but you can write good code in it. With regards to the example: $ php -a Interactive shell php > echo "I'm your father" + Luke + 2 + $nothingtosee; PHP Notice: Use of undefined constant Luke - assumed 'Luke' in php shell code on line 1 PHP Notice: Undefined variable: nothingtosee in php shell code on line 1 2 So the output is true, but you are given error notices. Back when I started PHP I thought nothing of notices (I also had no way of seeing them as it was all uploaded to a shared hosting environment and error_reporting was set to hide them). After years of programming websites and maintain code of people who were in my position before me i started to realize what got you in to trouble later on. I ensure that numbers are numbers, and not strings, and assume that all unknown type variables are strings. PHP as a language also does not expose you to anything low level, but that is what scripting languages should do. They are not for the Applications that work all day, they should execute, give you the result, and be gone.
- _vn5r 14y agoI usually stay away from PHP trashing articles (I'm a php dev), but I completely hate the misleading and incorrect title on this one. I started learning programming when I was 10 with the C How to Program book, and later switched to PHP because it was more USEFUL for me at the moment, and it still is. I've started learning Ruby (and RoR) and node.js, and I love them, but PHP gets the job the done pretty well. It is not PHP's fault that he's lazy, avoided compiled languages and went after cisco stuff instead.
- rosenjon 14y agoAnother way to look at this is that PHP enabled you to build a website with 100,000 users with little to no programming knowledge. I doubt it would have been possible to hack on the same forum if it was built in C and needed to be compiled to run. These debates come up all the time here. PHP is a really good introduction to programming, and for people who aren't programming just for programming's sake (i.e. want to build something), it provides the easiest entry point to do that without a formal CS background. It provides a shallow end for self-taught programmers. As for it spoiling your future programming efforts, I don't see why that should be the case. It doesn't prevent you from learning strong typing, strict OO, pointers, etc. That just takes the intellectual curiosity to go beyond your comfort zone.