Readit News logoReadit News
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
artpar · 3 days ago
I made a small list long while ago, but it still holds today

https://medium.com/@012parth/what-source-code-is-worth-study...

pixelworm · 3 days ago
Thanks! I appreciate it!
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
pydry · 3 days ago
I dont think this is a good idea, actually. Good design is about making good trade offs at the right point in time.

A code base with excellent design will show you the end state but not how it got there but probably not the trade offs and decisions involved.

Practicing refactoring on subpar code bases and dealing with the consequences of your decisions is a better way to improve.

pixelworm · 3 days ago
Are there any books or websites you'd recommend I read to learn more about design instead? I 100% need to learn by doing, but wouldn't it also be good to learn what has already been discovered so I don't have to reinvent the wheel? Or is it best to discover good design on your own?
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
chickenzzzzu · 3 days ago
Your own. Everyone else's is trash. Never understand someone else's code-- the whole point is that there should be just a handful of functions of yours I can call, and shouldn't ever care to see how the sausage is made. Otherwise, your abstraction sucks
pixelworm · 3 days ago
I agree that the internals of my code should be abstracted away from my users. But don't I still want the internals to be well designed so they are maintainable and extendable?
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
rgovostes · 3 days ago
These are several years old at this point, but many open source project leaders contributed to the series "The Architecture of Open Source Applications", which is free to read online: https://aosabook.org/en/index.html
pixelworm · 3 days ago
Thank you!
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
koliber · 3 days ago
Trying to learn software design by looking at code is kind of like trying to learn about architecture looking at the bricks that make up a building.

To learn about design you need a wider perspective. You can theoretically learn it from code but it won’t be most effective. Look at great documentation and literature about design instead.

pixelworm · 3 days ago
Yeah, I guess without the context I wouldn't really understand why it was designed that way. Or know what situations a design like that would be good for.

Is there any documentation or literature that has helped you?

pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
pfannkuchen · 3 days ago
Maybe I’m just not good enough at paying attention, but for me it seems like you have to actually run into problems over and over and figure out how to avoid the problems. Then you end up being able to mentally simulate what problems you will run into, and design is basically all about avoiding future problems of various kinds (and balancing tradeoffs about which future problems to avoid and how much effort to put into each, whether you can solve multiple with one design play, etc).
pixelworm · 3 days ago
This is pretty much how I've learned up to this point (and will of course continue). Trying to learn from real world code will be a new experience for me. Not sure how valuable it will be but should be fun either way.
pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
teiferer · 3 days ago
What if the question is born out of the insight that his team's software is poorly designed, motivating the desire to get outside input?

What if the question is asked by a college student?

pixelworm · 3 days ago
I would be interested in recommendations for those who have a poor example or no examples

In my case, I'm a junior engineer that has recently been given more responsibility designing aspects of our product. I'm just trying to learn all I can so my designs will be good!

pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
crystal_revenge · 3 days ago
My immediate reaction to this question is: "your team's". Nothing will teach you more about how to design software then really understanding why good and bad solutions were adapted to solve a certain real problem.

Software exists precisely because there is still a messy layer connecting user requirements to actions on a computer. If there was not messiness then we could just automate it all. Approaching software from some sort of Platonic ideal of what software should be will frequently lead to bad decisions on it's own.

When you start to see how certain pressures lead to certain paths you learn to recognize the wrong decisions that are often good at the time, and avoid them. At the same time, you need to learn to develop methods that work quickly and effectively. By far the biggest real challenge in real world software is time constraints. This is almost never discussed in theoretical views of software, but the truth is you're always going to be writing code under pressure to ship. You will come across situations where you do not have time to do what you want to do or think is best.

Good software is software that runs and solves the user need, but you will come to realize that there are design solutions that will make successfully running happen more often. The best way to find these is to study the real software you're writing.

pixelworm · 3 days ago
I haven't considered time to implement as a metric for evaluating design, but it makes a lot of sense.

I definitely learn so much from my team's codebase. Most of what I learn is either from the good designs I see in there or from my googling trying to fix the not so good parts.

pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
belZaah · 3 days ago
My experience (30 years in software, 25 in practicing architecture, MIT system architecture masters) tells me there is no such thing as abstractly “good” design. There are designs with negative consequences for sure, but “good” depends on the context: what are you building, safety/security requirements etc. Probably most importantly on the implementation team and it’s structure. A team of juniors will butcher your intricate design and Conway’s Law makes your software reflect the team.
pixelworm · 3 days ago
Yeah, as I've been learning more about software design, it's become pretty clear there is no silver bullet. It would be nice though. I find it a bit overwhelming to try to find the best solution for a problem when there are so many different architectures and programming paradigms.

That being said, taking into account the requirements does eliminate quite a few of the options. Right now, I work on safety-critical embedded systems which requires us to make some decisions that would most likely be way different in other environments.

pixelworm commented on Ask HN: Best codebases to study to learn software design?    · Posted by u/pixelworm
vogelke · 3 days ago
I'd recommend the book "Beautiful Code: Leading Programmers Explain How They Think". Published by O'Reilly, ISBN-10 ‏ : 0596510047
pixelworm · 3 days ago
I'll check it out, thanks!

u/pixelworm

KarmaCake day35June 27, 2025View Original