And really, aren't loops just ifs and jumps under the hood? So coding is just ifs
“Coding is basically just ifs and for loops.”
361–370 of 418 posts
Re: “Coding is basically just ifs and for loops.”
#362Re: “Coding is basically just ifs and for loops.”
#363Re: “Coding is basically just ifs and for loops.”
#364Gastronomy is just fat, sugar and protein.
Re: “Coding is basically just ifs and for loops.”
#365Earlier 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…
Had a boss once who insisted that all if statements should be pushed out to factory classes, and all control logic should be done by constructing a different instance of an interface. It was a pretty rigid system, but at least it did force me to write small focused classes that were easy to test. Debated for a long time whether that methodology was stuck in the second phase or if it was actually the third. Still don'…
Re: “Coding is basically just ifs and for loops.”
#366Re: “Coding is basically just ifs and for loops.”
#367If you want to go even lower than that, coding is basically just saying yes or no in response to a yes or a no . Sure, that's oversimplifying it, but that's the smallest unit of information being changed during computation. But yes, once you learn the basics that are shared between most programming languages and don't get distracted by the nuances, it doesn't take that long to pick up a different language. Being prof…
All chemistry is just sharing electrons.
Re: “Coding is basically just ifs and for loops.”
#368Earlier 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…
Re: “Coding is basically just ifs and for loops.”
#369Earlier quoted context omitted.
In going too basic. We can go to simple and elegant without going all the way back to crappy stone tools. http://bettermotherfuckingwebsite.com/ https://evenbettermotherfucking.website/
It’s interesting that on mobile the original one is actually nicest (to me).
The silly thing is that it's literally one CSS property, max-width, that takes care of that problem.
Re: “Coding is basically just ifs and for loops.”
#370Many of them are much smarter than me, but I think my insight which I remember getting around 6 months in is that it's just code, in many places hard to read/follow, but it will ultimately just do a logical set of instructions.