Live data from Hacker News

“Coding is basically just ifs and for loops.”

twitter.com

351–360 of 418 posts

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

#351
post #215

Earlier quoted context omitted.

Coding is not "ifs and loops, then $foo". That's a false premise. If you want to be fundamentalist about it (which I don't advise), a CPU is just a state machine. assembly instruction + machine state => new machine state Our idea of "jumping around code" and "control flow", as in for loops or if statements, are themselves abstractions of control state (an instruction pointer) and data state (perhaps a CPU register).…

Oh, but CPU instructions can be built up from a series of μops which are then executed out of order or in an overlapping fashion, making both "instruction" and "state" boundaries in your equation more fuzzy than it looks. So at the absolute-absolute bottom of "code", it is instructions for an abstract model of an interpretative device.

> Oh, but CPU instructions ...

And who says your code runs on a CPU? :^)

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

#352

Earlier quoted context omitted.

That’s a failure of Java’s language design, not a failure of the functional/declarative paradigm. Your for loop can do all kinds of damage to the list, and you have to read it all to find out what it does. Saner languages make the functional version more expressive.p: return first(users.filter(u => contains(u.name, searchString)) I’m not saying JS is a sane language; it has an anemic standard library without a robust…

>and you have to read it all to find out what it does. Which isn't a problem, because as long as its all loops'n branches, the code is easy to understand.

The first, filter, map, etc. functions are also only loops&branches under the hood, no? :)

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

#355

Earlier quoted context omitted.

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

Stephen Wolfram thinks the entire universe is built from simple rules https://en.wikipedia.org/wiki/A_New_Kind_of_Science

I'm no physicist, but doesn't the Standard Model fit on a few pieces of paper? That the universe has rules that are a lot simpler than the behavior that emerges from those rules doesn't seem like novel claim. Wolfram's idea to examine the universe by exploring CA-space is the novel part I think.

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

#356

Thats why i am seeing DB schemas without indexes lately. End of the day people with this kinda thinking make others to fix the broken code that they left behind. As a senior software engineer i had to spend a lot of time at night fixing code written by junior devs and interns. the code that company and devs (just ifs and loops gang) proud of was a pain in the ass for me so i quit the job entirly and do freelancing th…

Isn’t this just a rant that the senior management/devs failed to set up an environment[1] to stop this sort of thing happening? I don’t really understand how it’s related to the linked tweet or the subtext of it. [1] either a policy like strict code review or perhaps a cultural change about quality or responsibility or mentorship.

I was brought into to work on a 2 years old project built by junior devs and interns.

Companies thought they were saving money and devs thought they were born coders so no to read a book on software architecture/engineering and hence i had to deal with the big pile of ....

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

#357
post #312

Earlier quoted context omitted.

Yes, it's a good talk. Think of all the extremely talented internal combustion engine engineers that will be obsolete in 20 - 30 years.

They’re obsolete now, except on YouTube.

ICE has thousands of uses, they aren't just for cars.

An example? Up above the treeline, there are communities relying on diesel for power.

Solar is a no go, with months of darkness. Wind turbines are hard to maintain at -50C, and snow and ice can impede them.

Even electric cars can only cover some of car use-cases, both due to range and refuel time issues.

Expect ICE in 2050 still.

And in most places, electric cars take petrol out of the car, and instead, see things like coal or natural gas burned, to make the electricity to charge them.

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

#358

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

Perceived complexity peaks at intermediate skill. There's a concept in learning theory that perceived complexity is diamond shaped.

I wonder whether you could apply this analogy to physics and science in general. If so it seems like we haven't reached the peak/middle yet.
Post reply on HN