When learning to code, there is no such thing as the easy way. There is only the right way, and the right way is to power through the hard way as quickly as possible.
– Rafael D
✅ DO pick one popular language and stick with it
I see beginners ask this question a lot – which language to choose?
In the beginning you should pick a popular language with a lot of demand, because there will be plenty of help available online and any problem you run into will probably have an online solution already.
Other good beginner choices are Ruby or Python. Both are powerful languages with a relatively easy learning curve.
Pick one language and stick with it for at least six months.
❌ DO NOT “language hop”
Language hopping is when you spend a couple of weeks on one language, decide it’s too hard and move on to another one instead. It’s caused by the fear that the language you are learning is the “wrong one” and you are “wasting your time”.
The real waste of time is to keep switching between languages so that you never stick around long enough to learn anything.
When you switch languages the moment it becomes difficult you skip the step that would cause you to actually learn something. The process of pushing through the difficulty is what causes you to learn the language.
If you go back to square one with another language it will only be a matter of time before you run into the same roadblock again and all that time will have been wasted.
Learning a popular language is never a waste of time as long as you stick with it.
Once you learn your first language well enough, you can branch out and try others. But in the beginning you need laser focus on just one.
✅ DO learn by rote typing to build example apps
Find an example of a good program, then type it out and run it. There are thousands of online tutorials and books available for any popular language. Find one that takes you through building a simple app in your chosen language. Work through the examples in there and build the app yourself.
If you run into a problem, debug it yourself.
Here’s a secret most coders won’t tell you: a huge part of your job is figuring out why something is not working. So it pays to start learning these skills early on in the game.
If you give up trying to fix a bug and “cheat” by downloading the working version instead, you are really cheating yourself. You will waste your time and learn nothing this way.
✅ DO learn from doing drills and exercises.
❌ DO NOT try to “learn” by copying/pasting code from examples
Copying/pasting code from examples may seem like you are saving time but in actual fact you are wasting time because you will learn precisely nothing from doing this.
When working from an example, you must read the example, then type the code out with your own fingers. I cannot stress how important this is. You must learn the feeling of creation, which can only happen when the code comes from your own fingers.
✅ DO pick the right OS for your language
If you want to build games, you should probably use Windows and the Microsoft toolchain. If you want to build iOS apps, get a Mac. If you want to develop in Python or Ruby, you’ll have a much easier time on a Unix system (linux or OS X).
Do not make things even harder for yourself by going against the flow and using a language that is not designed to work well on your OS (e.g. Ruby on Windows).
✅ Stack Overflow is your friend
Programmers spend at least 50% of their time googling how to solve problems. Learn to get good at Googling for solutions to why your code isn’t working, and learn to love Stack Overflow for showing you the way.
✅ DO read good code
Find a great program in your chosen language and spend time reading random parts of it.
We live in a wonderful world where all the best programs are open source. It doesn’t matter if you don’t understand what it is doing, just looking at the shape of how the language is laid out on the page, the names chosen, the comment styles – these things will all teach you the essence of good style.
Here are a few examples of great code:
- Postgres (written in C)
- Rails (written in Ruby)
- Django (written in Python)
- Luminus (written in Clojure)
Shop around for a project you like, there are thousands of examples out there on github.
✅ DO learn about databases
Relational databases are boring, but they power a huge portion of the software you see and interact with every day. They are here because they work and they will still be here in twenty years time.
Learn as much as you can about SQL and how databases work, because this will always be useful knowledge.
Forget about NoSQL for now. You must learn the meat and potatoes of relational databases before you can have an educated opinion on the benefits of NoSQL databases and when they are the right/wrong choice.
✅ DO spend time learning the scaffolding
Scaffolding is all the little tedious jobs that surround and support the actual act of coding. These are things like
- Setting up databases
- Figuring out which version of Ruby to use
- Setting up your terminal properly
- Configuring your text editor to properly syntax-highlight your code
- Debugging networking issues
- Learning to use docker
- Understanding provisioning (for iOS)
These tedious tasks are the nitty gritty of your profession and you’ll spend a large portion of your professional career dealing with this stuff, so learn to do it properly.
You cannot skip over this step because it is an inescapable part of your job.
✅ DO give yourself a reason to succeed, and a deadline
I “tried” to learn code for years before I finally decided I was going to learn no matter what, and that pushed me over the hump.
I spent years spinning my wheels and making no real progress because I didn’t have a clear, compelling reason to succeed.
Then one day I quit my job and decided I would make my living writing code, and that pushed me over the edge.
I only had a few months of savings and during that time I sat in my house every day and fought my way through programming books. I did not go out and party. I did not take days off, except for Sundays. I did not spend time on Facebook or Instagram. I did not work another job and learn to code on the side. I did not look to either side of me, only straight ahead. I had tunnel vision.
When my cash ran out I went to my local co-working space and asked everyone in sight if they needed a developer. Lo and behold, somebody did (somebody always does…) and I built a site for them.
I worked 18 hour days to learn on the job and deliver what they needed. After that I hopped from one job to another, getting paid more and more each time and it was pretty much plain sailing from there.
When looking for your first clients, I recommend early stage startups. You can find them at incubators and co-working spaces.
Startups are great for learning to code. They don’t pay much but they are willing to accept less experienced coders to save money. They are more tolerant of mistakes and willing to accept a sub-standard product (and your first effort will be sub-standard). Look at it like a paid apprenticeship.
❌ DO NOT give up
If you’re feeling demoralized, take a break and come back again the next day. You will get it eventually if you stick at it, that’s a promise.
✅ DO write code for at least an hour every single day
You must write code every day. You are allowed one day off per week, other than that there are no excuses.
If you do not write code every day, you are not a coder. You are someone who wishes they could code but is actually destined to remain stuck in their shitty office job forever instead.