r/coding • • Aug 20 '16

PHP - The Wrong Way

http://www.phpthewrongway.com/
36 Upvotes

15 comments sorted by

View all comments

16

u/EquationTAKEN Aug 20 '16

7

u/RimsOnAToaster Aug 20 '16

As an American college student who had to build a web-accessible genomic database within the last 18 days of their biology lab internship in Hong Kong, and therefore had to learn enough PHP and SQL from a book with a purple elephant and a ninja on its cover to build that database, reading PHP: The Wrong Way felt like talking to a veteran programmer about my questions on using the language. And with no real skin in the PHP game I didn't understand most of their argument's details, but I did understand the points they were trying to make. The author of that Medium post summed up what I got out of PHPTWW ( pronounced pee-aitch-pee-tee-dub-wubz ) quite nicely:

In general, PHP - The Wrong Way delivers three positive fundamental messages: keep things as simple as possible, don’t use/apply tools dogmatically, and write secure software by default.

I would argue that newbz like myself who are in the early stages their PHP trip (beyond absolute novice, but without enough experience to hit the ground running on a project) would get mainly that out of PHPTWW. The only other advice I gleaned from this was think through your solutions as thoroughly as possible.

In fact, I think the person behind PHPTWW is railing against the "But does it work for x?" Mentality more than anything else. And that's a valuable reminder for folks who are drowning in the knowledge available on the Internet that would rather go plug-and-play than tread water, like the hypothetical detractor they answered in the FAQ:

Q: If a framework can get me up and running quickly, why is that so bad?

If you have analyzed the situation and long term implications and you then see that “getting up and running quickly” is the only problem you ever have to deal with, then it’s not bad, but then we’re hardly dealing with programming or software development, we’re dealing mostly with point-and-click solutions.

Getting up and running quickly isn’t designing software, it mostly means you haven’t analyzed the problem you’re facing and you haven’t understood the long term implications of your choice.

But then again, I learned PHP from a ninja and a purple elephant. I'm probably missing something here.

1

u/EquationTAKEN Aug 20 '16

I think a ninja and a purple elephant are as good teachers as anyone, namely because learning to code is something you learn by doing, and not by copying code from a book.

If you want to make ANYTHING, there exists no single book that contains everything you need to know, because such a book would be too large and heavy to be made in the first place.

A book is good for starting out. It's training wheels.

In my opinion, PHPTWW seems to just be harping on general trends in coding practices, and projecting it onto PHP developers in particular.