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

  1. 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.

    rob

    Jul 4, 09:05 PM #

  2. 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.

    Thame

    Jul 4, 09:25 PM #

  3. 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.

    rob

    Jul 4, 10:03 PM #

  4. 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.

    KalEl

    Jul 5, 12:16 AM #

  5. 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.

    Harry

    Jul 5, 02:41 AM #

  6. 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!

    Kevin

    Jul 5, 03:11 AM #

  7. 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.

    ultramancool

    Jul 5, 03:16 AM #

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

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

    Anthony

    Jul 5, 04:41 AM #

  9. 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.

    tom

    Jul 5, 04:44 AM #

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

    Marius Bernklev

    Jul 5, 04:50 AM #

  11. 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.

    veritech

    Jul 5, 04:56 AM #

  12. 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/

    Alvanweb

    Jul 5, 05:01 AM #

  13. 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

    Denis the SQL Menace

    Jul 5, 05:19 AM #

  14. 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.

    D'n

    Jul 5, 06:24 AM #

  15. 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

    Whitter

    Jul 5, 06:36 AM #

  16. 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.

    nobody

    Jul 5, 06:36 AM #

  17. 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!

    JJung

    Jul 5, 06:49 AM #

  18. 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.

    Thame

    Jul 5, 07:02 AM #

  19. 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.

    JT

    Jul 5, 07:39 AM #

  20. 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!!!”

    Derek Vladnik

    Jul 5, 08:41 AM #

  21. 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.

    Gabe

    Jul 5, 09:18 AM #

  22. 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, :).

    Burton Posey

    Jul 5, 11:28 AM #

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

    Eric N

    Jul 5, 11:44 AM #

  24. 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.

    florist in 32901

    Jul 5, 12:33 PM #

  25. 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

    web design uk

    Jul 5, 01:24 PM #

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

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

    Dan P

    Jul 5, 02:08 PM #

  27. 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.

    David Atkins

    Jul 5, 02:22 PM #

  28. 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!

    benj

    Jul 5, 02:49 PM #

  29. 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.

    Matt Todd

    Jul 5, 05:04 PM #

  30. @ Dan P

    heheh, nice catch.

    maseone

    Jul 5, 05:18 PM #

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

    Thame

    Jul 5, 05:41 PM #

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

    zoel

    Jul 5, 07:09 PM #

  33. 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.

    Mark Maunder

    Jul 5, 10:14 PM #

  34. 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.

    Sean

    Jul 6, 01:26 AM #

  35. 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.

    fens

    Jul 7, 07:29 AM #

  36. Congratulations Thame! :)

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

    Tarun

    Jul 7, 10:38 PM #

  37. Thanks Tarun!

    Thame

    Jul 9, 08:41 PM #

  38. 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.

    adi

    Jul 10, 04:53 AM #

  39. 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.

    Geoff

    Jul 11, 09:36 AM #

  40. 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.

    app

    Jul 11, 08:36 PM #

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

    Azhar A

    Jul 23, 09:26 AM #

  42. Really Superb tips

    Anish Gopan

    Sep 15, 07:52 AM #

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

    Andy

    Nov 15, 03:36 PM #

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

    John

    Dec 1, 07:09 PM #

  45. 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!

    Dan

    Jan 19, 01:14 AM #

  46. 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.

    Rick

    Aug 18, 02:39 AM #

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

    Windy

    Mar 19, 10:15 PM #

Add a Comment

Phrase modifiers:

_emphasis_
*strong*
__italic__
**bold**
??citation??
-deleted text-
@code@

Block modifiers:

bq. Blockquote
p. Paragraph

Links:

"linktext":http://example.com


Show Articles By:

You can show articles by time or category.

  • 260.

    The Ethics of Practicing Procedures on the Nearly Dead

    The report from the field was not promising by any stretch, extensive trauma, and perhaps most importantly unknown “downtime” (referencing the period where the patient received no basic care like...

    Read More

  • 260.

    The Ethics of Teaching Hospitals

    I can’t imagine what the patient was thinking. Seeing my trembling hands approaching the lacerations on his face with a sharp needle. I tried to reassure him that I knew what I was doing, but the...

    Read More

  • 260.

    Conscious Conversation: Behavioral Science

    Dr. Eran Zaidel is a professor of Behavioral Neuroscience and faculty member at the Brain Research Institute at UCLA. His work focuses on hemispheric specialization and interhemispheric interaction...

    Read More

  • 260.

    Progress Report

    Two years down, I’m still going. The next two years are my clinical rotations, the actual hands-on training. It’s a scary prospect, responsibilities and such; but it’s equally exciting, after...

    Read More

  • 260.

    Why Medical School Should Be Free

    There’s a lot of really great doctors out there, but unfortunately, there’s also some bad ones. That’s a problem we don’t need to have, and I think it’s caused by some problems with the...

    Read More

  • 260.

    The Cerebellum: a model for learning in the brain

    I know, it’s been a while. Busy is no excuse though, as it is becoming clear that writing for erraticwisdom was an important part of exercising certain parts of my brain that I have neglected...

    Read More

  • 260.

    Conscious Conversation: Philosophy

    Daniel Black, author of Erectlocution, was kind enough to chat with me one day and we had a great discussion – have a listen.

    Read More

  • 260.

    The Stuff in Between

    I’m actually almost normal when not agonizing over robot production details, and quite a bit has happened since I last wrote an update. First, I’ve finally graduated. I had a bit of a...

    Read More