This is a fairly general question. I know a bit of Perl and Python and I am looking to learn programming in more depth so that once I get the hang of it I can start developing applications and then websites.

I would like to know of an algorithm (sequence of steps :)) that could describe my approach towards learning programming in general. I have posted small questions on Perl/Python and I have recieved great help from everyone.

Note:- I am not in a hurry to learn. I know it takes time and that's fine.

Please give any suggestions you think are valid. Also, please don't push me to learn Lisp, Haskell etc - I am a beginner.

  • Is there any particular language you are looking to learn? I know you mention perl and python, is that what you are looking to get into?
    – Jason
    Commented Dec 3, 2010 at 11:01
  • So what you're asking for is... what exactly? The process by which you learn a specific language? Programming itself? Using what?
    – glenatron
    Commented Dec 3, 2010 at 13:56
  • I think this is a good question. I've edited to make it a bit clearer.
    – Gary
    Commented Dec 3, 2010 at 15:11

5 Answers 5


The 11 step algorithm for learning a new programming language

I'm currently in the process of learning Lisp, and I'd recommend the following algorithm:

  1. Ask around if the language is worth learning and where good resources can be found. If positive responses to the language are given by experts then proceed to step 2.
  2. Create an initial programming environment. Keep it simple: text editor and compiler/interpreter. The bare minimum. Consider a specific user account on your machine with a special colour scheme to cue the change of mindset.
  3. Create the "Hello, World!" application.
  4. Learn general syntax and control statements (if-then-else, repeat-until etc). Create sandbox to verify simple control cases (true/false evaluations etc). Try out every primitive type (int, double, string etc). Perform currency calculations. The number guessing game (as suggested by @Jeremy) is good for this.
  5. Create class (if applicable) with several methods/functions. Make calls between functions. Apply control statements.
  6. Learn arrays and collections. Create suitably complex examples that create arrays and collections of each of the classes/functions/primitives that are available to you
  7. Learn file IO. Create examples of reading, manipulating and writing binary and character based files.
  8. Ask more questions about idiomatic programming within the language (pointers, macros, monads, closures, support frameworks, build environments etc).
  9. Choose (or adapt your existing) IDE to work in the recomended idiom.
  10. Write a variety of applications that please you (or your boss).
  11. After 1 year return to step 1 for another language while maintaining your interest in the one you've just been learning.
  • 1
    I have found the "number guessing" game to be a great second program to write. (At step 4.) It allows you to learn about integers, booleans, text input/output, looping, and conditions.
    – Jeremy
    Commented Dec 3, 2010 at 14:38
  • @Jeremy Good suggestion, I've put it in there.
    – Gary
    Commented Dec 3, 2010 at 14:46
  • Hi Gary- thanks for the detailed instructions i will try to map it with python - very good step by step explaination thats why i love this chain of forums... @Jeremy yeah i am on it :)
    – user9057
    Commented Dec 6, 2010 at 8:29
  • special colour scheme to cue the change of mindset, can you shed some light on this? Commented Feb 7, 2013 at 4:44
  • I tend to choose a darker colour scheme when working with Lisp but use a light one for Java. The colour reminds me to switch my mindset.
    – Gary
    Commented Feb 7, 2013 at 7:35
while (stillLearning)
  • 4a5 > cross_pollinate(many);
    – ocodo
    Commented Feb 28, 2011 at 6:39

For every language you want to learn L

  • Step 1: Learn the syntax of L.
  • Step 2: Write a compiler for L in your favorite language.
  • Step 3: Write a compiler for your favorite language in L
  • Step 4: Write a major project idiomatically in L
  • Bonus: Make sure the result of Step 2 is compatible with the result of Step 4.

That should pretty much cover it, get back to us with a progress report in 10 years.

If all you're after is learning to do web development, and you already know Perl and Python, you pretty much have enough for a start. I'd say start learning the ins and outs of Apache (and specifically mod_perl and mod_python), then get practicing. Maybe pick up a book or two on CGI programming, network communication and such, rather than specific language manuals.

As a final note, being a beginner is no reason not to learn Lisp. Go check out SICP and the video lectures. Neither assumes any level of expertise with development, or computers. In fact to quote the introduction to the video lectures

I'd like to welcome you to this course on Computer Science. [Writes it on the board] Actually that's a terrible way to start. Computer science is a terrible name for this business. First of all, it's not a science [crosses out "science"]. It might be engineering or it might be art. [...] It's also not really very much about computers [crosses out "computer"]. And it's not about computers in the same sense that physics is not really about particle accelerators. And biology is not really about microscopes and petri dishes. -Hal Abelson

  • Sounds fun. See you in 10 years!
    – Jeremy
    Commented Dec 3, 2010 at 15:09
  • +1 for step 2 write a compiler for L! Brain... hurts.. so... much... now.
    – Gary
    Commented Dec 3, 2010 at 15:46

I don't want to say much except two steps.

  1. Learn Data Structure
  2. Learn The Introduction to Algorithm

P.S. Programming is your daily task.

  • On Programmers you are encouraged to "say much", don't be shy :) Give some details on your advices, like ressources, references or examples from your own experiences.
    – Matthieu
    Commented Dec 7, 2011 at 13:56

Best way is to learn basics/fundamentals of a programming language and then join a company as a junior developer (contractor). This will be the fastest way to learn and make money as well for your time ;)

Not the answer you're looking for? Browse other questions tagged or ask your own question.