Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The motivation behind developers dissing each other for their chosen field of work and their tools is absolutely puzzling, and it does real harm. Nobody would assert that printf("hello world!"); epitomizes systems programming, yet print($foo); is apparently considered synonymous with web development and lowest of the unspeakable arts.

Inept programming can be found all over the place. A newbie program doesn't magically get better because it's a kernel module written in C, anymore than it gets magically worse because it's a guestbook script written in PHP. The astonishing thing is this goes arbitrarily deep in the tech taxonomy tree: Ruby on Rails is considered a pro-grade environment, even though it's partially focused on mitigating newbie mistakes. PHP is considered a beginner-grade toy, despite the comparatively vast expertise one needs to write correct code in it. The web is a stupendously complex thing to write software for, there is nothing low or trivial about it.

When I was relatively young in the late nineties, my contact to other programmers was extremely limited. I was working at an ad agency, where I developed and maintained an in-house DSL for web programming. When the second full-time developer was hired, their first move was to diss pretty much everything I had made. "How can you write a web framework without regex?" "A document-based database? Abomination!" "A stateless server? That's crazy, why didn't you write a persistent app server?" "A real programmer uses Emacs"

Over the years, this mode of interaction still exists. Most people avoid it by hanging out only with developers who use the exact same stack they do, and when the winds shift they all switch together and pretend the old tech never existed. We had the chance, as a programmer subculture, to leave this ridiculous and arbitrary in-group/out-group stuff behind, but instead we embraced it and turned it up to eleven.



> PHP is considered a beginner-grade toy, despite the comparatively vast expertise one needs to write correct code in it.

As someone who's built a career on (mostly) writing PHP, this this this. It is indeed incredibly easy to write "working", terrible, insecure PHP. Honestly, people who write garbage PHP would write garbage rails/python/node too, because the errors fall into a few buckets:

1. Not using a framework's API/reimplementing boilerplate poorly.

2. Not paying attention to user-generated input (escaping, etc).

3. Not using best practices for major tasks (e.g., manually mysql_connect()'ing instead of using PDO)

4. Failures in logic ("brain farts").

These problems are the same in any language. If you CBA to pay attention to the basics in PHP, you won't do it in rails either. Blame the programmer, not the language.

The counterargument is that some languages won't let you make these mistakes, but the counter-counter is that those people would make those mistakes if they could, which is not really an improvement IMO.


I think the real counter argument would be: why would you use a language where it's easy to screw up in subtle ways as opposed to a language that makes it much harder to screw up, if all else is roughly equal. PHP is a minefield in ways most other languages aren't. Part of writing fewer bugs is setting yourself up with tools and practices that make writing bugs harder.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: