https://programming-idioms.org/idiom/184/tomorrow
I’ve always found it interesting to consider the simplest possible spec you could give 100 programmers and receive no bugs in return.
https://programming-idioms.org/idiom/184/tomorrow
I’ve always found it interesting to consider the simplest possible spec you could give 100 programmers and receive no bugs in return.
There is only one or two https://pubs.opengroup.org/onlinepubs/9699919799/utilities/t... and maybe https://pubs.opengroup.org/onlinepubs/9699919799/utilities/f... .
Even "Hello, World!" is done wrong more often than not. An example: you should check for errors from `printf()`, as in [1].
[1]: https://stackoverflow.com/questions/12355758/proper-hello-wo...
EDIT: Yep, https://github.com/coreutils/coreutils/blob/master/src/true....
Seriously, though, thank you for the link. That is good to know!
https://en.wikipedia.org/wiki/IEFBR14 was a one-byte program, but that had a bug, so it had to be doubled in size.
And yes, it still exists (https://www.ibm.com/docs/en/zos-basic-skills?topic=utilities...). I wouldn’t know how large it is nowadays.
The core of the problem was noted already: Obviously most people can't read.
That's especially "funny" when thinking about all the fuss that is made about teaching children programming in school. They should start with teaching them reading.
I don't even mean this snarky. The state of affairs is actually depressing and I would welcome it very much if more people around would be able to read, understanding what's written. Would make a lot of things easier for everybody I guess.
This would likely require teaching students at least basic logic. This was entirely absent from my school experience.
It’s a hugely undertaught and undervalued skill, IMO. Before we start shoehorning CS into high school curriculums, we should consider laying these foundations first.
A program
* Not all programmers can understand all programs
* Most programs don't describe the problem exactly
* Almost no program describes the desired outcome exactly
(Also debatable, for example if correct operation of the program depends on some property of its environment that can't always be relied upon.)
But the whole point of a spec is to describe how a program should behave before writing it.
Also you usually want some verification that the program matches the spec. When the program IS the spec what do you match?
People take it seriously, and you can hear it here and there as "argument" against proper specs.