Duct-tape coding is when you throw something together with existing parts that work just fine and tape them all together with shell code. Like duct-tape, you can’t let your code sit in the sun too long or it will fall apart under the heat and pressure. But it’s fine to get an idea of what you need to build out formally.
💬 Many of my colleagues and I have had a mantra for years,
“Never make your hack too good. They might never give you a chance to finish it.”
This comes from years of watching pointy-haired bosses make decisions about our code quality without listening to us and deciding it was ready for production despite all our warnings. It never ends well.
Imagine if Kirk ran down and pushed the “warp” button after Scotty told him it just wasn’t ready.
Yeah. If you are old enough to understand that reference then you have already probably been around long enough to know what I’m talking about.
[Just think, the networks almost never put Trek on because it was “too smart for TV watchers”.]
The idea is that you arrive at the core of what is needed faster when you just duct-tape it. Later, if needed, you can port the duct-tape code into something more formal, usually a strictly-typed language like Go or Rust or even TypeScript.
This approach is also more formally known as prototype programming.
These days Bash is clearly the best duct-tape coding language.
💢 Some people say Python is a good duct-tape coding language, but it really isn’t. Most people saying that are one-trick ponies who know nothing but Python. If they coded in anything else — like ever — they would see that Python is too heavy and inflexible for super fast duct-taping and too light for serious coding.
Once upon a time Perl was the king of duct-tape languages — not to mention all server-side web development.
A lot of misinformed people think Python beat Perl — but it was actually Bash that caught up removing most reasons to keep using Perl.
Python did take over for those wanting more formality for larger projects and a better OOP approach — which isn’t duct-tape coding at that point — but then Go and Rust and TypeScript happened and Python’s usefulness was obliterated. Now you know what the one-trick-ponies won’t tell you — because they can’t. 🤪