My wife and I are in the process of getting our small (36ft²), moldy “master” bathroom remodeled. During a break in jackhammering, I peeked around the worksite and noticed an empty concrete bag stashed away behind newly hung sheet of drywall.

This is not news. Contractors have hidden garbage in walls since the beginning of time. Empty beer cans, old news papers, vintage Superman comics, and piles of drug money are all common stowaways. Occasionally it provides free insulation, sometimes it’s simply passive-aggressive vandalism. The contractor did a great job floating the drywall, so I let it be, but I’m left curious why he felt the (innate?) need to put garbage in my walls.

Then I started thinking about my own situation. I’m a contractor (of an admittedly sissier breed), so what is my garbage? What is the crud I stash away in the things I’m building? In a small shop bustling from contract to contract there’s not much time for in-depth reflection on code handoffs.

As I pondered this, I was called in to a client’s office for code review with their UI development team. The meeting lasted three hours! That sounds daunting, like standing before a firing squad, but it was actually great. Hearing from the skilled and seasoned developers who will actually use the code we handed off is priceless. Here’s (maybe) some of my own personal garbage:

  • @import 'reset.css': I’ve been dependent on CSS resets since I began my career. Resets are pretty aggressive and create a lot of garbage in web inspector. Working with browsers not against them using Normalize seems more efficient.
  • !important: From time to time it’s necessary to set an override. It helps other developers to document why in a comment. If you can’t explain why an !important exists, it’s probably garbage.
  • .avoid > .over > .nesting: I’m a firm believer in the Inception Rule, but an awful practitioner. I need to be mindful when I need to snap another component or create a mixin.
  • 33 additions, 535 deletions: The team suggested ditching Bootstrap’s JavaScript tooltips in favor of just CSS. For our situation a simple .tooltip:hover:after { content:attr(title); } and some rudimentary styling did the trick.
  • Neater grids: Our deliverables included a robust hand-coded grid with built-in content choreography. However, the 332 line grid partial was difficult to read and maintain. Bourbon Neat (another team suggestion) allowed us to better automate our complex grid with only 191 beautiful lines of human-readable poetry.

I’ve noticed a trend. I tend to rely on pieces of frameworks or ancient cut-and-pastes to quickly fix problems so I can move onto the next. This is great when sprinting towards code complete, but “quick fixes” tend to be “fat fixes”. My gain can end up being be someone else’s loss.

Nothing is ever perfect and old habits die hard, but improving craftsmanship is more valuable than gold. Considerate contractors budget time for garbage removal and tidy up after a day’s work. Slowing down a bit, scheduling time to refactor, and using smarter tools seems like the sensible and professional path forward.

And, above all, if it looks like garbage and smells like garbage, it probably is garbage.