TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Sins of software development

56 点作者 ionelm超过 10 年前

12 条评论

lostcolony超过 10 年前
&#x27;Most people assume technical debt is there because of time constraints.&#x27;<p>As opposed to what? He describes three personality traits, only one of which (hubris; not entirely sure why that&#x27;s the term used given how close it is to arrogance) actually leads to additional technical debt. Both fear, and arrogance (as he describes it) merely lead to technical debt remaining unaddressed; they don&#x27;t create it in the first place.<p>I&#x27;d posit that technical debt gets created because of time pressure, and that it stays because of continued time pressure.<p>Almost the entirety of my experience with technical debt has been &quot;Hey, this code kinda sucks&quot; &quot;Yep. We just haven&#x27;t had time to make it better&#x2F;it&#x27;s never been enough of a priority to make it better&quot;. Not &quot;Don&#x27;t touch that, you might break it!&quot; (caveat: I&#x27;ve run into this on long lived, gigantic defense contracts) or &quot;No, it&#x27;s good the way it&#x27;s written&quot; (never run into this). I can&#x27;t even imagine a developer who is any good saying that latter one; you -always- realize ways you could have made it better after the fact.<p>It may instead be a manager calling the shot that refactoring isn&#x27;t necessary&#x2F;worth it (the arrogance he mentions), and we can debate whether it&#x27;s fair for management, rather than developers, deciding when refactoring is necessary, but it&#x27;s still based on time&#x2F;money constraints; I&#x27;ve never met a manager who would say no to a refactoring attempt whose cost was nil (i.e., the dev, QA, and anyone else who&#x27;d need to be involved, offered to do it in their free time).<p>EDIT: And even technical debt incurred because of changing requirements comes about because we didn&#x27;t take the time initially to fully understand the requirements. This isn&#x27;t a bad thing, it&#x27;s what agile is predicated on, that we don&#x27;t need a full top to bottom understanding of the problem space to deliver something useful. But it still can be expressed as a time constraint, one on the time it would take to expand our understanding, rather than one on the time it would take to code.
评论 #8197667 未加载
评论 #8197422 未加载
lumpypua超过 10 年前
<i>If you don&#x27;t know what technical debt is... If you hate making changes in your code, then you have it. If changes are hard to make, then you have it.</i><p>I just spent the past 4 hours making a breadcrumb layout in CSS. I hate making changes to fancy layout CSS. Does that mean the CSS language itself is technical debt? :P<p>(Yes, I know about and heavily abuse less&#x2F;sass and associated libraries.)
评论 #8197397 未加载
评论 #8197947 未加载
taeric超过 10 年前
I still think the whole metaphor of technical debt is borderline worthless. Taken to its extreme the simple act of using programming language is akin to taking a loan against the expertise of other workers.<p>That is, &quot;technical debt&quot; should be regarded as normal debt, if the metaphor is to be worth anything. As such, so long as you are making more progress due to the debt than you would in paying it back, it is probably wise to keep it.<p>Consider, nobody would say you should put every dime you own into paying off a mortgage. How would you eat? Now, they will say to be wise and pay attention to the amount of debt you take on.<p>But realize the main problem with this is looking at personal&#x2F;consumer debt as at all analogous to business debt. They are not as comparable as basic intuition would lead you to believe.
评论 #8197761 未加载
michaelfeathers超过 10 年前
Here&#x27;s an alternative point of view - Technical Debt is the way that software grows when people take the easy route. If it&#x27;s easier to add code to an existing method than it is to add a new method to a class, then it shouldn&#x27;t be a mystery why there are so many large methods.<p>The reason software goes bad is because bad is easier than good.
评论 #8197871 未加载
prof_hobart超过 10 年前
&gt;it can be shortly summed up as inadequate technical choices that incur maintenance costs<p>I&#x27;m not sure I like that summing up. Inadequate for what? If anything, &quot;good&quot; technical debt is making perfectly adequate choices (butno more) for your short term needs with the full knowledge that you are incurring acceptable long term cost.
javajosh超过 10 年前
A poorly written application does not need to suffer bit rot. A well written application can suffer bit rot. The reason?<p>Applications are <i>stories</i>, and bit rot comes from not understanding the story and yet you have to alter it. Easy-to-read stories are easier to alter, but they can still be hard.<p>An application has a history, and it changed over time to accommodate the people and pressures it had to deal with. People who understand the story can maintain even a poorly written application, to the extent that a poorly written app doesn&#x27;t really suffer from bit rot.<p>Well written applications are great, but even they have a story, and if you don&#x27;t understand the story then a good architecture won&#x27;t save you from bit-rot. Indeed, foisting &quot;small projects&quot; on unprepared juniors, and due to time constraints, just allowing the code in without review, is the seed of a form of bit rot even on well architected projects.<p>Over time, we see the story of the application grow to include its data, and it&#x27;s host(s). Indeed, one could say the &quot;devops&quot; trend is primarily driven by the definition of application as story. Extrapolating, we could say that applications are pushing at their boundaries: the build is part of the story, the push is part of it, and now we might add &quot;building the datacenter&quot; or &quot;router configuration&quot; in their story. At some level, for some larger companies, this is certainly the case.<p>The arrogance that the OP talks about is real, but it comes in two places: when a junior just doesn&#x27;t want to learn the story, and when a senior thinks his story is so good, so transparent, that it &quot;speaks for itself&quot;.<p>This is not to say that we shouldn&#x27;t strive to write better applications, and create and use better architectures, but rather to emphasize the fundamental subjectivity of the bit-rot problem, and that it&#x27;s a very human, very story-telling sort of problem at it&#x27;s root.
ownedthx超过 10 年前
We follow a simple rule about technical debt:<p>If you are working on an issue, and technical debt is affecting your ability to create factored, testable code, then fix the debt.<p>It might mean a 1 hour issue takes 4 hours, or more. But we put a premium on writing tested code, such that we can push builds often to production.<p>However, we never make a task &#x27; go fix technical debt X&#x27;.<p>That way, you don&#x27;t waste time on something that really isn&#x27;t a problem.<p>It&#x27;s working for us well, so far.
Bahamut超过 10 年前
I&#x27;ve seen technical debt accrued without regard at a company once - just before leaving, they had to scrap their whole prior frontend web app and rewrite it from scratch, about a year after they started.<p>Avoid technical debt at all costs - spending the extra effort on good engineering is worth avoiding an awful situation. Managers of course bear the most responsibility, but developers can do their part too many times.
评论 #8197265 未加载
评论 #8198172 未加载
scrabble超过 10 年前
Technical debt for me is code without tests.<p>If I can&#x27;t properly determine the intent of code, and there are no tests to ensure that refactoring is not breaking expected behavior, then it becomes difficult to work with that code in the future and I may end up creating workarounds and bypasses instead of simply updating the code.
评论 #8197430 未加载
wellpast超过 10 年前
By the time technical debt becomes evident enough for it to be noticed as a problem, it is most often too late to do anything about it. For those that don&#x27;t believe me, show me enough businesses that have successfully refactored their way out of meaningful technical debts. The majority of case studies I know of prove me right on this point.<p>Usually when someone argues to refactor a system, one of two things happen. The developer loses the argument and is left frustrated. Or the developer wins the fight but finds that the cost is too high to successfully dig out of the hole.<p>When you&#x27;re building a house, you&#x27;ve got to keep its structure sound as you go. If you violate architectural principles along the way, you will find it prohibitively costly (impossible) to revise your prior choices.<p>As long as we think bad architectural decisions are justifiable -- a mentality enforced by the idea that sound architecture comes at the cost of delivery time -- then we will forever be flailing.<p>The fundamental problem is that industry has failed to deliver good architects. The hacker culture and desperation of industry for coders has produced an ignorance, disinterest, and almost philistine disdain for the architectural skillsets. (Note: by architectural skillsets, I mean the ability to keep your technical components cohesive and decoupled with minimal interfaces.)<p>A skilled architect knows that solid design is a function of skill not of time. A skilled architect knows that there&#x27;s no tradeoff between time and sound design. The comprimises in the face of time pressure are not to be made on the architecture. The concessions to be made are on how generalized you&#x27;ll make a technical component or which features are most important to deliver today (think Minimimum Viable Product, a notion consistent with good architecture not opposed to it.)<p>But a majority of practitioners in our profession never learn the architectural skillsets and how to apply them. We learn how to hack, to code, to deliver -- this is all good -- but we don&#x27;t learn how to build sound architectures.<p>Acadmeic environments have trouble teaching it because its a skillset acquired through years of practice in the real world. Industry has trouble teaching it because businesses can&#x27;t afford to send their juniors off to go learn it. They need the juniors to execute, not go through the hard labor of learning architectural skills.<p>Our industry needs to figure out a way to produce workers with the right skillsets. Then we can avoid the major technical debts in the first place, without thinking we have to make a tradeoff on time. It is too prohibitive to dig yourself out of an unsound architecture. You have to build the house right. That it is &quot;soft&quot;ware doesn&#x27;t change the game. The house analogy applies.<p>We have to produce good architectures to begin with. There&#x27;s no other way. And that requires skill in architecture, a skill far far too but unnecissarily rare in this industry.
评论 #8198039 未加载
nawitus超过 10 年前
&gt;Even juniors can have good ideas.<p>I propose that software developers drop this whole idea of &quot;junior developer&quot;. There are just developers.
评论 #8197869 未加载
CoffeeDregs超过 10 年前
What nearly all discussions (every?) of technical debt miss is <i>technical debt interest rate</i>, <i>product value</i> and <i>product interest rate</i>. It&#x27;s not a problem to carry debt if the interest rate on it is lower than that on your product and its level is lower than your product&#x27;s.<p>I like to build cleanly, but sometimes a feature needs to be in production TODAY, so we get it into production TODAY. Or sometimes it&#x27;s useful to get something into production&#x2F;usage before investing too much into building it. In fact, I&#x27;m about to commit a cleanup to a &quot;get it into production TODAY&quot; bit of code that I wrote 3 months ago and I&#x27;m very appreciative of the fact that I got a second crack at the problem: the revision is much more general, has better test coverage, is extensible because the feature has been in production for 2 months and I understand it better now that we&#x27;ve been using it. I would have wasted time and money building it more cleanly 3 months ago.<p>As parts of the product get larger and more complex, we carve them off into their own products&#x2F;services&#x2F;systems so that we can more easily reason about the value, debt and interest rates. To be sure, all of these measures of debt, value and interest rates are very subjective (...in the early days ...perhaps they can be measured in various ways later on), so I&#x27;m not suggesting that we sit around saying &quot;the debt on that would be $4,729 and the interest rate would be 39.16%&quot;. But they&#x27;re useful analogies and are helpful to keep in mind and to guide discussion. And, besides, you probably don&#x27;t know your exact credit card balance and interest rate at this exact moment* but you probably have a decent estimate&#x2F;feel of&#x2F;for it.<p>The problem with technical debt is not technical debt; it&#x27;s that most people are blind to it. Just as with a credit card, they just swipe the card and, hey!, new stuff!; they just commit the code and push it, and, hey!, new feature! When the bill arrives, they&#x27;re surprised. Just as with financial debt, technical debt is a tool. Just as with a physical tool, you can use it to hurt yourself.<p>I run the product&#x2F;dev group for a startup and we are constantly accruing and paying off technical debt. We do so very consciously and very openly, while constantly thinking&#x2F;asking: if we do this quickly and accrue debt, when will it need to be paid?; will it slow development of other parts of the system?; did we accrue a debt without noticing it?; how much debt are we paying-off&#x2F;cleaning-up this week? And I&#x27;m clear with the rest of the management team about where and when we&#x27;re accruing debt and they use that knowledge when considering product&#x2F;dev requests. IMO, it&#x27;s critical that your company and team have a philosophy about technical debt recognition, accrual and payment.<p>* 3... 2... 1... A pedant just checked their balance and interest rate...