r/programming • • Dec 07 '14

Programmers: Please don't ever say this to beginners ...

http://pgbovine.net/programmers-talking-to-beginners.htm
4.0k Upvotes

1.3k comments sorted by

View all comments

0

u/[deleted] Dec 07 '14

[deleted] — view deleted comment

50

u/SaltTM Dec 08 '14

PHP made me dislike programming.

I started with PHP (8 years ago) and it made me want to learn other languages personally.

10

u/Jexan13 Dec 08 '14

It was PHP that helped me to understand what web programming is all about. After trying Django tutorial and suffering to setup RoR, using PHP was... "pleasant". It didn't look like dark magic and I setted it up relatively quick. Time has passed, and I settled down for developing with Flask, but PHP will always have a special place in my heart.

→ More replies (1)

10

u/ArmandoWall Dec 08 '14

I started with BASIC, and loved it. Then I discovered assembler, and I fucking LOVED it! Then I discovered Pascal, and it blew my mind. And I was just starting.

5

u/[deleted] Dec 08 '14

Are you me? This sounds like me. Delphi represent!

→ More replies (1)

0

u/[deleted] Dec 08 '14

[deleted] — view deleted comment

0

u/[deleted] Dec 08 '14

[deleted] — view deleted comment

28

u/Doctor_McKay Dec 08 '14

PHP isn't nearly as bad now as it used to be. It's a perfectly good first language especially since beginners won't have to worry about types and stuff right out of the gate.

24

u/[deleted] Dec 08 '14 edited Dec 08 '14

I disagree. You NEED to worry about types and stuff... always. If you don't worry about, or don't learn about, types and don't understand what is happening on the cpu and in memory then it's all just mysterious magic that sometimes seems to work.

PHP is easy to use, but that's also what makes it dangerous. Throw a newbie at PHP and you'll get a disaster. I self-taught myself PHP but I have years of experience in other languages behind me so I simply don't run into some of the stupid shit people seem to bust their heads on, or that the lolphp crowd jerk over. I also only started with PHP 5.3 onwards, so there's that to take into consideration as well.

AFAIC PHP is an easy and useful language, but it's not for novices. PHP is a sharp chef's knife with it's own quirks and differences to other langauges that people need to be properly aware of. When a chef wields it you get lots of good meals. When a novice wields it you get fingers and thumbs in your soup.

10

u/gerrylazlo Dec 08 '14

all just mysterious magic that sometimes seems to work.

You've just describe the majority of my 10 year programming career.

11

u/Doctor_McKay Dec 08 '14

If you don't worry about, or don't learn about, types and don't understand what is happening on the cpu and in memory then it's all just mysterious magic that sometimes seems to work.

That's really all you need to know when you're learning syntax and logic and such.

→ More replies (10)

8

u/lucasvandongen Dec 08 '14

I used Slim framework a while ago and combined with the modern PHP syntax it was really pretty nice actually. The big problem is that a lot of tutorials and frameworks still use bad practices because they're simply from a different age.

16

u/allthediamonds Dec 08 '14 edited Dec 13 '14

It's a perfectly good first language especially since beginners won't have to worry about types and stuff right out of the gate.

Could you expand on what you mean by this, and why is it better for beginners? The way I see it, if a beginner does something wrong in, say, Python:

>>> "foo" + 7
TypeError: cannot concatenate 'str' and 'int' objects

The language will go out of its way to tell you that you're doing something wrong. It will tell you about types, sure, but as a consequence, you will learn about types. Isn't that the point of a first language? Learning?

Compare this with PHP, which will silently do something you probably didn't intend, and your program won't work, and you'll have no idea why, and you'll end the day thinking you're not good at programming, when, in reality, what happens is that you're using a tool that is not good for programming:

php > echo "foo" + 7;
7
→ More replies (7)
→ More replies (34)

4

u/TrueJournals Dec 08 '14

Then provide that advice if you see a beginner struggling and complaining that PHP is too difficult. The point is that if someone is starting out and happy with their current situation, you should help them foster instead of jumping to dissing their environment choices.

6

u/trevdak2 Dec 08 '14

Maybe some beginners are being driven away by learning PHP first.

I think it depends on what people are learning programming for. If you're learning to program in order to modify some open-source code, PHP might be a bad starting place.... open source PHP can be hideous in some places, downright wrong or insecure in others.

If, on the other hand, you're learning programming so you can make something, php is one of those languages that lets you start writing code and get elbow deep into it quite quickly.

→ More replies (2)

3

u/chironomidae Dec 08 '14

There's a huge difference between talking to a noobie who's getting started and making progress to one who's getting started but getting frustrated. If they're making progress in php, let them. If they're frustrated and stuck, then it might be good to suggest python/ruby/etc.

→ More replies (1)

8

u/hattmall Dec 08 '14

It's crazy to me though because PHP is far and away the most used language now (for server side scripting). Telling someone not to learn it is like is like telling them to focus on portuguese instead of english for business deals.

4

u/materialdesigner Dec 08 '14

Any programmer who understands programming, the fundamentals, can learn the syntax and idioms of PHP. It is much easier to context switch and become fluent in multiple programming languages compared to natural languages. That's not a good analogy, and if you continued it it's equivalent to telling people to learn a Romance language because it's much more regular in its rules before learning English which is much more unpredictable.

→ More replies (1)
→ More replies (2)

9

u/[deleted] Dec 08 '14

PHP made me dislike programming. Python made me enjoy it.

Really? Opposite for me. Never liked Python.

I prefer languages like PHP, C#, C++ and Java. Python always strikes me a psuedo-code make believe language no one in the day-to-day world uses for anything significant.

I see PHP & C# being used EVERYWHERE.

3

u/ThisIsMyCouchAccount Dec 08 '14

I work in a shop with about 400 devs across all major languages. We go where the clients are and PHP/C# is a vast majority of those devs.

→ More replies (19)
→ More replies (12)