How do I become a good programmer? Some advice needed

C wasn’t my first language, because it hadn’t been invented yet; Fortran was. C was my second language. I’ll take C any day.

C is much easier if you know assembly. Many old timers think that C is low level enough that learning pointers will have you set for “How stuff works,” but really until you’ve loaded an address into a register and accessed the data pointed to by that register–C may as well be Java for the level of understanding you will have if you didn’t get that core bit of computer knowledge down in a CS course.

Teaching yourself from scratch–where you have no idea why anything is the way it is, or what the history and pitfalls were that were encountered over the last 60 years of programming to cause languages to become designed as they are now–truly everything is just annoying and silly.
Personally, a pointer wouldn’t have made sense if I hadn’t used registers manually. And objects didn’t make sense (even though I had been forced to use them by Java) until I saw a C struct. Fixed length arrays didn’t make sense until I had to manually reallocate memory off the heap myself or decrement the stack pointer. A “heap” didn’t make sense until my assembly book described the layout of memory. Reading set buffer lengths of data off of a “stream” instead of just being able to say “Just give me the whole damn file darn you!” didn’t make sense until I dealt with streaming data (like the internet) and had enough experience to realise why a generic interface is better than one just for hard disk storage.

And–even though I had already done many of the things that I didn’t understand, and made code which ran perfectly fine–until I traced down the history of programming languages everything was annoying and made no sense. And yet, many my age don’t do this, and they go on to code perfectly fine starting with ASP and working their way downwards. Personally, I hated the high level langauges until I knew how they worked under the hood, and why they were designed the way they were–but that is probably just me.

But I can say that starting from either end, and in fact probably anywhere in the middle even is probably perfectly fine. Everything is mysterious and annoying–but that will go away with time as you figure out the things that personally annoy you. But what the best course of progression is probably a very personal thing–and until you know something and have an opinion on what you have already encountered, I don’t think anyone can really suggest a definitive course load that is perfect for you.

Here’s a cute little “Basic” language system. It is very powerful though, check out some of the examples.

http://www.basic4gl.net/

My advice, which seconds what has been said, is to learn programming concepts, not just a language. There’s a huge difference. Once you know the concepts you can basically pick up any language and run (not so easy in some cases but reading helps). Most languages have the same or similar control structures, methodologies, etc. just different syntax. I was a hobby programmer for a few years before studying Computer Science and having the chance to learn the concepts behind everything properly has given me a huge understanding of how I knew next to nothing previously :stuck_out_tongue:

Yep!

If you want to be a “hobby programmer”, that is, someone who is interested in programming for the mental challenge and the thrill of getting somthing to work for its own sake, then the important thing is to learn the concepts of programming: data structures, thinking out and implementing an algorithm, and modular design. Whatever language you choose will be OK. Back when I was first learning to code, the prescribed “learner’s language” was BASIC, then Pascal; nowadays it’s probably Java, or even Perl. There are many books that would serve you well in learning this stuff.

However, if you want to be a professional programmer, or a “serious” one, I would suggest you also take in a wider scope of topics in Computer Science: operating systems and how they work (how the file system and process and memory management is done); how the internals of a computer are organized (what is RAM, ROM, a CPU, the system bus, the memory bus, etc.) and at least play with some assembly programming; and if you intend to work as an applications programmer in the business or scientific world, something about relational database systems as well.

Depending on how far in which direction you want to go, I would recommend different books.

I tend to go with the higher language crowd. I learned my first languages 20+ years ago first basic(you know with line numbers and such) then assembly then pascal. Yes, assembly taught me more about how a program actually does its thing but basic had me writing useful programs far far sooner. I dropped out of programing for 18 years and came back recently and picked up java and c#. I think c# is the easier of the two to learn and it is a good stepping stone to learning c++. At this time I can look at c++ code and easily tell what it does and that will be where I head next but I think the ease of a higher language is a good tradeoff over the exactitudes that make c++ so much faster.

Also there are free versions of both java and c# out there. I know that Borland makes a reasonable good c# IDE/compiler for personal use that I used to learn the basics, and even better an excellent help system, a must IMO for a beginner.

Read books by Scott Meyers and Allen I. Holub.

Oh, and learn C++ before you learn C. If you do it the other way around, then you’ll probably wind up using C++ as just a fancier version of C, which is entirely the wrong way to think.