161 comments

[ 4.6 ms ] story [ 272 ms ] thread
Agreed. you have to start somewhere. I started with GW Basic. I didn't have access to a better compiler at the time, but I was able to do stuff. Later, a friend gave me a Pascal compiler, then I learnt C/C++.

It's a lot easier nowaday, with internet and interpreted language in your browser.

Oh man, this is the first time I've ever heard someone else reference GW basic.

When I was 10 or so I convinced my parents to let me put the ibm 286, which previously was sitting in their closet, in my bedroom. (At the time we had a newer computer with windows 98, this would have been just before XP would be released iirc)

GW basic on that 286 was where I taught myself the basics of programming. That takes me back.

Nice :)

I had an even older computer, a Tandy 1000. I had to boot MS Dos 6.2 with a 5"1/4 floppy disk. GW Basic was kinda the only thing I could do. Later, my father got me QBasic, which was nice since I didn't have to input each line numbers :p

now you've gotten our attention. :) feels like it sucks!
Most programmers my age (I'm 37) started with BASIC. We should all be terrible if the language you start with would be so fundamental. The only thing that matters is actually to start with something, and to improve over time.
I think we (I'm 36) should also bear in mind that we'd probably be better programmers if we were starting out today. HTML + CSS + JS + PHP is worlds ahead of the rubbish we were using!
As someone who learned MS BASIC 2.0 -> 6510/6502 assembler -> Pascal -> C -> etc, I know we'd be more immediately productive, but would we necessarily be "better"?

I run into a fair amount of programmers these days who never worked with a non-garbage collected language, have never even seen an assembly language listing (let alone written code in assembly), etc who are generally productive but end up being really lost whenever whatever leaky abstraction their language/framework/etc is using inevitably breaks in some way and in this situation if the solution to their problem isn't immediately Google/StackOverflowable they are standing in front of a brick wall because they've never worked in a language or environment that wasn't abstractions upon abstractions over how computers actually work at a fundamental level.

I'm sure there is some amount of get-off-my-lawnism going on here and I know it isn't universal (there are still young kids writing real bare metal bit-banging code, especially in the maker/"IoT" space), but I think that while highly programmer-time-productive languages and frameworks are great we're still at a point where those skipping over the fundamentals the technology is built on do so at their own peril in terms of how effective they can be when things don't go as planned (and in software things rarely go as planned).

> writing real bare metal bit-banging code

Well, there are plenty of microcontrollers running on Javascript/Ruby/etc, so if people are still writing "real" code, it won't be for long.

Just to clarify, the "real" I used was a qualifier for the bare metal code description.

I'm not suggesting JS/Ruby/whatever code isn't "real" code, but it is pretty common to see people talk about some JS/Ruby/etc code being "bare metal", totally abusing the classic meaning of the term.

Examples (just a couple out of many dozens I've seen over the past few years):

http://video.kiberpipa.org/jsmeet_slavic_performance_optimiz...

http://www.hyperscala.org/

Efficient JavaScript is great! But it isn't bare metal programming.

Also people will be writing low-level C/asm code on small devices for quite a long time yet. While it is great that you can get small "IoT"-style devices with the power to run a JavaScript interpreter, such SoCs are still really expensive by "chip whose cost must be factored into every device manufactured" standards.

Computers are themselves abstractions upon abstractions. How many levels of cache does a modern computer have? How many memory protection layers exist between your code and the machine? Hardware keeps getting more complex and it becomes obsolete quickly.

It's hard to teach this stuff to beginners because it will probably be useless by the time the get good enough at programming to do anything. Add to that the fact that there are probably 15,000 different platforms all doing the same things in subtly different ways .

PS: 'subtly' is a horrible word.

No I don't agree. HTML + CSS + JS + PHP (and also probably + SQL) is a lot of layers and languages to get your head around as a beginner. A single simple environment (e.g. Python or even BASIC in a REPL) is going to be a lot easier to focus on.
No, I don't agree, I never managed to "study" programming using an editor and a compiler. I always had to have a reason. I read, poked away, tested, got burned, read, poked etc.

That kept me focusing. And, I learned it and mostly got better grades than the "student" types as well. (B.Sc Computer Systems).

Generally it seems for some of us it is easier to focus once things make sense and has a purpose.

"Studying" seems to be for people with infinte lifespans and neverending funding, I never had any of those and I guess it affects my learning style ;-)

30 and started with QBasic. Yeah yeah... i heard it was terrible at the time but i didn't have internet to get a real compiler or language. Had a lot of fun though. nothing anyone told me could stop me.

Also, if i wanted to make windows programs, Win32 was an impossible beast to me. I, to this day, still have no idea how that mystical beast works even though I've coded a few programs in it. Some of these "frameworks" can be a little code heavy and have lots of technical details (MVVM and WPF come to mind) They are completely overwhelming while php and basic are simple and have little magic. That said, if i were to have a child soon, I would teach her racket using SICP.

>Just let them first learn something (anything!!!) to get hooked onto the potential of programming, and then you can offer to show them the true light later.

pgbovine nailed it. I learned this lesson from mathematics (I studied math in college and theoretical CS in grad school): the best math teachers always introduced a new concept/idea using a "toy" example. A toy example may not have the full generality of the overarching theory/idea, but it has all the essence without any of the abstract inaccessibility.

I try to apply the same lesson when I teach people data analysis: I learned (through my time as a quant on Wall Street) that a lot of people feel very comfortable in Excel but find other data analysis tools (SQL/R/Python) too abstract/scary. So, instead of telling them "Oh, you should use Pandas with Postgresql" or "that stuff can be done better using R", I show them what the equivalent operation looks like in Excel first, then show them how they can be done in SQL/R/Python (See, for example, this: http://blog.treasuredata.com/2014/12/05/learn-sql-by-calcula...)

John Foreman's book _Data Smart_ follows the Excel-first methodology, and I've been appreciating how well this separates the data analysis from the toolset choice.
Yea, I am a big fan of that book. I tend to think of it as a well-executed troll against the fad-driven, toolchain-crazed "data scientist" communities.
Visual Basic 3 for me (although I did a bunch of BASIC on commodore64 in the early 80s).

There weren't that many high/entry-level languages back then, though. The argument that BASIC is terrible notwithstanding, it was often either that or a very low-level language.

Hell, I'm 22, and the first few years of my programming life were with TI-BASIC.
TI-BASIC, as in TI-99/4A?

How many times did you lose your work due to a fat-fingered FCTN-= instead of SHIFT-=?

At least that prepared 6 year old me for the adult world of "rm -rf . *".

I made a blackjack program on my TI-85 (with real arrays of suits!) that took 5 minutes to compile...
Probably TI-89 or TI-83+ graphing calculator BASIC, given his age.
You never know. I finally took my 99/4A to the recyclers just a few years ago. Had had it since new in high school, and it still worked.
IIRC if you had the Extended BASIC cartridge you could poke a value in a certain address and disable the FCTN-= action (which was an immediate reset of the computer, losing any unsaved work).
TI-83+ for me; the TI-99 is a decade older than I am.
30 years old here, started off with TI-BASIC on a TI-83 that I beat the crap out of.
I'm in my late 20s and started the same way. Ended up leading to my first entrepreneurial pursuit - I made money by coding games and getting friends to pay me to put them on their calculators.
I'm 50, and started with BASIC on a mainframe timeshare system. The following Dijkstra quote is proudly displayed on my cube wall:

"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."

I would actually go a step further with the thread title: Please don't try to teach if you can't.

When I talk to junior (or senior) folks who are learning to program, it will become evident that I've chosen different tools than what they're learning. So the discussion of tool choice is inevitable, especially if I have to admit that I don't know the language they're learning. My typical advice is to choose something that is presented with good learning tools, and maybe one that has tutorials related to a subject matter that they're interested in.

I was about to quote this quote, but I have a different opinion here.

> I would actually go a step further with the thread title: Please don't try to teach if you can't.

The line between teaching a truth and teaching a self-enforcing belief pattern has not been drawn, and I don't know if it ever will be. You can be an amazing teacher and not even know it (by making horrible mistakes that other people learn from by observation, comparison, abstraction, and analysis). Or you can be a really amazing teacher and never admit it.

> My typical advice is to choose something that is presented with good learning tools, and maybe one that has tutorials related to a subject matter that they're interested in.

That's good advice.

>>>>> The line between teaching a truth and teaching a self-enforcing belief pattern has not been drawn, and I don't know if it ever will be. You can be an amazing teacher and not even know it (by making horrible mistakes that other people learn from by observation, comparison, abstraction, and analysis). Or you can be a really amazing teacher and never admit it.

Great points. Thanks.

After 14 years of java programming which was really the language I started with, I can say that quote applies to java and perhaps any language that's not assembly, C, C++. I think every beginner should be strongly encouraged to start with C.
To start with assembly is great if one wants to learn programming instead of building websites.
It's tough being smart and influential: your [Dijkstra's] successes and mistakes end up going through the same megaphone.
That's certainly true. I keep the quote, as a conversation starter if for no other reason. And I can't claim to have proven Dijkstra wrong. ;-)
I taught myself to program in .NET (VB and C#) this year and I've really enjoyed it. For someone who lacks the perspective of a seasoned programmer, I am routinely blown away by how easily you can incorporate .NET libraries to do cool stuff. One example - Microsoft has a standard speech recognition library, which works well for constrained grammar. As such, a desktop app with voice recognition was very easy to do.

For a variety of reasons, prior attempts at C++, Ruby, PHP never took hold for me. The main reason was I had no compelling project to complete (I have a few now, related to work). Yet, looking back on these episodes, and the experienced programmers will surely laugh, but getting a basic environment up where you can write code, build and deploy is difficult for the uninitiated, if you start on Windows as I did.

Later, with a mac, I did the first 1/3 of the one-month-rails course, which actually saw me through to creating a working ruby environment. There's lots of domain expertise which makes ruby inaccessible to the newb, not the least of which is that the most common IDE is a glorified text editor. Compare this to all the "spell-check" equivalents in Visual Studio.

anyway, now that I have a foot-hold somewhere in programming, I have a frame of reference to look up (and mostly down) the stack. Looking forward to learning more.

I've never met a language that isn't broken in some way. They're tools—my only real advice to beginners is to branch out once you get a handle on your first language.

My first language was MBASIC on a Kaypro 2, because that's the toy my family had to play with. When I branched out (from QBASIC), I first found assembly—first, for the 8085/Z80, because the public library where I grew up sucks at life.

Thankfully, the Internet happened, and I found information about x86 assembly—but better than that, I finally got my hands on more than one C compiler. Then, I discovered Linux and found Perl and Python. Somewhere in this timeline I also found Java, which turned out to be a great way to bring a 486 to its knees.

I'm glad I took this drunkard path through programming. First, I learned how my machines actually work. More importantly, I learned all languages are made of trade-offs. C++ is nowhere near perfect, but it lets me get work done at the level of abstraction I choose, which turns out to be a win for the things I do. But it's definitely not for everyone or every project.

Most importantly, I got a gentle exposure to programming, followed by a series of challenges that taught me without demoralizing me, allowing me to build myself up to the point where C++ seems like a relatively tame beast.

Edit: One of my favorite books ever (http://www.dspguide.com) presents code in BASIC as a least-common-demonimator language. Even a limited tool like BASIC can do amazing things.

what??? my language isn't broken!!!
I'm 32 and started with QBasic in DOS in 1994. After creating a program that reached 1000 lines of code (which I considered enormous at that time) I started to feel the limitations of the language. I then got a hold of a compiler for basic which sped things up a bit but went on to teach myself C. I was blown away by the improvement in speed! After the equivalent of "hello world", I created a minimal basic interpreter as my first C project which taught me a lot about the differences as well as a wide range of tasks in C that had little external dependencies (didn't have to deal with drivers or graphics). While the patterns I learned in BASIC weren't ideal, it was enough to give me the love of programming and and a lot to appreciate about the power of C. Then I got into web dev and was writing CGIs in C/C++ (even to the extent of generating jpeg charts from dynamic data). When I later discovered PHP I was ecstatic that I didn't have to recompile every time and db interfaces were so easy! It's all been a fun learning journey. I now also work with Rail and Node.js and embedded C/C++, and no, I no longer use SSI or CGIs, most definitely not in C!
Everything you say is good but the PHP part. It's just like telling your own kid to not touch poop, you have to say it.
I'd be very surprised if you really knew much about PHP.
https://github.com/coinkite/coinkite-php/blob/master/sign.ph...

You can be the judge of their PHP skillz :P

We don't do PHP. If you are so great, why don't you do a Pull Request.
> We don't do PHP. If you are so great, why don't you do a Pull Request.

Your post seems rather hostile and I don't think it's warranted.

First, you call PHP poop.

Then someone expresses doubt that you use PHP at all.

I then linked this person to a repository in your github that is written in PHP.

Thus, my actions were disproving the implied statement in "I'd be very surprised if you really knew much about PHP."

At no point did I say I am "so great".

Calm your jimmies. They are rustled thoroughly and for no good reason.

Meh. I wouldn't try to sway them away from PHP, but I'd try to get them to try something else as soon as possible, and make the introduction to the language an overview of harmful PHP-isms (i.e. explaining the difference between arrays and objects, how equality works on a non-fucked language, showcasing a standard library that isn't a minefield, etc)
I've heard this anecdote told for years, over a decade, but I've never heard it occur in real life. Has anybody, really?
Variations of it. It could also be something as simple as "You don't know how do to XYZ in JavaScript?! It's like 101!" Either way - encouragement/mentoring is always good.
When I was younger (13-14) I started playing around with VB5 completely organically to try to build an application that would manage photos (my father has a photography business).

I was discouraged against both the programming in VB (it's beginner stuff and you can't make anything good with it, was the basic message) as well as against building/finishing the image view/organization tool (at the time ACDSee was all the rage, and I was going for something of that nature).

Well, sadly, that was all I needed to hear to realize that I was going down the wrong path and if I wanted to get into programming I would have to wait until college.

Thankfully I found PHP (gasp) a few years later.

I've had it happen to me. My mentor was going over a perl program of mine, showing me some beginner mistakes, and I was making good progress in understanding where I went wrong. Then a friend wandered in, sat in the loungeroom, and started throwing out abuse at perl and how it was a stupid language etc. Focus completely broken, and no more progress was made, because this guy just had to abuse language X to a beginner learning it.
You must have missed "PHP: a fractal of failure" or the endless rounds of sniping whenever a university changes from teaching its Into to Comp Sci courses from <whatever> to Java.
Yep. The first language I worked with for a good amount of time was VBA - making Access forms more complex. Despite the language itself being terrible, it was great - I could start with something I understood (forms) and slowly build on that, making useful things all along the way. Then came VB.NET, then C#, then, well, about everything else.

Where you start doesn't really matter at all.

True words...though I also think that not giving a shit to demoralizers is also something that every programmer should learn on the way.
Ahmen. Toughens you up.
Completely agreed. I'm very vocal about PHP's flaws, but I try to keep my hate away from beginners. When you're starting, the important part is getting shit done. The language doesn't matter.

(However, as soon as the chance presents itself, I'd try to get said beginner away from PHP. That shit melts your brain.)

One problem I can see with that is, it is very hard for a beginner to see the real flaws of PHP. So after he/she starts to get shit done in PHP, they will have their head so far up their asses that it will take a large amount of your time and effort to convince them to move away to a better language.

For eg, take the case of PHP arrays. If you are a beginner, you will probably have fallen in love with this thing. And when you show them a better language, and they finds out that it doesn't have arrays like PHP, they might feel very unsure about your claims that what ever you are introducing is the better language. If they have found /r/php, then it becomes almost impossible to convince them. You will have to counter the vague bullshit fed by 50 guys from /r/php to make any progress with the matter.

So while the author point about getting your feet wet is important, it is also important that you are not doing that be entering into a swamp that can suck you all the way down.

I agree. I am by no means a seasoned programmer, but I do remember first starting out as a novice. It does get discouraging as a noobie when you hear people in forums throwing around the latest tech jargon and some esoteric C library just to show-off how much they know more than you. The more you program (the older you get), however, you begin to learn it is all just posturing. It's the occasional bad apples that perpetuate that "winner-loser" MIT A.I. lab stereotype.

Trolls do serve their purpose though. It teaches you how to preserver despite the negativity.

> you begin to learn it is all just posturing

Yeah, I think that's probably the most common motivation behind the interaction spotlighted in the article.

> Here's a sample interaction between an experienced programmer and a beginner who is just learning programming

I think the interaction happens between programmers of all levels of experience, but it might be most harmful when it's an experienced programmer talking to a beginner.

> It does get discouraging as a noobie when you hear people in forums throwing around the latest tech jargon and some esoteric C library just to show-off how much they know more than you.

If that's really their intent and if you (the noobie) are the one they're talking to, then sure. If I'm a noob walking deep into a HN thread on an esoteric C library, I'm probably not going to be discouraged that people are using jargon, unless I've identified myself as a beginner and the comments are replies to mine.

Even this advice is aside from the point and a bad way to influence a beginner.

If you're talking to someone 'learning programming' you should talk to them and figure out a project that they can work on that would benefit them, and is within their grasp.

Yes, the tools are a side concern. But what is going to help them is automating a task they're interested in, or hooking some data sources together, or creating a programmatic animation.

To teach someone english word by word and rule by rule fails. You want them to read something interesting, to watch the subtitles on a movie. It's the same with programming.

I started coding in the 80's and many people would deride my expertise in BASIC, whether it was on an IBM PC or on a DEC PDP-11 or DEC VAX. If you weren't coding in C and later C++, you just weren't a "real" programmer.

So all I have to say is...one of my clients in 1991 is still running the payroll reporting system I wrote....in Microsoft Professional Development System...which was BASIC.

I've since learned OO, C, C#, scripting, and all the new stuff, but BASIC is where I started.

My first internship (circa 1995) had me writing an email support system for IBM in...Lotus Notes Script. It was still alive and kicking in 2000 when I checked back on it (given that OS/2 is no longer alive, I doubt it is now).
No OS-related reason why it shouldn't be; Notes will run happily on Windows, OS X and Linux. It may even have been webbified (not particularly difficult from R5 onward, and really quite easy since Domino 8.x).
The project was done for OS/2 device driver developer support, so I'm guessing it is not around for that reason.
I used to live in a college town and I heard this a lot. Especially from the RoR fanboys. The RoR fad is done, so I don't hear it as much anymore.

It is quite ironic, seeing as I didn't even consider the people saying it as advanced developers. They had enough knowledge to mash a few frameworks together.

Hm. While good advice, this seems like just general life advice not specific to programming.

If you're the kind of person who says things like "TextMate is for n00bs" (or some variation of such) you're probably just a super annoying person in general.

What made, say, PHP or Visual Basic good for beginners was that they just worked. You wrote a PHP program (in the language, not a framework), saved it as index.php and suddenly you had a working web app. With VB6, you created a project, dragged stuff onto a window, typed things, and suddenly you had a program that looked just like the other programs you were running on your OS. You didn't spend hours configuring things or typing boilerplate code.

The experienced programmer's goal is to make good stuff; the beginner's is to get his feet wet. These are radically different goals with mostly randomly different tools.

> What makes, say, PHP or Visual Basic good for beginners is that they just work.

And what makes them bad is they permit, induce or even explicitly teach bad habits.

I agree to not discourage someone if they're doing it, but if you have a chance to steer them in a position where they'll be better programmers, you should do that.

The reality is almost any language allows you to create a single file and run it and see a web page these days. That's not something unique to PHP at all.

But the thing is for many people (at least for me) was the instant gratification PHP provides can be a powerful hook. With PHP you can create interesting visual things with virtually no experience, no boilerplate required. It's one of the few languages where that is (was, more options today than when I learned) really possible.

PHP wasn't the first language I learned, but it absolutely was the language that got me hooked on programming by giving me the power to create things, visual things, interactive things, and more importantly, let me do so without following a step by step tutorial (I had basic html knowledge prior).

> And what makes them bad is they permit, induce or even explicitly teach bad habits.

Very true, I had some bad habits from php that took me a while to kick, but for me it was a small price to pay.

> The reality is almost any language allows you to create a single file and run it and see a web page these days. That's not something unique to PHP at all.

These days that may be the case, but many commenters here are referencing when they were learning to program, and a decade ago it was something incredibly unique to PHP.

> The reality is almost any language allows you to create a single file and run it and see a web page these days. That's not something unique to PHP at all.

This is not what the parent means. In PHP you get a crappy shared hosting account, and copy a file up to the server via FTP and it works. This is not possible with Python, Ruby, etc... you need to do more server setup in most cases. Sure this is due to historical reasons and maybe not specific to "PHP the language", but that is the situation that most beginners face. It's a very simple mental model as well. Services like Heroku kinda/sorta make it simpler for Ruby/Rails/etc., but understanding how those work and getting the command line tools set up is mentally more complex to a beginner.

> This is not what the parent means.

Well let's be fair, it's what the parent says. Even so, that's a largely outdated piece of "common knowledge" in 2014.

Five years ago? Sure. Today? Not as much.

Genuinely curious... can you explain to me how to get a single-file ruby or python app up and running on a normal shared host (basically anything that uses "CPanel" or "Plesk")?

With PHP: 1. log in to server via FTP or CPanel "File Manager" 2. find the publicly-accessible document root (htdocs, public_html, etc) 3. upload an "index.php" file to that directory with "<?php echo 'hello world';" in it 4. visit http://yoursite.com/

How would I achieve this most-basic web page on a common shared host in ruby or python?

It's been a very long while since I've been in either of these, but I recall Plesk having a shell. With that the case, the Python/Ruby file could be dumped somewhere (ideally the vhost root) and then just run through the command line in a long-lived process or daemon. Port 80 is obviously taken by Apache, but other than that ...
It is not that it is impossible to do it in another language. It is just that it is relatively simple in PHP. Single file does not necessarily mean simple.

Bad habits can be induced by a language, but if you are still at the point where you're learning the concept of variables, you're way before the point where you'll begin to pick up bad habits.

>And what makes them bad is they permit, induce or even explicitly teach bad habits.

Do we have a set of good habits defined? That seems no different a question than "What's the best programming language?" and backed by just as much opinion and authority as "Language X sucks! Use language Y!"

In that regard, JavaScript is even more accessible; just put a <script> tag around the code, save it as an .html file and double click it. You don't even need installation permissions, since every computer comes with an interpreter installed.
And you can even do graphics in it too, which may be much more appealing to some one who is trying to learn programming. To me, moving a circle across the screen is much more rewarding than putting a HTML form with 20 input fields on it...
Key to what you are saying (I agree) is that by starting to write something (even a shell script) you get instant feedback and reinforcement.

If you are spending time understand a framework you don't get to that part as quickly.

While it may seem trivial even having someone see what happens in the shell when they do simply from the command line:

Lesson One from the command line:

echo "Enter your name:"

read x

echo "Hello $x"

..is the type of reinforcement that allows someone to feel as if they are making progress.

Lesson Two: Ok let's put that in a script and make it executable:

...and so on.

(Obviously equivalent examples with Php.)

Despite not being a ruby programmer, this is why I've loved _why's shoes framework (http://shoesrb.com/) You're not going to use it on an enterprise project, but in terms of just getting shit done with a little friction as possible it's great — and that is precisely what a beginner needs.
I'd take it one step further and argue that it doesn't matter what they code in, it's the outputs that matter. Facebook is a billion dollar company, and their code base is PHP. There are still enterprise level companies that maintain Visual Basic programs. Yume nikki is made using RPG maker, and it doesn't make a bad game.
> Facebook is a billion dollar company, and their code base is PHP.

Great point, because allegedly, their original code base wasn't even in decent or organized php, it was just includes and inline sql queries.

Also, you could pay $20 for a server for a year, upload it, and boom! No fucking around with devops bullshit, like my current project.
I know Angular is getting a lot of HN hate lately, but it really helped me get my feet wet. It was much easier to get basic apps running for me in Angular compared to messing around with Rails or Django. For a basic backend, I can use firebase. Surely doing it this way has limitations, but it allows me to get in a positive feedback loop so much sooner.
... or you can skip talking about your favorite framework and point to theory like logic, computational complexity, data structures, lambda calculus, relational algebra, and other stuff that actually matters. He already took the first step, which is playing around with some programming.

I have a friend and previous co-worker who hoped that by learning Python he could work on a legacy system I built while we worked together. He's able to make some tweaks and get a general idea of it, but translating intention to algorithm is still mostly mystic to him. He was shocked after I showed how to simplify some 30 lines of if clauses with a dict, he learned the syntax for a dict but didn't really understood how it works, or to what it's good for. This kind of illumination, I believe, only comes after learning some theory, not syntax, or your favorite framework.

Coming from a background of not much computer science and having dropped out of college, I found learning theory to be too lengthy and dull for my novice mindset at the time I started programming (in, quite fittingly, HTML+CSS+JS+PHP on LAMP). I was in the same shoes as your friend, as whenever I would see an open-source project or library, I would be quick to modify it to suit my needs, but would end up with massive if clauses and without much modularization. Of course, after about a year or so of doing this same bad practice, I came to ask "Truly there must be a better way than this, right?" It was at that point, after already becoming completely addicted to programming (yes, in the ugly, somehow-working kind of way) that I gained enough patience and interest to learn more theoretical concepts about computer science and its applications to programming (lambda calculus and functional programming in particular). I agree with you, being that this ultimately ended up helping me greatly, but I disagree that CS theory should be the very first thing a novice programmer approaches.
> ... or you can skip talking about your favorite framework and point to theory like logic, computational complexity, data structures, lambda calculus, relational algebra, and other stuff that actually matters. He already took the first step, which is playing around with some programming.

Yes, exactly, that was my first thought too. I'd add things like microprocessor architecture (like the von Neumann architecture, the cache hierarchy and how memory is structured), Turing-completeness and Turing Machines (which probably fit into your "computational complexity category"), programming language design and implementation (including things like parsing and grammars), and concepts like object-oriented and functional programming.

For example, a lot of programmers struggle with C, until they read about computer/processor architectures and realize how the processor accesses memory.

Sadly this sounds exactly like many of the PC based programmers across the hall. What is it with them? Its like water cooler hell with some of them, and share code - hell they all can implement X better than someone else.

Is there just so much language bravado amongst this class of programmers or did it bleed through from school? I have listened in arguments between Java programmers, C#, and the like, and never understood the animosity some have.

Oh you're learning to be a chef? That's awesome! What are you cooking?

Rat poison a la bleach? That's awesome! Let me know if I can help you with that at all!

If only there was a middle way between denigrating and patronising n00bs...

The difference between a good cook and a crappy cook is that the good cook powered through all the crappy not-quite-there meals and learned everything they could about what makes a meal good by tasting all of their own cooking, and striving for improvement. Learning how to cook to taste is about persistent trial and error, just like learning how to develop software is about persistent trial and error.

There's no right or wrong way to cook. It's all about what you personally have a taste for. For example, Natto is something I personally find distasteful. However, people have put effort into learning how to make Natto and they personally find it delicious. It meets their needs. Who am I to devalue their experiences?

By the same token, PHP meets needs and there are plenty of people who develop effective software with it. If it's working, and you don't find its warts to outweigh the value you get, then you should continue using it.

>There's no right or wrong way to cook. It's all about what you personally have a taste for.

Only if you're cooking for yourself.

Additionally, I've developed a near vomitous reflex whenever I read "there is no right or wrong way to..." If there is no wrong way to cook, there is no reason to have cooking schools or to pay people to do it.

Of course there is a wrong way to cook. Pretending that you can't fail at something is pretty much guaranteed to ensure failure.

The difference - and I hope this isn't being patronising - is that rat poison a la bleach can never be anything but poisonous, whilst a good programmer can be perfectly effective using HTML and PHP (depending on the task, of course).
There is a middle way, and that middle way is to realize that the relationship between PHP (and other frequently beat-upon languages) and other programming languages is not at all like the relationship between Rat poison and a normal meal.

Most any language can teach the absolute fundamentals of programming (logic and how to control it, loops, if/then, functions), and it doesn't really matter to a beginner, nor will it really affect how well they learn or the quality of their learning.

The middle ground is to do as all teachers do:

1. Accept

2. Advise

3. Advocate

As a mentor, we first accept the terms of the students curiosity. The student lacks so much information about making any choice, that when they say "I want to learn PHP" it does them almost no good to try to head them off or explain why they should choose something else. As the mentor, we must accept the students line of inquiry and begin to foster this curiosity with the situation we are given.

Next, the mentor must advise. Once we have accepted the line of curiosity that the student has chosen, we feed this flame with more information. The students curiosity will take hold and begin to spread to other areas, testing and learning from this original place of understanding. As the student questions, the mentor answers.

Eventually, the student will begin to have confidence in what they have learned. They will learn and work for information more readily, and will come to the mentor less and less often for advice and counsel. Once the student is at this point of confidence, the mentor can begin to advocate for ideas and concepts as yet unknown to the student. This is where the real learning happens, where the student has been given enough information to even understand and make sense of the mentors advice. This is the time for the mentor to say "maybe you should not use PHP. As you can see, there are things that are inconvenient and which you wish where different. There are other languages that provide what you seek." The student, now properly equipped to understand the mentors advice, can follow them.

This structure is how many of us, inadvertently or not, learn the crafts we know.

At least the professional programmer recommended RoR instead of Haskell or F#!
I really like this comment from an AskHN from jlcfly two weeks ago. I hope most of us embrace this philosophy as the reality is programming as an art is much more important than programming as a rote skill.

"Teach them to be better than you. That may seem counterproductive. I have a type A personality, and I have decent coding skills. I've been in your situation a number of times. I also know there's these mythical expert developers out there that I can't seem to find (or afford). So, what to do? A few years ago I realized that if I continue down this path, I'll end up with some serious health issues due to the stresses that come along with having a reputation for being a really good developer.

So, I decided that instead of searching for developers better than me, I would teach developers I work with how to BE better. It's taken a lot of patience. And it's taken me quite a bit to LET GO of my way of doing things. I had to take my ego out of the picture. (VERY hard to do.)

Nowadays, I realize that developers don't have to BE better than me. I simply have to ALLOW them to do what they do without being so obsessive about it. Turns out, even junior developers really CAN do good work. They just need a little guidance that only comes with experience, and then they need me to get out of their way."

https://news.ycombinator.com/item?id=8649415

Most of the people I know who are starting out are starting on TI-BASIC. I have to say, Beginner is already ahead by starting out with "some PHP and HTML using TextMate on my Mac." It's at least better than starting out with some Visual Basic using Notepad on my Windows.
Facebook.

Initially developed in: PHP

Why: It was what Zuckerberg knew!

Todays Value: $200+ Billion

This (tired) argument successfully says you can build something with anything. But that's not really the topic at hand.
I think it's a great point in this context.

Freaking out on beginners because they're using the "wrong" language is often nominally based upon the notion that what tools you use matter a lot to the results you get. But there are a zillion examples of successful products made with terrible tools. And plenty of examples of very well-engineered failures.

If you believe the end goal is being a billionaire CEO, sure.

If you, however, believe the end goal is being a well-rounded programmer, it's irrelevant.

In the context of "I'm learning to program," I think one should look more to objective B than objective A.

Saying the end goal of being a programmer is being a programmer is ridiculous. The end goal of being a programmer is to make useful things. And you can do that in PHP. Zuckerberg's a billionaire only because he made something that a lot of people get value out of every single day.

Further, if being a well-rounded programmer were the goal, then people starting with whatever is fine, because becoming well-rounded means they'll get around to better languages by and by. An I'd add that any programmer who wants to consider themself well-rounded should definitely have used PHP or some equivalently beginner-focused language.

> Saying the end goal of being a programmer is being a programmer is ridiculous.

Well I didn't say that. Note the not-so-subtle distinction.

It's a distinction without a difference. The goal of being a programmer is also not being a well-rounded programmer. It's still tautological.
The "goal" of learning to program can be a myriad things, from simple hobby to being a CEO. If one presumes that the goal in some way hinges on being "good" at programming, then learning good habits is certainly a step on any of the possible paths.
Yeah its a fair statement that it depends on the context.

Ultimately it will depend on the beginners' goal however just to highlight one point to beginners with dreams of big exits and start-up goals. The debate about what language is better becomes a moot point when there are clearly large and great companies being built on even the most basic languages.

We changed the title to a sentence from the article that expresses its substance more informatively.
Started off with AutoIt, then VB6, then PHP. Not the smartest route but today I'm using Ruby, C#, SQL, F# and JS/frontend. All through the first few languages I heard people bashing each and every one for various reasons.. However I built a range of tools at a young age including a file encrypter, a website complete with authentication and user management, an online shop and a game "bot".

If I hadn't mucked around the way I did, I don't think I'd have the breadth of knowledge on networking, protocols, assembly, file formats and authentication I do today. I probably wouldn't have gotten into security either.

And let's be honest, there are two ways to go about steering someone to another language that might put them in a better place as a programmer long-term.

The first is the condescending, snooty version espoused in this blog. The problem is, I don't think it actually happens that much. It may be perceived that way, but people who are learning new things are sensitive to instruction from people who know more.

The second is to be very supportive and maybe even a small sales pitch about where you would start if you were beginning programming now in 2014, knowing what you know as an experienced programmer.

If you truly believe that learning PHP as a first language is bad for a new programmer, then you shouldn't bite your tongue. But you should be prepared to explain why and present a good alternative and maybe even offer some hands-on instruction.

> If you truly believe that learning PHP as a first language is bad for a new programmer, then you shouldn't bite your tongue. But you should be prepared to explain why and present a good alternative and maybe even offer some hands-on instruction.

I routinely recommend python for this, and somewhat more aggressively to people who are making php noises. Not because I'm a massive fan of python, but because it has relatively little syntax and tends to fail in very obvious ways, which is exactly what you want here. On rare occasions I'll offer some direct tuition, but usually I just point people to http://learnpythonthehardway.org/book/ because it really works.

For the most part, it's not all that important where you start - I recommend against people starting out with java or C++, but it's not a tragedy if they do. However, PHP is an exception. I have seen too many new programmers latch on to PHP because "it's easy", and it breaks them. They never manage to learn any other language because "it's too hard to get going, and I can do everything in PHP anyway"; they leave a trail of half-finished projects that hit the 20,000-line wall and couldn't figure out how to get past it. Whenever you try to introduce them to something else they just say "but it's hard, and I don't see why it's useful". You can't teach them how to do software engineering because PHP is too broken and the internet is full of terrible advice about writing PHP code.

Learning PHP first makes it harder to learn your second language, not easier, because of all the bad things you have to unlearn.

Yes, Facebook has a lot of PHP code. That's because they've made a business decision that rewriting it all would cost more than developing highly customised tools to make PHP somewhat manageable and then burning engineering costs on managing it. That cost analysis is very unlikely to apply to anybody else.