So, someone from the NLSC forums realized I’m a CS (actually, CE) student, and asked me for tips on how to go around becoming a “good programmer”. Here’s what I had to say, coming from my own experience. Full disclosure, when I began my CE studies, I was already familiar with some programming concepts, since I had been using Visual Basic since grade school, and had started my own project at 2003. But, I still think what I write below could act as some tips even for a person who’s just getting to know programming.
There’s no particular language that will get you to be a good programmer. All the languages you’ve mentioned have one thing in common, they’re object-oriented. Which means, they’re based around classes (objects) and their properties and what you can do to manipulate those objects.
There’s many steps to becoming a good programmer, but the most important one is practice, and exploring programming outside the limits of the assignments that were given to you, when you have the time.
First of all, start with the basics. Start with a language like C or C++ and build small programs, follow a book’s examples or tutorials to learn stuff. You’ll make your first mistakes, learn how to debug them, get frustrated when nothing works, but it all matters. Then, as you go bigger with experience, problems will get more complex, you’ll find yourself walking up and down in your house trying to figure out how to solve a particular problem. You’ll try, it may work or not, you may scrap it or not, and move on. Debugging will become more difficult, as certain things will be broken when done in a certain way but not in another, and that’s when you’ll learn about call stacks and breakpoints. The most difficult part in programming for me so far is debugging small bugs in big applications. Those can be a bitch to find. There’s also those cryptic errors in C and C++ which just say “Segmentation Fault”, which until you’ve encountered them, you won’t know what debugging really is.
Do not go for a “modern” programming language such as Python or C# until you’ve had enough experience with C, C++ and Java. The more modern languages simplify things too much, things that an experienced programmer has done by hand in the older ones and can appreciate the fact that they’re easy in the newer ones. For example, each object you create in C must be properly disposed. If you enter a function, create an object, and then leave it without destroying/deleting/disposing it, you’ll have memory leaks which can be catastrophic. If you learn how to do that in C, you’ll appreciate that C# has what is called “garbage collection” (i.e. automatic disposal of everything that isn’t needed anymore). But you need to do it the hard way on your own, learn how it works, so you’ll be able to decide whether the automated method is for you.
Plus, it’s easier to return to C from C# if you’ve already used C for a while and are experienced in it, rather than those who just know C# and have to learn the difficult, non-automated stuff for the first time.
So, in general:
1) Learn the basics in C, C++ and Java using a book or a tutorial
2) Try to go bigger by experimenting on everything you build to improve it
3) Learn to debug, learn to read your call stack, learn to set breakpoints
4) Make sure you realize the differences between C and C++
5) Move on to a more modern programming language like C# or Python
6) Find an idea of a project of your own, start building it in them. This is pretty much the best way to learn advanced programming after all your studying and learning, as you’ll be working on something of your own, and you’ll be looking up more stuff constantly, learning and disproving previous notions that you may have about certain things.
Oh, and by the way, you may be enticed to go to StackOverflow.com every time you get stuck, but my recommendation is, don’t. Unless you’ve read your code a thousand times, tried debugging and nothing works, you need to put the most effort on it on your own while you’re learning. Having others do things for you won’t help you. StackOverflow is a useful resource for more advanced questions for things that you can’t even realize on how to start to look for or how they’re done, but it shouldn’t be used so that others do the work for you.
However, searching on the internet generally is recommended. Many other programmers like you were beginners at one point and had the same questions as you, so when you’re stuck, never be afraid to search what you’re looking for.
He then asked me if a month was a good amount of time to become good at Java, said he was watching thenewboston‘s tutorials on YouTube, and asked me about a specific book on Java I had never heard about. This is my answer.
Do not rush into programming. Java is a nice language to start with, but you’re going straight into the deep with learning to program graphical interfaces, mouse events, mouse listeners and the rest. Haven’t heard of the guy or the book, but you can look up every book on Amazon for reviews anyway.
Do not set a timeframe in which you should “learn” or “know” a language. Just take programming one step at a time, make sure you understand everything from a tutorial before moving to the next one, and if something’s not explained well, look it up in other places as well. Having a book by your side should make things much better.
It won’t take a month, it will take as long as it takes until you’re comfortable with writing and debugging things on your own.