Live data from Hacker News

“Coding is basically just ifs and for loops.”

twitter.com

231–240 of 418 posts

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

#231
post #14

That 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.

I'm may be biased because I spent too much time arguing about this but you hear those $fancy_principles / fp / hard oop / "clean code" evangelists, and then you go to any repo of real world software - linux, compilers, kubernetes, git, blablabla and everywhere you see for loops, goto, ladders of if statements

I mean, you cherry-picked by quite a criteria there. It’s all C and Go, and they somewhat lack higher level abstraction capabilities. On the other hand compilers are often written in C++, or are bootstrapped in the very same language though. Also, what about OpenJDK, elastic search, all the web servers running the whole cloud? Linux might be the underlying OS, but that’s not the program actually doing business logic. If anything, it’s just another layer of abstraction.

Also, let’s be honest, C does all these “virtual method” magic on a per-project basis which will not be understood by any tool ever (all those function pointers to whole new implementations passed from God knows who, with barely any typing). At least FP and OOP knowledge somewhat transfers and is queryable by tools.

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

#232

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.

Math is just addition and subtraction. Coding is just copy and pasting boilerplate code and googling how to make it work.

Copilot. FTFY.

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

#233
In my twenties, I wanted to use all the cool PL techniques: meta-programming, reflection, monads, macros, type-level programming, etc. I'm getting older and now I want my programs to be 90–95% functions, arrays, structs, enums, and loops and only parsimoniously throw in more advanced language features.

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

#234
post #75

All life is just cytosine, guanine, adenine, and thymine.

Those mean nothing without the proteic machinery that translates codons into other proteins though. DNA and RNA without ribosomes is like a language without a compiler.

Umm.. what are those codons and other proteins made of? ...

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

#235

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.

Well, it is just counting natural numbers and making up placeholders for whenever a subtraction or division wouldn't work out.

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

#236

Earlier quoted context omitted.

I started off writing a lot of 68000 machine code. I was always amazed what you could accomplish with a lot of loops and branches. I never lost that sense that at whatever higher level I was at later on, it was all loops and branches.

Reminds me of biological metabolic systems. All loops and branches…

With a lot of fuzziness, some state and temporal stuff.

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

#237

Earlier quoted context omitted.

Recently posted this, which wasn’t well received. https://motherfuckingwebsite.com/ Where does this fall?

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/

Thanks for that link! I actually like the other one much more. I really appreciate JS free sites, Amazon can be used without JS for example.

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

#238

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

That’s what disappoints me in modern Java. There is practically no ifs. It makes it inaccessible to beginners on the project, and the streams are about twice as slow… just because devs think they are more clever if they pile 7 “.map()” to transform a list. list.stream().filter(Objects::nonNull).map(User::getUsername).filter(Objects::nonNull).filter(name -> name.contains(searchString)).map(name -> “We have found your…

Java has never really liked to do in 10 characters anything that could be done in 30 characters instead, especially if it obfuscated things a bit more at the same time.

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

#239
post #228

Earlier quoted context omitted.

Recently posted this, which wasn’t well received. https://motherfuckingwebsite.com/ Where does this fall?

That site is a piece of shit, because it uses google analytics, thus snitches to a big brother.

You’re right, I didn’t notice! Gonna link to evenbettermotherfucking.website from now on.
Post reply on HN