5 Tips For a Beginning Programmer

For someone who spends most of their time in Photoshop or working with relatively simple languages like HTML and CSS, it can be difficult to move to more advanced (and more interesting) programming languages. The transition is significant and requires an overhaul in the way you approach a task or problem.

Being a beginning programmer myself, I have found the following tips very helpful in learning both the concepts behind general programming and the specifics of individual languages.

  1. Get the basics down first: It is important to realize that the logic behind most languages is nearly identical. So understanding what variables, loops and functions are beforehand will be invaluable. As described by Kyle Neath, learning various languages will be akin to learning to interpret a new accent once you understand their foundation. The best way to learn these basics is by focusing first on the concepts presented in your programming tutorial before reapproaching the content to learn the syntax, etc.
  2. Get a good book: This may seem like a no-brainer, but finding a good book that can walk you through the process is very important. Try starting of with a ‘For Beginners’ book as these usually do not make the assumption that you are at least partially familiar with the content they present. Also, consider picking up a couple of these introductory volumes as the authors of these types of books are often forced to cut out important parts to keep the lengths down so you might find important topics in one book that went completely untouched in another. Plus, it’s always helpful to reread those foundational concepts.
  3. Learn by doing: This is perhaps the most important tip because it ensures that you are actually learning the concepts and syntax and not just recognizing what happens. There’s a big difference between actually writing the code and telling yourself that this is what I would do. Most books have end-of-section exercises – they’re there for a reason. Being presented with a problem or question helps you learn how to approach future programs.
  4. Go old school: When you’re first learning a programming language, it is easy to become overwhelmed with relatively minor syntax, style and conceptual problems making it difficult to remember what exactly it was that you were trying to do. By outlining your program’s function and scope on paper (or the electronic equivalent) you can quickly remind yourself of what you’re trying to achieve.
  5. Community Participation: A big part of learning a new programming language is joining an active and proud community. Whether it’s a co-worker, mailing list or forum, connecting with an expert can be just what you need. Books are good for setting you up but you’ll often find yourself faced with a seemingly insurmountable obstacle once you begin applying your new knowledge. At times like these, the practical experience of a seasoned programmer is essential not only to help you solve your problem but also to learn how the problem was solved.

If you have any tips that might be of use to a young programmer, feel free to submit them in a comment.

In German

46 Comments

  1. rob

    Jul 4, 10:05 PM

    6. Get used to working with version control (such as Subversion or CVS) early on. You’re guaranteed to use it at some point, even if you don’t pursue programming as a career, and being comfortable with it will increase your own productivity as well as it being another rather employable string to your bow.

  2. Thame

    Jul 4, 10:25 PM

    Great tip Rob.

    I remember when I first started my job and was completely unfamiliar with CVS and was downright terrified to use it. Practicing on your own test server will be very helpful so that you’re not forced to work with it on a high-profile website when you’re still uncomfortable with it.

  3. rob

    Jul 4, 11:03 PM

    I was the same once; now I’ve sort of gone overboard, and use SVN for virtually everything. I’ve found it particularly useful for documents; being able to revert back to any previous version of an essay or other piece of writing is a godsend, and it also works great for group projects.

  4. KalEl

    Jul 5, 01:16 AM

    Version Control, no doubt a very important tool when you are at a later stage, is hardly a concern for the beginner programmer. Even though useful, and learning and using it will be benificial no doubt, it is first of all not an integral part of programming itself… and secondly one can have a career in programming without even knowing it. So in my feeling even though this tip is useful, it is not a tip for beginners. If it is, lots of other concepts also come to my mind, like Design Patterns for example.

  5. Harry

    Jul 5, 03:41 AM

    I must again recommend version control software. If I known about it when I was at uni I would have saved myself an amazing amount of time.

  6. Kevin

    Jul 5, 04:11 AM

    Why not spell check this blog? It’s so easy, and could add to the professionalism level. Drives me nuts when people don’t take that small step!

  7. ultramancool

    Jul 5, 04:16 AM

    I found that subversion was much easier to learn and more powerful than CVS. That’s just my opinion and other people may think different, I’m not trying to troll here, but I’d recommend SVN to a noob.

  8. Anthony

    Jul 5, 05:41 AM

    Two words, one book:
    “Code Complete” (http://www.cc2e.com/)

    it’s really a classic for turning an amateur into a professional

  9. tom

    Jul 5, 05:44 AM

    I’ve been working for a web development company for about a year and a bit and we use VSS (Microsoft Visual Source Safe) and it is fantastic! Unless of course someone new starts with us and doesn’t quite understand the basics and then goes to check out a file/s, doesn’t realize that some of the files have been changed since the last time they did a ‘get’ of the files then checks in a new version that erases the last version change because they didn’t get the latest version of the file before editing it.

    I’ve seen a senior designer behave very arrogantly about source control, only wanting to burn his work to a CD every few days, causing problems as above and such, so happy that he resigned. I hate having to compare heaps of files to ensure that they have the correct changes applied.

    My point here is that understanding a Source Control system (We develop ASP .NET applications, .NET is fantastic!) is vital to ensuring productivity in a team environment.

  10. Marius Bernklev

    Jul 5, 05:50 AM

    There is no such thing as a perfect book. Don’t /consider/ buying several. Just do it. Borrowing from friends and libraries also works.

  11. veritech

    Jul 5, 05:56 AM

    I’ve been teaching myself from the beginning, after almost two years, i went from making horrible html table based websites to writing visual basic programs and learning C, i learnt most of this tips on my own, but it’s nice to see that i’m on the right path.

  12. Alvanweb

    Jul 5, 06:01 AM

    I see this very useful and translate a large extent this nice article to Persian language in my blog:
    http://weblog.alvanweb.com/2006/07/05/5-tips-for-a-beginning-programmer/

  13. Denis the SQL Menace

    Jul 5, 06:19 AM

    I agree Code Complete (2nd edition) is a must have.
    Other books that are worth mentioning are Design Patterns and Refactoring

    It probably helps to start with something that doesn’t have a huge library, for example C. Once you master the basic concepts you can progress to Java/C#/etc and you will see that a lot of the stuff is already in the library and you don’t have to write your own

  14. D'n

    Jul 5, 07:24 AM

    Rule 0:
    KISS: Keep It Simple, Sammy…

    The simpler a program is, the easier it is to fix it or change it. Use “cute” tricks only when there is no easier way to do it.

    Rule 7:
    Do what they expect

    Make your interfaces work the way someone who has never seen your program before, but knows what he wants to do, would EXPECT. You want to have your user “Save” his work? Use F2 or ^S or File/Save—because that’s what most programs your user has used in the past have used.

  15. Whitter

    Jul 5, 07:36 AM

    Before even starting to write any code:

    Rule #1: Work out what you want the code to do
    Rule #2: Work out how to achieve the task(s) in #1 in logical steps
    Rule #3: Work out how you will be able to tell if your code really does #1 or not.
    Rule #4: While writing your code, keep on testing #3

  16. nobody

    Jul 5, 07:36 AM

    I can’t beleive i wasted 30 seconds of my life on this article… mabye they should have added a 6th tip…

    6.) Buy a computer, and learn how to turn it on.

  17. JJung

    Jul 5, 07:49 AM

    Excellent tips! I started teaching myself programming (with a few tips from my dad) when I was 10, then about age 14 I started learning C++ and it has taken off since then and I now know SQL, HTML, CSS, ColdFusion, Visual Basic, Java, Javascript, and Flash Actionscript.

    Now that I am in college and doing quite a lot of programming for work I can see the things that have helped me the most and those that have hindered.

    One of the things that makes me frustrated now that I am in college is that a lot of programming classes emphasize form and design over practice. Its like learning music theory without ever practicing an instrument. Sure you may know how programming works “ideally” but when it comes down to the line and its crunch time I would much rather have the experience and practice to work out a bug in fifteen minutes than have the concept of the “perfect program and how to design it” but then spend ten hours working through code to find that bug.

    Programming is an art. If you want to be good, my biggest tip would be to practice your butt off and don’t assume that because you know how to design a program on paper means you’ll have any clue how to put it into real code!

  18. Thame

    Jul 5, 08:02 AM

    Thanks to the suggestions for Code Complete. I can’t say I’ve heard of it before and it seems like a great resource.

    Also, thanks D’n, Whitter, and anyone else with a suggestion. To those complaining about the simplicity of these tips, I’m sorry. I did target it towards beginners but perhaps it was a little too beginner-ish.

  19. JT

    Jul 5, 08:39 AM

    JJung: Thank you for reaffirming my belief that college course work is not necessary for learning programming.

    I’m a beginner programmer as well (by the by, tip 1 & 3 are the ones that actually do something) and in the beginning portions I wondered if I could actually get somewhere without formal education.

    You are right…. doing it is what makes the difference. Start out with small challenges and work out to bigger ones.

  20. Derek Vladnik

    Jul 5, 09:41 AM

    It’s important to keep drilling the basics. Some examples: IF, WHILE, function declaration, class declaration, instantiating a class, etc. Just drill the hell out of those, until you can remember them in your sleep. It just sucks to have to stumble like this: “Now I must write class.. DAMN!@#$%.. How do I get this right??!! It doesn’t compile!!!”

  21. Gabe

    Jul 5, 10:18 AM

    JT: while it is true that a college degree alone does not make you a good programmer. A good computer science curriculum includes exposure to a whole array of critical knowledge that you wouldn’t even know to look for. A good school is like a multiplier on your programming skill.

    I learned to program as a teenager, which was ideal, because in college I was able to focus on the theory. Unfotunately a lot of students who had never written code before were too hung up on the syntax to really absorb the theory.

  22. Burton Posey

    Jul 5, 12:28 PM

    In response to Gabe’s comments,

    I totally agree to anyone looking at learning to program. If you don’t do it before you start at the college level. There’s a potential to get left in the dust because you’re trying to wrap your head around the syntax. I learned this first hand, but had never taken the initiative outside of what I could learn from a high school class. To add to that, my high school didn’t offer programming of any kind, so I didn’t learn anything about the subject before I headed off to a top Computer Science program.

    So please, take the initiative and learn on your own. I would like to think that theoretically and syntactically I really know my stuff now, but it will cost you time and money (lots to a teenager) learning what your classmates knew when they got accepted to the university, :).

  23. Eric N

    Jul 5, 12:44 PM

    two other books i’d put out there along with Code Complete is The Pragmatic Programmer and Coder To Developer – all great books

  24. florist in 32901

    Jul 5, 01:33 PM

    There is only one way to learn advanced programming, and that is by coming up with something you want the computer to do and making it do it. Its akin to learning a musical instrument…no matter how many books on technique and theory you read, until you pick the damn thing up and bang on it, you haven’t learned anything.

    Good programming is, IMO, much more artistry then most people give it credit for. Creating a well-behaving, useful program is very similar to writing a cool, popular song. There are no “right” or “wrong” way to do it, as long as it works.

  25. web design uk

    Jul 5, 02:24 PM

    I agree. Getting a good book will help loads. When I first learned PHP it was by myself, all I used was a book by Larry Ulman. It was a great resource.

    Lovely tips, keep up the great work

  26. Dan P

    Jul 5, 03:08 PM

    “So understanding what variables, loops and functions are beforehand will be invaluable.”

    What’s a ‘loop’? And what’s a ‘variable’?—A Haskell Programmer :-)

  27. David Atkins

    Jul 5, 03:22 PM

    For those that gave advice for using Microsoft Visual Source Safe, I’d stay away from it in droves. Your Revision Management software should be the most reliable part of your development environment, it should be transactional and easy to backup and restore. I’m required to use VSS for some of my projects, and I find it highly unreliable. Even though, VSS 2005 is a marked improvement, it still does not light a candle to something more robust like Subversion. And, when time is critical, and you realize that your source repository is corrupted beyond repair., it really makes you nervous.

    Also, the Subversion development model works better (no “checking out” or locking source files), makes for more frequent, test and commit cycles, which I believe results in more reliable code.

  28. benj

    Jul 5, 03:49 PM

    I can’t believe this hasn’t been mentioned yet:

    // write comments!

    Maybe fold this into rule #4: Instead of outlining what you want the program to do on paper, do so in a comment. If you write out step by step comments you can fill them in with code as you go. This is often a very useful technique for tricky bits of code.

    If you are having trouble figuring out how to accomplish something, the next person to come along and read your code probably will too (and that person is often an older you). Comments help organise your thoughts and help the next guy read your code. Write comments!

  29. Matt Todd

    Jul 5, 06:04 PM

    How about learning what Rubber Ducking is? OK, I’ll tell you: it’s stumbling over your problem, then describing it to a rubber duck. This allows you to verbalize the problem and, more than likely, spot the flaw with it!

    To be more concise: learn to verbalize your impossible problems into simple instructions to find out where the logic or method breaks down.

    M.T.

  30. maseone

    Jul 5, 06:18 PM

    @ Dan P

    heheh, nice catch.

  31. Thame

    Jul 5, 06:41 PM

    Lots of great tips in these comments (Matt, benj, florist and more). I, for one, have picked up my copy of Code Complete.

  32. zoel

    Jul 5, 08:09 PM

    Learn by doing , Community Participation and Internet is BEST teacher for devlop your self

  33. Mark Maunder

    Jul 5, 11:14 PM

    Have fun. Enjoying coding is the reason I can work 20 hour days. Sitting back and putting an application you created from scratch through it’s paces is incredibly satisfying. Seeing how much further you can push your abilities is even more satisfying. Don’t start coding by working on someone elses app – you’re going to hate that. Rather start by writing your own from the ground up – it’s the best way to learn.

  34. Sean

    Jul 6, 02:26 AM

    When working with others, make sure you have a strong plan, as well as some semblance of consistancy in naming of variables, classes etc. Several programmers writing the same piece of code, haphazardly throwing their ideas into a program, makes a very disorganized program.

  35. fens

    Jul 7, 08:29 AM

    Use good names for variables & functions.

    Outline in a comments what it does and the possible return values, maybe even an example of how its used.

    If its a big project for public use consider documentation it as developers like to tinker with code.

    And for beginners too, check other peoples code. Rewrite it even. Learn by example. People write code to be open soure sometimes ;) check how they do things, it’s a great way to learn new things.

  36. Tarun

    Jul 7, 11:38 PM

    Congratulations Thame! :)

    http://www.lovelyblogs.com/2006/07/06/erratic-wisdom/

  37. Thame

    Jul 9, 09:41 PM

    Thanks Tarun!

  38. adi

    Jul 10, 05:53 AM

    A good program should not be aware only on writting code. He should write flexible code and easy to reuse. Try to read about design principles: www.oodesign.com. You can find a lot of resources on the internet about design patterns.

  39. Geoff

    Jul 11, 10:36 AM

    Great Article!!!

    I agree that adding books to your library is very valuable to any programmer. Just as valuable is creating and maintaining a Code Snippit Library as well. It will reduce you debugging and development time, that is if you save you debugged versions of code snippets.

    I enjoyed reading everyone’s comments and insight offered here, found some very useful.

  40. app

    Jul 11, 09:36 PM

    For a beginner…and even a pro… books are very important…and very expensive.

    The pro is making money from their programming and most likely can afford them. The beginner most likely can not.

    This is why I put together a list of freely available programming related ebooks here:

    http://www.programmingebooks.tk

    Also, many beginners make the mistake of getting discouraged by boredom. They don’t want to do the boring learning projects and instead want to jump head first into the deep end without knowing how to swim.

    Patience…that day will come. In the mean time, get creative. Ask yourself with each new skill you learn, “How can I use this?”

    The answers may surprise you if you dig deep into your imagination. You might just think up the next ‘good thing’. And even if you don’t, you will at least have fun and stay motivated.

  41. Azhar A

    Jul 23, 10:26 AM

    Thanks for your advice.I am a beginner in this field.I think i need such informative resources

  42. Anish Gopan

    Sep 15, 08:52 AM

    Really Superb tips

  43. Andy

    Nov 15, 04:36 PM

    There is no such thing as a perfect book. Don’t /consider/ buying several. Just do it. Borrowing from friends and libraries also works.

  44. John

    Dec 1, 08:09 PM

    Another most important thing is run some simply code , this way you can learn how to use most of the functions.

  45. Dan

    Jan 19, 02:14 AM

    Nice tips, comments I agree with, although I do not use them, but I blame that on being a beginner.
    And Thame, just wondering, but how do you deal with those people who put down your articles, I mean, they read it, they’re not happy with it, so they post comments such as : Those tips are crap! You have no idea what your talking about. I Hope they realize that no one is making them read this stuff, and if they wanted to add a tip, well theres a thing called creative criticism.
    Once again, thanks for the tips!

  46. Rick

    Aug 18, 03:39 AM

    Hi, nice thread.

    Can you help me out on choosing the right programming language to start up with? Otherwise i might grab Code Complete as advised.

    I’ve had my programming classes way way back 9yrs ago. And had Turbo Pascal 6 as the last hands-on language. I’m planning to jump for Java but it seems i’ve had some little problems on it. I think i need to refresh and recondition my thoughts on new simple programs to start up. Thanks.

Leave a Comment

Comment