26
Making breakfast made variables in Python make sense
Honestly, I was totally lost on what variables really do in Python. Tbh, I kept mixing up strings and integers, and my code kept breaking. Ngl, I almost quit my online course because of it. Then, this morning, I was cooking eggs and realized each ingredient is like a variable: the eggs are one value, the salt is another, and I can change them to make different dishes. It clicked that variables just hold stuff you can use and change later. I finished cooking and went straight to my laptop to try it out. Writing code felt way easier after that. For anyone starting out, find something simple in your day to compare coding ideas to.
3 comments
Log in to join the discussion
Log In3 Comments
phoenixh742mo ago
Funny how a simple thing like making coffee used to seem totally separate from code. Always pictured variables as these abstract math things before. Watching the cream swirl in and change the color, that's when it hit me. Each stir was like updating a value, and the mug was just holding it all. Totally changed how I look at writing loops now too.
10
wade_hall2mo ago
Ever think about how the coffee grounds are like a class definition before you even add water? The whole potential is there but nothing happens until you instantiate it with hot water. That first pour is basically calling the constructor. Makes you wonder what other daily stuff is just waiting for its method to be called.
5
parker_bailey2mo agoTop Commenter
Actually the mug is more like a function, since it contains the whole process.
1