top of page

Should I learn to code? and if so, how do I start?

I've sat on this post for a couple of months. As I wasn't sure the best way to address the advances in AI. It's a tricky thing to advise someone on whether they should start learning to code or not. I get asked a lot, mainly due to the site but also by those who have seen my work or are interested in learning it.

The problem is, how can you advise someone on starting a skill? In my mind, it's akin to learning an instrument like the piano or guitar. If someone asked you if they should learn an instrument, what are you going to say? If you want to? If it interest's you? If you've got the time and patience to develop it?

Another thing about coding is, you don't just learn to do it and then you're done. You can do it for years and still get better, and still have things to learn.

Much like an instrument, it can be a lifelong pursuit. Or you can be a three-chord trick player and get by most songs around a campfire ;)

I suppose one difference is that not everyone is expected to be able to play a bit of guitar in their day-to-day job. Coding, especially for medics, particularly when looking at the statistical side and certainly in research, is going that way. You should all be able to plot some data and do some stats or Kaplan-Meier curves, and you're not going to be able to do that without a bit of coding ability.


The AI Copilot

However, the other conundrum is AI. AI is making a lot of coding skills redundant. For the most part, any of the statistical stuff—the coding at least—AI can do a lot of it for you.

And therein lies the problem. If AI can't do it, you don't need a beginner coder—you need someone with years of experience to pull it apart. AI can do a heck of a lot, increasingly so, so the bridge between what it can do and what it can't is now pretty vast. So it's hard to know if it's worth people learning to do it unless it's to take fairly seriously and learn to a substantial level.


To make it worthwhile, you're going to have to put a lot of work into it before you get to what AI can already do for you. And then, by the time you're at that point, you're probably able to walk into a junior coding role—which, to go back to my guitar analogy, do you really want to be a coder? Or do you just want to be able to do it when you need it?

I don't think anyone can really answer the question for you.


One thing I do know about coding is that some of the best learning comes with the struggle—and the problem sitting there overnight whilst your brain slowly chips away at it. It's hard to see how that would work now with a fairly competent AI assistant who you can fall back on at every hurdle. Especially as a beginner. It would take some discipline just to not rely on it to learn the ropes.

Many people get stuck on where to start and what to start on, all from this time pressure and desire to not want to waste time on the wrong thing...

A consequence of modern life: we don't have time to waste.


Which, again, when you think about it—how can you commit to something that will take you likely years part-time to get competent enough to do as well as an AI bot?

It's hard to see it being compatible with anyone who has a full-time job and lives in our 'modern' every minute counts world.


So, is it worth it? I'll indulge myself and share my opinion with you now.


Yes

I think coding is a brilliant way of using your brain's clock cycles, and I'm always pumped when people want to join in on the fun.

You can become engulfed by a virtual world of floating modules, dependencies, and variables. You create and explore from the comfort of your own chair, bringing the joy of losing yourself in a book with the cognitive engagement of playing a tough game of chess. You can find flow! It is a truly awesome and rewarding experience. I've lost hours and days to this world. It's art and science combined.


So in summary then

This is, of course, a truly subjective experience. It's something I got to after years of graft. Filling my kindle with best practices and loving it. There is no end to my learning—I'll always be able to be a better coder. But for those considering it today, maybe, with AI as it is, it may actually not be worth it unless you're going to do it as a caree. Unless you acknowledge that it may be something you do for fun, and it's okay to always have an AI bot that can do it better.


I suppose that's already true of many things. Take chess, for example—I've always loved the game. I watch the world champs battle it out, follow their moves, do the puzzles. It's great. But even the world champs can't touch AI. Is it a futile and pointless game because AI can't be beaten? We don't seem to think so.

Is the 100m sprint pointless because we made the motorbike? No, of course not.





So ignoring the narrative of not learning to code, let's talk about it in case you do feel like it's worth taking the plunge.

Even if it's just for the intellectual curiosity, for the fun of it. It is fun after all.


Resource

The first question to address is resource.

Not about finding resources, quite the opposite. Filtering them.

Let's face it—they're not hard to find. You're inundated with them (as anyone with a Google search engine will have discovered. Also, if you don't know how to use a Google search engine yet, I'll save you time; coding isn't for you. 😉

As with most things you can possibly find a way to charge money for, the internet is full of 'crash' programming courses.


Learning Style Matters

That's an individual choice as well. How do you want to learn to code?

Maybe you want a personal experience with an online course?

Maybe group work is your thing?

...Or maybe you want to physically be in the room with someone showing you the ropes because if you go on one more Teams meeting that day you might shoot yourself in the face.

It's all out there, and you've got to lean into whatever works for you. What will keep you motivated, and how much cash you've got to burn.

Personally, I hated group work or being in a classroom learning to code. I felt self-conscious and time-pressured. I like to sit and take my time, struggle with the problems on my own terms. So for me, I'd always go for a self-paced online course.


Ready to Code! Wait, Code What?

Coding isn't a single thing. It's actually an increasingly complex web (no pun intended) of languages, frameworks, and interconnected principles.

Google coding tutorials and you'll be hit with catchy names like Django, Java, Laravel, and Python, which will seductively lure you onto sites like Udemy and Coursera.

Before you know it, you're at page 2 signing up for a diamond discounted package at £60 a month for full-stack tutorials with the promise of just one weekend of work before you can competently code.

Just to once again dispel this myth right here—coding isn't a single weekend or 'start and finish idea,' nor is it a 'can or can't' kind of thing.

You won't master coding in 1 weekend, or 1 week, or ... n weeks. Or possibly even n years.

It's a skill that you get better at as you do it, and one you get worse at if you stop doing it. (Looking at myself in the mirror.)


Motivation

If you go into this without an idea of why or what you want to get out of coding, before you know it you'll be down a rabbit hole of learning a typeface tutorial without actually knowing what a typeface is, why you're learning it, or what you can use it for!

I can see why many might just immediately close the lid of the laptop and say 'sod this...' I'm off to watch Netflix. It is, after all, the golden age of television.

So find your motivation. When you've got that, you're golden.


Getting Started

One of the benefits of starting to code in 2024 is that it has been made easy to pick up and get going without much work. Thanks to web-based scripting environments such as Jupyter Notebooks, Replit, Google Colab, etc... it's a plug-and-play event.


Gone are the days that you'd waste your energy and enthusiasm by banging your head against the wall of your operating system trying to set up system variables to get your compiler to work. That eventuality still exists, but by the time you get there, you will hopefully know what a system variable is and why you need to add it to your PATH.

So really the main choice you have to make is what language to go for.


There Are 14 Million Languages out there!!

Which one shall I choose?

I think this circles back to motivation—what you want to code and why.

Ultimately, programming is for people who want to build something.

Whether it's automating something you do regularly, making a pretty app to do something cool online, or maybe it's more data sciencey and you want to make some pretty graphs from your data.

Whatever it is, it's this motivation that will keep you coming back, so I would strongly advise you let that lead your decision about what language to learn. Having a project to complete will also keep that motivation going. Learning by the process of building something is probably the best bit of advice I can give, and the skills definitely come as a result. Experiental learning at its finest!


I Like Games, So I Want to Build in C++

Some languages are better suited to others, both for the task you want to complete and the level of competency you might have in general IT.

I've been asked by newcomers about C++ a few times. After all, that is fundamentally what a lot of the libraries are built in, and it's super fast, so that's what keen beans think they should be doing... Honestly, don't do that.

C++ is a very high-performance language, yes, it's used to do fast maths for AI, it's used in all the cool graphics for games like Call of Duty. It does real-time simulations etc...

But would I start with it? Hell no.

Unless you want to start manually playing with memory management and making your PC blue screen within 5 minutes of starting.

It's too hard to begin with. The entry-level is not for your typical novice.

It's for people who are used to tinkering with their machine at a fundamental level, and maybe that is you. But for the majority, I would say it certainly isn't.


And I say this from a point of total hypocrisy, as I am also in the camp of doing things in a hardcore fashion because I think that's the way they should be done.

Like getting the biggest textbook to learn everything on a subject to show for some bizarre reason that I can learn it all to amazing depth, and almost inevitably every time failing without learning the lesson.

Take it from me—come back to C++ once you've got some chops in other languages.


Okay, Not C++ Then...

Here's a table of what I'd recommend for getting started with and their respective use cases:

Purpose

Language

Difficulty

Machine Learning & AI

Python

Easy / Medium

Cross Platform (App Development)

Dart (Flutter)

Medium

Website Development

HTML, CSS, Javascript

Medium / Hard




The Language Wade

This bit gets a bit more techy, so feel free to skip to the concluding remarks if you're not up for learning about some languages.


User Base

One aspect of coding communities is the user base. Everything I've mentioned so far is mainstream. So whatever you code, whenever you code - there will be someone out there who you can access with an answer (be it AI or human).

Community gets a bit more relevant when you're thinking about niche area's or languages, plugins, or if it's a new language and has some weird bugs (yes another meta mic drop moment is when you come to realise that languages are actually coded - and can have flaws. Especially when you find one. Boom...)


Python

Named as a nod to Monty Python's flying circus, Python is the go-to language for machine learning. Often pitched against R as its main competition on the statistical tool front as they both have extensive libraries (collections of tools and methods) that make statistical operations much easier. I'm not a fan of R, It has no sense of humour and its name is more a piratey expression than a programming language.

Python is a language you can pick up and get started with with no background knowledge of how computers work. It's accessible, fun, and easy to learn the basics quickly.


My favourite bits about the language

One of the great things about Python for both beginners and more experienced programmers is that it is dynamically typed, which means you don't need to worry about explicitly stating what type your variables and objects are.

This can make it easier to break things though, a double-edged sword.

One of the defining characteristics of a programming language is how each language defines its variables. Static or dynamically typed.

Dynamically typed means that you don't have to tell Python what your new variable is made of. So, you don't need to tell it that your new variable 'myNumber' is a number.

It works this out when you enter '12345' that you're playing with numbers.

This comes with numerous benefits.

One is to remove the hurdle of defining your variable type, which might make your program look cleaner and easier to read.

Another is that it's nice when you don't crash your program when you accidentally save 'This is my String of words' into your lovely 'myNumber' variable.

The downside is that when you try to do a mathematical operation on that string of words the compiler just can't make work without a number. Then it's welcome to Crash City. Population you.


Quick programming chat - What's a variable

A variable is the basic building block of any program.

Everything you make will be made up of these basic building blocks, the atoms, if you will, of your bigger structures.

Basic constituents are things like numbers, letters, or boolean (true or false).

Most things are made of combinations of these. So when you think about it like that, how hard can programming be? :D Hah.


Clean Syntax: Colons, Curlies and Whitespace

For every other language I've used for the past 30 years, you needed to use a semicolon ';' at the end of each line, with extensive curly brackets '{ }' around your blocks of code.

Whitespace (that is, any gap or space or indentation on each line of code) was ignored, so you could choose to put your blocks anywhere on the screen and surround them in randomly placed curly brackets, and as long as it made sense to the compiler, it would work!

This often led to a messy pyramid of barely readable code - even to you, the one who wrote it, let alone those you're coding with.


In Python, you don't do that. You can't.

Which is awesome. A line of code finishes at the end of your line of code.

No semicolon is required. Nor do you need to wrap everything in brackets.


Whitespace win

The biggest evolutionary win in my eyes is that Python uses whitespace to give information about the structure of the code.

This is an insanely clever use of information that was completely ignored previously.

It was also a massive source of headaches, as everyone would indent their code a bit differently, so it all looked different and was way less accessible to read and find errors.


Summary

In summary, Python is a great place to start if you're interested in learning. It's great for doing some machine learning and AI, or just getting a grasp of what it is to be a programmer.

The downside is that it's not a pretty interface you're creating, and whilst it can be used to do front-end stuff with libraries—they don't look fantastic.

For the sort of prettiness that comes with a UI/UX interface, web-based or app-based, you will need front-end technologies like HTML, CSS, and JavaScript.

So if you're okay with crunching the numbers, doing a few basic graphs, and getting your feet wet in the world of machine learning, Python may be for you. If you want to get seen—perhaps you can find a friend that likes front-end interfaces. You could work together to build something cool. However, if it is a web interface you're more interested in developing... Let's move on.



Website Development

Website development has come a long way in the last 20 years.

Previously you could just make a website with HTML as your basic code, CSS to give it a bit of style, throw in a bit of JavaScript for something clever here and there, and voila. You've got your hopping title on a website with a dropdown menu that is animated. Yeehaw.


It's all got a bit more complicated now.


Mobile phones with different screen sizes, tablets, and different browsers all need to be thought about when you're building your shiny new website. And it has to work and look roughly the same.



There are frameworks (which are collections of tools and foundations of software to help you build things) for the front end, the back end, and, er, lesser well-known middle end.

You can start simple with it, but it gets complicated pretty quickly.

Especially as a newcomer when you're working with several languages that are doing different things.


HTML -> Mark up (structure the code and words)

CSS -> Style the output (layout and prettiness of the words)

Javascript -> Give logic and response to the code (The brains of what happens on the page)


Trying to make things look good on every screen size can be a challenge, and invariably you need to get into frameworks pretty quickly to make a decent usable site that doesn't look like it's from the early '90s (or hang half off the screen on your mobile even though it looks cracking on your full-sized PC monitor).

This inevitably requires a bit more savviness on the programming and tech front. Fortunately, there are some amazing tutorials to take you through web development from the beginning. It's a very popular place to begin (and continue) a programming career.


Wins of Web Dev

One of the great wins of web development is that you can code directly into your web page, and with each refresh of the page see the difference appear before your very eyes.

The second is that what you're building, you can quickly show off, pretty much in real-time. When you're ready to show the world, you can do so just by registering and setting up a link to your page on the net and sharing it on WhatsApp.



The Pains of Web Dev

I find coding CSS one of the most frustrating experiences in the world.

It literally drives me up the wall. Probably because I'm not very good at it and also because there are a lot of ways of achieving the same thing. It just really pisses me off.

Especially when you're doing things for multiple-sized mobile and desktop screens.

Because of this clearly visceral and previously unrealized frustration I have with CSS, I don't really do front-end dev. I think certain people are drawn to UX and UI, as it really is an art.

Not me though.

One thing to think about is the ready-made web that is around for website development these days. WordPress, Wix—they've done the heavy lifting so you can focus on content creation.

(I, for example, use Wix for this site—because I don't have the time or inclination to code it from scratch, nor probably can I without having to learn a load of stuff I don't really want to learn.)

To get a feel for this, you can throw open developer mode on your browser and go to a site like YouTube. You can freely explore the magic that goes into the site. (Developer mode is available on a tab on the 3 dots drop-down on the right of the screen.)

Epic.

(See what I mean about the annoying hanging curly brackets everywhere? ;) )



Summary

If you want to spend a lot of time gently moving art around, changing fonts, and playing with a layout until it is perfect for the user, then front-end and web dev is almost certainly for you.


To Code or Not to Code

Like anything worth doing, it takes time and repetition, banging your head against a wall because you can't solve the problem, and that's where the rewards lie.

If you're going to do it, I'd start with Python.

For self-paced learners who want to watch videos and do exercises:

London App Brewery by Dr. Angela Yu (also a London medic turned coder)—but now, a multi-millionaire ex-medic business owner. (Inspired much?)

But you do her courses and you can see why. They are brilliant, and well-paced. She gives the occasional bump of strategy and praise, and tips and tricks to learn this stuff.

She has 100 days of Python, the full stack development pathway, Flutter, and a machine learning course by a colleague. Check it out! : The App Brewery


If you prefer the group work approach and want a bit more 1 to 1 time, then my colleagues at Lets Do Digital have some fantastic modules to get into : https://letsdodigital.org/

Motivated by making changes to the healthcare scene and open source code.

It's great to see fellow healthcare workers leading the development charge!

Highly recommend it! Check them out.



Coding Conclusion

Coding follows you into the shower, to the toilet, stalks you in your sleep.

It eats its way into your other activities of living. I've had a few brilliant moments whilst standing in the shower and suddenly realizing where the bug in my code must be. And it feels absolutely awesome. :) And it's lovely when people want to join the club.

But, it's not for everyone! :)


I'd love to hear your thoughts! Thanks for reading!


Sam


Comments


bottom of page