Live data from Hacker News

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

news.ycombinator.com

91–94 of 94 posts

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

#91
post #67

Earlier quoted context omitted.

I'm definitely going to do that. I asked because I wanted to start off with some that I'd knew would be well designed. However, it would probably be more interesting to see a wide variety of quality than just the good ones. Or maybe open source projects are all usually well designed. I haven't looked at many in depth. The only one I've really looked into was Clang to try to figure out why clang format ignored my styl…

One of the best is actually the implementation of the Tcl language. It's highly readable C code, very well structured (it was initially by Ousterhout, after all).

I also found the Tcl implementation to be easy to read and understand.

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

#92

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

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?

The design will reveal itself to you the more you wrestle with the data and logic of the problem you are trying to solve. Full stop-- nobody on Earth would be more qualified than you at that point to say, unless they've already solved your problem

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

#94

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 in…

I totally agree with you. Some of the most intense thinking I've put into writing code has been when I go out for a run in the middle of the day and come back 30 minutes later with solutions to the thing I spent all morning trying to fix.
Post reply on HN