TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Habitable Software

39 pointsby rasmusfabbeover 3 years ago

6 comments

advaelover 3 years ago
It seems like every few months I read some new way of articulating the idea that code that&#x27;s hard to maintain and modify is frustrating. Some, like this, don&#x27;t really pose solutions, some do, but most I think fail to realize that their advice inevitably falls apart in some case<p>Extremely modular&#x2F;functional code can require understanding more separated moving pieces, which may well be scattered to the winds in a zillion different files and combined in clever but counterintuitive ways<p>Extremely object-oriented code has lots of mutability, inheritance, and encapsulation gotchas that make users of an API less likely to understand what&#x27;s happening under the hood of some class<p>Extremely terse code can be difficult to parse the logic out of, extremely verbose code can take forever to read and be hard to hold in your head, extremely abstract code can be hard to parse out how it accomplishes the application, extremely purpose-specific code can be ridiculously idiosyncratic and be hard to separate into digestible pieces, and so on and so forth. I&#x27;ve heard a lot of code organization advice and could keep doing this for hours.<p>I had a student tell me a personal project&#x27;s codebase looked like the necronomicon once after an overhaul I made to make it more readable from my perspective<p>There are sometimes takeaways from all these analogies and policies and just generally opinions about how to write code people can supposedly maintain or modify or read more easily, and I definitely use and take some of them to heart. But most advice is really bad at generalizing, and I often feel that the most readable style of code is whatever one that I prefer and can convince people who work with me on it to prefer (Or, you know, vice versa as the case may be)
评论 #28884620 未加载
mikro2ndover 3 years ago
The original: <a href="https:&#x2F;&#x2F;www.dreamsongs.com&#x2F;Files&#x2F;PatternsOfSoftware.pdf" rel="nofollow">https:&#x2F;&#x2F;www.dreamsongs.com&#x2F;Files&#x2F;PatternsOfSoftware.pdf</a>
veltasover 3 years ago
The building analogy doesn&#x27;t work, software is not a building. There are essentially templates for buildings, there is no template for software.<p>Maybe software is more like a city. Maybe buildings are more like patterns, data structures, etc.
评论 #28875830 未加载
0wisover 3 years ago
I’m not entirely sure I would want software to be « engineered » like old farmhouses. They were not modular by design but often hacked to be tailored to the usage. It is not that different from hackable software. You can change part of it but everything is not possible. And it creates stability and reliability issues. I prefer engineered software like the superdome. You know what it is for, you can optimise it for its usage. And what is great with software is that when you don’t need it anymore, it doesn’t bother anyone. Unlike olympic games installations for example…
godDLLover 3 years ago
The number one characteristic of uninhabitable software as above defined, in my experience would be the inability of people touching it to look past today, and past themselves.<p>There is a degree of hack that should be unacceptable. If you&#x27;re using what&#x27;s at hand and not what&#x27;s preferable, you should stop to think. If you&#x27;re rushing to meet a deadline, open a new branch marked &quot;hacked-to-deadline&quot;. If you&#x27;re using something you&#x27;re proficient with instead of learning what is commonly used in such a situation, you&#x27;re not a hacker, but a worker.<p>A hacker is an aspiration, and a noble discipline. Meaning you are not to decide if you&#x27;re a hacker, but the people you respect as such should decide for you.<p>And discipline is key word in there. A discipline is both a pursuit and a technique. Seeking and sadhana. Feeling AND understanding.<p>There is no place for workers in an open-source project. There is place for goals, instrumental goals, hackers and automation. Explain what you&#x27;re doing, have clarity. Clarity leads to less features, more usefulness, better documentation that isn&#x27;t confused wrt&#x2F; what the code is actually doing.<p>Work it out in a draft branch, scrap it and code it again the way it is required to be to remain clear, driven by one clear approach to a goal that is well defined. If you leave a placeholder, clearly mark it as such in place, and in the backlog as a FIXME.<p>Do what you&#x27;d want others working on the thing to be doing, leave time to hack on what titillates your inner joy, as well. Eat the frog, but have cake ready.<p>This kind of discipline is demanding. If it&#x27;s sounds too demanding then your perception has not graduated to hacker levels. Hackers love complexity. It is a thing to neatly pack into your requirement space, a cute puzzle, and a lovely time.<p>Hackers love constraints. Those are the bedrock on which we build continental machines of universal magnitudes of influence.<p>Hackers love requirements. Once the problem space is well defined, and goals are clearly approachable, those are the things that drop, one after the other falling off the wagon. Hackers love to get rid of ill-conceived requirements.<p>But that last part you have to graduate to, with discipline. If you think you&#x27;re there, you should be able to think outside yourself, defend your discipline and it&#x27;s application in your code. And others will decide if you&#x27;re making sense or not. You can not be it.
almostarockstarover 3 years ago
I&#x27;m not sure any specific pattern or structure could possibly be good for all software.
评论 #28876628 未加载