If you’re wanting to get into programming, or you want to acquire a new skill that’ll make you more attractive in the job market, you’d be hard pressed to find a better language than Java. By some estimates Java is the most popular programming language in the world. Released in 1995, it’s certainly one of the older languages still in modern use.
But teaching yourself something as complicated as programming in Java can be really difficult. Unless you’re a Career Karma regular, that is, in which case it’s
How to Teach Yourself a Programming Language.
Programming is a complicated skill, one that people aren’t naturally adapted to in the way we’re adapted to recognizing faces. This means becoming a good programmer requires spending a lot of time building the right kinds of intuitions. I know of no way to do that besides spending lots of time working on coding problems that are just at the edge of your abilities.
There are some tricks you can use to get the most out of this time. I often find that talking through code helps me understand what the programmer was trying to accomplish and whether they succeeded. The best way to approach this is to code alongside a partner, but it’s also pretty effective if you’re by yourself.
This is sometimes called ‘The Rubber Ducky Method’ because you can talk out loud to a rubber duck you keep on your desk–assuming you don’t mind having your coworkers look at you funny.
I’ve also spent lots of time ‘coding’ by writing out code ideas or examples with pen and paper. This forces you to slow down and pay more attention to the little details of syntax, which can bite you more often than you might think.
A lot of experienced programmers recommend reading code backwards to get some of the same benefits. The problem is that when you’ve been working on a problem for a long time your brain is prone to reading what you meant to say, not what you actually said.
And I’ve recently begun keeping a document on my computer where I save code snippets that solve tricky problems. Once I finally get a function or whatever to do the thing I wanted it to, I’ll note the incorrect code and the correct code in this document for reference later. To cement these techniques in memory I will periodically return to that document and review this growing body of programming knowledge.
Remember: Persistence Wins Out
As a person who got started programming relatively late with no background, I’m fully aware of how intimidating and frustrating it can be.
It’s important to remember that acquiring difficult skills like learning to code takes a lot of struggle and a lot of perseverance. But if you show up everyday, put in the hours, and consistently learn from your mistakes, there’s no reason you can’t teach yourself Java or any other programming language.