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.

When I was in school, I had a difficult time getting into programming because of a catch-22 in the learning process:

  1. I didn't know how to write anything because I didn't know what keywords and commands meant. For example (as a student, I would think), "what does this using namespace std; thing do anyway?
  2. I didn't know what keywords and commands meant because I hadn't written anything.

This basically led me to spending countless long night cursing the compiler as I made minor tweaks to my assignments until they would compile (and hopefully perform whatever operation they were supposed to).

Is there a teaching/learning method that anyone uses that gets around this catch-22?

I am trying to make this non-argumentative, which is why I don't want to know the 'best' method, but rather which methods exist.

share|improve this question

migrated from stackoverflow.com Feb 3 '11 at 21:08

This question came from our site for professional and enthusiast programmers.

1  
Read the book ? –  Yochai Timmer Feb 3 '11 at 21:06
    
@Yochai: That was part of the late nights, but, again, I had a difficult time doing anything when I didn't know why I was doing it, and I didn't know why to do anything because I didn't know what was needed to be done. –  Mark Avenius Feb 3 '11 at 21:08
    
How were your other classes different from programming? Learning a new skill is learning a new skill. Get instruction, read the text, apply the text, ask questions, get answers, attain knowledge. Why did this same methodology not work for programming when it worked for every other subject? –  KevinDTimm Feb 3 '11 at 21:15

9 Answers 9

up vote 3 down vote accepted

You need to do a combination of reading/studying and coding. Working through a book that has sample problems (with solution code) might be the best if you're being annoyed by the small errors.

In the end with programming though, you learn the most when things go wrong. If solving the problems is frustrating instead of being an enjoyable challange then maybe programming is not for you.

share|improve this answer
    
that is what I did, and I eventually got over the issues that I was facing. I am asking this so I can give advice to young developers who are starting out so they don't have the same struggle I went through. But I guess there is no silver bullet :-) –  Mark Avenius Feb 3 '11 at 21:13
    
@Mark Avenius I don't think there is a silver bullet. I think everyone gets a baptism of fire at some point, I know I did. –  Alb Feb 3 '11 at 21:14

Perhaps you should start with something simpler that doesn't require too much apparently extraneous code that only becomes clear when you've learnt more.

One way would be to use something like Visual Studio as your editor which will create a lot of this boiler plate code for you. You can create an empty project in C++, C# or VB.NET and it will compile and run (doing nothing) straight "out of the box".

You can then concentrate on getting the algorithms and data structures you are trying to learn correct.

When you have more experience you can then delve into this boiler plate code and work out what it does and why it does it. For more advanced programs you will have to.

share|improve this answer

Looking back, I just realized that the way I learned to program maps directly to the Dreyfus Model

Novice I typed programs directly from the back of Compute! magazine and Family Computing I didn't know what it meant just that the end result would be a free game!

Advanced Beginner I started to learn what the different commands I was typing in did and was able to make simple modifications to the program

Competent I began writing simple programs from the ground up and learning more than BASIC (added Pascal to my known languages)

Proficient For school, I had to write advanced programs that performed complex goals.

Expert Programming is the easiest part of my job. The hard part is figuring out what to program.

For each language I learn, depending on its similarities to my currently known languages, I start between Advanced Beginner and Competent. I'm currently learning F# and would call myself a Novice there.

Writing an application for college work is difficult if you have no understanding of programming. The only way to address this is to write code and lots of it. Also if you're learning C++ pick up the C++ Primer and work through that book. It was a god-send for me.

share|improve this answer

If you are learning any natural language, you practice by speaking, reading, writing and translating.

Translating is largely forgotten, when learning a programming language. Rosetta Code is an excellent place to get hold of a lot of "translating" exercises.

share|improve this answer

Depending on your learning style, tutorials or formal educational settings can work though this depends a lot on the individual in question.

share|improve this answer

I'd suggest finding some interesting example in the language I'm looking at.

The example needs to be well explained like the stuff at CodeProject

And then google anything i don't understand.

share|improve this answer

There is only one way Hands On Practice, I might look good to talk about concepts but you have to implement them and get your hands dirty.

share|improve this answer

I don't see this as a catch 22 situation. Long nights filled with cursing are part of the fun of being a programmer. You can get out of that situation in either direction -- either code more so you have more experience and don't make as many rookie syntax mistakes, or read more so that you have a better idea of what you're doing before you start writing the code. The path you choose is a matter of preference. I am a "reader" and like to read a book on a new technology before I try it out, but most of my peers are "tinkerers" and would rather try something out, and only look up reference materials when stuck.

It also sounds like you might want to start out in something other than C++. It has its own set of headaches for a novice programmer. There are other languages and platforms / IDEs that are easier for beginners.

share|improve this answer

I spent many a night at the computer lab (that's were we went before PCs, people) logged into the VAX from a dumb terminal, trying to get all the syntax errors out of pascal programs.

You need to check into Alice.

Alice is an innovative 3D programming environment that makes it easy to create an animation for telling a story, playing an interactive game, or a video to share on the web. Alice is a teaching tool for introductory computing. It uses 3D graphics and a drag-and-drop interface to facilitate a more engaging, less frustrating first programming experience.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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