What to do before you learn to code...

What to do before you learn to code...

We've all seen them, the ads promising that learning to code is like winning the recruitment lottery; that with just a few weeks of Python camp you'll be in a heady world of 6-figure salaries and job opportunities lining up like marching penguins.


A quick look at the more grim reality parts of the internet (like job and recruiting subreddits for the UK) will paint a very different picture. Coding is not some golden ticket to a chocolate factory of software engineering opportunities overseen by a pantheon of managerial Wonkas. I wish that were true.


Coding is also bloody difficult and don't let anyone tell you otherwise. The same way that learning to play the violin, mastering painting, completing a novel or getting really jacked at the gym is bloody hard. They take time. They take blood, sweat and tears. If they didn't everyone would be founding the next billion-dollar Silicon Valley startup while hanging their latest masterpiece in the Saatchi Gallery and celebrating a Sunday Times bestseller while simultaneously looking like Arnie c. 1986.


What a world that would be.


Now, having said all that, I would encourage anyone to expand their skillset in a rapidly changing and expanding landscape. But let's go about it the right way.


I began learning to code in December 2023 while on holiday. I work in AI already and Python felt like a good skill to develop in terms of opening up other opportunities. Swiftly, I found I was focusing on the wrong thing. What most coding courses teach is the syntax of a particular programming language -- that is, the way the code is formed on the screen. This is OK but it's not enough to actually code. You can learn all the rules of a particular spoken language but if you never try both speaking it and immersing yourself in the culture of it you'll never master it.


Coding is a fun challenge, but the code that we see onscreen is floating atop a lot of things going on beneath it. Code sits upon decades of computing developments which rests upon a bedrock of logistics and mathematical principles dating back millennia.


None of that is meant to scare you off, though I understand the sentiment; until very recently there was nothing that would instil the fear of god in me faster than the word "maths". But, believe it or not, you can learn with the right mindset, and that is step 1.


Or, since code always starts with 0 rather than 1, let's call it step 0.


0. Mindset

Accepting a shift in mindset is the best preliminary step before we get anywhere near computer coding languages. You see, most of us think in a narrative mindset; it's why stories and myths form the basis of our societies: we learn through storytelling. Most of our brains work this way. This is why at school I (like many) was far more drawn to art, literature, classics and theatre than computing and mathematics.


To truly understand some of what is to come we need to be open to a different way of thinking. Picture being dropped in a beautiful garden. Most of us will find our way out with a narrative mindset: we'll stop to enjoy the trees, lounge on the sunny lawn, admire the flowers, and enjoy getting lost in the ornate hedge maze. We form experiences which become stories.


Now, imagine you were dropped in that garden with one task and one task only: find your way out using the quickest, simplest, most direct route possible.


Welcome to the programmer's mindset.


1. Computer Science fundamentals

Why start with computer science? Well all coding languages have to adhere to the same basic principles, so knowing the basics is invaluable.


The syntax of each particular coding language, whether it's Python, JavaScript, Ruby or C++, all sits upon the key foundations of computer science, and they're helpfully outlined in this excellent video:


(I'd save it and come back to it because it's 2 hours long).


2. Mathematics

All coding languages and many of the principles therein are built on mathematics and follow the same formatting as algebraic equations. Some of the language and terminology even directly crosses over.


Re-visiting maths is invaluable before we get caught up in the nuances of code. If maths wasn't your thing and you haven't touched it since high school, you will be genuinely amazed at the positive impact that re-visiting it has on other parts of the mind and even in different areas of life. It's truly astounding.


I personally recommend Duolingo's new maths module (currently only available on iOS), but there are any number of free resources out there when it comes to mastering the basics of maths.


https://www.duolingo.com/math


3. Logic

Coding is, in my experience so far, creative writing with logic. And we've been studying logic for a very long time now. Logic is solving problems and resolving arguments using the uniquely human capacity for reason. As the philosopher Saint Thomas Aquinas observed, God himself may defy and even break the laws of nature if He so wishes; but even he cannot break the rules of logic because they are fundamental to the nature of reality itself.


That may sound pretty deep but firing up the logical brain is where we bring in the games. Apps like Brilliant have entire courses devoted to logical thinking, and you can find many videos outlining the logical principles (see below).


Chess is logic in its purest form, but crosswords and Sudoku puzzles are other fun ways to engage with this part of the brain and can easily be done on the go with free apps. Through doing them, the brain forms new connections and perspectives which will be invaluable when it comes to coding as they touch on coding's very reason for existing: solving problems.




Conclusion

So, why focus on all this before you even type your first "Hello World"?


Because at the end of the day you're not learning code to be writing lines of funny letters and symbols and learning when to wrap brackets within brackets: the code is just the lens through which you're applying your creative ingenuity with analytical computing power to solve problems.


Before you dive into your chosen coding language (and studying these basics may even change your mind on what the first language in question should be) take some time initially to work on your mindset, the fundamentals of computer science, mathematical skills (if required) and logical reasoning.


Believe me, learning to code long-term will make a whole lot more sense if you do.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了