The chef, the magician, not the shepherd

In a lot of fictional worlds, magicians draw their powers from mystical creatures. If you could speak the language of the beasts you could make them do you biddings.

Computers have their own language as well. The machine language, the unnatural instruction set that we have invented to achieve precision and performance with our creations. Getting comfortable with that language takes a lot of efforts for humans. Despite all our achievements in the field of AI and natural language processing, the machines still don't fully understand us. To this day, our best chance of tapping into their extraordinary powers is to speak their language. And learning it is not without benefits for our human brains.

The 2016 drama arrival (warning spoilers ahead) mentions the Sapir–Whorf hypothesis, the theory that learning a new language will rewire your brain. That's actually how the protagonist gets her "superpower" in the movie. Saying that programming will give you superpowers would be false advertisements. But it does rewire your brain by teaching you better problem solving techniques and establish an algorithmic thought process in your brain. That's a part of why I love programming, and I want to make it easy to learn and easy to love for everyone else as well.

I'll begin this series by using simple analogies. The magician/alchemist analogy was tempting at first but a little disconnected from our daily lives. The shepherd analogy would kind of work for AI but not for programming. I think something that most of us are familiar with is cooking.

Writing a simple script is very much like writing down a very detailed recipe. And certain practices are comparable to fundamental concepts you must understand in programming. like keeping each ingredient in its proper container.

So what do we need to get started with coding? First, the language. The instruction set defined in hardware of a computer is very hard to utilize. And these instruction sets are different for every other processor. So instead we use higher level languages. A higher level language is still machine language, but a little bit closer to ours. You might be tempted to ask, if there is a programming language that makes more sense for humans, why would we even need anything else? The computers don't actually understand the high-level code. Each high level language has some means to convert itself to machine-readable instructions. Either via compilers or via interpreters, your high level code needs a medium to run.

Python is a very good example of a high level language, a lot of its syntax is borrowed from English and is relatively easy to learn. Python is an interpreter based language, meaning if you want to use it you have to download its interpreter first. If you're using Linux you already have python. If you use macOS or windows you have to install it manually. It's not that hard to install and there are already tons of tutorials on it so I'll leave it to you.

After installing the interpreter you can run python codes, and you can write them in any text editor you like. But writing code in a simple text editor is like cooking out in the wild without the options your kitchen can provide. Things like controlling the heat, easy inspection of your pot, and cleaning up would be more convenient if you had a kitchen. You could say that your kitchen is your integrated development environment. All your food development needs integrated in one place. the kitchen, is the IDE for making food. And that's what you'll need for writing code as well. A neat text editor that would integrate all your code development tools.

For python development I use visual studio code IDE, but again you can search around and find the best one that suites your needs. VS Code is a general purpose IDE, it's not made for just python but for many other languages as well. You just need to install the language plugin.

Once you have the IDE and all the necessary plugins you'll create your first file and end up with a scene more or less like this.

|

Do you feel it? That tempting blip on your monitor that calls you to write something. A light blip on a dark background if you're not a psychopath.

Contacts