5 ms·
What can a pipe wrench teach us about software engineering?
- ThrowawayR2 6y agoMost development these days is sitting on top of a stack of abstractions, tools, frameworks, and library dependencies of highly varying quality and stability that are a couple of dozen layers deep. In this environment where software products and services maniacally duel each other for financial success atop these jenga towers made of jello, no such precision as Vannevar Bush recommends is possible. And it only gets worse from here; more and deeper abstractions are inevitable.
- hinkley 6y agoWe excel mostly where there are constraints, like most other creatives.
- deleted 6y ago[deleted]
- jcims 6y agoI was doing some security evaluation work this week on a platform that surfaces information from functional tests of web applications. It had a somewhat obtuse onboarding process so I just copied one of their tutorial applications thinking that would be and easy way to get some data flowing through the tool. 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.
- nosmokewhereiam 6y agoA $5 wrench can allegedly crack passwords: https://xkcd.com/538/ https://xkcd.com/538/
- Chris2048 6y agoSo can a $0 rock (or stick)
- Joker_vD 6y agoRocks ain't free. Finding and picking up a rock usually requires at least half a minute, so if one takes an hourly wage to be $24 that makes the cost of obtaining a rock equal to... about 20 cents.
- thaumasiotes 6y agoBut there are two further considerations: (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.
- schwartzworld 6y agothe technique costs more than 5 dollars though unless you have the "drug him" drugs sitting around already.
- athenot 6y agoThe alt text on that comic also says "I would be hard-pressed to find that wrench for $5" ;)
- leetcrew 6y agoyeah you need at least $20 for the drugs, plus gas and wages for the driver to go pick them up. this doesn't even touch on depreciation / capital cost of the vehicle itself! also, what's the prevailing rent for an interrogation facility these days?
- a-nikolaev 6y agoTo put it in the context, it's not actually a "strong type system" that allows you to model data precisely, but algebraic data types. (And type constraints, such as non-empty collections, can be created using generalized algebraic data types, GADTs) 1) https://en.wikipedia.org/wiki/Algebraic_data_type https://en.wikipedia.org/wiki/Algebraic_data_type 2) https://en.wikipedia.org/wiki/Generalized_algebraic_data_type https://en.wikipedia.org/wiki/Generalized_algebraic_data_typ...
- 1-more 6y agoIndeed, "strongly typed" doesn't have a real definition imo.
- deleted 6y ago[deleted]
- michaelt 6y agoIronically, the quoted description of a pipe wrench seems to be from a patent [1] that's full of references to a picture. 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. [1] https://patents.google.com/patent/US126161A/en https://patents.google.com/patent/US126161A/en
- taeric 6y agoYeah, I wasn't at all clear on how that quote helped. From it, I couldn't tell if it was a worm gear, or a screw thread. Nor can I tell how much power the wrench has. Either in torque or in grip. Really, without the picture, I would have no real hint as to what it looked like. Nor how it worked. :( 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.
- taftster 6y agoI think you're right, but that's maybe not giving credit to the overall concept presented. The patent description text, even surrounded with the illustrations, still stands on its own. Yes, a picture paints a thousand words, but it would be nice if software engineers would write their descriptions or documentation as precise as that simple paragraph. 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.
- louwrentius 6y agoThis is more of an example of: every problem is solved with a wrench (strong typing). 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.
- pugworthy 6y agoAn interesting thought experiment would be to give the description of the pipe wrench to engineers without telling the what it was or what it was used for. Then ask them to design a tool that matches that description. 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.
- Animats 6y agoFrom the article: By turning the nut to the right or left the movable jaw may be moved either toward or away from the fixed jaw, as may be desirable. The inner face of the movable jaw is formed at a right angle to its shank, and is also provided with a series of teeth, which pitch or rake on its fellow jaw... 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-CW12H/204064331 https://www.homedepot.com/p/Crescent-12-in-Chain-Wrench-CW12...
- classified 6y agoThat's an easy comparison. If you want things that work, stick with wrenches. Software is for masochistic gamblers that like it when things blow up in their faces.
- gkop 6y agoHere’s a classic interactive lesson to teach this concept to students early in their programming journey: https://teacherswithguts.org/resources/peanut-butter-jelly-robot https://teacherswithguts.org/resources/peanut-butter-jelly-r...
- jesperlang 6y agoI've seen this way of state modelling pop up more and more recent year in me feeds. Make impossible states impossible. It's a great way to keep you sane! https://www.youtube.com/watch?v=IcgmSRJHu_8 https://www.youtube.com/watch?v=IcgmSRJHu_8 (Elm) https://www.youtube.com/watch?v=uGMm3StjqLI https://www.youtube.com/watch?v=uGMm3StjqLI (Kotlin)
- bittercynic 6y agoFor anyone unfamiliar with pipe wrench use, the genius of it is that the parts fit loosely and thus squeeze the pipe harder the more torque you apply to it. edit: you don't have to tighten the screw - that is just to get the jaws to about the right width.
- guenthert 6y agoYou might be thinking of the Plumber wrench.
- bittercynic 6y agoI hadn't heard of a plumber wrench before. It looks conceptually similar to vice grips, and squeezing the handles together produces the gripping force. Is that correct? 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.
- lutorm 6y agoBoth use the jaw shape to bite into the pipe. The difference is that the plumber's wrench (never heard that name, the Swedish name translates directly as "pipe wrench") is that you can "help" it bite initially and that means it doesn't have to have as sharp teeth. The "american" pipe wrenches always seem to severely mar what they are used on.
- hinkley 6y agoThe pipe wrench also bites into the pipe: https://youtu.be/A5ERUP6Bt8g?t=89 https://youtu.be/A5ERUP6Bt8g?t=89 The wobble in the upper jaw is essentially the key feature of the wrench.
- lutorm 6y agoWe did a pretty fun lab with some high school students to drive home how hard it is to convey precise information. They were in pairs, separated by an opaque screen. We gave one of each pair a flag of a random country, and they were supposed to describe it to the second of the pair who drew it according to their instructions. Even simple flags got pretty botched. :)
- hrishios 6y agoReminds me of the viral video where a dad asks him children to instruct him on how to make a peanut butter sandwich. If they were vague, he would exploit any ambiguity in the instructions against them - like "rub the knife on the bread" before it had any peanut butter on it :) 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.
- kossae 6y agoYou'll find the spec here: http://www.everyspec.com/MIL-SPECS/MIL+SPECS+(MIL-C)/download.php?spec=MIL-C-44072C.024608.pdf http://www.everyspec.com/MIL-SPECS/MIL+SPECS+(MIL-C)/downloa...