Operant Conditioning by Software Bugs (2012)
blog.regehr.org
blog.regehr.org
I think this is one of the big differences between junior and senior software developers. You can see juniors get very frustrated with bugs because the code they delivered was 'working'. Seniors realize that software only works within well defined parameters - and it's only a matter of time before you find another parameter that you did not define well enough beforehand.
I also think there's a hierarchy of software implementations:
Working As Expected (by the user)
Working As Designed (by the designer/lead)
Working As Intended (by the programmer)
Working As Implemented (by the programmer)
[this is somewhat tongue in cheek]
> I think this is one of the big differences between junior and senior software developers.
This may just be the curse of knowledge, but as a senior developer I would have to disagree. I've thought software was crap as long as I've used it, and I believe I can find a bug (or at least what I would consider a bug) in about five minutes using any software. Part of the problem is there are so many dimensions in which the software can be crap: unapproachable/overengineered, lacking in features, badly documented, inconsistent, slow, unstable, etc. The software could absolutely be some of the best in the world and still be terrible on one or more axes.If that's the case, assuming those juniors have relevant degrees, they weren't paying attention in their lectures on testing. Any decent lecture series on software engineering in general, or on testing specifically, will cover that testing can almost never prove the absence of all bugs, as exhaustive testing is rarely practical. If you want proof of correctness, formal methods are the only game in town.
I like your hierarchy, that's really a neat perspective on correctness, and the tongue can be returned to its preferred posture. Perhaps a fifth entry might be useful, along the lines of As Deployed, to cover bugs in the platform (the compiler, standard library, OS, and hardware). This might not perfectly align with Working As Implemented, unless the implementation is taken to include the platform.
How does this take into account unknown parameters indicated in the parent? For instance, expecting little endian but getting big endian in a different environment?
Of course, by using a formal verification framework, you aren't worrying about being blindsided by something like endianness, you're worrying about getting the thing to verify. If it verifies, that means you haven't made any fiddly mistakes with concerns like endianness.
The SPARK language (designed for formal verification) doesn't let you write endian-sensitive code in the first place, if I understand correctly. (SPARK is technically not a fully deterministic language but it's very close. [0][1])
I don't know if there are circumstances where you must write endian-sensitive code, but don't think there are. I can imagine an endian-sensitive solution might perform better (e.g. simply reinterpreting an array of bytes as an array of 32-bit unsigned integers).
[0] https://docs.adacore.com/spark2014-docs/html/ug/en/appendix/...
[1] https://docs.adacore.com/spark2014-docs/html/ug/en/usage_sce...
I remember when “zapping the PRAM” was the solution for everything on classic Macs. (Maybe it still is?) It was a truly bizarre group-level tic. Literally any issue would be met with a stampede of experts bearing the magical key combo Cmd-Opt-P-R. I doubt anyone even knew what was in PRAM, but by god zapping it would fix your computer and neuter your cat.
In the 2018 thread someone writes[2] "but if I sit down with a new user for an hour, they discover all the bugs I knew about and a few I didn’t! But an hour of someone’s time is hard to get"; but the internet is full of people clamouring to give feedback about your code, desperate for someone - anyone - to listen. An hour of someone's time is hard to get, are you kidding me? I've spent hours challenging myself to find hundreds of nitpicks in something, for free, just because they asked. What did they do with it? Ignore it. More zeitgeisty look at the "MS Teams is slow" complaints, thousands of upvotes on UserVoice, one reply "we're working on it". Stuck that way for years.
It's not hard to get feedback, you don't want feedback because you don't have time or interest or spare effort or motivation to fix all the bugs, you have more fun things to do - more interesting, higher priority, more defensible. It's way better to have forum users pass around the Chinese Whispers of their grandfather's command line which he found on a BugZilla comment on an unrelated issue, which came from a mailing list, which came from an unsourced email from an internal chatroom where they found it in a fossil,,, than it is to fix that edge case. Users telling each other to clear the PRAM and run "sfc /scannow" and "chmod 777 -R" and "setenforce 0" costs you nothing.
[1] https://cdn.dribbble.com/users/6205/screenshots/5556008/penr...
However even though they are things you would do pretty frequently like
echo $(basename <TAB>
echo `readlink <TAB>
I somehow wasn't aware of them. I suspect that's because I have been using bash for something like 15 years and was TRAINED not to type those things!Oil Uses Its Parser For History And Completion
http://www.oilshell.org/blog/2020/01/history-and-completion....
shopt -u progcomp
To the bashrc. I find the dumb "just complete a f@#$$# filename" completion to be at least predictable, even if it means i need to memorize a few more arguments to some programs. Just today, I created a test-user for something and hit <TAB> in bash expecting the dumb filename completion and instead it hung for about 90s then printed a python backtrace.So for me both of those work as expected if I'm on my bashrc...
2018 https://news.ycombinator.com/item?id=16863233
2015 https://news.ycombinator.com/item?id=9822637
Apparently not discussed at the time
Bring that back for web sites, somebody.