logo

drewdevault.com

[mirror] blog and personal website of Drew DeVault git clone https://hacktivis.me/git/mirror/drewdevault.com.git

Reliability.md (6031B)


  1. ---
  2. title: Software developers have stopped caring about reliability
  3. date: 2021-10-17
  4. ---
  5. Of all the principles of software engineering which has fallen by the wayside in
  6. the modern "move fast and break things" mentality of ~~assholes~~ modern
  7. software developers, reliability is perhaps the most neglected, along with its
  8. cousin, robustness. Almost all software that users encounter in $CURRENTYEAR is
  9. straight-up broken, and often badly.
  10. Honestly, it's pretty embarassing. Consider all of the stupid little things
  11. you've learned how to do in order to work around broken software. Often
  12. something as simple as refreshing the page or rebooting the program to knock
  13. some sense back into it — most users can handle that. There are much
  14. stupider problems, however, and they are *everywhere*. Every morning, I boot,
  15. then immediately hard-reboot, my workstation, because it seems to jigger my
  16. monitors into waking up properly to do their job. On many occasions, I have used
  17. the browser dev tools to inspect a broken web page to figure out how to make it
  18. do the thing I want to do, usually something complicated like submitting a
  19. form properly (a solved problem since 1993).[^1]
  20. [^1]: I often also end up using the dev tools to remove the rampant ads, spyware, nagbars, paywalls, newsletter pop-ups, and spam. Do not add this shit to your website. Don't you *dare* write that code.
  21. When the average person (i.e. a non-nerd) says they "don't get computers", I
  22. believe them. It's not because they're too lazy to learn, or because they're
  23. backwards and outdated, or can't keep with the times. It's because computers are
  24. hard to understand. They are enigmatic and unreliable. **I** know that when my
  25. phone suddenly stops delivering SMS messages mid-conversation, it's not because
  26. I've been abandoned by my friend, but because I need to toggle airplane mode to
  27. reboot the modem. **I** know that when I middle click a link and "javascript:;"
  28. opens in a new tab, ~~an asshole~~ a developer wants me to left click it
  29. instead. Most people don't understand this! You and I, dear reader, have built
  30. up an incredible amount of institutional knowledge about how to deal with broken
  31. computers. We've effectively had to reverse engineer half the software we've
  32. encountered to figure out just where to prod it to make it do the thing you
  33. asked. If you don't have this background, then computers are a nightmare.
  34. It's hard to overstate just how much software developers have given the finger
  35. to reliability in the past 10 years or so. It's for the simplest, silliest
  36. reasons, too, like those web forms. My web browser has been perfectly competent
  37. at submitting HTML forms for the past 28 years, but for some stupid reason some
  38. ~~asshole~~ developer decided to reimplement all of the form semantics in
  39. JavaScript, and now I can't pay my electricity bill without opening up the dev
  40. tools. Imagine what it's like to not know how to do that. Imagine if you were
  41. blind.
  42. Folks, this is not okay. Our industry is characterized by institutional
  43. recklessness and a callous lack of empathy for our users. It's time for a
  44. come-to-jesus moment. This is our fault, and yes, dear reader, you are included
  45. in that statement. We are personally responsible for this disaster, and we must
  46. do our part to correct it.
  47. This is what you must do.
  48. You must prioritize simplicity. You and I are not smart enough to be clever, so
  49. don't try. As the old saying goes, there are two kinds of programs: those simple
  50. enough to obviously have no bugs, and those complicated enough to have no
  51. obvious bugs. It is by no means easier to make the simpler kind, in fact, it's
  52. much more difficult. However, the simpler the system is, the easier it is to
  53. reason about all of its states and edge cases. You do not need a
  54. JavaScript-powered custom textbox widget. YOU DO NOT NEED A JAVASCRIPT-POWERED
  55. CUSTOM TEXTBOX WIDGET.
  56. On the subject of state, state is the language of robustness. When something
  57. breaks, it's because a state occured that you didn't plan for. Think about your
  58. program in terms of this state. Design data structures that cannot represent
  59. invalid states (within reason), and then enumerate each of those possible states
  60. and *check* that your application does something reasonable in that situation.
  61. Identify your error cases, plan for them, implement that plan, and then *test
  62. it*. Sometimes things don't work! Most languages give you tools to identify
  63. error cases and handle them appropriately, so use them. And again, for the love
  64. of god, *test it*. If you commit and push a line of code that you have not
  65. personally watched run and work as expected, you have failed to do your job
  66. properly.
  67. Prefer to use proven technologies. If you use unproven technologies, you must
  68. use them scarcely, and you must *personally* understand them at an intimate
  69. level. If you haven't read the source code for the brand-new database engine you
  70. heard about on HN two weeks ago, you shouldn't be putting it into
  71. production.[^2]
  72. [^2]: If you don't have *access* to the source code, then you definitely should not be using it.
  73. Finally, stop letting economics decide everything you do. Yes, developers have
  74. finite time, and that time costs. Yes, users with annoying needs like
  75. accessibility and internationalization are more expensive to support than the
  76. returns they produce. *You need to pay for it anyway*. It's the right thing to
  77. do. We can be profitable *and* empathetic. Don't think about rushing to market
  78. first, and instead prioritize getting a *good product* into your user's hands.
  79. Our users are not cattle. It is not our job to convert attention into money at
  80. their expense. We need to treat users with respect, and that means testing our
  81. goddamn code before we ship it.
  82. ---
  83. Do an exercise with me. Grab a notepad and make a note every time you encounter
  84. some software bug in production (be it yours or someone else's), or need to rely
  85. on your knowledge as a computer expert to get a non-expert system to work.
  86. [Email me](mailto:sir@cmpwn.com) your list in a week.