Live data from Hacker News

Habitable Software

akkartik.name

1–10 of 11 posts

Re: Habitable Software

#2
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…

Re: Habitable Software

#3
The building analogy doesn't work, software is not a building. There are essentially templates for buildings, there is no template for software.

Maybe software is more like a city. Maybe buildings are more like patterns, data structures, etc.

Re: Habitable Software

#4
It seems like every few months I read some new way of articulating the idea that code that's hard to maintain and modify is frustrating. Some, like this, don't really pose solutions, some do, but most I think fail to realize that their advice inevitably falls apart in some case

Extremely modular/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

Extremely object-oriented code has lots of mutability, inheritance, and encapsulation gotchas that make users of an API less likely to understand what's happening under the hood of some class

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've heard a lot of code organization advice and could keep doing this for hours.

I had a student tell me a personal project's codebase looked like the necronomicon once after an overhaul I made to make it more readable from my perspective

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)

Re: Habitable Software

#5
post #3

The building analogy doesn't work, software is not a building. There are essentially templates for buildings, there is no template for software. Maybe software is more like a city. Maybe buildings are more like patterns, data structures, etc.

The concept of "pattern" in software is based on Christopher Alexander's concept of "pattern" in architecture, which was introduced to the software community[1] by the same Richard Gabriel the article quotes (though the modern idea of software pattern is quite different, focusing only on details rather than multiple levels of patterns which combine to form a coherent whole).

[1]: https://www.dreamsongs.com/Files/PatternsOfSoftware.pdf

Re: Habitable Software

#6
post #5
post #3

The building analogy doesn't work, software is not a building. There are essentially templates for buildings, there is no template for software. Maybe software is more like a city. Maybe buildings are more like patterns, data structures, etc.

The concept of "pattern" in software is based on Christopher Alexander's concept of "pattern" in architecture, which was introduced to the software community[1] by the same Richard Gabriel the article quotes (though the modern idea of software pattern is quite different, focusing only on details rather than multiple levels of patterns which combine to form a coherent whole). [1]: https://www.dreamsongs.com/Files/Patt…

Without being too reductionist, I don't think 'pattern' means that to people using the word 'pattern'. Architects didn't invent 'patterns' and the word's regular English meaning is going to be how 99% of programmers interpret it, and it fits with how it's used today.

EDIT: although thanks for reply, it is interesting to know that bit of history / link with architecture.

Re: Habitable Software

#8

I'm not sure any specific pattern or structure could possibly be good for all software.

I don't believe anybody would make such a claim.

The Design Patterns (GoF) book explicitly has a complete section about "Applicability" for every pattern it discusses, and makes no bones about circumstances where a pattern is not a good fit to a problem. Further, under "Consequences" it discusses (again: for every pattern in the book) negative as well as possible positive consequences of using the pattern. Then in "Implementation" it discusses tradeoffs, gotchas and variations...

The notion of Design Patterns was never intended to be prescriptive nor to suggest inherent "goodness". It was merely an attempt (largely successful, imho) to establish a common vocabulary for software designers, saying, effectively, "Look, lots of people faced with problem X have solved it in this way. Here are some(!) of the considerations, use-cases and tradeoffs, and here are some things you might want to think about, when using this pattern.

Not sure how the notion got so badly screwed up in peoples' minds.

Re: Habitable Software

#10
post #4

It seems like every few months I read some new way of articulating the idea that code that's hard to maintain and modify is frustrating. Some, like this, don't really pose solutions, some do, but most I think fail to realize that their advice inevitably falls apart in some case Extremely modular/functional code can require understanding more separated moving pieces, which may well be scattered to the winds in a zilli…

I agree. What is easy to understand for you depends on your experience, personality etc. I have been told many times by experienced developers that my code is straightforward and easy to understand and maintain. However I have also been told by some inexperienced developers that I am “doing it wrong” because I am not following whatever pattern or silver bullet is currently hyped/fashionable on HN. Which always amuse me. It’s like a young inexperienced virgin trying to teach me about sex based on what he/she has read in the latest fashion magazine.
Post reply on HN