In case you hadn’t noticed, we live in a polyglot world. As a developer (in my mind anyway), you have two options.
- You can sit back and double-down on your primary language (probably Java) and force it to work for everything (regardless of whether it should or not).
- Or, you can embrace change, new development paradigms and languages so that you’re capable of always developing closest to the platform you’re delivering on.
Matt Might said it best:
One should always choose the programming language that reduces the impedance mismatch between a problem and its solution.
Or, in other words, don’t use Java in the browser for rich web applications
and don’t use web technologies for native mobile apps. On an editorial note and IMNSHO, every developer
should be JavaScript proficient. It’s not the assembly of the web (I’ve never seen any assembly that is powerful, expressive, and
a multi-paradigm advocate, have you?). It’s not bad (or more bad than other languages) and it has a lot more good parts than people give
it credit for. On top of that, it’s ubiquitous.
I’m not saying there’s something wrong with Java. It’ll be around for a long time (forever maybe). It just may not be the best
solution for all your problems. I also think that “Java as a platform” (i.e., the virtual machine) has a big future (think Scala, Jython, Clojure, etc).
Enough editorializing, option two above is the best. Embrace change. Be uncomfortable. That’s how you know you’re learning.
Here’s how you can grok new languages and get up to speed quickly. Keep in mind
that the only way to achieve true mastery of a language is to put in the keyboard time. This just helps you ramp up quickly.
- Get some context (ignore the pundits and the stereotypical developer hubris - at least at first)
- Why was the language created?
- For example, Lua was created in Brazil due to trade barriers that caused it to be built domestically from scratch.
- What “itch” did it “scratch”?
- Io was built out of desire to get to know how languages worked.
- When was it created? What was going on in the industry during that time?
- What languages inspired it?
- What programming paradigm does it advocate?
- Single paradigm or multiple paradigms?
- If you are unaware, there are four main paradigms: object-oriented, imperative, functional, and logic programming.
- Dive into the language
- I like to setup a Github repository (or Bitbucket if you need to keep it private) when I dive into a language. For example, with R (that I’m still groking), I created a repository called ’learn-r’.
- Create small examples and comment your code furiously. It may make sense now what you’re doing but when you come back, it won’t.
- Name the file so it’s easy to see what it contains.
- Also, comment the top of each small code example with the purpose so it can be easily grep-ed when you’re looking for a reference.
- This varies a bit with each language, but you’ll probably want to follow something close to this:
- Setup - do you need to install an interpreter, a compiler, dependencies?
- Try and avoid an IDE initially. They help, but sometimes they abstract your setup too much.
- “Hello World”
- This checks to make sure you have your environment all setup.
- Comments
- An important part of coding
- Variables
- Decisions & Conditional statements
- Functions
- Imports
- Data structures
- Project structuring
- Any expected format? Packages?
- See what the pundits are saying (try to find intelligent conversations, not 0).
- Do a Google search on Hacker News.
- Check out some of the popular questions on stackoverflow. Why were they asked, why are they popular?
- There are some great books out there as well.
- Look at (sometimes seemingly random) rankings. tiobe.com or the recent RedMonk rankings.
- Use Google Trends, see geographic areas searching for the technology (yah, Utah’s legit).
Most importantly, be intellectually curious. Go tangential. The most important thing is to ask why, and then try to answer that question.