8 ms·
A Philosophy of Software Design
- deangordon782 3y ago[dead]
- gumby 3y agoWhen I think of philosophy of software I think of the operative semantics of programming languages, model semantics, Quine, Church, Barwise & Perry, et al.
- rzmmm 3y agoI think Ousterhout has interesting approach for software complexity and it's causes. In a nutshell, he suggests it's composed of (cognitive) dependencies between the software components, and obscurity. If anyone has more reading suggestions which have focus on software complexity, I'd like to hear about them.
- fzil 3y agoProbably the best book I’ve read on this subject. There’s a lecture by the author[1] as a quick overview of what the book is about. [1]: https://youtu.be/bmSAYlu0NcY https://youtu.be/bmSAYlu0NcY
- cc_ashby 3y ago[redacted] are my favorite people on complexity. [redacted] was notably my professor for operating systems @ [redacted]. He taught not just ways to design software, but also ways to live. [redacted]’s work is also directly influenced by [redacted], as referenced at the end of his article. For [redacted], I suggest looking at the class website: [redacted] For [redacted], I suggest his book, [redacted]
- codeflo 3y agoI'm a fan of Ousterhout's writing; "A philosophy of software design" clarified a lot of my thinking around complexity. I find the "Grug Brain" stuff pretentious and dishonest. "Me not smart. Me like simple things. Me not believe in hype. Hence why me invent complex new frontend framework, and then me hype it up beyond reason." (To be clear what I'm saying, my point is not that HTMX is overhyped -- it might be, but then so is everything. It's specifically the hypocrisy of the "we're against hypes" hype that makes me cringe.)
- resonious 3y agoI feel the exact same about grug. I don't think people actually agree on what's simple, so it's pretentious to pretend your "simple" is the obvious one that a caveman would agree with.
- TeMPOraL 3y agoGrug has some good points about complexity, but proceeds to take it all the way to full-blown, self-defeating anti-intellectual and anti-professional attitude. It makes sense for imaginary cavemen, but not for practitioners of a profession - people both capable and expected to learn the tools of their craft and continue learning past their first job interview.
- recursivedoubts 3y agoironically, i teach at a university agree that anti-intellectualism is a danger if you take grugbrainism too far
- cryptography 3y agoDo you think this would be beneficial for a somewhat perplexed CTO of a newly seed-funded startup? Or would it be wiser for me to concentrate on my current responsibilities and return to this book when my mind is clearer? I'm feeling a bit overwhelmed and under pressure, and I'm concerned that reading this book might add to the chaos. I would appreciate your input.
- corethree 3y agoAn alternative viewpoint on software: https://www4.di.uminho.pt/~jno/ps/pdbc.pdf https://www4.di.uminho.pt/~jno/ps/pdbc.pdf Rather then using blurry fuzzy concepts about software. This book is called "Program design by calculation". Which is to view software through the theoretical lens of math, science and engineering rather then "philosophy". Should software design be interpreted using the blurry and hand wavy concepts of philosophy and literature? or should it be theoretically laid out completely with all primitives formally specified like newtons laws of motion? Can we model software in a very formal way and come to make EXACT statements and conclusions about program design rather then a bunch of opinionated takes? Unfortunately, like all hard sciences pdbc is much harder to understand then a "philosophy" so most people end up switching majors to philosophy. Or Perhaps it's not about the challenge... you just prefer the philosophical approach over the theoretical one. Your preference is very valid. But to you I would ask: can you build a bridge, a car, or an airliner with philosophy? Or do you need hard formal theory and sciences? If we don't have hard and formal theory about software design are we being limited in what we can build?
- lvturner 3y agoDo the business requirements (fundamental assumptions around design to be more generic) of a bridge, car or airliner change dramatically over time? I'd argue not. Software design, in my opinion, is both a science and an art so my stance is that we need both the formal theory and science as well as the philosophy and that they shouldn't be viewed as mutually exclusive.
- corethree 3y ago>Software design, in my opinion, is both a science and an art so my stance is that we need both the formal theory and science as well as the philosophy and that they shouldn't be viewed as mutually exclusive. What formal theory have you ever used for designing your software? I would argue you've never used anything. Every abstraction you've ever made was likely a gut feeling, an instinct or following some vague hand wavy rule of thumb. At best we use type theory for type correctness and complexity theory to calculate efficiency. That's basically as far as it goes with "theory" and these two things aren't even about "software design". Software design in practice as most engineers use it today is, practically speaking (key phrase), 100% art. Sometimes people come up with big fancy words like "dependency injection" or stupid Acronyms like SOLID to create the illusion of formal theory, but these things are nothing of the sort. It's just tips and tricks. The plane, the car, the bridge? Those things use both design and formal theory... software design as most engineers use it, again, does not use ANY formal theory, it's almost just purely design all the way down.
- mparnisari 3y agoHis book is awesome! One takeaway I had: code reviews matter. If your code is undergoing review and a reviewer tells you that something is not obvious, don’t argue with them; if a reader thinks it’s not obvious, then it’s not obvious.
- ludston 3y agoBut don't forget that there are two reasons why something will not be obvious: It may not be obvious because the meaning is obfuscated, or it may not be obvious because it relies on the reader understanding certain ideas, concepts or technologies.
- daveslash 3y agoThis. I once had a code review with a new hire who couldn't understand a for loop in C#. Something almost as simple as the snippet below. Their resume showed a B.S. in CompSci from a CalState school. But they professed "I never understood loops". for(int i = 0; i < 100; i++) { newList[i] = sourceArray[i]; } I've also been in working environments where management has insisted that the code reviews be moderated by someone who was a mechanical engineer with no code/software training, background, or experience. I didn't particularly enjoy those....
- laurent_du 3y agoIf I ask my kids or my girlfriend to review my code, nothing will be obvious to them. Doesn't mean that my code is the problem. The idea that the reviewer is always right makes no sense.
- glun 3y agoYour family is not the intended audience for the code. If the reviewer isn’t either, then they have no business reviewing your code.
- marcosdumay 3y agoI can agree with that. But the intended audience for your code isn't as rigid and formalized a thing as review processes make the reviewers identities. That actually means that review processes are usually wrong. But then, people experiences are about the wrong process, and that's what they react on.
- buzzwords 3y agoIs this good going to be readable on Kindle? It might be just me, but some software engineering books are hard to read on Kindle due to codes sections could end up with strange format.
- mparnisari 3y agoI read it on kindle just fine
- buzzwords 3y agoThank you
- pamoroso 3y agoNo problem on Kindle, the book is mostly text and has only a handful of short code snippets.
- buzzwords 3y agoThank you
- a_c 3y agoHaven't read the book yet but it seems to be about design principles, abstraction, divide and conquer, single responsibility and the like. Man made objects tend to be single-purposed and interact with few other components. Over the years I have come to appreciate the nature more and more. In nature, things are always multi-purposed and exist in a web of relationship. A bat is a pollinator, pest control, fertilizer and food source all at the same time. But if we are to replicate the role of bat, we need seed, pesticide and artificial fertilizer. And if we want to grow only one kind of crop, we will need even more control. See monoculture [1] In software, every named domain can and will grow into its own forest. There was only nginx(or apache) serving html. There wasn't "frontend" and "backend". Nginx served also the analytics. Now they all seem to mean its own thing. There are and always will be manual interacting with the software. What we do is first manually interact, and then write automated script, and then manually interact and make demo video, and then manually interact and make tutorial, and then manually interact and illustrate the user journey, etc. Telemetry is "engineering", analytics is "product". The division goes on forever. Man made concept grows into isolated forest. The more division, hence specialisation, we have, the more gluing we need. People seem to talk more about infinite scaling is a fool's errand. I say so is specialising without seeing the forest first. I find occasionally zoom into other direction immensely helpful and refreshing. [1] https://en.wikipedia.org/wiki/Monoculture https://en.wikipedia.org/wiki/Monoculture
- rTX5CMRXIfFG 3y agoThat’s because your example, a bat, is a high level of abstraction. If you dig into the cellular level things start becoming very single-purpose, even more so down to the atomic level, and so on. The architecture of recursive composition usually done in building large software was found in nature first.
- jkrubin 3y agoBats are single celled?
- TeMPOraL 3y agoOn the contrary, once you start digging down into details, you'll see living things made of multi-purpose components with fuzzy boundaries, going very much against "single responsibility principle" and the like. That's because evolution isn't like human engineers, who need to walk up and down the abstraction ladder so things they care about fit in their head. Evolution is brute-forcing the problem space, using a greedy optimization algorithm. It doesn't need to remember anything.
- rgoulter 3y agoOne thing I liked about the book was it emphasised the conceptual difference between 'interface' and 'implementation'. "Interface" is "what you need to know to use the module". Some module is "complex" if you need to know more than the interface suggests in order to use that module (e.g. you have to know implementation details); or if the interface requires irrelevant details.
- dang 3y agoRelated. Others? A Philosophy of Software Design – Book Summary and Notes - https://news.ycombinator.com/item?id=31248641 https://news.ycombinator.com/item?id=31248641 - May 2022 (34 comments) A Philosophy of Software Design, 2nd Edition - https://news.ycombinator.com/item?id=28975872 https://news.ycombinator.com/item?id=28975872 - Oct 2021 (1 comment) Book Review: A Philosophy of Software Design (2020) - https://news.ycombinator.com/item?id=27686818 https://news.ycombinator.com/item?id=27686818 - June 2021 (61 comments) Book Review: A Philosophy of Software Design - https://news.ycombinator.com/item?id=18331219 https://news.ycombinator.com/item?id=18331219 - Oct 2018 (51 comments) Notes on “A Philosophy of Software Design” - https://news.ycombinator.com/item?id=17906662 https://news.ycombinator.com/item?id=17906662 - Sept 2018 (32 comments)
- mbwgh 3y agoIn addition to 'A philosophy of Software Design', I would also recommend the less well known 'Object-Oriented Design Heuristics'. It came out at the same time as the GoF book, but I think it is still relevant today and similar in spirit to Ousterhout's book.
- livrem 3y agoIs there a drm-free ebook to buy somewhere? Someone mentioned in a recent HN thread thatthe Calibre plugin to read Kindle books no longer works, so not sure I want to buy the Kindle version right now.
- layer8 3y agoNo, but you can find the first edition online, and the new chapters of the second edition are available for free via TFA. There’s also a DRM-free German translation of the second edition from O'Reilly.
- yawboakye 3y agoi read this book. no, i studied it but found it less about philosophy of software design and more about how to deal with the current state of affairs. it does a good job here, in my opinion. but as a work of philosophy it undersells. one criteria is can a non-programmer study and have any idea what software design should be about? in my experience, the answer is no. a philosophy of software design shouldn’t necessarily target software designers/engineers. amazing book, wrong title.
- tabtab 3y agoAn honest book would explain the trade-offs instead of say "design X is always better than Y". Context and domain matter. One-size-fits-all is wrong.
- nucleardog 3y agoHave you read the book? I felt it did that quite well. The overall pattern really seemed to be “I think we should do X because Y. This falls apart in the face of Z, so don’t do it there.” That said, it’s been a couple years since I read it so I may be misremembering.
- benjiweber 3y agoDoes the second edition fix the [misconception of TDD](https://twitter.com/benjiweber/status/1037772606261350401 https://twitter.com/benjiweber/status/1037772606261350401)?
- anononaut 3y agoI can't at all agree with the added differences of opinion with Uncle Bob's Clean Code. The author argues a reducing the size of a function of "a few dozen lines" likely won't improve the readability of the code. That's not even defensible! I would fail any (professional) code review for having that many lines of code in a function. It's a complete failure of abstraction. He later goes on to say "more functions means more interfaces to document and learn." This is also smelly. Clean code is self documenting. It should be simple to read because it should read like prose. If levels of abstraction are kept to one per function, it's easy to understand what is happening. One would only drill down into functions if it were necessary to grok implementation details of an abstract function. The comment on comments I also disagree with, although that's more contentions. In general I agree with Uncle Bob that comments are usually apologies. Most of the time the code should be refactored to not need comments. Ousterhout does bring up a point that names can sometimes be verbose as a result, but I can't be convinced that's a universal evil in the same way I can't be convinced that comments are a universal evil. >And, with this approach, developers end up effectively retyping the documentation for a method every time they invoke it! In what way is that a negative? This is a feature of self documenting code! This is what makes good code so great! This seems like some degree of misunderstanding of Clean Code. I'm compelled to pick up this book, however.
- Ecoste 3y ago> The author argues a reducing the size of a function of "a few dozen lines" likely won't improve the readability of the code. That's not even defensible! I would fail any (professional) code review for having that many lines of code in a function. I would argue that such absolutist rules are harmful. Yeah, there certainly are times when smaller functions are better. But there are times where separating a function into smaller ones does indeed make it 'harder' for me to read, since with each 'abstraction' you're losing context/details that might be very relevant in the code to follow. I would rather have a 40 line function with the dirty low-level details rather than the same split over 50 lines of different functions that I need to go into and figure out the details. And then again, who is to decide what is 'one abstraction'? Abstractions can be at different levels, and abstracting different things. There really isn't an objective way to do it. I would argue that this is analogous to writing -- there are all kinds of books/stories/poems, short and long etc. and one isn't necessarily better than another.
- danielovichdk 3y ago"There is a new chapter 'Decide What Matters' that talks about how good software design is about separating what's important from what's not important and focusing on what's important." I can almost hear the noise of team members arguing what's important and what's not. This book is on my list I wanted to read for some time.
- allig256 3y agoI personally loved the book. I don't think it gets enough credit for keeping its message concise and approachable. Plenty of nuggets of wisdom in there to glean from.
- speed_spread 3y agoNot directly related but there's a recent three-hour interview of Dave Cutler (main architect of OpenVMS and Windows NT) where he mentions giving money for a university computer lab to his name, and requesting that on one of the wall be painted in large letters "If you don't put it in, you won't have to take it out."
- tyronedarren091 3y ago[dead]
- maxclayton121 3y ago[dead]
- maxclayton121 3y ago[dead]
- maryfisherr6 3y agoIf you're looking for a top-quality phone monitoring solution, remotespywise @gmail com is the answer. Their innovative application and link works quickly and easily, so you can get started right away. Installation is simple and takes just a few minutes, so you'll be up and running in no time. And their friendly support chat is always available to answer any questions you may have. They are the best when it comes to any kind of cellphone monitoring services