Ok, that's a little misleading. I've been messing around with computers since I was a little kid (including dabbling with several incarnations of BASIC), and have done a few of those online interactive language introductions (such as JavaScript). In college I worked for a small company where, among other things, I was their "computer guy" by virtue of knowing more about computers than anyone else, so I was responsible for networking, installation, and general troubleshooting.
Anyway, my brother wants to write this new app in C#, so I figured that if I'm to be of any actual assistance, I'd better learn the language! I ran through the relevant interactive intro courses on Codecademy and SoloLearn, which is roughly equivalent to reading the rules of chess but not actually playing a game.
We hadn't yet found time to get together and work on the project, so I considered what to do next in order to keep learning. A couple of years ago, after doing the JavaScript intro, I had started working on a console version of FreeCell, as it seemed like an appropriate learning challenge: clear, but uncomplicated rules, but also non-trivial to implement (at least for someone of my experience). I hadn't ever finished that project, so I thought it would be nice to do it in C#.
Shortly after I started working on that, my wife and I had a new baby! After coming home from the hospital, I started getting up at 3am to take care of him, so my wife could get some uninterrupted sleep, and I needed something to keep my mind off, well, sleeping. Working on this C# program was a great project for these early morning hours, and I made a lot of progress!
We'll call that phase 1 of learning to program in C#. Here are a few of the key things I learned (in no particular order):
- When I was "learning" JavaScript, I was just using an online code editor, which had some built in formatting features and error detection, but nothing like Intellisense in Visual Studio, which I've been using for C#. A feature like Intellisense is pretty amazing.
- It's amazing for several reasons: one, it helps reduce the drudgery of repeatedly typing the same sorts of things over and over again. (I'm not talking about code re-use here, but basic things like names) Two, it helps reveal to the novice (me) the internal logic of the language by showing me the sorts of things the compiler is looking for. Three, by reminding me of the arguments required by different methods. There is value in making errors, in that they are an opportunity for learning (and learning more concretely), but too many errors just leads to frustration and negatively impacts learning. Intellisense doesn't do the programming for me, as I still have to choose the correct options and use them correctly once I have them on the page.
- I was at first frustrated by the fact that C# is much more strongly typed than JavaScript, as it made certain trivial things more difficult. However, at a certain point in writing my JavaScript program, I had started to encounter unexpected behavior which took a long time to figure out, and some of it was due to implicit type conversion happening "under the hood". C# has been making me work harder to get things set up, but this has had the very important effect of making me think more carefully about what my variables and objects are doing! Rather than just stabbing at particular outcomes, I am thinking more about how the computer "thinks" about things.
- Oh dear, there is a lot more to learn! Continuing with the chess analogy I used earlier, I now know the basic rules, and have learned the basic principles of development (a term applicable to both chess and software!), but I am almost completely ignorant of combinations or structure.
