Live data from Hacker News

Simplistic programming is underrated

lemire.me

41–50 of 93 posts

Re: Simplistic programming is underrated

#41
post #3

> I like the concept of “simplistic programming” by which I mean “programming that is so simple that people will criticize you for it”. At first, that sounds strange… can we really get criticized for being “too simple”? Of course, we do. Oh man, this hits home. I've attempted to be a voice of reason on this front so many times, I've practically given up on it. I've come to the conclusion that most programmers suffer…

I can't... agree with you more. Just lost one recently. There was no need to go "microservice" but we did (I have nothing against that structure). Argued against it, got shot down and they went around and are implementing it now. Happened so many times and it's.. dead tiring.

Re: Simplistic programming is underrated

#43
“Mr. William Faulkner got into the act by observing that you never crawl out on a limb. Said you had no courage, never been known to use a word that might send the reader to the dictionary.”

“Poor Faulkner. Does he really think big emotions come from big words? He thinks I don’t know the ten-dollar words. I know them all right. But there are older and simpler and better words, and those are the ones I use. Did you read his last book? It’s all sauce-writing now, but he was good once. Before the sauce, or when he knew how to handle it.”

https://quoteinvestigator.com/2016/01/26/dictionary/

Re: Simplistic programming is underrated

#44

First, you're not stupid/dumb/whatever. This idea of simplistic programming obfuscates the reality that the enterprise of software programming is one of the most complex endeavors humans have undertook. We desire simplicity because the reality is terrifying: that programming is far too complex for us to manage. That we're not smart enough to keep up. If we keep on using simple tools this reality will only continue to…

[deleted]

Re: Simplistic programming is underrated

#45
post #8
post #3

> I like the concept of “simplistic programming” by which I mean “programming that is so simple that people will criticize you for it”. At first, that sounds strange… can we really get criticized for being “too simple”? Of course, we do. Oh man, this hits home. I've attempted to be a voice of reason on this front so many times, I've practically given up on it. I've come to the conclusion that most programmers suffer…

Is map-reduce really less simple than a for-loop? I agree with your other examples, but I see these too things as totally equivalent (unless you're in a language that make a dog's dinner of this type of thing, like old C++).

I mean, it can be, right? Take todays Advent of Code problem, where you want to grab the index of the largest element in a sequence breaking ties toward early elements, then re-distribute that element one at a time over other positions starting from the largest element (looping around as required).

I can write that using various maps, folds, flat_maps, and reduces, but no one else would understand what is going on in the code. Maybe someone will post the right idiomatic functional way to do that, but nothing elegant comes to mind.

Re: Simplistic programming is underrated

#46
post #6

There is a major problem with how programmers are judged. Say you are given a seriously challenging and apparently problem; that is to say the naive approaches are all hideous train wrecks. You work on it long and hard, until you have a key insight that allows you to implement the simplest most elegant solution. Now a naive observer will look at it, say well that's obvious, and then ask why you wasted a week to write…

https://en.wikipedia.org/wiki/Egg_of_Columbus

Re: Simplistic programming is underrated

#47
post #6

There is a major problem with how programmers are judged. Say you are given a seriously challenging and apparently problem; that is to say the naive approaches are all hideous train wrecks. You work on it long and hard, until you have a key insight that allows you to implement the simplest most elegant solution. Now a naive observer will look at it, say well that's obvious, and then ask why you wasted a week to write…

Anyone who thinks more lines of code equals better software should not be working in this industry. Hopefully the naive observer you're referring to would be someone with no background in software development

Re: Simplistic programming is underrated

#48

Earlier quoted context omitted.

what's funny is that the code compiles the small map-reduce and the for loop to exactly the same bytecode probably. :)

Not my area of expertise, so I want to ask this question: Do compiler optimizations exist to automatically parallelize a for loop, which can be parallelized, no matter how to programmer wrote their for loop? If not, then map / reduce offers non-trivial performance benefits over a for loop. Mapping, as far as I'm aware, is "embarrassingly parallel", assuming the function that's mapped is pure? I think?

[deleted]

Re: Simplistic programming is underrated

#49
post #3

> I like the concept of “simplistic programming” by which I mean “programming that is so simple that people will criticize you for it”. At first, that sounds strange… can we really get criticized for being “too simple”? Of course, we do. Oh man, this hits home. I've attempted to be a voice of reason on this front so many times, I've practically given up on it. I've come to the conclusion that most programmers suffer…

what's funny is that the code compiles the small map-reduce and the for loop to exactly the same bytecode probably. :)

No, map reduce can be run in parallel, at least in some cases.

Re: Simplistic programming is underrated

#50

Simple vs. non-simple isn't the best way to think about code. Rather I would think about the requirements of the code. Who is going to be reading it? Maintaining it? Do advanced language features give some kind of advantage (runs faster?, less likely to have bugs?, more extensible?). Will new team members likely introduce bugs? Is spaghettti code better or worse than using less known patterns/language features? Don't…

The whole idea of calling functional features advanced language features is a bit ridiculous I think. Yes, something like java only recently started supporting functional programming, but the paradigm has existed for a very long time.
Post reply on HN