BBW, I feel embarassed that since I am the one around here who is loudest about programming skills, I've been loose about how you actually acquire them. Yike enumerates goals, so I would like to offer advice on how to get them.
0: programming is an imperative craft, you are doing something to a computer, not vice versa, anyone attending a CQF info session with me learns that is my philosophy.
1: Adopt the discipline of counting from zero.
2: Adopt the habit of counting how many things are in intervals that you encounter in everyday life. A good % of all programming errors come from not counting things properly, more generally the "out by one" error.
3: Program things that don't need programming. Excel will import a variety of formats, but can get really confused if (say) you import data that may have commas in it, which breaks up CSV files. Automate your application process for applying for internships, write a macro to spot the fact that you over-use certain words in text . The point here is that many get bogged down in trying to get a computer to do something that they don't really know how to do themselves. Start with things where you have a complete analysis of the task already because its something you now do manually.
4: Program something that should not be programmed. There are any number of proprietary data formats out there, applications that are "sealed" and not intended to be automated and/or apps that very nearly do what you want.
5: Program things in ways that are unnecessarily hard. For instance I once wrote a spell checker that didn't have a dictionary...
I used a mix of Markov chains and hash tables,
because I could .
6: Write programs that generate programs. This is both useful and instructive. A system I had to get data into had errors in the input which the system diagnosed as "Bad file", awkward when there was very large number of ticks in the data set and there was no description of what it did accept and I had no control over the data being generate in the first place. So I wrote bit of code that turned each line of data into 3 inputs for the API interface, and compiled it into a
big C++ program. You have no idea how cool the team that got this really quite shit bit of code thought this was.
Code generation makes you think about syntax in a different way.
7: Write generic code even when you don't need to. You're a student, the task is not to finish the assignment, but to learn from it. In real life you might write code that barely works once and is then thrown away, but the skill of generic code development will be useful for code you want to reuse.
8: Debug other people's code. In real life that will be part of your job and is a major aspect of many interviews. If you don't have access to other people's code take sample programs on thew web and make them
better. Doesn't matter how you define better, you want to be a better programmer and a better programmer is someone who programs better. Add error checking, find out the cases the sample code can't cope with and add them. Make it faster.
9: Argue with other programmers. Is the memory management in Linux more sophisticated than in Linux ? Can you defend that ?
10. Find insanely brute force methods to solve problems. By this point you must have a whole pack of optimisation methods. Great.
But often in the real world there will be constraints that make them really slow, also brute force is a good way of checking you're right, a trillion goes round a loop is not always unacceptable.
11: Try to code in a different language from the one you're being taught. The more different the better. For most here that doesn't mean
C++ or Java it means Haskell or F#. Why ?
Because they are different ways of addressing a problem and a serious programmer thinks in a richer set of ideas and models than those his language accepts as code. Excel VBA doesn't have sets, it's really quite hard to get
C++ programs to modify themselves but having these ideas makes you a superior programer. Write number crunching routines in SQL, no reason, except one day you will need to.
12: Adopt the habit of looking at every single thing that you see as some sort of defective computer that you personally can make better.
Nowadays lots of things have chips in them, could you do better ?
A train sign tells you how long until the next train, how does that work ? Could it be better ? What does "better" mean ? Does "better" mean true, or one that makes customers less pissed at waiting ? The thermodynamics you learned should tell you some sort of relationship between the temperature of water and rate of transfer of heat in your kettle, could a chip in the kettle make it more efficient ? My posts on Quantnet really piss you off, can you find a way of hacking Javascript so that you never see them ?
13: There are any number of algorithmic brainteasers on the Web, regard any that you can't do as personal failures.