“Coding is basically just ifs and for loops.”
181–190 of 418 posts
Re: “Coding is basically just ifs and for loops.”
#182That first reply is so funny to me because it hits too close to home https://twitter.com/nice_byte/status/1466940940229046273 The more I do this, the more I gravitate towards the simple things.
New developers write simple but shortsighted code. It gets the job done, but it will be painful to work with in the future. Intermediate developers, bitten by their past mistakes, decide to future proof their work. But they don’t just look one or two steps ahead, rather they try to look five steps ahead and identity problems that do not and may never exist. Consequently, they over-engineer, over-abstract, and over-co…
Re: “Coding is basically just ifs and for loops.”
#183Earlier quoted context omitted.
I'd never seen that meme before, but there's a Bruce Lee quote (maybe apocryphal) that has had a lot of meaning for me ever since I got over the same hump myself. “Before I learned the art, a punch was just a punch, and a kick, just a kick. After I learned the art, a punch was no longer a punch, a kick, no longer a kick. Now that I understand the art, a punch is just a punch and a kick is just a kick.”
makes me think of the Buddhist "Before enlightenment: chop wood, carry water. After enlightenment: chop wood, carry water". not my favorite source since it doesn't go into the 'scaling the mountain' bit, but every source that talks abt that part seems to be...eh: https://buddhism.stackexchange.com/questions/15921/what-is-t...
Q: What is the difference between an enlightened person and an ordinary person?
A: There is no difference, but only the enlightened person knows this.
Re: “Coding is basically just ifs and for loops.”
#184Earlier quoted context omitted.
Personally I disagree. We should be using state machines and pure functions. If+for loops are just what's easiest to express in the major languages of today. they are no more or less computationally expensive but due to lack of tooling they are often cheaper to write. In languages and libraries that allow FSM and pure functional kernel based designs you can get just as clear logic that is expressible not just to the…
I inherited a piece of code that was designed as a state machine and the state machine design basically made the project become pure technical debt as requirements increased over time and engineers had to make it work with the state machine model that had been chosen when the project started. If the project had instead been designed to have less unnecessary state and “transitions” it would have been a lot easier to m…
so was the chosen model the issue or choosing a state machine model at all?
Re: “Coding is basically just ifs and for loops.”
#185That first reply is so funny to me because it hits too close to home https://twitter.com/nice_byte/status/1466940940229046273 The more I do this, the more I gravitate towards the simple things.
New developers write simple but shortsighted code. It gets the job done, but it will be painful to work with in the future. Intermediate developers, bitten by their past mistakes, decide to future proof their work. But they don’t just look one or two steps ahead, rather they try to look five steps ahead and identity problems that do not and may never exist. Consequently, they over-engineer, over-abstract, and over-co…
A: The novice thinks twice before doing something stupid.
Re: “Coding is basically just ifs and for loops.”
#186Earlier quoted context omitted.
New developers write simple but shortsighted code. It gets the job done, but it will be painful to work with in the future. Intermediate developers, bitten by their past mistakes, decide to future proof their work. But they don’t just look one or two steps ahead, rather they try to look five steps ahead and identity problems that do not and may never exist. Consequently, they over-engineer, over-abstract, and over-co…
And that's also why a lot of Architecture Astronaut that looooved Java, didn't see Python coming.
Re: “Coding is basically just ifs and for loops.”
#187Re: “Coding is basically just ifs and for loops.”
#188Re: “Coding is basically just ifs and for loops.”
#189That first reply is so funny to me because it hits too close to home https://twitter.com/nice_byte/status/1466940940229046273 The more I do this, the more I gravitate towards the simple things.
- it's okay to use printing instead of a debugger - you don't need to write classes for everything - it's okay to write something in a more verbose way to make it clear for other people - your tools don't need to be perfect to get things done I need more of these, maybe some that aren't as reductionist as Carmacks's original post.
https://tenderlovemaking.com/2016/02/05/i-am-a-puts-debugger...
In rare cases I pull out a real debugger, but most of the time the right prints in the right places are just as good. I can also iterate much faster because I'm not jumping between the code the the debugger, or pulling the debugger out of the loop it's stuck in.
Re: “Coding is basically just ifs and for loops.”
#190"First a punch is just a punch, Then a punch is not only a punch, And finally a punch is just a punch" (heard from Bruce Lee) Basically it means that in the beginning we punch like we can.. then a martial arts student learns the proper and different ways to punch.. so a punch is no longer just a punch... Is a lot of instructions.. Then to sheer practice and repetition the right way to punch becomes second nature.. so…