How do you learn a new computer language?
-
I find the only way to learn is to do and then, preferably, teach. Little known fact - your knowledge retention when teaching can be as high as 90% compared to 10% sitting in a classroom being lectured... I have normally learned new languages because of a need or desire to use them, rather than just as a desire to learn them. So I have a project in mind, and start programming. I usually do a few 'test' programs as I go - just testing out concepts and then, when I feel I understand them sufficiently to make an informed decision, I use them (or otherwise) in the project. I also find that I continue to learn by not reusing code without question; so, when not time critical, I will look over existing libraries that I or my employer has, and investigate other methods that could be used - this often leads to new pastures where I feast upon the lush, fresh grass of knowledge (sorry, waxed lyrical there for a moment) What I find I can't do is just read (or watch videos) about some technique or other without doing. Personally I also find I need to understand what's going on in order to feel comfortable using new methods. Learning something as big as a programming language is necessarily time consuming, so I generally try to concentrate on one area at a time, until I am reasonably comfortable with it. Small steps give you a better feeling of progress, and you can always re-engineer stuff that uses a familiar technique. Example: When I was first learning Linq (and I am still no expert) I still wrote a lot of
foreach(droid in collectionOfDroids)
{
if(droid.name = theDroidImlookingFor)
{
foundDroid = droid;
}
}Rather than using the equivalent Linq, because although I knew it was possible, and approximately how to do it, I wasn't comfortable enough that I knew it well enough to risk life code on it. But I did tend to comment it so I could come back later and re-do it if it turned out that Linq would be 'better'.
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
_Maxxx_ wrote:
Rather than using the equivalent Linq, because although I knew it was possible, and approximately how to do it, I wasn't comfortable enough that I knew it well enough to risk life code on it. But I did tend to comment it so I could come back later and re-do it if it turned out that Linq would be 'better'.
Yes, we move to new techniques step by step. In C++ I remember moving to STL where my initial use amounted to no more than using basic_string, vector, etc., instead of MFC CString, CArray, etc. Then some algorithms, then algorithms plus function objects. Re: C# LINQ and lambdas, I now find that having gotten over the learning curve I find such code easier to read and understand than traditional loops and conditionals! That's because it reads in a more declarative manner.
Kevin
-
When I was in high school, I took a programming class that involved Visual Basic, but I didn't like VB much so I learned QuickBasic on my home computer by reading the documentation built into QuickBasic. Lots of playing around (making games, visualizations, and so on). Years later, I now laugh at my best QuickBasic code, but it served its purpose to get me thinking about the right things. When I learned WPF (because it seemed interesting), I read a book on WPF and played around (making a code migration utility). When I learned XSLT, I did so because it was required of my job and I didn't read any books. I just stumbled through some examples laid out by the Umbraco community and Googled and tested when I ran into problems. I still haven't learned all the aspects of C#/VB.Net. I need to look more into LINQ and I'm curious about expression trees. I bought a book on LINQ that has a section on expression trees and I'll work my way through that as time permits. I'm sure I'll be Googling a bit as well. What I do know of LINQ I've gathered from coworkers and online sample code. So there are many ways I learn. Unfortunately, they are all time consuming. Such is the nature of the beast of learning. I find the hardest part of learning is being motivated enough to devote time to a subject... if you've got that covered, I wouldn't worry about it being time consuming, as your time is being well spent.
> I find the hardest part of learning is being motivated enough to devote time to a subject... Agree. Well maybe while I was a college student, I was interested in the subject. After working for sometime, I find out programming is boring. I can do the job, but find out I don't want to touch it (programming) after work. (That means my learning, at most of the time, was from studying source code my coworkers have transferred to me.) If I want to, I could have taken a course in ASP.NET almost 3.5 years ago after I started a new project in ASP.NET. Right now as I have a book on C# 2.0 (yes). I don't want it to collect dust, so I pull out and read from time to time. But find out reading it while taking transit back and forth workplace is both boring and hurt my arms.