Live data from Hacker News

Ask HN: Best codebases to study to learn software design?

news.ycombinator.com

1–10 of 94 posts

Re: Ask HN: Best codebases to study to learn software design?

#3

It's been asked a few times, here are some links to get you started: * https://news.ycombinator.com/item?id=36370684 * https://news.ycombinator.com/item?id=30752540 * https://news.ycombinator.com/item?id=9896369 (Python specific)

Thank you!

Re: Ask HN: Best codebases to study to learn software design?

#4
I am not qualified enough to answer, but some ~15 years ago I enjoyed going through the book Code Reading[0], which is about this exact topic.

I think there was another one with a similar name but I can't think of it's name.

0: https://www.spinellis.gr/codereading/, check the TOC https://www.spinellis.gr/codereading/toc.html

Re: Ask HN: Best codebases to study to learn software design?

#7
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.

Re: Ask HN: Best codebases to study to learn software design?

#8
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).

Re: Ask HN: Best codebases to study to learn software design?

#10
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.

Post reply on HN