Why I learnt to code (and why you should too)

Before Covid forced it to close its doors for good, TechHub was the home of the Eloy Team. For those that don’t know TechHub, it was a coworking space located near London’s ‘Silicone Roundabout’ that provided a fantastic environment and gave us the opportunity to meet founders of other startups, seek advice from people who’d done it before, attend product demos and fireside chats, and get introductions to potential investors.

It was interesting finding out what other fledgling businesses were up to and how they were going about building and marketing their products. However, one of the things that often surprised me was how often requests for help were made from the owners of EdTechs/FinTechs/PropTechs/HealthTechs etc needing someone to build them a website.

Let’s look at this in basic terms: how tech ARE you if you can’t put together up a basic brochureware website to showcase your technology product? Furthermore, with so many web builder platforms available, such as Squarespace, WordPress, and Wix, you don’t even need to know much code. You just need to point and click. Everyone can and should be doing it.

My website beginnings

Around the 2008/9 financial crisis I was in the early years of my digital career. I had learnt an awful lot of theory about SEO (Search Engine Optimisation) but didn’t have any hands-on experience – a major problem people in the early years of a career face. I was in a chicken and egg situation as the company I worked for wasn’t going to let someone with no experience tinker with its website. So how could I practise and gain that experience?

There was only one thing I could do: build my own website and tinker with that.

Woman Coding

Learning to code

At the time it was fairly common amongst digital marketers to have a side hustle which involved buying an exact match domain – something like ‘micro-camcorders.com’ or ‘paddling-pools.org’ – throwing up a 10-page WordPress website with a few pages of thin content, some fake product reviews, and a handful of affiliate links, and watch your site quickly rise up the Google ranks and the money roll in.

There were whole forums dedicated to link farms, private blog networks, spun content, comment spam, and other black hat arts, all with the aim of getting one over on Google.

Despite the promise of untold riches, my focus was elsewhere – getting my skills recognised and upgraded. My goal was to build a site that would show up in Google using white hat (good SEO) techniques just to prove that I could and then have evidence for my CV. Plus the thought of churning out articles about ‘omelette-pans.co.uk’ didn’t particularly inspire me.

Anyone building a new website without a business need has to think of a topic. I needed to find a topic that wasn’t so popular that the market was saturated – this meant things like travel, fashion, and beauty were out – but wasn’t so niche that it wouldn’t be a challenge. A website on the history of the stapler would have little competition but nobody will want to read it.

Robin

The robin – Britain’s favourite bird

It was just after Christmas 2009 and the RSPB had started running TV ads for its Big Garden Birdwatch. It wasn’t something I’d ever heard of but like all good advertising it made me sit up and take notice when they said that a million people took part in the event every year. A million people spending a day counting the birds in their garden? That’s a fairly substantial audience right there.

I fired up Google and typed in phrases like ‘bird websites’ and ‘garden birds’. Apart from the RSPB there was little else. A few high brow forums for proper twitchers and a couple of ecommerce sites selling bird food and accessories.

Result: potential audience found and hosting and domain bought, I was ready to build a website. And that meant learning to code.

Starting out with no coding experience

Prior to building websites, the only code I’d ever written was on a BBC Micro computer which I vaguely remembered involved Going to 10 and printing ‘Hello’ without the luxury of cut & paste or even a delete button.

With a little research I was relieved to find that you could actually cheat massively and use something called a CMS (content management system) that gave you the bare bones of a website. You then just needed to add the code on top to make the content. I say that naively – one of the big challenges of coding is just getting to grips with the jargon. Understanding jargon does take a little bit of time.

I have no idea why I chose to build on Joomla. Joomla 1.5 wasn’t ideal for novices but its inflexibility actually turned out to be a good thing as it meant I had to code the content of every page by hand. Once I’d got to grips with it writing HTML (the code) started to become second nature. CSS took longer but with the help of Firebug I unpicked other websites’ code and started to understand how you could apply classes to elements and styling to classes to make things do what you wanted them to do.

W3Schools was indispensable for tutorials and testing and even now I still have to refer to it from time to time usually because I can never remember the HTML entity for a non-breaking space. (It’s   in case you were wondering, sorry I mean  ).

I even managed to knock up some JavaScript for a few interactive features. There is much satisfaction to be had from writing a whole load of code, clicking a button and seeing something pop up exactly as it’s meant to. Even better is seeing it close on a second click.

Over the course of a few months a website started to take shape and after a few more months Google started sending me traffic. 

From websites to mobile applications

Fast forward over a decade (further skills upgrades and a career change – I’m now a Co-Founder at connected car software company Eloy and run a digital agency called Modas) to the beginning of this year and we were ready to put our new Eloy app into production. Our only problem was that we didn’t have a front-end developer. There were options of course. We could hire someone or outsource the work. Our back-end developer could do it on top of the million and one other things he had to do. Or I could learn to code again.

So I installed Xcode, watched a few YouTube videos and built Eloy. If only.

My slow Swift (Apple’s app code) learning curve began with Code With Chris, who has a series of tutorials aimed at beginners on how to build apps from scratch. You can also find some 1 minute videos on his YouTube channel which are really useful for learning new functions quickly.

Xcode Storyboard

Eloy - the early years

This is the very first thing I built in Xcode 

At first what I was doing wasn’t proper coding – it was more like Photoshop on steroids. I was laying out each individual screen and handing them over to our proper developer who’d then have to try and stitch everything together. It was laborious and painful and very little of that work is still in the app today.

What I was learning was how to make outlets in order to make objects look nice, I learned that I could also make outlets coupled with actions in order to make objects do things. Before long I moved on from developing flat screens that did nothing and went nowhere to building screens that users could interact with and those actions could pull in information from databases or perform tasks for the user.

Xcode

All this code to make pretty flashing colours

Help is everywhere if you get stuck.

There is an amazing community on Stack Overflow with experienced developers giving up their time to patiently explain things to people like me. If you’ve got a problem with anything not working as it should or need to figure out how to do something new, then you are almost guaranteed to find the answer on there. And if you can’t then ask, and someone will be along to help out.

Once you want to start adding some more fancy or tricky stuff to your app there are open source libraries available on GitHub. For example, in a moment of madness I tried to code the Done button that sits at the top of the iOS keyboard as well as make the screen move up above the keyboard so it didn’t hide text input fields and back down again when you finish typing, for every single time this occurred, before realising you could install a library called IQKeyboardManager that does it all for you!

You can also download projects from GitHub for various features and functions so you can look at the source code if you want to learn how to do things yourself. I feel that this sharing of knowledge is exactly what the world wide web was invented for.

Things break a lot when you’re building

Remember – technology breaks. Whilst computers are incredible they don’t have the intelligence to remove all typos in code or repair poor logic. Debugging becomes an important part of your life.

When anything breaks, including Swift, it can sometimes be hard to find what you’ve done wrong. The dreaded Thread 1: signal SIGABRT error message still makes me want to throw my laptop out of the window, but if nil is unexpectedly found while unwrapping an optional value I know that I just need to find the outlet I have disconnected but that I’m still referring to in the code. If a table isn’t doing what it should do then the answer is always ‘reload data’.

Car Picker

From horrible picker to neat drop  down menu with animation

I’m sure if someone who knew what they were doing looked closely at my code they would be horrified. Some of my early work is pretty scrappy and some definitely needs completely reworking – but it looks great and works well for a relatively small budget.

Lockdown review

I’m proud of what I’ve done. When we look back on the Covid Lockdowns, I’ll be able to smugly say I really did learn to do something new during lockdown, even if I failed at all the other things I was meant to achieve like writing a novel, mastering a headstand, or perfecting a loaf of banana bread. So if you’re the founder of a startup, an employee looking to get more responsibility or need to get something done, instead of asking for help from an outside source why not first have a go yourself. Learning how the pieces come together will give you greater insight into what your technology team needs to do and how software can improve, enhance or replace current business functions.

Notes 

As well as Code With Chris, Archetapp and Mark Moeykens on YouTube were both really helpful in developing my knowledge. For more advanced programming, you will find hundreds of high quality tutorials on Ray Wenderlich‘s website.