No announcement yet.

So you want to learn "How To Program"?

  • Filter
  • Time
  • Show
Clear All
new posts

  • So you want to learn "How To Program"?

    Every so often, in most forums/tech blogs/webpages, the inevitable "How do I learn to program" thread pops up. Sometimes, there are minor variations on this same theme:
    • "I'm just starting; should I learn C++ or Java?" (replace by any combination of languages)
    • "Dude, I wanna get me uber haxor skillz" (the "I want to be a hacker/cracker/maker of keygens" post)
    • "I can barely turn on my PC; can I learn to program?"
    • "How do I become *really* good at programming?"

    Regardless of the actual wording, the generic question may be understood to stand for "How do I acquire - or expand my existing - programming skills?" and the answers, provided by the forum members at breathtaking speed, are generally of the form:
    • "You gonna have to learn C - it's the mother of all languages"
    • "Learn VB - it's much easier than NET and it's what I use"
    • "Java, dude - compile once, run everywhere"
    • "Nah, I recommend C# - much easier than C++"
    • "Ignore the other guys - *REAL* programmers code in assembly"

    Most of these contributions are well-intentioned, from well-meaning members, providing genuine and heartfelt recommendations.

    As answers to the question of "How to Program", though, they are crap.

    Let us explore why.

    1. The Process of Programming

    Imagine that a friend of yours revealed his/her intentions of becoming a master writer, dreaming of one day winning a Nobel prize for literature. Would your immediate recommendation be that he write that great new novel in Russian, because "Tolstoy and Nabokov wrote in Russian, and they were really good"? Or, if your friend wanted rather to become a painter, would you say that "watercolours are the best, cause they're really easy"? Perhaps some other friend would join in, saying "nah, all the greats painted in oils - you'll have to choose oils".

    The problem with this approach is that you're giving advice on which tools to use to someone that may not have even understood what programming (or writing / painting / etc) is!

    My take on programming is that it is, essentially, an art. Now, I don't ask you to take my opinion into consideration, for I am - among the real programmers - a non-entity, a nobody, a simple NULL. Fortunately, this view of programming as a form of art is shared (in fact, it was developed) by some of the truly great programmers. Check out what Donald Knuth decided to name his famous set of books:


    and what he said on this very subject:


    And my analogy of learning programming as akin to learning to write a creative novel is straightforward plagiarism from a Bruce Eckel's blog entry:


    Obviously, there is the science aspect - after all, in an academic context, it is called "computer science". Without entering into semantics and pointless debate, let us simply consider that programming is solving problems through the use of a computer. As far as this thread is concerned, this definition suffices. The global approach to resolving these problems by use of a computer can, and should, be done in a scientific manner (proper analysis, documentation, revisions, etc); but the essence of the task - coding a solution to a particular problem - is essentially an art form.

    Ergo, the computer programming (in our case, the novice programmer) is, or is trying to become, an artisan.

    As such, it is no more possible to provide straightforward, guaranteed guidelines on how to become a great master programmer, than it is to tell someone how to become the next Mark Twain or Scott Fitzgerald (or, in the case of the visual arts, Michelangelo or Jackson Pollack).

    2. So, how/where do I begin?

    Well, that depends. Do you want to learn how to program, or do you need to learn how to program? The difference resides, as you've probably guessed, on how much choice you have on how and when to carry out this never-ending adventure.

    If you need to be able to program so that you can overcome some calendarised goal (be it work, school or hobby-related), then seek out an informed opinion on what path you should be taking (including, obviously, the computer language most appropriate to that specific task). At worst case, do set out a thread seeking help, but make sure that you provide the full background on what it is that you need to overcome (project details).

    If you decided to learn how to program, simply because you can and want to learn, then my advice is simple:
    • if it's available to you, seek out an organised "learn to program" course (school/college/community/online/tuition/etc). I don't care what form it takes, as long as you feel the teacher/instructor is good (how will you know? If you're looking forward to the next class, they're good. Stanford and MIT have some stuff on their webpages - check it out).
    • if that is not an option, there are quite a few books that cater to full beginners (never coded before), as well as to those that already have a smattering of programming experience; find one that you seem to like (peruse it first), check that it tells you how to obtain the tools of the trade (essentially, the compiler and the IDE) and start reading it and solving the problems/challenges within the book (all programming books are problem-based).
    • finally, you must CODE. No other way around it: you can't learn to program by reading about it, or by wishing you could code. One learns to code by coding.
    • When you get to the end of that book, or have solved a significant problem in your first language, you may - if you wish - pick another book (some other language) and have another go.

    3. How long will all this take?

    Do you mean, to become a pretty good programmer - one recognised as competent and skillful by your programming peers? Ooh, not that long, but it's never less than...

    10 years.

    See why:


    4. Damn it, man - just tell me what *bloody* language I should pick

    Well, since you insist...

    Pick the last word in your name (let's call it Surname)

    Start at first letter of Surname

    Until you reach the last letter of Surname (inclusive), start counting the letters

    If your count is superior to 8, then you are destined to learn C++

    But if count is equal to 8, you must learn Python

    Else, if count is inferior to 8, Java is your answer

    By the way - in case you didn't guess - this was an algorithm: think of it as the recipe to devising a solution to the problem that must be solved. All that remains is to translate this general language recipe into a computer language (in other words, program the solution).

    I must insist: the language you pick to start with doesn't matter as half as much as actually having someone (or something: a good book) teach you to think like a computer programmer ( experience will also get you there, eventually).


    That's it; or as much as I feel I can contribute at this particular stage of my own 10 year odyssey.


    read about programming languages here:




    if you're a true beginner, pick your language (start with something reasonably popular but that appeals to you) and search for the "<insert language> for the absolute beginner" books.
    For example, suppose you choose Python - there is a "Python for the Absolute Beginner"



    Search for the others, read a lot, CODE lots, and - above everything else - enjoy yourself!

    An average take on How To Program, from An Average Joe type of programmer

  • #2
    The problem with this approach is that you're giving advice on which tools to use to someone that may not have even understood what programming (or writing / painting / etc) try to minimize this problem.
    Last edited by abraham.a; 02-26-2011, 03:59 PM.