DEV Community

DaNeil C
DaNeil C

Posted on • Updated on

Coding VS Baking a Cake?

Coding is a lot like baking to me and as you can see below, even an "experienced baker" might need to use outside resources (dependencies) to make things work... ish. Or in my case of this 4 layer cake... chopsticks to keep it from sliding apart. (I didn't take into account the thinness of the filling I used for between the layers and it started to shift.)

picture of 4 layer cake I made
Birthday cake I made for a friend<3

But How do they Relate??

This is where taking the time to learn how code interacts at different levels becomes very important to create an amazing project.

Say you have an idea for an application and you can't quite get the authentication functionality to work. You hop over to StackOverflow and grab some random code that makes the application work the way you dreamed.

Nice, but what is that code really doing? It could be secretly stealing user's credentials or tracking them across applications and without understanding the code you may have no idea until it's too late.

Practice and Learn

Like any good chef, developers/coders need to take the time to developer our skills. You don't need to become a master of the craft but even "not completely sucking" can't be done overnight.

When you really understand how to bake even a simple cake you don't grab a box of cake mix from the store and hope for the best. You weight everything, sift the dry ingredients together, ensure wet items are at room temperature, make sure you know the humidity and elevation you are at for modifications, and ensure the oven is at the proper temperature. This process takes a lot of knowledge of how ingredients interact at different temperatures and consistencies and this is very important to make an amazing cake.

layers of cake gif

They say to learn a language at depth as well as breadth, but I argue that an understanding of how language stacks interact is just as important for the longevity and security posture of the application; as well as growth as a developer/code.

When you become a good developer/coder you are able to understand how the backend interacts with the front as well as how an application's layers might be leveraged maliciously. And like making a soufflé, this is something that developers don't get right the first time.

Wrap-up

Just as anyone can pick up a box of cake mix, follow the instructions, and still end up with a mess. Anyone can get code from StackOverflow, throw a couple dependencies together, and end up with Frankenstein's Monster.

It takes years of writing bad code and seeing code from different developers to understand the different ways that code can be written, and leveraged, to really create good code. Just as when you take the time to measure the ingredients and understanding the science of how they work together; it's then that things take shape and have structure in a beautiful way.

yummm cake gif

Please Note: that I am still learning and if something that I have stated is incorrect please let me know. I would love to learn more about what I may not understand fully.

Oldest comments (0)