Programmers will tell you that you should
learn a new programming language every year. I'm not going to tell you otherwise. In fact I agree with this. Here's why, I believe that a language is just a tool to get your job done. More over, Python is
not how you program, Python is
a means by which you write programs.
When I got out of college I didn't really grok this. I knew there were many different programming languages, but Java was how I programmed. When I thought of a problem, I saw the solution in Java. It's almost like communicative languages. If your first language is English and you are taking French, you translate the French to English before really understanding the French.
This is what I would do with other languages and Java. It's not the best method to learning the language I've found. In fact, every language is different so trying to transpose one language to the other tends to push the
write Fortran in any language approach (no scientific study, just my experience). So, if I take a Java programmer and give them a project and tell them that the language being used is Javascript, they will write Java and the code will likely get written, but poorly and need to be completely refactored.
Going For The Goods
The way I would approach new languages was to take some existing problem and attempt to solve it in the new language. While this is one of the steps you'll need to take to really know the language, shouldn't you get familiar with it first? Think about your education for a moment. When you were in school taking Spanish, did the teacher start you off by saying english("I") and then spanish("I") or did she start you off by saying spanish("Take out your translated version of Tale of Two Cities in Spanish and read")? I'm going to assume the first scenario as this is what my experience was.
For me, diving into an existing problem and trying to tackle it with a language I've had no experience with just ends messy. It's almost like when you...ok I'm going to try not to make the Rails mistake. But, really, everything we as humans do when learning is experience based. We crawl, then learn to stand, then walk, then run...and so on. So why not start out with the same approach and build momentum for your language? I'm not saying that you need to spend hours relearning what a for loop is. I am saying that you should spend some time getting familiar with the syntax and differences of one language before trying to "go for the goods".
The Foreplay
Because I noticed that I was trying to run before walking with languages, I started taking a new approach. Instead of transposing language constructs, I instead started to rewrite common/well known data structures or algorithms in the language I was learning. There are a couple reasons to do this. First, I constantly feel out of practice when it comes to algorithms/data structure design. I don't claim to be a math wiz so
re-reading and
implementing them is great practice. Additionally and perhaps more importantly is that the algorithms/data structures I'm implementing aren't new ideas. These are tried and tested concepts that span languages. Thus, I will have comparable results.
Take this for instance. If you write a merge sort in one language, you'll most certainly be able to write it in another language, it will just be written differently using the appropriate syntax and language designs. Since you already know how a merge sort jiggles when you poke it, you can compare your version to the typical. Plus, you can calculate the speeds of doing said algorithm in the new language. This will provide you with some benchmarking for better decision making about the language.
Another Analogy
If you need another analogy, I used to play instruments. Typically, outside of August Rush, people who haven't touched a musical instrument must go through some period of time to learn the instrument. You need to learn how to caress it so that it will make music rather than just a mixture of noise. When you start out you don't learn
Für Elise you start with notes and scales. The notes and scales apply across instruments. You have to learn them for the instrument you're using, but you understand the concepts.
Conclusion
Warming up to the language seems to work best for me as I can compartmentalize the diffs of the languages preserving my memory for other interesting things. Then I can pull out what I need from each language. Think of it like this, the algorithms and data structures are your minds libraries and the syntaxes of the languages are the methods written on top. The algorithms aren't likely to change, but you're trying to evolve your syntaxes.
To summarize: I have a specific methodology for learning languages that I've found works really well for me. Although I'm sure many of you will have your own method for learning them, maybe this will help someone trying to get more familiar with differing languages and maybe give you a different approach.
Disclaimer
Always leave room to learn more about algorithms. Who knows, you might be the one to figure out how to make quick sorts obsolete. So, don't write them off, but know that they are tried and tested and because of that, produce predictable and comparable results. That is my reasoning for recommending them.
Comments (0)
Leave a comment...