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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The joys of maintenance programming (2011)

159 点作者 pramodbiligiri超过 1 年前

14 条评论

JohnBooty超过 1 年前
Maintenance programming for pay can be rewarding <i>iffffffffffffffff</i> management has a deep understanding of and appreciation for the task. There can be a lot of joy and satisfaction in adding tests, fixing edge cases, fulfilling user needs, &quot;quality of life&quot; improvements, optimizing. <i>Honing.</i><p>My experience is that this is almost never the case.<p>Generally, management does not understand or appreciate why it&#x27;s a slog, why you might want to refactor this or that, etc.<p>Obviously a lot of this falls upon the engineer. It&#x27;s your job to communicate and demonstrate. Helps if you have other engineers backing you up and presenting a unified message. Also helps if management is technical enough to understand what you&#x27;re saying instead of simply believing -- or <i>not</i> believing -- you.<p>But maaaan. Uphill battle! I&#x27;m burnt out on it. I&#x27;ve decided I need to seek greenfield stuff. Maybe forever. But definitely for now.
评论 #37564575 未加载
评论 #37565239 未加载
评论 #37561210 未加载
评论 #37562594 未加载
评论 #37564230 未加载
jebarker超过 1 年前
I&#x27;m currently on a sort of sabbatical from greenfield research projects. I&#x27;m doing maintenance programming on a large widely used open source project. It&#x27;s been really refreshing. I didn&#x27;t realize how much I was feeling the pressures of 15+ years of greenfield research. By contrast the maintenance programming is clearly defined, easier to put down at the end of the day and unambiguously useful. I&#x27;m also rapidly improving in my debugging, code understanding, profiling and optimizing skills which will make me a better programmer when I do return to writing new code.
评论 #37561049 未加载
SKILNER超过 1 年前
I gave a presentation many years ago to a software process group in Silicon Valley entitled, &quot;Unsolved Problems of Software Maintenance&quot;. The problems are all still there.<p>Having done lots of both greenfield and maintenance work over four decades, I can unquestionably say that software maintenance is way, way more difficult.<p>I heard this first from Joel Spolsky, &quot;it&#x27;s easier to write a program than read it.&quot;<p>Which led me to write an article on the subject, &quot;How To Read A Program,&quot; about the cognitive aspects of trying to learn unfamiliar code. <a href="https:&#x2F;&#x2F;www.itjungle.com&#x2F;2009&#x2F;01&#x2F;28&#x2F;fhg012809-story01&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.itjungle.com&#x2F;2009&#x2F;01&#x2F;28&#x2F;fhg012809-story01&#x2F;</a><p>The article uses AS400 applications as an example, but is general enough that it applies to applications in most languages.<p>This is a field begging for help from AI.
评论 #37566337 未加载
x1f604超过 1 年前
Do people understand code by line-by-line reverse-engineering what the code is doing, or do they understand it by relating it to what they&#x27;ve written before?<p>If the latter is the case, then you get better at reading code by writing code. Writing lots of code puts those code-patterns into your long term memory, and then when you see those code-patterns again you&#x27;ll recognize them.<p>For system design too - if you&#x27;ve designed lots of systems yourself, then when you see a new system, you&#x27;ll be able to relate it to the systems that you&#x27;ve designed before.<p>So maybe building greenfield projects also makes you better at maintaining existing projects?<p>It&#x27;d be great if someone could point me to some existing literature on this topic. I&#x27;ve looked around and can&#x27;t find any.
评论 #37560972 未加载
评论 #37561582 未加载
评论 #37560080 未加载
评论 #37560814 未加载
swader999超过 1 年前
The joy of Greenfield is short lived. At some point, it becomes too costly to fully refactor and you are stuck with what you chose and edging closer and closer to legacy dev.<p>Some projects though just keep on trucking along and doing the next part with the newest shiny thing. You end up with five ways to access data, three ways to send emails and fifteen different methods of report generation. Frankenstein architecture! This architecture also emerges when you have leaders that don&#x27;t make decisions and peeps debating all day on slack and then doing their own thing anyway because they didn&#x27;t really want to offend anyone and everyone&#x27;s ideas are great.
gregjor超过 1 年前
Author of the article here. Thanks @pramodbiligiri for posting. Surprising and humbling to see this old article on the HN front page. I haven’t read it in years.<p>When I wrote that, in the wake of the 2008&#x2F;9 meltdown, I intended to give programmers some career options to think about. More interesting and stable work out there than FAANGs and startups.
vsareto超过 1 年前
&gt;Skilled programmers recognize what makes good code good, and what makes bad code bad<p>You&#x27;re still somewhat biased, so you can get put on projects where the style is different from yours. If you happen to think that style is bad, it won&#x27;t be fun to work on.<p>You shouldn&#x27;t want to change the style. Chances are you&#x27;ll do it incompletely (job change) or the time spent won&#x27;t be worth it. If someone else comes along and doesn&#x27;t like your style, we&#x27;re just going to repeat this process.<p>There&#x27;s been way too many different approaches that work for developers to be unified on what styles are best.
评论 #37563396 未加载
评论 #37567386 未加载
hiAndrewQuinn超过 1 年前
I love maintenance programming. I love legacy programming too. I have a story where the two worlds collide.<p>At my last job I had to work with a PowerShell codebase that `cloc`ed in at over 100,000 lines, and was absolutely ancient to boot, having been added to in bits and pieces by sysadmin after sysadmin over the course of 12 years total, in 3 different human variables-and-comments languages, all of whom were Windows power users with very clear ideas of what needed to be done, but also all of whom were very clearly learning to program for the first time, at least in the wonky PoSH paradigm. AKA: Classic big ball of mud situation. Every new customer had to have their details run through this codebase, however, and I saw the potential to eventually boil this down to a simple 6- or 7-parameter cmdlet (PoSH for &quot;shell script&quot;). I got my undersized chisel and toy hammer and got to work.<p>In some ways starting work on the proj felt more like beginning to dig into an ancient COBOL database in a System&#x2F;360 mainframe than anything resembling the state of the art in 2023, or even 2011. There was a single VM that everything had to run on, and the script couldn&#x27;t even be called remotely via SSH because the only way in was via a web browser based remoting session. The connection was spotty and would often drop halfway through coding in there in my dinky little Notepad++ session, requiring minutes of reauthentication just to get back to work. Unit testing (which PowerShell had a surprisingly good third party library for, called Pester) was out of the question. And: There was no version control! No wonder it got to 100k lines - most of the code was being entirely unused! But what?<p>The first few Saturdays I spent didn&#x27;t go very far. I was mostly trying to figure out where the logic even began and ended in this mess of spaghetti. But eventually I started to piece together an overall structure for the thing. I made a pact to myself not to delete any of the many, many files that had accrued over the years until I knew every file that the code would touch first. I started doing some lightweight encapsulation with the -WhatIf flag, and with firebreaks (sticking `return` after each tiny function) so I could work on one linear piece at a time, and gradually tiptoe my way forward to the finish line. Eventually I got there, and managed to strip the whole thing down to about 1500 lines.<p>The joy of this kind of programming is that, even if you don&#x27;t start with regression tests or modern practices, you do know from having ran through the original process a million times <i>exactly</i> what the end product is supposed to look like. Since no one is paying attention to your refactoring work in the first place, you&#x27;re allowed to take your sweet time. To me it was obvious this mess of code was going to become a blocker for the business at the pace we were going: We were a SaaS, and yet we had to manually provision customers behind the scenes like this, in a process which took days to weeks? And we didn&#x27;t even have a proper CLI we could call for this? Jackpot!<p>I left the company about 2 months after wrapping this project up and demoing it to my coworkers in search of better pay, but I&#x27;m really glad I got the chance to take such a fearsome codebase and tidy it up like that. There is just something satisfying about that kind of work, it&#x27;s like gardening. I also got really, really good with Notepad++&#x27;s find and replace across all files functionality. There is in fact a skill to it! (Mostly that you should always, always find and replace the longest strings first!) Although I think these days I&#x27;d probably reach for a similar function in vanilla vim first, or even in bare `sed` if I was feeling gutsy.<p>(I&#x27;d end with &quot;If you, dear reader, are in a similar PowerShell quagmire you need someone to pull you out of, I&#x27;m available for consulting at $X00&#x2F;weekend&quot;, but alas. My weekends for the next few months are already sworn to another equally wonky project for my current employer. At least I&#x27;m getting overtime this time. ;) )
评论 #37567154 未加载
评论 #37560922 未加载
dang超过 1 年前
Discussed at the time (of the article):<p><i>The joys of maintenance programming</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2267261">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=2267261</a> - Feb 2011 (29 comments)
评论 #37564596 未加载
stringtoint超过 1 年前
Nice post. In the past I&#x27;ve had colleagues (also senior people) who disliked touching &quot;legacy&quot; parts (e.g. Java based microservices compared to newer Express.js or Kotlin based microservices which don&#x27;t provide half the value that the legacy parts do). I also think that maintenance programming can be rewarding. However, I do believe that it does not make sense to throw entry-level engineers into the maintenance mess alone: they still need some guidance in my experience. Then you&#x27;ll be able to reap the benefits such as getting better in debugging and understanding more about the business problems that the software is solving.
summerlight超过 1 年前
One more benefit is to learn how to tame complexity. The most complex piece of software doesn&#x27;t come from nowhere; it is built over years, if not decades. People will never experience the same level of complexity in the &quot;greenfield&quot; programming. And that experience changes the entire mindset, from how to write the codes to how to structure the entire engineering org.
Cthulhu_超过 1 年前
I wish I spent a year doing this at my previous job instead of doing what I was hired to do, rebuild the project. The rebuild would&#x27;ve taken another 2.5 years, even if I had help.<p>But the existing project could&#x27;ve used some improvements; there was an inefficient SQL result to XML string to JSON thing happening with every request, so doubling response times could probably have been done within a week of work or so, and quadrupling it with a few weeks of work (there was thousands of LOC of SQL to XML code involved, but in most cases it could&#x27;ve been SQL to JSON directly).
Jabrov超过 1 年前
Let&#x27;s say I wanted to do this. How do I actually get started?<p>Let&#x27;s say I make a website that showcases my qualifications and lists out the services I offer.<p>How do I actually get a client?
评论 #37564544 未加载
jakobson14超过 1 年前
After the NX bit, and cookies, and shadow stacks, and now tagged pointers (again) I&#x27;d rather stop pushing the guardrails for shitty code down into the hardware. It costs performance and the bandaging never ends.