Duct Tape & Baling Wire Methodology
Duct Tape & Baling Wire
A coding methodology for personal projects and proof of concepts.
Premise, and Perspective
Premise
There is a time and place for following “best practices” as a developer. It is not “always”.
Best practices should be followed when…
- your code can cause harm, damage, loss, etc.
- you are sharing software that people will rely on.
- people are paying you for a product that is expected to be “good quality”
In all other contexts following “best practices” are optional, and sometimes detrimental.
Flexible Makeshift Materials
Duct tape is commonly used in situations that require a strong, flexible, and very sticky tape. Some have a long-lasting adhesive and resistance to weathering. - Wikipedia
Its uses are infamous, and as a result, almost everyone has a roll of it on hand, even though it’s rarely the “correct” or “best” tape for any given job. It’s not even the right tape for ventilation ducts anymore.
Baling wire, otherwise known as bale wire, farm wire, haywire, or soft wire is a type of wire used in agriculture and industry for many uses such as mending fences or manually binding rectangular bales of hay, straw, or cut grass. It is also used in many non-agricultural applications such as banding together corrugated cardboard, paper, textiles, aluminum and other materials that are processed in the recycling industry.
Baling wire is sometimes used in an informal, make-do manner as an easy fix. It is frequently referred to as one of the basic repair materials. Typical uses include supporting loose mufflers and patching chain-link fences. Common phrases often include baling wire as an ad hoc, fix-anything material, alongside chewing gum, duct tape, and the cable tie. - Wikipedia
While most of us don’t have a roll of Baling wire on hand, it’s become a similarly generic solution to a wide variety of problems by those who do. Baling wire is a little harder to work with than Duct Tape, but its much stronger, and can be trusted to hold things together for a significantly longer time.
The “Wrong” Tool For The Job
Every time you’ve solved a problem with Duct Tape, you’ve likely used “the wrong tool for the job”. At the same time, it’s rarely a “bad” decision. The “right” tool is frequently unavailable, or inconvenient. The “right” tool frequently involves taking more time, and applying more care and consideration than the problem justifies.
Sometimes a “quick and dirty” hack is absolutely the “right” choice. If you’re having a yard sale, and the wind keeps blowing your sign away, then grabbing some Duct Tape and taping it down is a great choice. It’s a far better choice than canceling the yard sale while you go off and build a waterproof, wind-proof, ground-embeddable, backlit sign holder made exclusively out of recycled materials.
Quick & Dirty != Crap
Quick and Dirty hacks should be applauded, not derided. They are applied when we need to accomplish a goal, and the most important criteria is speed, not quality. It doesn’t need to be pretty. It doesn’t need to last forever. It just needs to hold up long enough to serve a short term function.
Imagine you’re a race-car driver, today is the last race of the season, if you win your team could take home millions. Some important mount in your car has broken. You’ve got a roll of baling wire. You need 2 things: for your car to be ready when the race starts, and for your car to last one more race. You grab the baling wire, wrap the 💩 out of the thing that needs to be held up, and drive! It doesn’t matter if the car falls apart afterwards. What matters is that you’re back in the race.
That is not a crap solution. That is a glorious solution. That solution solved a problem, and gave a team the opportunity to get paid, and possibly become famous.
Imagine your company is trying to decide if they should spend the next 3 months building out some new functionality that sounds cool, but no-one’s really sure about. Spending a week slapping together a proof-of-concept “test spike” with whatever tools you have readily available, is a great idea. It doesn’t matter that it doesn’t scale. It doesn’t matter that it only works on Mary’s computer. It doesn’t matter that regardless of success or failure it’s going to be hucked in the trash. What matters is that it proved or disproved the idea in the shortest amount of time possible.
The Importance of Context
The problem with a Duct Tape & Baling Wire approach to coding is that developers are crap at following best practices even when they know they should. Our egos tell us our code is good and we skip writing tests, or only write perfunctory ones. Our brains suffer from “Recency Bias” and assume that because our bad habits didn’t bite us in the ass the last few times, that they’re an acceptable approach.
Duct Tape & Baling Wire are great solutions in specific contexts.
Again, don’t use this technique when…
- your code can cause harm, damage, loss, etc.
- you are sharing software that people will rely on.
- people are paying you for a product that is expected to be “good quality”.
This applies even if you’re putting together a “Quick and Dirty” proof-of-concept. If it has to talk to the production database, then you better damn well ensure you’re not altering records, or overwhelming the server with expensive queries.
That doesn’t mean that you have to take an “all or nothing” approach. You can build a quick and dirty app, while also following best practices within specific areas of it.
The Methodology
Duct Tape & Baling Wire is an approach to software development rooted in the following ideas:
- Sometimes fast is better than “good”.
- Sometimes accepting risk, is better than guaranteeing control.
- Sometimes “works for me”, or “works for now” is all that matters.
Duct Tape & Baling Wire is…
- recognizing that sometimes it’s ok to write “bad” code.
- embracing the clumsy, inelegant, nature of a bodge.
- choosing easy, and fast, over elegant, and good.
- finding and using tools that already do what you need.
- not caring that you don’t know how something works.
- accepting that if it breaks, you won’t be able to fix it.
- connecting things that were never intended to go together.
- not worrying about efficiency until you need to.
- looking outside your bubble for other people’s solutions.
- buying a hammer, instead of making one.
- being thankful for the Unix Philosophy.
- knowing that sometimes using Duct Tape and Baling Wire is a terrible and/or dangerous choice, and taking the time to do the right thing when it is.
Duct Tape & Bailing Wire is not…
- code you want to show off.
- appropriate for anything you’re selling.
- good for maintainability.
- good for collaboration.
- acceptable when other people can be harmed.