I self-learned to code at 30. And so can you.

I self-learned to code at 30. And so can you.

You can build your first software project in just 234 hours of practice.

I self learned to code when I turned 30. Then launched a few side projects; and now run a full time SaaS biz (currently at $220 MRR). I think of myself as a coder now. My favourite tasks of the day are always engineering related. 

I think that everyone should learn to code. And my recent rant on that clearly touched a nerve. I got a lot of angry messages from people who disagreed. Which is fine, because this is my opinion and I am standing by it. I also got a lot of requests to show how I did it. So I went through 2 years worth of emails and chats to jog my memory on how I reached here. Hope my journey ends up being useful to you. 

First off, I absolutely 100% think that everyone can learn code. It seems difficult, but it’s not. And neither does it need to take 10,000 hours of practice; or 4 years of college. The image below show the exact number of hours I took to launch my 1st project. 

Hours I logged while I built my first side project

It was half baked, and buggy. But it had real users signing up! This is just 80 hours of actual code work. Assume around 160 hours or more of reading and learning. So if you have a full time job today, you can get those 240 hours in roughly 4 months. 

  • Every weekday - 1 hour post work 
  • Every weekend - 4 hours on Saturday and Sunday each
  • Done over 4.5 months, so total = 234 hours

If you still think that you need 10,000 hours to change your life; here is the exact number of hours I logged in my IDE (aka code editor tool) in 3 years. Full export of my logged time (via Wakatime) here.

Looking back, I think my journey to learn code can be broken down into 5 phases. Probably learning any new skill goes through the same graph.   

The early excitement is always fun. But cross the final chasm to go beyond being a "newbie"

Phase 1: Wannabe learning

My first attempt at learning to code back in 2018 was me simply following the herd. I was a business guy who had been running tech marketplaces & applications since I graduated. I wanted to learn it myself so that I can stop being dependent on others for my ideas. So I did what most of you have probably done before. I went to Google and typed “learn coding online”.

Where do I even start?

I think I tried at least 3-4 instructors and courses. Damn it was exciting! I change this line of code, and ooh the colour changes to red. Look ma, I am coding. I felt so powerful and fully in the driving seat. Anything was possible :) I am gonna learn frontend, and then server stuff, and then maybe a little bit of Artificial Intelligence and I would be all ready to launch my own startup in a few months.

Reality check - Every few days I would hit a wall. I was finding simple things like center aligning images on the page (margin:auto what?!) super difficult. Enter the first crash. I hit rock bottom pretty fast. This is the same crash that will inevitably happen to you too, unless you jump into this with a goal first. More below. 

Phase 2 - Goal based learning

I took a break from learning to code, and also from work for a few weeks. And then went back to the drawing board. I think those two weeks really helped me start thinking back from first principles. My memory is a bit hazy right now but I am pretty sure my wife also nudged me in the right direction. I remember her asking me one weekend “Why are you doing this? Why do you wanna do this and skip the weekend beer and pizza with friends”

So I sat down and crystallised my goal - “I want to startup again in 2 years, and run a sustainable tech business”. This goal led me to finally laying down a few frameworks and boundary points of the learning process. 


My goal meant that I must learn to code myself, at least build prototypes and get early users myself. I wouldn’t have VC and investor money to hire engineers. This was my why. I tattooed it into my brain this time. 

Details of the framework I laid down:

  • I don’t want to make my career in this — it’s ok if I don’t become an expert. My customers wouldn’t care if I write in React or Vue so why am I breaking my head over it? Today’s software ecosystem has a lot of abstractions, and you don’t need to reinvent the wheel again. Leave it to the experts, and to the people who want to make this their career. 
  • I need to validate my ideas fast — I will do no-code as much as possible e.g. signup emails to go via Zapier + Airtable. I asked my friends what would be the fastest framework to get started on and Django apparently came with all batteries included (admin panel, send emails etc) and I went with that! I decided to chuck React and other stuff and just went with simple JavaScript because apparently React had a steep learning curve. 
  • I need to learn both frontend and backend — Node.js was very tempting because apparently it could handle both things with just one language skill. But nobody in my network knew this language well so I didn’t pick it up. More below on “Finding your support group”.

The first project that I wanted to do was really simple - a list of celebrities that have “Ankylosing Spondylitis because I have the disease too and it was a good passion project to build. So I took out a notebook and scribbled the first version of the website. It was really simple - header, footer, one section on top, list of celebrities in a card design and 5 buttons to toggle between each category of celebrity. 

This opened the floodgates; and my progress became much faster. For everything that I wanted to achieve, I would google that thing. It was as simple as that. If I was starting from scratch today; this is how I would start googling:

  • How to start new website code document” --> you will see some weird new things here e.g. <!DOCTYPE html> so Google that next
  • What is doctype html”--> oh cool, just a simple declaration to tell browser how to load my page.  
  • How to add image to my page” --> done! But why is it always on the left?
  • How to right align image” -->
  • “Hide elements on page on button click” --> this will take you in the Javascript jungle. Which is a completely new skill. So maybe spend few days just learning basics of that. Then come back to this exact task.
  • “How to insert dynamic data on my website html” --> this will help you understand servers and databases

Diff goals lead to diff styles of learning paths e.g.

  • I want to automate my business - no need to learn code. Simply learn tools like Webflow, Zapier and Airtable. These no code tools are pretty good at letting you visually build tools
  • I want to build make high salaries, and build a career in software engineer — go join a school or at least a coding boot camp 
  • I like launching fun side projects — learn code, along with no code. Focus on design and Frontend (css, js) so that you can build beautiful things over the weekend and share with the world. 

Phase 3 - Copying others is good. But don’t blindly copy paste. 

The internet is a beautiful place. For everything that you want to do, it has probably been done before in some way or the other. My simple website to list celebrity names? Obviously a theme like that existed. I could have gone to Themeforest and simply downloaded such a theme and got the HTML/CSS/JS files. It was pretty tempting honestly. I even tried finding it. But I decided to go with the approach of not doing anything until I understand the basic blocks of software engineering. I didn’t want to know how computers are made (still don't!) but the basics are important for the long term.  

The first big difficulty that I hit was designing a mobile responsive card that will have the celebrity information. Neither was I a good designer, nor did I know how to code one. But once again, the internet solved it for me. I simply Googled for “sample code for website card design”. And voila. There were hundreds of tutorials for the same problem, and also ready made code that I can copy paste. 

You can find exhaustive tutorials on almost every feature you want as a newbie

As I said, feel free to copy this code and add to your website. But understand the basics first. Keep googling until you understand what everything means. And if your previous work on building buttons, colours, laying down HTML divs etc was done properly with good understanding - you will now find it much easier to read the code and edit it to fit your project. 

If you are feeling bad about cheating, then don’t. I am yet to meet any other software engineer that doesn’t do it. Learning from others, taking from their work and adding your own twist is what the entire open World Wide Web is based on. Everyone benefits!

Phase 4 - hitting a wall (again)

Not everything was rosy and smooth. There were loads of nights when nothing was working and I was completely stuck. The last time this had happened I gave up the whole thing for a full year and I didn't want to repeat that. You can’t do much here, apart from continue going. If your “why” is strong, then you will find the intrinsic motivation. If you are still struggling check the Phase 5 instructions. 

This is completely normal. You have achieved the 20% basics. By now you probably know the basic html page design and how servers and databases work. But you are struggling to probably add a filter to your page, or hook your frontend with the backend. It’s totally fine. You will get it soon. If it was easy, then everyone would be doing what you are trying to do. All the people who find this easy, have been doing it for years. Remember that. They were all struggling at some point of time. 

Update - 

This is apparently well researched topic called the U-curve of performance vs pressure. If you are not in the best performance zone, then decrease the pressure a bit. 

Phase 5 - finding your support group 

I am lucky to have peers, colleagues and friends from the technology world who already know how to code. People whom I can call at 2 AM with my issues and they will help me out. If you don’t have such a group, you can find them online. Keep asking questions online, engage deeply with people who reply to you in forum comments and make friends.

You would be very very surprised by how much the universe can provide you once you ask for help.

I used to buzz my friends on Whatsapp, emails and even calls! No one ever asked me to fuck off. Everyone was patient and super helpful. And I will forever be grateful to them. I think I might have given up without them. 

If you need more support, message me personally and I will make sure I am there for you. If you can show me serious about this, so will I be in helping you. I don't care if you are a stranger, or where you live. If you need help in getting this done, find a way to message me and I will be there.

What not to do

Don’t send “can you help me code” / “How do I learn javascript” generic messages. That is too vague and shows your lack of preparedness. Ask specific stuff e.g. “I want to center this button on my page, but it's left aligned. I tried Googling but I couldn’t make it work. Can you help?”. Or simply paste the code and ask “Why is this not working? This is the error that I get” 

Phase 6 - you are a coder now

My Github commits in 2020. The year where I finally felt a at ease with this new skill

One day, you will get up and realise you are a coder now. It would all seem so natural to you. You won’t be bashing your head on the keyboard every few hours. You would think that you were always meant to do this! It will become part of your life, and your entire identity would have changed. 

It might seem very far away if you are starting today, but it’s not. Just start. If you have started and are struggling today, go back to your why. Intrinsic motivation will see you through. If you have learned something new yourself online, I would love to hear what worked for you.

The 1% better newsletter

Actionable guides on remote work, leadership & lifestyle design.
No spam, ever.

Read more

Creativity is overrated

The science of being creative

Read Story

Change your heroes

Want to change your life? Start here.

Read Story