Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question

closed as off-topic by gnat, MichaelT, user16764, Bart van Ingen Schenau, Kilian Foth Jan 31 at 16:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking career or education advice are off topic on Programmers. They are only meaningful to the asker and do not generate lasting value for the broader programming community. Furthermore, in most cases, any answer is going to be a subjective opinion that may not take into account all the nuances of a (your) particular circumstance." – gnat, MichaelT, user16764, Bart van Ingen Schenau, Kilian Foth
If this question can be reworded to fit the rules in the help center, please edit the question.

    
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 Dec 3 '10 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 Dec 3 '10 at 13:56
    
I think this is a good question. I've edited to make it a bit clearer. –  Gary Rowe Dec 3 '10 at 15:11
add comment

5 Answers

up vote 25 down vote accepted

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.
share|improve this answer
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 Heiler Dec 3 '10 at 14:38
    
@Jeremy Good suggestion, I've put it in there. –  Gary Rowe Dec 3 '10 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 Dec 6 '10 at 8:29
    
special colour scheme to cue the change of mindset, can you shed some light on this? –  Santosh Kumar Feb 7 '13 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 Rowe Feb 7 '13 at 7:35
add comment
while (stillLearning)
{
    read(some);
    practice(lots);
}
share|improve this answer
    
Hi Steven - good advice thanks –  user9057 Dec 6 '10 at 8:28
    
4a5 > cross_pollinate(many); –  Slomojo Feb 28 '11 at 6:39
add comment

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

share|improve this answer
    
Sounds fun. See you in 10 years! –  Jeremy Heiler Dec 3 '10 at 15:09
    
+1 for step 2 write a compiler for L! Brain... hurts.. so... much... now. –  Gary Rowe Dec 3 '10 at 15:46
    
Hi Inaimathi- thanks for the suggestions –  user9057 Dec 6 '10 at 8:28
add comment

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.

share|improve this answer
    
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 Dec 7 '11 at 13:56
add comment

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 ;)

share|improve this answer
add comment

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