So recently a good friend of mine, approached me with the request: “Can you teach me to code?”
Of course I would, but I also struggled with where to find the time to do so (letting down the poor guy on more than one occasion!), it is after all a time consuming exercise, and for the next couple months, I’m low on free time (moving house and expecting a new baby). One other thing the lack of free time has been taking away from, has been putting up fresh content on this blog too (With the effect that my daily views has gone down by around 60% since two years ago).
Giving it all some thought, i figured, one way to invest what free time I have into both causes, might actually lead to a good idea. Instead of just teaching Marco, isn’t there maybe a way I can teach all of you? And in turn, some of you can help teach Marco too? (: Imagine that!
Knowing upfront this is going to lead to a LOT of articles, I guess a good place to kick this off is with a Part 1. And what better way to get this to gain some popularity than with a requisite clickbait-y title 😀
So what should Part 1 be? Well, when I started teaching myself to code 3 years ago – there were a couple things that stopped me from starting. If you have these barriers-to-entry stopping you from even trying, then whats the point in continuing this series? So – for part 1 – lets start off by addressing some of these Myths thats keeping you in the mindset of “I can’t code”
1. Its called CODE so it must be hard
Bullshit! It used to be code years ago, cryptic, hard to read, hard to write and hard to understand. These days, i think you’re better off thinking of it as plain old English, but with some basic rules of what goes where. It’s really not that hard! Its not cryptic. Anyone can, right now, figure out what a well-written piece of code does. Caveat here of course, some developers try to push their superiority complex on the world, by writing code in styles no one can figure out what they are doing. Stay away from those people, you don’t need that negativity in your life (; – the GOOD open source projects all have a relaxed coding style, where its easy to work with.
2. I’m going to have to write a tonne of code right?
Wrong! Over the last few decades, millions of wonderful people have gone and shared their work with the world. For MOST things you want to do, there is some kind of library/api/example code/documentation to work from. Most of your work is in bringing these things together. There is no shame in using Libraries to make your life easier! And believe me, they do make it easier!
3. Developers sit down, write a couple hundred lines of code, then (execute or compile) it and it just works! Mine doesnt!
Yeah, uhm, that not how it works. You look at someones code submission say on Github, and its a beautifully polished piece that works? Thats not how it started! Developers will never admit it, but they – just like you – often typed out a couple lines, run it, test it, debug it, add something on to it, make it do more, test again, find a problem, sit on the problem for hours trying to see why it doesnt work. Realise its a typo, fix it, test again. Rinse and repeat a few times, finally have the function doing exactly what they want. Then they sit down for a couple hours making it pretty, and adding nice comments. Thats the version they wrap up into nice Commit and send to Github. So no, you are no less than them, they just tend to hide the struggle and tell you you are stupid, to maintain that superiority complex
4. It’s called “Development” for a reason
This ones probably the biggest secret. That application you use daily: Its so smooth and finished and works so well right? Well, it didnt get that way from sitting down and writing it in one go.
The reality of development is that you start with something small, an idea, or a small existing piece of code. Then you DEVELOP the idea little by little until its great. It takes months sometimes and thats fine. Thats why they call it Development, its not done in one go, its a bunch of tiny little leaps!
So, most importantly, don’t feel bad at your little unpolished turd that finally compiles… keep at it, and in a few short months it too could be a diamond!
5. Other developers are so evil!
When you just get started, you might soon find yourself in a situation where you need to reach out to another developer (say the one who writes that Libary you want to use) – either to report an issue with their code, or to ask a question, or something like that. I bet you in just a few weeks you’ll come back and say something like “It’s useless, those guys just dont want to help! They were rude to me! etc”. Well, it’s empirically untrue. Developers DO want to help you become a developer too. But with Open Source software especially, those same developers face a lot of abuse from users. Because of that, most, if not all, has an automatical defensive response, until proven otherwise. You can get help, but how you ask for it, thats the secret. There is a LOOOONG document that is worth taking the time, to read from start to finish. It contains some of the BEST advice I’ve ever read in my life. Since I started reading it and practising it, i’ve been able to get absolute GOLD from developers the world sees as “evil”. Of course a little plain old friendliness, kindness and rallying up a couple donations toward their projects, also doesn’t hurt.
Head over to http://www.catb.org/esr/faqs/smart-questions.html to learn all about HOW to ask for help (: