Robot Thoughts
Published in

Robot Thoughts

Coding Is Easier Than Making a Sandwich

And this is why the world should learn how to code.

Photo by James Harrison on Unsplash

There’s no way you’re reading this without having a computer or a mobile phone. Some years ago people struggled to have a computer at home. Now, we’re all surrounded by computers, we need them for our daily activities. The problem is most of us don’t know we can use them to ease our lives even more.

Computers were built to make our lives easier. When the first attempts of computers were built, their purpose was to let users automate repetitive tasks.

What happened? What changed that now we have to hire someone to make programs based on our ideas?

In a few words, programming became a service, and along with that, it became a stereotype. Think about it, think about the first thing that comes into your mind when you hear the word programmer. You’ll probably imagine this guy.

Photo by Kevin Horvat on Unsplash

Black hoodie, multiple screens, hundreds of lines of code, in the dark.

Sounds familiar? I don’t blame you. Even I, a software engineer, think about that guy when listening to the words programmer, coder, or hacker.

A long time ago, programming was really hard, those who ventured into the task of developing some kind of software had to learn about memory allocations, what the ALU was, and how it worked. Today, all one needs to know to learn programming, is writing. Now there are no more reasons to avoid learning programming. However, I’ll tell you why you should want to learn coding.

1) Coding is as easy as making a sandwich

You were probably wondering about the title of this post. Odds are that some of you were thinking “wow, is it really that easy?” and others, most likely programmers, thought “Of course it’s not, I studied for years and I work 8+ hours a day programming, there’s no way it’s that easy”.

Think about the steps you take to make a sandwich:

  1. Take some bread.
  2. Add mayonnaise, mustard, or whatever you like.
  3. Add ham and cheese.
  4. Close the sandwich with another slice of bread.

Of course, it wouldn’t be the perfect sandwich, but look on the bright side, there’s your first algorithm! What’s an algorithm?

An algorithm is a set of instructions with a starting and ending state, and a specific purpose.

Let me express those words with the example. The starting state would be having the ingredients to make the sandwich. The objective, to make one. And the ending state, a delicious sandwich waiting to be eaten.

Obviously, we can’t write something like that to create programs, yet it’s still that easy. Let me show you a real example. This time, a program to calculate how many days you would last locked up with some cans of beans as your only supply.

Lockdown program’s code

If you read it, you’ll find out that the first 2 lines ask for how many cans the survivor has and how many he/she eats in a day. The third line divides the number of cans by the eating speed, and then the result is being printed on the screen.

Probably there is one thing in there you don’t yet understand, however it is quite simple. The “int()” is just to say that the value the user typed must be considered a number.

And here’s the code running.

Lockdown program running

Easy, right? That was written in Python, a very popular and easy to use programming language.

2) Only YOU know what you need

Some of you probably are thinking “well, if it’s that easy, probably everything I need has already been made”. And here’s where the subtitle comes in. That thought would be true if everyone knew how to code, yet because most of the people who know how to code are software engineers or developers, there’s no way they find out what you need to automate.

Only you know which are the repetitive tasks in your job and how they work, therefore, you are the most qualified person to do those programs.

I want you to think about what you do at your job. Is there anything repetitive that could be made automatically? If the answer is yes, you should learn to code.

3) It doesn’t take that long to learn

If you’re still here, surely you’ll be wondering “Ok, maybe it’s easy and I would take advantage of it, but how long could it take me to learn?”.

I’ve been programming since I was a kid, and it took me forever to really understand how things worked in programming, but that’s because I learned by reading really big books (1,200+ pages) on a very old and complex programming language.

Things could be different for you. As of today, there are thousands of online resources to learn programming and there are languages like Python, which make the task of learning to code insanely easy.

My Book

Even though there’s an immense amount of online resources to learn programming, there are very few which were made thinking about those who don’t want to become professional coders.

I want people to learn to code not because everyone should become a developer, but because I believe everyone should be able to use their computers to make their own life easier, to automate boring and repetitive tasks for which computers were initially made to do. And also because I believe that programming is a form of expression, and everyone should be able to express their ideas.

I’m currently running a Kickstarter campaign to fund the publishing of the book. You can pre-order it at the campaign site and if you wish to support you can share it with your friends.

Here’s a link to my campaign.

A short video of my Kickstarter’s campaign

I hope you enjoyed my post and found it useful. I invite you to follow Robot Thoughts for more content related to technology, programming, AI, sci-fi, and anything in between.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


I’m a computer science student and I write about programming, roleplaying games, sci-fi, movies, books, finances, and anything that comes into my mind.