News for hackers. Stuff that matters.
Re:Simple, correct, fast: in that order by Dylan16807 on Monday July 09, 2018 @10:42AM (#17490485)
> If the program doesn't have to work, I could make it read 100 cards per second.

> Correctness comes first. Simplicity is highly desirable, adds additional cost, but always comes after correctness.

Correctness isn't binary. Roughly no software today is 100% correct, but for most purposes you'd still pick the current version over a highly complex, slower, more-correct version.

Simplicity can save you a lot of cost as you edit the software, which helps you make it correct sooner. Simplicity and correctness go very well together.

Re:Simple, correct, fast: in that order by kibwen on Monday July 09, 2018 @11:28AM (#17490933)
Simplicity (however it is vaguely defined) is desirable, but at the end of the day it is a vehicle for correctness, and hence necessarily subordinate to it. Correctness is the destination of any piece of software (ultimately the goal of any piece of software is to work), and simplicity is just one route to it.
Re:Simple, correct, fast: in that order by aidenn0 on Monday July 09, 2018 @11:42AM (#17491055)
> Correctness is the destination of any piece of software

"Good enough" is the destination of any piece of software. Sometimes that means correct, but more often it means "oh yeah, sometimes it starts acting funny, just restart it when that happens"

Re:Simple, correct, fast: in that order by makapuf on Monday July 09, 2018 @06:24PM (#17493902)
Seems a bit like the "worse is better" philosophy :

    It is slightly better to be simple than correct.
See https://en.m.wikipedia.org/wiki/Worse_is_better
Re:Simple, correct, fast: in that order by mockingbirdy on Monday July 09, 2018 @02:43PM (#17492429)
Agree. And "good enough" depends on your use case.
Re:Simple, correct, fast: in that order by zzzcpan on Monday July 09, 2018 @11:48AM (#17491118)
It never means "correct". Not to mention that 100% correctness is even impossible.
Re:Simple, correct, fast: in that order by kibwen on Monday July 09, 2018 @11:57AM (#17491189)
> Not to mention that 100% correctness is even impossible.

In which case please consider that everyone here is using "correctness" to mean "correctness that is achievable by reasonable human effort". :P It's easy to win any argument by taking one side to its logical extreme and asserting that it is therefore impossible, but that doesn't create a useful discussion. By the same logic we could assert that 100% simplicity is impossible, but that would be just as silly.

Re:Simple, correct, fast: in that order by aidenn0 on Monday July 09, 2018 @07:00PM (#17494111)
They said "destination" being correct, with me interpreting "destination" in the sense of "goal." My point was that some software has the goal of being 100% correct, but most software does not.
Re:Simple, correct, fast: in that order by mockingbirdy on Monday July 09, 2018 @02:42PM (#17492422)
It depends on the severity of a bug. If it's very severe, you'll favor the complex but more-correct solution. Otherwise, you'll favor the simple but more-often-wrong solution - because it's easier to fix and get progress.

I use more-* phrases because it's always in a relation. Even NASA can't claim to have 0 bugs although people die if they fail.

bit OT: There's a great article about NASA programming: https://www.fastcompany.com/28121/they-write-right-stuff

Re:Simple, correct, fast: in that order by zzzcpan on Monday July 09, 2018 @11:46AM (#17491099)
Why do you equate working software with correctness? Software that works is never correct by any definition of correctness. Because working software is a system that exists in the real world and therefore can never have a specification against it.
Re:Simple, correct, fast: in that order by kibwen on Monday July 09, 2018 @11:51AM (#17491140)
> Why do you equate working software with correctness?

Because the original author neglected to provide an adequate definition of correctness, thereby inspiring an epic HN flamewar as people now must run around endlessly debating semantics. :P

Re:Simple, correct, fast: in that order by jessaustin on Monday July 09, 2018 @12:55PM (#17491624)
Sometimes people say things that might not be literally true or even "true in spirit", not because they are lying liars who love to lie, but because relating an exaggeration or a caricature or some other sort of not-totally-true thing will have a better effect on their audience than the strict truth would have. As we're now up to 17 comments you've made here emphasizing the skepticism you have for TFA's message, it seems that you value the "correct" more than the "simple". It could be that you are in the intended audience for TFA...
Re:Simple, correct, fast: in that order by DannyB2 on Monday July 09, 2018 @10:50AM (#17490548)
If correctness is some kind of continuum rather than a binary choice, then pick whatever trade offs, cost, and other factors you want.

Plenty of times correctness is binary. In some cases it would be: passes all tests. Or: meets all requirements. Even if it could be "more" correct (or "more" simple), but those aren't part of the tests / requirements.

Re:Simple, correct, fast: in that order by close04 on Monday July 09, 2018 @11:23AM (#17490889)
I always thought correctness begins when the result of your work does what it's supposed to do.

Maybe it's supposed to move from A to B, maybe it should do it in under x seconds, maybe it should go via Y, maybe it has to be easily understood by a 6 years old, etc.

But I can't really imagine something that has simplicity as the only requirement ("nothing" is the simplest thing so that requirement would always be met with no action). So as long as the other requirements are met simplicity is usually the nice to have "add-on". And you can have correct and simple, or correct and complex. But correct (does the job) trumps simple. And the world is surrounded by examples that prove this point.

I think the author meant "simple should be part of good design" but couldn't properly convey the message. He focused on making the message simple and ignored the fact that it's not correct.

Re:Simple, correct, fast: in that order by traviscj on Tuesday July 10, 2018 @02:38AM (#17495899)
I’ve noticed a pattern where the simplest solution DOES accomplish the goal, but isn’t what a user might consider the “shortest path”. How do you count a workaround where it technically can accomplish the end result, but requires a minor annoyance? What about a major annoyance?

What about a process so painful nobody has even thought of it?

Re:Simple, correct, fast: in that order by close04 on Tuesday July 10, 2018 @03:55AM (#17496139)
It's nigh impossible to solve any complex issue with the "simplest solution" from the first try. This means that when you're faced with a complex issue you will postpone the fix because it's not the simplest.

And you never know if it can be done in an even simpler fashion later.

Re:Simple, correct, fast: in that order by nine_k on Monday July 09, 2018 @10:52AM (#17490566)
This seems to mix correctness and completeness.

A good program does only the correct thing in a particular area. It is known to be reliable in that area, sometimes even formally proved to be so.

Outside that area, an ideal program refuses to work, because it detects that it cannot obtain the correct result. This is normally called "error handling".

There's also some gray area where a program may fail to reliably detect whether it can produce the correct result, given the inputs / environment. A reasonably good program would warn the user about that, though.

A "garbage in, garbage out" program is only acceptable in very narrow set of circumstances (e.g. in cryptography).

Re:Simple, correct, fast: in that order by lszu on Monday July 09, 2018 @02:25PM (#17492292)
Agree. In many (most?) cases there is no formal, verifiable correctness proof. And then you are way better of with the simpler solution once feedback from the real world arrives.