It might sound surprising but cooking and programming have lots in common. You take a recipe, follow certain instructions (commands) to achieve a specific result. Similar to an open source, you have a recipe (code), where the set of instructions can be tweaked or changed in some way. You can get your creative groove on, adapt the recipe to your liking, swap ingredients and come up with your own ‘code’.
Before you start frying up a bunch of these beauties this coming Tuesday, check out the top 5 reasons why making pancakes is a lot like coding! Don’t forget to use our special promo code - #pancake - to get £500 off on one of our online coding bootcamps ;).
Reason #1 - Making Pancakes is Hard, Especially When You’re Doing it For the First Time, Same with Coding!
Anyone that has attempted to make pancakes even once will know what I’m talking about. When I decided to make my own pancakes for the first time, I bought a ready-made pancake batter mix and expected to fry up lovely, fluffy pancakes that come out in a perfect round shape and taste divine. You may already predict the ending - half of them ended up in the bin! The other half was hardly salvaged and resembled more scrambled eggs if I have to be totally honest. After this epic pancake fail, I was straight on the phone to my mum, asking her for a fool-proof recipe.
Same with coding, when you’re just starting out, you’ll be probably using ready-made formulas that might not necessarily produce exactly what you were looking for. As a beginner, you’ll feel like you don’t know the code well enough to be able to play with it and adjust it to your liking. It’ll be a hard journey that will undoubtedly get easier with time and practice.
You’ll need to learn to examine the code to fully understand different components as well as the reason why certain ‘ingredients’ are indispensable. It would be challenging to make pancakes without eggs but I’m sure there are plenty of vegan pancake recipes on the internet. Before attempting to change the code you need to dive deep and understand what each component does and how eliminating or altering it, will change the entire code’s behaviour.
Reason #2 - When Making Pancakes, We Need to Prepare the Ingredients, In Coding, We Need to Think of What to Do, How to Do it and Which Technologies to Use Before Writing the Code!
Before you jump in and start writing the code, you’ll spend a good amount of time on thinking and preparing how to approach it, what functionalities you need, what technologies to use.
Those that are new to coding would think that as a programmer you’re just coding 24/7, that’s not entirely accurate; you’ll spend lots of time on thinking how to do it and that’s a fact.
You’ll need preparation, just like when making pancakes, you need to gather the right utensils, buy the right ingredients. You can’t attempt writing the code without the proper thought-out process. In programming you might even want to try pair programming, when you’re writing the code with another coder and have a chance to talk about the process before building the software.
Reason #3 - Try Substituting Coconut Flour for All-Purpose Flour on 1:1 Ratio, Your Pancakes Will Be in Trouble - Same When You’re Trying to Add New Features to Already Existing Code
There was a time when I started following a gluten-free diet and tried to find substitutes for all-purpose flour. I discovered coconut flour and naively thought that it could replace regular flour on 1:1 ratio. I learned it the hard way as most of my culinary ‘creations’ were inedible. I tried to come up with a recipe for gluten-free pancakes. It took me at least 10 attempts of playing with different ingredients and measurements and hogging the kitchen for about a week (my flatmates were not impressed) but I finally found the perfect ratio and now my gluten-free matcha crepes are all the rave with my friends and family.
Playing with a recipe is like playing with the code. You forget one vital ingredient and your pancake batter will come out too thick or too thin, too sticky or too firm.
In coding, you need to be super focused on the details. Forget a bracket or a semicolon and your code will not perform the desired action. Let’s say you want to introduce a new feature into the existing code in software. You’ll probably need to spend a fair amount of time rewriting parts of the original code to make sure that everything fits together so that the new feature is compatible with the existing code. Similar to introducing a new ingredient to a fool-proof recipe, you’ll need to adjust the measurements to make sure the ingredients will blend perfectly well, giving you the right consistency.
Reason #4 - If You Want to Become a Pancake Master Chef, Cooking Sites Will Become Your New GitHub Platform
If you aspire to be the best pancake maker in the world it’s quite possible you’ll spend hours on scouring the internet for inspiration, guidance and that perfect recipe that you can use or alter to your liking. You’ll read the reviews and ‘borrow’ someone else’s code to create something of your own.
You’ll become addicted to checking and relying on new cooking sites just like coders rely on GitHub, the biggest software development platform where programmers discover, share and collaborate on different projects to build better software.
Just like in GitHub, you can take someone else’s code (recipe), break it down to see which ingredients you need for the satisfactory result and put your own spin on it. With time, you’ll get a good grasp on different syntaxes, formulas and rules, which will enable you to change specific parts in order to reverse-engineer the existing code.
To be honest, the best way to learn how to code is to hack someone else’s code. When you mess with the existing code you’ll have a better understanding of what makes it work and how it works. Test and experiment, don’t be afraid to break something as trying to rebuild it will be the best practice you can get, especially if you’re a beginner programmer.
Reason #5 - Pancake Recipe is Yet Another Set of Instructions, Different Pancake Types are Like Different Programming Languages
Programming languages vary, each programming language has a different syntax and purpose. PHP is for generating dynamic page content, Python has been increasingly used in AI and machine learning development and Java rules the Android app world. Same with pancakes, there are different types of pancakes and we need different instructions to make them. Think of American style pancakes that are quite thick, much thinner European style - called crepes, savoury pancake in Korea - called jeon, okonomiyaki in Japan or even potato pancakes that are all the rave in Poland.
The concepts for different programming languages or different pancake styles might be similar. It stands to reason that it’s a lot easier to learn another programming language when you already know one. In programming whatever works in one language will need some sort of translation to work in another, same with pancakes, whatever ingredient works in one type, will need to be substituted (translated) to work for another type.
The options for tweaking pancake recipes are endless, same with coding, you have a myriad of opportunities that are begging to be explored, examined and tested. The sky’s the limit.
Bonus! Get £500 Off on One of Our Coding Bootcamps for Pancake Tuesday
Now that you’re happily noshing on one of the pancakes you’ve just fried up, you can take a minute and use our promo code #pancake to get a £500 discount.
You can see that making pancakes is so much like coding. You’re creating a recipe, declaring the variables and defining the procedure that the computer needs to execute. If you forget about one vital ingredient, your pancakes might end up in the bin, just like your program, it’ll simply not work. The sequence in which you perform certain tasks when cooking is extremely important too, you’re not going to fry the flour first and then mix it with all the other ingredients. In programming, if you swap the order of certain lines you might realise that it affects the behaviour of the entire code.
We learn programming through imitation, just like making pancakes. Understanding how things work will enable you to get creative and improve the original concept. When you’re super happy with the basic pancake recipe, you can get onto Instagram to get inspired and start experimenting with a new set of instructions. Developers need to nurture their curiosity and constantly search for innovative solutions. Technologies change and what’s hot today might be forgotten tomorrow. Revolutionary functionalities might put an end to much loved and widely used solutions so keep learning, testing and exploring. Don’t get discouraged if your first batch of pancakes is not exactly resembling that perfect Instagram pic, you’ll improve with practice!