What can a pipe wrench teach us about software engineering?
mokacoding.com
mokacoding.com
Probably much like with software designed from a description, there would be multiple solutions, all of which would meet the requirements given. Some would be better than others, some worse. Some would share common engineering designs, others would be completely unique.
And in the end if someone created a functional and usable tool for the job required (rotate pipes), who is to call those that don't accurately recreate the original wrong in their solution?
I realize by the way that the article is more about precision code like that description rather than writing code from the precision description. But still, there is still the concept that even precise things are open for interpretation.
This misses the key feature of a pipe wrench. The movable jaw has some swing such that it will tightly hold the pipe when moved in one direction, but will release the pipe when moved in the other direction. This provides the equivalent of a ratchet.
This is what distinguishes a pipe wrench from an ordinary adjustable wrench. It's that small amount of swing motion that gives it the ability to grab round things tightly. There are other forms of pipe wrenches which have a chain or a strap[1]. They do not have a jaw adjustment nut but do have the ability to grab round things and a grab/release ratchet-like action.
The actual patent language (Stillson, 1869): "The lower part of the frame c extends forward of the shank A, and is recessed out, so as to permit said lower part to swing to the rear a sufficient distance only to bring said jaws nearly or quite parallel with each other." There's the swing part. Note another key part of the invention. The jaws won't close beyond parallel, so if you pull hard on the wrench, you rotate the pipe but don't crush it.
In the original patent, we see the "why", as well as the "what". The novelty of the invention is in the "why". This matters. If you made the tool described in the article, you'd have an adjustable wrench with teeth that would slip when you tried to tighten a pipe.
[1] https://www.homedepot.com/p/Crescent-12-in-Chain-Wrench-CW12...
And it seems doubly strange to choose a patent as an example of precisely and uniquely describing an invention in the modern age, when patents are written as broadly and imprecisely as possible.
Add to all of that the main decider in regards to strength and build will be material science related, and that description is borderline useless.
Seriously, gears don't just cut themselves. Threaded metal fittings are the advanced type theory for these tools.
So don't miss the point of the article simply because maybe the patent illustration doesn't strictly hold. I'm personally tired of seeing lazy data structures that offer great amount of ambiguity in their use and type. This article hits on a great point that software folks can really stand to improve on.
1) https://en.wikipedia.org/wiki/Algebraic_data_type
2) https://en.wikipedia.org/wiki/Generalized_algebraic_data_typ...
And it only gets worse from here; more and deeper abstractions are inevitable.
Running on Amazon Linux it took nearly two hours for me to descend into the pits of ruby/rvm/node/puppeteer/headless chrome to get the damn thing ‘working’. Broken builds, missing tools, wrong major releases, segfaults, path issues, byzantine environment variable dependencies. I felt like Hal fixing the light bulb and I still have no idea what actually is going on when I run the tests. I just get the API requests I need and the rest feels like a black box in the form of nested Klein bottles.
I was really feeling my BOFH oats by the end of it and dismissing everyone that deals with that mess every day as a flock of sadists. I’ve since calmed down and realized that it’s probably not that bad if it actually is your day job. I just know that if I depended on that heap to actually do anything more than run some unit tests I would have years of acclimation in front of me.
I am a little more familiar with pipe wrenches, though, and even though it isn't obvious from looking at the tool, it does grip harder the harder you pull on the handle. If you've never used one, I think it is worth the price of the wrench just to experience how it works.
https://youtu.be/A5ERUP6Bt8g?t=89
The wobble in the upper jaw is essentially the key feature of the wrench.
But the real thing that we should discuss is to understand the context, the requirements and only then select our tools.
But no, it’s always hammers vs. wrenches on hacker news.
Even simple flags got pretty botched. :)
The military knows how to do this - and has a strong reason to. If your documentation cannot survive the death or resignation of the man, team or department that wrote it, you can't build generational knowledge. Look up the mil spec for chocolate cake (skips my mind where it is in my library) for example.
(1) The cost of the rock drops precipitously with your ability to pay. No matter what value you compute for the rock, you will find that the actual cost of a rock never rises above "negligible" for anyone who isn't severely handicapped, regardless of ability to pay.
(2) If you anticipate needing a rock in the future, you probably don't have to dedicate any time to finding one. You can just pick one up whenever it happens to be convenient.
And that is even independent of torture being inherently immoral.
The _operational_ problem with torture is that the subject tends to tell you whatever unverifiable information they thing you want to hear. it is in this context that torture doesn't "work." the information is unreliable and thus low value.
For immediately verifiable information, such as a password, torture most assuredly does work and it is foolishness to pretend otherwise.