The world’s leading publication for data science, AI, and ML professionals.

How I Learned To Code (No CS Degree, No Bootcamp)

A rundown of my coding journey and advice I wish I had

Photo by Christopher Gower on Unsplash
Photo by Christopher Gower on Unsplash

Learning to code is probably one of the best decisions I made in my life. It opened many opportunities and allowed me to find a career I love. Not to mention, being able to code is a very valuable skill nowadays, you can get several jobs that pay quite above average.

So, in this article, I want to run through my whole coding journey and provide some advice for those of you at the beginning of yours.

My Story

Photo by Clemens van Lay on Unsplash
Photo by Clemens van Lay on Unsplash

I wasn’t that young protege who built their first compiler at age 10 or anything like that. In fact, I wrote my first line of code at 18 during my first year at University.

My dream when I was younger was to be a Physics researcher after watching The Big Bang Theory when I was 13. I basically wanted to scribble on paper or whiteboards all day trying to solve complex proofs in quantum mechanics or general relativity.

Yet, in my first class of my physics degree, I found myself in a computer lab being taught how to code. And it gets even worse. The language taught, and it is the first language I ever learned, was Fortran.

I have a romantic affinity for Fortran now, I have even written an article on why data scientists should consider it over Python. However, being the first language I ever learned made me not like coding that much.

Why You Should Consider Using Fortran As A Data Scientist

For those unfamiliar with Fortran, it’s probably the oldest general high-level programming language and was first released in 1958. It hasn’t got a massive community and is barely used nowadays.

Fortran uses DO loops instead of FOR loops, that just shows how old it truly is!

It’s far from the ideal language to start your coding journey with compared to Python or JavaScript. Fair to say, it made me not like programming that much and I actively avoided modules throughout my degree that had coding elements.

I also didn’t do that well in my first coding test, which probably didn’t help.

Despite my lack of immediate love for programming, I learned many things from Fortran:

  • Variables and data structures
  • For and while loops
  • Functions and sub-routines
  • How to navigate the terminal
  • Bash and Z-shell commands

These are the core ideas and patterns that are common across all programming languages and how to work with them.

To be honest, even though I could solve simple physics problems in Fortran, I didn’t really "know" how to program. I was just learning these topics to make sure I didn’t fail my university module. I didn’t have deep intuition behind coding.

I have a previous blog detailing why I wanted to become a data scientist. But the short story is that I fell out of love with the idea of having a research career in physics and was inspired by DeepMind’s AlphaGo documentary.

How I Became A Data Scientist – No CS Degree, No Bootcamp

To become a data scientist, it is no secret that you need to be well-versed in Python. So, even though at the time coding wasn’t something I really wanted to do, I needed to learn Python if I had any hope of becoming a data scientist.

The first course I ever took was the Learn Python – Full Course for Beginners by freeCodeCamp back in 2020. It’s about 4 hours long and I did the whole thing in one sitting.

It is a terrific course to get a rundown of Python syntax and all the native data structures you need to know, so I highly recommend it if you are getting started.

Throughout the above course, I used both W3schools and TutorialsPoint to supplement the material from the video.

Python Tutorial

Python Tutorial

After this course, I needed some hands-on practice and problems to work through on my own. The easiest way to do this is through Hacker Rank or LeetCode. I solved about ~50 Hacker Rank before I started to feel comfortable.

HackerRank – Online Coding Tests and Technical Interviews

LeetCode – The World’s Leading Online Programming Learning Platform

Now I had the basics down, I needed to learn the Data Science Python tech stack. To do this, I simply messaged one of my professors who ran a Python for physics module and asked him for the course notes.

Despite what people may say, data science, in my opinion, follows the scientific method. So, most of the Python libraries that are used in Physics are also used in data science as they are similar.

I also combined these module notes with the courses on Kaggle (a data science competition site) to solidify my understanding further.

Learn Python, Data Viz, Pandas & More | Tutorials | Kaggle

At this point, I felt like I "knew" Python to a good level. Don’t get me wrong, I wasn’t an expert in abstract decorators, but I could code most things from scratch given enough time.

Along with Python, I also took a couple of courses to learn SQL as it’s the so-called "language of data" and used by pretty much every data professional. The two courses that I used were The Complete SQL Bootcamp: Go from Zero to Hero by Jose Portilla and W3schools.

SQL Tutorial

From then on, I started building simple Machine Learning projects to build up my portfolio when applying for jobs. However, at this point, I was kind’ve past the "learning to code" part and focused on improving my data science skills.

So, that’s that.

That was my whole learning-to-code journey. It spanned around 3 years, although at the beginning I was only learning from my university module which was about 4 hours a week.

Realistically, it took me 2–3 months to learn Python, but I did have pre-requisite programming knowledge from Fortran and my background in Physics probably helped as well.

Everyone’s journey is unique, and I am sure some people learned coding faster than me, and I am sure I learned it faster than others. Remember, you are running your race, and don’t compare yourself to others, particularly when trying to learn hard skills such as coding.

Advice

Photo by Kenny Eliason on Unsplash
Photo by Kenny Eliason on Unsplash

Right, now I want to give you some advice that I wish had, and also some key things I did that benefitted my learning.

Pick ONE Language

Start with a single language, ideally choosing either Python or JavaScript as they are probably the most useful in the current climate.

If you pick a language like C, Rust, or Fortran, it’s much harder to learn and may discourage you from coding like what happened to me. Python and JavaScript will enable you to build things early on, which will help motivate you to keep on learning.

Obviously, you are free to choose whatever language you want and C, Rust, or Fortran are important and have the uses. This is just my two cents on the approach I think you should take.

It Will Be HARD

Sometimes people misconstrue coding as quite a glamorous thing where you get to "hack" mainframes or build the next Facebook.

Most of the time, you will be Googling, or nowadays ChatGPT’ing, the traceback error you got from your simple adding two integers function. You will probably spend more time thinking, than actually typing the code on your keys.

This initial period will be difficult and you will probably not understand anything. But over time, you will realize how things hang together and your skills will improve. It’s the power of compounding.

As the famous entrepreneur and investor Naval Ravikant __ puts it:

It’s not 10,000 hours, it’s 10,000 iterations.

Have A WHY

Learning to code is cool, but you may quickly become unmotivated if there is no underlying reason for why you are learning.

For me, it was so I could become a data scientist. However, it could be something smaller than that. For example, you may run a cupcake company and want to code your website for it.

You may not have a why and just want to learn to code. This is completely fine. But maybe have an end goal like a project, which you can then write a blog about. At least it will give you some direction in your learning.

Structure, Practise & Variety

Following a course is the best way to learn, in my opinion. In this post, I have linked several courses and tutorials I used to learn Python, and you can’t go wrong with any of them.

When you do take the course, make sure you commit to it and have regular practice. You need to put in the reps at least twice a week for a couple of hours, to progress at a decent pace.

Even though I recommend taking one course and focussing on it, supplementing your learning by googling concepts that you are not clear on is really valuable. It gives you a wide range of explanations and multiple examples that can really enhance your learning.

Summary & Further Thoughts

Coding is a skill that is becoming more and more important every year. If you are thinking about learning it, then I promise you it will be an invaluable skill to have. I hope my journey and advice are something that you take on board when approaching your coding journey this year!

Another Thing!

I have a free newsletter, Dishing the Data, where I share weekly tips for becoming a better Data Scientist. There is no "fluff" or "clickbait," just pure actionable insights from a practicing Data Scientist.

Dishing The Data | Egor Howell | Substack

Connect With Me!


Related Articles