Live data from Hacker News

The Way We Look at Technical Debt Is Wrong

bigeng.io

41–50 of 114 posts

Re: The Way We Look at Technical Debt Is Wrong

#41
In the past 15 years I've been in a situation twice where shipping something NOW was more important than taking the time to do the needed cleanup. Simply because the competition was breathing down our neck, and taking a break to refactor stuff would just give them an opportunity to bury us. And who's going to care about your code quality then?

And it wasn't just crappy web apps or throwaway MVP stuff. The first one was in medical systems, where the suits figured we had a 6 month lead on our closest competitor, the other was in consumer electronics (navigation devices), in the time that competition was still stiff in that sector.

In both cases it was decided that releasing something was more important, knowing full well that we had to pay the cost later. Of course not everyone agreed with it, since no one likes having to work with legacy crap, and everyone and their mother always wants to refactor all the things, but guess what: code quality is not the goal of your company, making money is.

Re: The Way We Look at Technical Debt Is Wrong

#42
I'm starting to believe that debt is the wrong metaphor. Imagine you have 1k in debt and 2k in the bank. You're free to pay down that debt, so you do. If you later realize that you actually need that 1k used for the debt, you can simply take out a new loan and effectively undo that step. This is precisely where the tech-debt analogy breaks. When you invest a month into fixing tech debt, you can't get that month back. That decision is final.

Re: The Way We Look at Technical Debt Is Wrong

#43
IMO This is all you need to know about "technical debt"

1/ Poor code =/= technical debt. Far too often, poor code masquerades as "technical debt"

2/ Good engineers do the right thing which is always a judgment call based on circumstance & culture.

3/ Take guidance from your best engineers, and find a way for the business to adapt. Much easier to change the sales deck or pricing today, much harder to overcome bad technical decisions. No one ever said "I never knew that sales deck or pricing would last this long" but many say this about software. Be super careful & deliberate.

4/ Build things that are simple (not easy), and respond to demand. Focus on movability & robustness, not "perfect" design.

Re: The Way We Look at Technical Debt Is Wrong

#44
Ehh... what's this "we" stuff? I think the way a lot of people look at technical debt is correct, not taken from the perspective the author seems to have where debt is always bad, but rather taken from the perspective that the term "debt" is meant to convey.

Financial debt (contrary to the implied sense I get from reading this article) isn't always a negative -- business loans and even VC capital are forms of debt without which many companies wouldn't be able to exist, mortgage debt is debt without which very few people would be able to buy a home. These are useful tools. Likewise, accruing technical debt is often just part of the process of writing software, especially when "bootstrapping" new projects. In moderation, it isn't bad at all, but like financial debt, you do have to manage it, see it as a risk factor and not let it spiral out of control or else it will become very destructive.

Re: The Way We Look at Technical Debt Is Wrong

#45

From years of experience, I detect in the tone of this piece a certain notion that product managers / non-technical people tend to form when working with developers - namely, that developers don't care about speed-to-market and would rather agonize and winge over perfect architecture and coding standards... What I think you'll find, more often than not, on the business end of this attitude is a developer(s) patiently…

New PMs are like children, they tend to only learn the fire is hot by actually getting burnt.

Instead of digging my heels in on not giving such PMs everything they want, I try to offer alternatives and put the choice on them: they can have this feature today and in 6 months we grind to a halt because we can't fit in anything new, or we slow down just half a beat and do it right the first time. "Up to you, buddy," I say.

It happens with jr. devs, too. They want to use a singleton to solve a problem, or they want to forgo using any sort of referential constraints in their schemas.

Of course, the PMs and jr. devs always choose the shortcuts. I help them both pick up the pieces afterwards, but I never work overtime for it. The point is to make it clear that nobody other than themselves is responsible for their own mistakes. They led us into the mess, they can lead us out.

After that, everyone seems to get along a lot better and everyone seems super keen on having discussions about the "right" way to do things and how to fit things into the current state of the project correctly.

Re: The Way We Look at Technical Debt Is Wrong

#46
Unless you have infinite amount of time, you shouldn't refactor code you didn't need to touch in the first place.

When you have a large enough codebase, you will always find bad code if you look long enough, it's pointless to waste time on that. You should only refactor code that you needed to touch in the first place.

Re: The Way We Look at Technical Debt Is Wrong

#47

I don't believe that, even in the short run, taking shortcuts actually saves you time. It's much like working 12 hour days - you feel more productive, but you're not actually getting any more done on a larger scale. There's an obsession with 'hurry up and get it done' that contributes little on a larger scale. I also don't believe it's possible to pick the 'important' areas of code a priori and make only those areas…

While I agree with you on time vs. shortcuts, I do think it's a question of valuing explicit time vs. opportunity cost that's a depper issue here.

My opinion is that whether it's programming or general white-collar work, most cases of doing it "the right way" vs. "the dirty way" tend to be about investing the "certainty" of lost time immediately for the "promise" of savings.

For some things, the tradeoff is pretty decent (taking time to improve core knowledge or relevant skills that are related to goals).

But for a quickly growing company, how many situations are there where a "hack it out" fix that costs time in the long run is a net win in opportunity cost and hence long-term value?

If a shortcut that will cause you headaches in 9-18 months also allows you to add critical features at an accelerated pace for the next 6 months, is it: (1) inefficient because you net lose man-hours or (2) efficient (a) maximizes your near-term growth trajectory, (b) thereby increasing potential access to resources and hence long-term growth

To be clear, I do agree with your statements about shortcuts usually not saving time especially when you deal with teams/setting standards.

My point is more that while time saved/lost is easier to mentally calculate, it alone is not really what's driving value in many situations.

There's also the inherent problem of using qualitative terms that mean different things to different people.

But hey, that's part of the fun on the internet.

Re: The Way We Look at Technical Debt Is Wrong

#48
I'm going to add a comment about non-software technical debt. Think about technical debt in residential home construction. When a home is built, it requires a footing, a foundation, framing, sheathing, electrical, plumbing, insulation, roofing, etc. However, homes are typically designed "statically" in that they don't frequently change shape.

As a result of that, when it comes time to renovate the house, the workers doing the renovation frequently find that nothing about the construction of the original house was designed to make it easy to extend or add to the house. even things as simple as adding light fixtures can require running wires all through the house back to the electrical box, cutting holes in walls, patching walls, moving insulation, etc. When you go to add rooms, you find that the way the foundation was poured means you'll need to remove existing foundation drainage systems to add new footings, add new foundation, add new drainage etc. Then, tear everything apart to add more electrical and plumbing. and finally, tear apart a big portion of the roof to merge the shingling on the roof.

Houses _are_ static, and thats why we tolerate building things this way. We can't predict how they might change in the future, or what the needs might be. If you could/did, you could mitigate almost all of those challenges I mentioned earlier.

In software, we do know that it will change, and we frequently can predict where and how those things might attach. Because we can predict those things means that we should design our software to be ready for those expansions as well as possible to minimize major structural changes to the whole applications in the future.

Re: The Way We Look at Technical Debt Is Wrong

#49
Minimizing technical debt before launch or major milestones is huge because, on occasion, that debt can compromise all future estimates/dates/milestones if it is not addressed.

I think developers, including myself, like to get things right before launch because fixing it after launch is harder, if not impossible once other emergency/technical debt comes in and starts layering on top of that debt.

If this goes on for 1-2 cycles, before long your app, backend and internals look like a shanty town that no developer wants to enter.

Sometimes I wish code was visual like buildings, you could more easily see quality that way. Mostly though you have to believe in your developers/engineers that what they are building is a mansion/building you want not a shanty town dwelling that is held up on duct tape and silly putty, yet the technical pressure/debt put on is largely coming from someone who can't see the visual representation of the system.

Developers can only be MacGyver for so many release cycles before instability strikes the system down if management is not careful.

There will always be some amount of technical debt but developers do love to get things done and out the door as fast as possible. We like to do so with a minimum amount of technical debt as it is a constant battle against time/market/cost with quality.

Re: The Way We Look at Technical Debt Is Wrong

#50
This has been my experience in the startup world.

My startup went from a few scribbled notes on paper to a full app in the app store in three months, including 50 lessons, 6 mini games, and a challenge/achievement system.

Naturally, I had to cut a LOT of corners to do that, and accrued a ton of technical debt, but I was able to keep the high level architecture relatively supple, and as a result tackle the various messes individually rather than as a whole later.

It paid off. Or architecture has since changed twice over so none of the old code remains, but we're strong on investment, have lots of people, and are poised to take over our target market. And we got app of the year last year.

Post reply on HN