Live data from Hacker News

“Coding is basically just ifs and for loops.”

twitter.com

151–160 of 418 posts

Re: “Coding is basically just ifs and for loops.”

#152

This is funny, but it's like saying "Math is basically pluses and minuses". I see coding as playing with hardware without having to use soldering iron.

Maybe math is just equations and sets.

Math is just writing on a blackboard. Equations and sets optional.

Re: “Coding is basically just ifs and for loops.”

#153
post #124

I also like "all web development is basically fancy string concatenation", and as a web dev I feel seen.

It's almost like "a series of tubes" that do nothing more than squirt text around.

"U+1F346 is an eggplant" and other oddities from the tubes we build modern society on

Re: “Coding is basically just ifs and for loops.”

#156

Earlier 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…

In a very real way, it's all conditional jumps in assembly, and every thing you've learned to make programming easier by allowing more directly letting you express your high level intent is just sugar. It might even help some or most of the time. But what you're actually doing is creating a bunch of branches and loops, and as much as the high level stuff might help, you really shouldn't forget this is the medium you…

Agree with this a lot. In other words, don’t be too clever. That leads to an unmaintainable codebase. There is value in simplicity and not overly using abstractions that take you farther and farther away from bare metal.

Re: “Coding is basically just ifs and for loops.”

#157

Earlier 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…

> 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 my experience programming programming with primitives and basic flow control operations frequently tends to be at least be order of magnitude fast…

for loop goes brrrrrrrrrrrrrrrrrrr!

Re: “Coding is basically just ifs and for loops.”

#158
post #13

Earlier quoted context omitted.

Indeed. Jump on zero and integer manipulation are sufficient for turing-completeness. For example: https://en.wikipedia.org/wiki/Counter_machine

All you really need is `mov`. https://github.com/xoreaxeaxeax/movfuscator https://www.youtube.com/watch?v=R7EEoWg6Ekk

All you need is `mov`

`mov`

`mov` is all you need.

Re: “Coding is basically just ifs and for loops.”

#160

Earlier quoted context omitted.

> you eventually "give up", and clock your 9–5 writing if+for making a fine living, but erroneously pass that off as a mature This comment sure indicates to me where you most likely are on the curve. In all seriousness, I think this is considerably off the mark. After enough experience you realize that expressivity and convenience are antipatterns and don't actually simplify things but are harbingers of complexity, b…

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've written many SM implementation starting from one used in low protocols and up to business process middleware so I have an experience and know how incredibly useful and powerful those are when used in right place. But to use them everywhere especially in some math algos would be an insanity worse than GoTo.
Post reply on HN