Wednesday, April 28, 2021

Decomposition



One of Chris' slides about decomposition, infinite time of lathering and rinsing since there is no stop command. I think ghosting works that way, you will fall into infinite iterations since you don't know what went wrong and the other person just vanished into thin air. I know it's bad but sometimes ghosting is the easiest way out, no confrontation. 

Anyway, back to coding ... After studying Karel the robot to understand the basic idea of programming (control flow, logic and decomposition), this week we move to Python. The main difference (for me) is that in this Python world, we play with more types and functions, which usually scared me. I used to be overwhelmed with different types integer, string, numeric and others, how to write and other details. But since I started the python journey by playing, I really enjoy the journey. 
 

Chris' explanation about decomposition is really beautiful. I call things as beautiful if they are logical :D I usually make my code quite long and after understanding the pattern, I make sub-blocks. But the better way to do it is to understand the problem first and then create sub-block.

No comments:

Untuk Papa

Papa …  Kini senyum itu tak bisa lagi kulihat  Kebaikan itu tak bisa lagi kudapat  Tapi jasa papa tetap melekat  Hangat itu tetap mendekap  ...