How Did You Learn to Program?


How did you learn to program? Especially if you’re not a professional developer and never had been (I already have the data that says that something like 70% of professional developers got degrees in computer science or engineering). I’m wondering how you learned to program if you aren’t a pro.

What programming language did you start with? C? BASIC? VB? C#? PHP? HTML? What was your next language?

This is a question that’s occupying a large amount of my time these days. Why? Because, as in any resource-constrained environment, I need to focus on doing things in order – preferably in the order of “biggest thing” to “smallest thing.” In this case, I’m confronted with a host of solutions to how people learn:


  • Books (and if through a book, what kind of book – intro book like this) or a book like K-R C?)

  • Online videos (like this)

  • Online “lab” (like this)

  • Online tutorial (like TryRuby)

  • Classroom

And if you use one of these, what did you find most useful? What was fun? What was boring? What got you sucked in in the first place?

Fundamentally, I’m asking where my team should invest its efforts in getting future developers from 0-10 MPH.

Comments (19)

  1. Brian Edwards says:

    I began programming using BASIC that came with MS-DOS about 25 years ago.  Over time I continued to learn more programming from books and using "free" languages (C++, PERL, CGI, etc.) in my spare time.

    I started with Object-Oriented Programming with Visual Basic 3.0 and Visual Basic for Applications (in MSFT Office) as there were plenty of programming books available and the software wasn’t too expensive.  I currently do three principle languages: VB.NET, C#, and PowerBuilder and a lot of DBA work.

    Of the programmers that I know personally it’s probably 50-50 on whether someone has a Computer Science degree (although frequently they have some kind of degree – mine are in Chemistry and Biology).  IMHO, self-taught programmers are more well-rounded in I/T (started fooling with hardware and worked their way up) and CS majors are better at didactics and theory.  Of the CS majors I know they all stated that they didn’t learn any "real-world" languages until after they graduated.

  2. TheCakeStealer says:

    I’m a hobbyist studying to be a prof. developer at a university. My first language was c++, then c# and php. 1% class learned 99% book learned (oreilly series).

  3. Adam says:

    I never went to college.  I started doing Classic ASP/VBScript against Access and SQL.  When .NET came around I moved to VB.NET.  After about 2 weeks of getting over the .NET curve I moved over to C#.  

    I learned by working on projects and I had 2 really good Mentors that took time to show me the ropes and point me in the right direction.  

    I’ve read a few books.  I started by using the Teach yourself in 24 hours series.  The ASP, Beginning Programming and SQL books were helpful.  I got to about Chapter 8 in the ASP book and then went on to something else.

    Classroom instruction bores me to death.

  4. Jim Wooley says:

    I started as a hobbiest in high school typing in programs from Compute! magazine into my C=64. The most programming I did at that point was debugging my type-o’s which forced me to understand the source of the problem in order to fix them. I started professionaly with MSAccess (using Mike Groh’s Access 95 book). I now work with VB.Net/Sql Server/ASP.Net/etc. Most of the learning I get at this point is through trial-error. I also find user groups to be a good source of free training as well as networking opportunities. For a new programmer, the best learning will be to give them a simple task and have them figure out how to solve it. Sure they will make mistakes along the way, but we often learn best from our mistakes. We can read all the books we want, but actually doing is what counts. As evidence, consider the number of people who read the certification books, pass the tests and still can’t code their way out of a shoe-box.

  5. Jacob says:

    I first learned using the embedded BASIC in the various home computers of the 1980’s (Sinclair ZX81, TI994A, TRS-80, etc.).  In college I took a couple of CS classes but didn’t major in it — learned Pascal and some Prolog.  Picked up HTML on my own from a couple of online tutorials.

    Got a job doing helpdesk and some web development.  Learned ASP and Javascript (took a 4-day training class and then used books and online resources).

    At this point I decided to go back to school, took CS, learned Java and C++, and got my first job as a professional developer.  A couple jobs later I’m working mostly in C#, which I’ve picked up from online resources, a couple of O’Reilly books, and the fact that it’s very close to Java.

    Trial and error works very well to get things working, but you only actually become a better programmer by understanding the errors and wrong choices — what caused them, what could you have done differently to avoid them, what could you have done differently before that to avoid the risk?

    Now I’m trying to move to the next level — as described in "The Pragmatic Programmer" and "Coder to Developer".  Completely de-coupled layers, exhaustive testing, every configuration detail removed from code, etc.  I’m not there yet.

  6. szurgot says:

    As a teen, I learned reading magazines about the Atari 400/800 and later the Commodore 64. (84-86 or so)

    After I started doing some work to help someone out, I’ve learned a lot by just reading the manuals for C/C++ and Oracle.

    I tried school, but never really picked up much out of it I hadn’t already figured out on my own.

    I read anything I can get my hands on, from online manuals, blogs, samples, hard copy books….

    So for me, Trial-by-fire, armed with a good manual or online resource has been the best learning experience.

    (And I would consider myself a pro, I’ve been doing professional programming for going on 14 years now)

  7. Jacob says:

    I’ll add to my earlier remark about trial-and-error by saying that an important component of improving as a developer is defining "error" very broadly.

    For example, if you write a program that works great, and then a new requirement is added, and you realize that you’ll have to change the basic architecture to comply, is that an inevitable annoyance or an external issue?  No, it’s a design error.  What can you do to avoid it next time?

  8. Andy says:

    While I am a professional developer with a Computer Science degree, I wouldn’t say that I learned how to program while working towards my degree.

    When I was in elementary school, some time during each year we would get to type in Apple IIe programs that were written on the board. Initially, the programs weren’t really explained to us (as in, what does a for loop do, an if, etc.) – we just typed them in to see what they would do.

    Later on, of course, they would start to explain how the programs worked, and we would start to tinker around and write our own programs.

    When I started outgrowing the Apple II, since we had a Mac at home, my parents bought me a Basic for the Mac (I’d say this is where I really started to understand what was going on). Eventually, in high school, I moved up to C and C++ (which I learned by reading books).

    I really see my CS degree as filling in the gaps of what I didn’t learn on my own, and formalizing everything. Since I didn’t necessarily know the "right" way to do something on my own, learning at college helped me to figure out the right way to do most things.

  9. Eusebio Rufian-Zilbermann says:

    I first learned by typing in programs from magazines (C=64 Basic) and then getting the manuals and trying to understand what I was copying. Then through a user forum I got in touch with an engineer who had the kindness to teach me 6502 assembler. I was making money from writing software before I got any formal training (after that I went to study Engineering and I have been doing professional programming for many years now)

  10. Dan McKinley says:

    I’m a professional developer, but I taught myself as a non-pro. I started learning BASIC when I was ten or eleven (1989-90), because it came with the machine. When I was twelve or so I started learning C and bits of C++. All of this was coming from books since there was no "online," my schools didn’t offer anything, and I didn’t know any programmers.

  11. Jeff Parker says:

    While I am a professional developer that went to school most of what I learned is school is way outdated and really not practical Windows was version 3.1 and most programming was on Unix or Vax systems you had to buy professor made books because there were really not a lot of good books out there, or there was no amazon and the local book store had maybe a shelf dedicated to computer books.

    I started on an old Apple 2 with basic and a book. My first real language was ADA and a really good book. My first real learning came from a peer using Visual basic believe it or not. This guy forced VB 4 to be an OO language and taught me really how to apreciate OO models. After he left I continued learning on my own studying books, learning from other ideas. Seeing if they were practical or not I continue to this day to read books and much prefer to sit down with a nice big core reference and go through each and every sample and read every page. Some of the developer centers are nice and produce some good articles. However coding4fun is an area I visit more than anything else. That and the msdn blogs. I learn a lot of more practical stuff from the blogs than anything. They are more real.

  12. It started with BASIC on terminal which happened to also have some built in BASIC ROM.  Then it was C64 BASIC, and games/tools from magazines like BYTE.  Moved on to 6502 assembly.  Took two courses in HS, but didn’t learn in them, as much as do all the work in about a week, and played around 😉  Pascal got thrown in there at some point.

    Self taught myself Lotus 123 macros, and then moved on to learning C by book, and now do C#, and various scripting languages as well.  Once you have learned to program, the language doesn’t matter.  

  13. Andy Wilkinson says:

    Spectrum/BASIC -> Amiga/E (a bit like C but didn’t force you to have all those semicolons!) -> Windows/C++ -> Windows/C#

    As for how I learnt, I suspect the Spectrum came with a brief programming guide (when even computers came with "real" manuals). And I should also mention Logo too (Spectrum – Snail Logo – named because of its speed) as this is a great introduction to control flow. The biggest step was probably a series of programming magazines (I think they covered Spectrum/Commodore/etc.) called "Input" that my parents bought second hand as the complete series.

    Since then I’ll add trial-and-error as my biggest learning experience (I’m using Jacob’s definition of trial-and-error above). Of course now online documentation, blogs and Google are my main sources of new information.

  14. Rick Wayne says:

    I’ll be interested to know how useful you find the comments collected here. As a member of the not-quite-passing generation of hackers who learned when programming was more hobby than profession, my experience may not be germane to today’s wannabes. At one time, merely knowing how to enter code and run a compiler was a perfect "in" to the profession. Today, though, programmers are almost literally a dime a dozen, especially in the flattening global marketplace.

    And yet…and yet. In order to rein in skyrocketing development costs–and make no mistake, those costs will continue to rise, cheap "line" programmers are only a finger in the dike–much development that once would have required from-scratch work in COBOL, C++, or Java is today assembled out of existing components. So line programmers are less and less code authors, and more and more IT widget-hooker-uppers.

    However, somebody has to build the widgets. Reusable, quality, secure, bug-free software is really really hard to build, and only star programmers can do it economically. So even for mainstream IT, we’re turning back to an era where remarkable talents will stand practically alone on the landscape. And people who code for the love of it, finding jobs later, will once again be enormously significant.

    Me, I didn’t start till college. Hated computers–cold, lifeless entities sucking the humanity out of the world. Finally decided to take a course in my very last year (know the enemy, and all that). Picked up the textbook, leafed through it. Started to read it from the beginning. Was startled to realize that it was dark out, and that I had already started back at page one, having gone through the whole thing in one sitting.

    The programming course used card decks; I happened to wangle an interactive timesharing account, which ticked off the T.A. because I wasn’t turning in cards. So I found a card-deck printer. She was still miffed, but I was complying with the letter of the law.

    Despite the coursework, I was largely self-taught–the real learning happened in thousands upon thousands of edit-compile-run cycles. Much later, I took the core CS curriculum at Wisconsin, but while I learned valuable stuff there, they didn’t teach you how to craft software, you had to pick that up by osmosis.

    Today, since the tools are so readily available, I think I’d start a new programmer with a copy of Chris Pine’s "Learn To Program" and a Ruby interpreter. The fun and joy of programming will be fanned, not quenched, and that will keep the new coder at it until they’re proficient enough to branch out. Then it’s a matter of picking up practices, which you can do best by finding a mentor or joining a team, and languages, which can be self-taught.

  15. orcmid says:

    I ran a little roundtable at Mindcamp 2.0 on the title subject.  It went so well I want to do more, and also cover other aspects.  

    The introductory round was for everyone to answer the question: When did you write your first line of code, what was it in, and what did it run on.  [I held up the low end with 1958, Fortran before any Roman numerals were needed, and the IBM 704 computer installed near the wind tunnel at Boeing.]

    We went on from there.  There were essentially three software-generations of people involved.  Those who remember punched cards and paper tape, limited character sets and machine-language (even pre-assembler), those who started with personal systems in the brief but exciting microcomputer era, and those for whom PCs were the first machines (but maybe running Logo or something else interesting).

    There are strata in this picture and our short go-round revealed that to us but it would be fun to do more.  We had a guy who had been at NASA and new the scoop on the Apollo 13 LEM landing-radar computer, another fellow who used to build software and hardware for early test systems, and young Microsost language wonks that you’d likely find reading Lambda-the-Ultimate.

    So I am very keen on this question.

    One caution.  There are those of us that were pretty established in this field before there was any formal computer-science education.

    I’ve been asked to blog and write more about my own case, so I will take your questions to heart when I do that.

  16. I started programming on my Apple II+ when I was knee high to a grasshopper. All I had to start with was the Apple Basic manual that came with the computer. I programmed for a while in a custom language that came with GBBS that I used to set up my BBS (remember those?) in High School. Somewhere in there I also programmed professionally (yes, scary, at 14 or so) in Hypercard (stop laughing, it paid really nicely). I just read the on-line documentation for that one. I learned C when my boss on a summer job took me to lunch and wrote out the basic syntax. I then bought K&R and that taught me the rest. I learned FoxPro (another good paying job) from the manual. In college I did take a degree in computer science but really they didn’t teach us any languages. The feeling was that any idiot could learn a language so go learn them on your own time, the classes focused on theory. I am eternally greatful for that. The concepts I learned (as opposed to focusing on individual languages) have served me extremely well. From there on out all the other languages I have used (i’ve lost track of the number) were learned mostly from on-line documentation. I rarely buy books. I find that in reality most languages are usually just some variant of Algol so once you figure out the dialect the rest is pretty easy. The exceptions being prolog and scheme, I am still a sucker for Scheme although I do wish it had some kind of schema support.

  17. Adrian says:

    You don’t need to have university education to be professional.

    I’ve started off with dBase, then Clipper and by the age of 15 I was already selling my first application to a company.

    Then did some VB and finally Powerbuilder and C#