Live data from Hacker News

“Coding is basically just ifs and for loops.”

twitter.com

221–230 of 418 posts

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

#222

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

Before enlightenment: chop wood, carry water. After enlightenment: chop wood, carry water.

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

#223

Earlier quoted context omitted.

Maybe math is just equations and sets.

It is just sets! Set theories like Zermelo–Fraenkel can be the foundations for all of mathematics. https://en.wikipedia.org/wiki/Set_theory

I think he knows.

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

#224
post #139

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

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/

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

#226
post #139

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

Programming alone vs programming in a team are very, very different occupations. A lot of what applies to one doesn’t apply to the other. I’m still painfully learning this, after all these years.

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

#227

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

Or a set of composable primitives if you’re using an array language. What, you think if and for aren’t abstractions over jump/goto?

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

#228
post #139

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

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.

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

#229

"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 user: “ + name).orElse(“We haven’t found”);

Basically unreadable.

for (User user : list) if (user != null && user.getName() != null && user.getName().contains(searchString)) return “Found it!”;

return “Not found”;

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

#230

Reminds me of a coworker who said that they only data structure you need is an array since it can be used to to mimic every other data type.

Somewhere in the 90s a colleague asked about why those pesky types we had to use while we had void *. We fought, I won. (but somehow we still ended up with Javascript 20 years later)
Post reply on HN