To code or not to code
Coding is not essential to get a tech job, but you should learn it anyway – here's how you can do it
Welcome to Art Science Millennial, a newsletter for non-techies navigating the world of tech! I know the struggle because I’m one of you.
One of the most frequent questions I get is about how I learnt to code as a mid-career switcher with zero experience in programming. Interest in coding is high these days, what with primary school pupils attending compulsory coding classes and anxiety about the increasing demand for tech skills at the workplace.
First, a bit of background about me. In October 2018, I wrote my first line of code ever (in Python) and continued picking up coding from scratch through online courses for the next nine months. I then did a 12-week, Python-based data science bootcamp. Today, I work mainly with SQL to prepare data reports, although I try to find opportunities at work to chip in to keep my Python skills fresh.
Job in tech does not always mean coding
Previously, I thought coding was essential to land a job in tech but my perspective has changed somewhat. Sure, if your ambition is to be in a technical position such as a software engineer, you should have started learning coding yesterday.
But there are other non-coding roles such as product managers, UX designers, and data translators where your job is to shape a business issue into a problem that can be tackled by tech, improve customer satisfaction when interacting with tech products, or act as a bridge between the business and tech divisions in a company.
These roles don’t require coding expertise yet are still integral to and heavily involved in tech development, even if they are not the first ones that come to mind when people think of “tech jobs”.
But coding’s still useful even if it’s not your job
So the short answer is that coding is not an absolute must for a job in tech. But having some grasp of this skill can absolutely make you better at your job in ways such as:
Being able to speak the same language as the technical experts will give you a more complete understanding of a project’s progress, especially when the conversation veers into technicalities.
When framing a problem, you have a rough idea of how complex the solution will be and whether deadlines are realistic.
You might be able to test out some basic theories of your own before turning to the full-fledged coders. For example, if you know some SQL, you could pull a basic data set and run a preliminary analysis. If the results are promising, you can then involve the data analysts and have more specific requests for them to explore.
If you reach a certain level of proficiency, you could even chip in to help with simpler coding tasks, making you a little less dispensable and boosting your bargaining power.
Like what you’re reading so far? Sign up so you don’t miss the next update of Art Science Millennial!
Here’s how to do it
Now that that’s out of the way, let’s return to the initial question: how to learn coding when you’ve never done a single bit of programming in your life.
The first, most important step is to take all those thoughts about how you’re an arts student, you’re not good with numbers/science/technical stuff, computers bore you, etc, and CHUCK THEM OUT THE WINDOW.
There’s already enough lack of belief out there that general degree holders can’t hack it with tech skills, so at least be your own best cheerleader. Having self-belief in your ability to learn new tricks is also what will keep you in the game when you run into obstacles.
Next, I would caution against plunging headlong into an online coding course. Coding is ultimately about feeding the computer a set of instructions so it spits out an output that’s useful to you. But most introductory coding courses I know start by going straight into defining variables, demonstrating index positions, making lists… you get the idea. Only later does it get into how all these come together.
I think a better way is seeing some code in action and learning to read how the code goes about giving the desired output. Consider the following Python code:
for i in range(1, 16):
if i % 3 == 0 and i % 5 == 0:
print("fizzbuzz")
elif i % 3 == 0:
print("fizz")
elif i % 5 == 0:
print("buzz")
else:
print(i)
It looks like gibberish, but it’s just a series of instructions that goes:
First let’s get a sequence of numbers from 1 to 15 and run through them one by one.
If the number is divisible by both 3 and 5, output the word “fizzbuzz”.
If the number is divisible by just 3, output the word “fizz”.
If the number is divisible by just 5, output the word “buzz”.
If it doesn’t meet all the above conditions, just output the number itself.
So when you run the code, the computer follows the series of instructions above and runs each number from 1 to 15 through the conditions, generating this full output:
1
2
fizz
4
buzz
fizz
7
8
fizz
buzz
11
fizz
13
14
fizzbuzz
Still confused? Let’s break the code down instruction by instruction.
for i in range(1, 16):
Means: “For every integer, i, in the range of 1 to 16.” You’re creating a sequence of numbers 1, 2, 3… 14, 15 and running them one by one through the subsequent code.
Points to note:
The i is just an arbitrary stand-in, much as how x and y are used in algebra. You could have chosen any letter but for simplicity’s sake you use i for integer.
Notice that 16 is missing from the sequence of numbers. In Python, a range between two numbers always includes the first number but excludes the second.
if i % 3 == 0 and i % 5 == 0:
print("fizzbuzz")
Means: “If the integer divided by 3 gives a remainder of zero and the integer divided by 5 also gives a remainder of zero, then output the word ‘fizzbuzz’”.
Points to note:
Looking at the meaning, you can deduce that the
%
sign means you get the remainder after a division is done. So12%5
is 2 and16%5
is 1.The double equals sign
==
stands for “is equals to”.So using this form
i%3==0
is really a way to check if the integer is divisible by 3.
elif i % 3 == 0:
print("fizz")
Means: “Else, if the remainder of the integer divided by 3 is equals to zero, then output the word ‘fizz”.
Points to note:
The word
elif
stands for “else, if”. Now you can start to understand that you’re setting up a series of conditions. If the integer doesn’t meet the first condition (in this case, that it’s divisible by both 3 and 5), then you check the second condition (whether it’s divisible by 3).
elif i % 5 == 0:
print("buzz")
Means: “Else, if the remainder of the integer divided by 5 is equals to zero, then output the word ‘buzz”.
Points to note:
This part follows the exact same logic as the preceding section.
else:
print(i)
Means: “Else, output the integer.”
Points to note:
The word
else
is used at the end as a catch-all to capture all cases that don’t meet all the conditions above.
And that’s it! If you’re still with me, some final points that you’ll notice:
Code is made out of words that intuitively lets you know their purpose such as
for
,range
,if
, andprint
.The meaning of unfamiliar words, such as
elif
, can be easily googled and found in the official online documentation, forums, and coding resources.It’s actually not that hard to read simple code and discern its purpose. And once when you can read, you can write something to express your own purpose.
I’d love to know what you think of this newsletter and what you’d like me to write about. You can reach me by replying to this email or by leaving a comment if you’re reading this on the Art Science Millennial website. If you enjoyed this piece, sign up so you get subsequent updates in your inbox!
Even though I don't need it for work, I've found it empowering to get a better understanding of how the computer works.
I can also testify it makes it much easier to gain the trust and ear of experts when I demonstrate that I know some basic code and terminology. With that mutual trust, they in turn are more willing to listen to me about law.