Why and how you should learn to code

Why and how you should learn to code

Tools & Tech

Table of contents

This is the first in a series of posts where I’ll be sharing stuff I’ve learned from 5 years of running a pretty successful medical education startup whilst being a medical student at Cambridge University.

Quick background - my company (6med) has been running since 2013, and averages £125,000 in annual revenue. We’ve taught over 5,000 students across the UK, Singapore, Hong Kong and The Netherlands, with over 20,000 using our online resources. We’ve done this as a small team of friends, all studying medicine full-time but teaching courses/making websites/doing 6med stuff on some evenings and weekends. We’ve learned a lot over the years of doing this, and want to share some of it with you - actionable advice that you can hopefully apply to your own life in your own side projects.

So if you’re a student (or otherwise engaged full-time) but might be interested in starting your own business/startup/app/project on the side, hopefully you’ll find some of this stuff useful.

You should learn how to code

If there’s one piece of advice I could give to anyone interested in starting their own business, it’s that you should learn the basics of web design and coding.

Why? Two reasons. Firstly, knowing how to code opens up possibilities for business ideas in your mind. It helps you notice problems in day-to-day life that can be solved by technology. And secondly, knowing how to code helps you execute your ideas much, much faster than everyone else. Let’s explore these in a bit more detail.

Knowing code helps you notice business ideas

The way to get startup ideas is not to try to think of startup ideas. It's to look for problems, preferably problems you have yourself. Paul Graham (Y Combinator)

This is golden advice when it comes to generating ideas. There’s often very little to be gained from sitting in a room with your tech-savvy mates and thinking “right guys, let’s come up with a startup idea to make money”. Instead, the best ideas come about from experience, from noticing problems that you have in your own life, and then generating solutions for those problems.

Knowing the basics of how to code helps with both. Let’s say you’re a surgical trainee, and you have to fill out consent forms for the same appendicectomy operation 10 times per week. You duplicate exactly the same information on each form - in fact, the only thing that really changes is the patient’s name and their signature. A ’normal’ surgical trainee might regard this as no more than a minor annoyance, and not even consider how the process could be streamlined. But a surgical trainee who taught herself how to code for a few weeks at university - she will immediately notice that it would be pretty easy to make an app for consenting patients, one that automatically fills out the complications, leaving her with more time to explain stuff to the patient and less time writing the same information over and over again. This, in fact, is the story behind Surgical Consent, an app that does what it says on the tin and is being trialled at various hospitals this year.

There are literally thousands of examples like this - where an idea for innovation is first noticed by someone with a background in coding. That person knows how easy it is to hack together an app that talks to a database and that could save a lot of time for real people, and so they start to notice areas in their working lives where that could be applied.

Knowing code helps you execute your ideas

Knowing the basics of design and code will also help you execute your ideas much, much faster than someone who doesn’t. In my example, I had the idea for the BMAT Crash Course one night during Ramadan while at the mosque. I mulled the idea over in my head on the way home, and had the website online and taking bookings exactly 7 days later. My background in design and code firstly made the idea feasible - it took the idea from “it would be cool to run a local BMAT course” to “hmm, if I’m running a local BMAT course, I might as well make a website and advertise it nationally”. This thought was what sparked the whole company, and if I didn’t have a basic background in design and code, 6med likely would have never happened, and I wouldn’t have put so much money in bitcoin…

How to learn how to code

Okay, so you’re sold on the idea of learning how to code. You might even have dabbled with it a few times in the past, but never really got past the initial stages.

Coding can often seem like a black box to those entering the field for the first time. There are so many languages, frameworks, platforms - how do you know where to begin?

Here’s my suggestion - start with web development and completely ignore ‘app development’ (ie: iOS and Android) for the time being. Within web development, start by teaching yourself HTML and CSS. There are some very good courses on Codeschool, CodeCademy, Udemy, Coursera - many of them are free, but if you’re happy to pay £10 or so, you can get a really high quality course that’ll teach you the important stuff in a matter of a few days.

Once you’re familiar with HTML and CSS, you should learn Javascript which will teach you how to add interactivity to web pages, and will be a solid foundation for you to learn NodeJS. Again, Codeschool, Codecademy, Udemy etc, all have really good courses on Javascript and NodeJS that are quite fun to work through.

Having done this, you’ll now know how to ‘talk’ to a database, and once you can write code that talks to a database, you can spin up practically any app or website you can think of. Let’s say you’re Jack Dorsey and you have the idea for Twitter - your basic app is a text field for a tweet, and when you hit the ‘Tweet’ button, your code inserts an entry into the database. When you want to read a list of tweets, just retrieve them from the database. The ability to write code that talks to a database completely changes the game in terms of the possibilities you’ll see for businesses/apps/products as you go about your life.

How hard is it to learn to code?

So far, I might have made it sound like anyone can hop onto Udemy, learn how to code and then make the next Twitter.

That’s not what I’m suggesting. Coding can be quite hard in practice, but learning the basics is reasonably straightforward, and the basics are all you really need to kick-start your creativity. I can remember when I was first teaching myself coding in Year 8, and coming across the concept of databases and reading about how to write data to and read data from a database. I can remember my brain proverbially exploding at the implications, and spent the next few weeks of French lessons planning out how to make an online game:

so we have a table that contains the player’s stats, like their health and stamina, and the amount of gold they have. We can have another table with all the various items, including their name, an image, a cost price. If a player wants to buy an item, we can retrieve the item from the items table, work out its cost, and subtract that from the player’s total_goldin the player_stats table

I still go back to this simple concept of databases whenever I think of a new project. For example, when I first had the idea for an online BMAT question bank (BMAT Ninja), I came up with the database structure within a few minutes:

Okay, so we want a table for the users containing their email and encrypted passwords. We want a table for all the questions, containing the question_textalong with option_a to option_e, and also the correct_answer and solution. To track a user’s progress through the question bank, we can have a completed_questions table that stores the user_id and the question_id of the question they just did, along with time_taken and user_selected_answerto see what answer they put.

None of this is particularly groundbreaking stuff, and by following a ‘Learn to code’ course on any of the websites I’ve suggested for a few weeks, you’ll have the power to (at least theoretically) build almost any website/web app you can think of. Sure, the process of actually building it will be hard and will probably take a lot of time, but by learning the basics of coding you’ll at least know what the possibilities are.

And let’s say further down the line, you’re a working professional and you have an idea for a simple app based on a database that would save you and your colleagues time in your working lives. If you know the basics of coding, you can form the structure of the app in your head, and then find someone else to actually design/code the app for you - websites like Upwork.com are great for finding reasonably-priced freelance developers who can do precisely that.

So is coding hard? Yes. But is learning the basics of code particularly hard? Not really - with the wealth of incredible online courses available today, all you need is an inquisitive mind and the desire to work through the exercises to gain basic proficiency in a reasonable timeframe.

Concluding Remarks

So yeah, if you’re thinking of starting a startup/business/app/whatever on the side, chances are it’ll be something at least loosely tech-related (because the barrier to entry for those is so low, and the potential upside is so high).

If you’re in that position then you should definitely learn how to code. I’ve got a medical student friend who started a £10 course on Udemy 3 weeks ago. He’s been enjoying working through the exercises, and with just a few hours in the evenings each week, he’s already taught himself HTML and CSS and is working through Javascript. He’s already made stuff like an online to-do list and a web-based game, and is looking forward to applying his newfound skills to problems he encounters within the medical field, with the long-term plan of hopefully spinning these solutions off into a startup of his own.

I hope you enjoyed reading this post, or found it useful in some way, and wish you the very best of luck on your journey. If you need a hand, you can always reach out to me via Twitter/YouTube/Instagram.


This post was originally written for The New Medic, an initiative that I'm involved with. You should check that out to read more articles from medics who do much cooler stuff than I do on the side.

Browse Topics

Sunday Snippets

Sign up for Sunday Snippets - my weekly newsletter where I share actionable productivity tips, practical life advice, and high-quality insights from across the web, directly to your inbox.

Join 157,912 friendly readers


Join 157,912 friendly subscribers getting Sunday Snippets every week

You've successfully subscribed to Ali Abdaal
Welcome! You are now a Ali Abdaal subscriber.
Welcome back! You've successfully signed in.
Success! You are now a paying member and have access to all content.
Success! Your billing info is updated.
Billing info update failed.