https://bitsquid.blogspot.com/2009/09/welcome-to-bitsquid-bl...
Ask HN: Best codebases to study to learn software design?
71–80 of 94 posts
Re: Ask HN: Best codebases to study to learn software design?
#72Proceed with extreme caution. This is highly subjective and often results in a blind leading the blind scenario. For example how do you determine which code bases are well designed if you yourself are not comfortable determining such?
Instead, heed the guidance of some of the other comments and just start building things. Plan on failing and solving for the failure. That’s called practice. With enough practice you will know what works well for you. If you are measuring things along the way you will also know what’s slow.
Re: Ask HN: Best codebases to study to learn software design?
#73Maybe 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 have this too, I have never been able to "do exercises" or "study a codebase". I need to be making something that I am excited about, then I'll learn, from examples, from wanting to be thorough and correct. But sometimes I think I'm just not their yet, if I become able to read code like a book and really understand what happens, which often I don't, then perhaps I'll enjoy the process more.
I can read a codebase and run simulations in my head. But this almost never results in learning anything. I can study code and see how a particular task is done, but I don't learn it until I put it into practice. Just about the only thing I get from reading other people's code is the most egregious ways to not do something.
This is a pretty common thing, a plurality of humans learn this way. We just have different standards for software, for some reason. We like to pretend books teach you something more "real" than just getting your hands dirty and writing some real fucked up code. But the reality is that figuring out why your disaster code doesn't work, and then fixing it is one of the most educational experiences a programmer can have.
Re: Ask HN: Best codebases to study to learn software design?
#74Maybe 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…
> for me it seems like you have to actually run into problems over and over and figure out how to avoid the problems This shows how immature the field of software engineering is. Imagine bridges or houses were built like that. Or your surgeon was trained like that. Over time, we hopefully develop estblished norms, but at the moment, things are too much in flux. Put 5 sw engineers in a room, pose a problem and you wil…
This is the engineering process. If you put five engineers of any discipline in a room, you will get five different answers. Every contractor and architect has their own ideas about how things should be done.
Furthermore, we do build houses this way, even in the modern age with building codes. The builder is going to do whatever they can get away with and this is a universal truth. The only reason bridges are held to such high standards is because of the monetary cost of a collapse.
The "norms" are not what you think they are. They're tradition, they're "we've always done it this way". What you're talking about are laws written for public safety. Those laws only exist because we tried and failed to do things a certain way and the cost in money or lives was untenable.
> "I recognize a good solution when I see it" is just not good enough for a serious engineering discipline.
You're conflating engineering with science. A scientist will rigorously test and validate, but a huge part of engineering is just recognizing a good solution. Of course there's a lot of testing and validation in engineering as well, but not with the kind of rigor you're implying.
Re: Ask HN: Best codebases to study to learn software design?
#75Re: Ask HN: Best codebases to study to learn software design?
#76Study and fix shitty code.
Find college students who wrote a web server and put it on GitHub for the world to see.
Find all the bugs and then see how many integer overflow vulnerabilities can be exploited to crash it … or worse.
Re: Ask HN: Best codebases to study to learn software design?
#77Re: Ask HN: Best codebases to study to learn software design?
#78Re: Ask HN: Best codebases to study to learn software design?
#79The Architecture of Open Source Applications
Then afterwards diving into a repo based on the map given to you by the textbook.
Re: Ask HN: Best codebases to study to learn software design?
#80Earlier quoted context omitted.
I generally agree with your point on ease of experimentation, but if we insist on calling it software engineering , then maybe the field needs to adhere to engineering principles, as the GP highlighted.
Notice OP says "software design". Design is still an art, even in mechanical engineering. Engineering applies to looking at a design and proving something about it.
When design is a process to build something pleasing (like in music or painting), then yes, it's an art, and you can rightfully have different opinions about outcomes, sometimes diametrically opposed opinions, which is all not just fine and accepted but inherent in the field and a required ingredient.
When design is about building something functional, then it's part of engineering. You can objectively measure whether it does satisfy the requirements. That's where serious engineering disciplines are and where software engineering needs to aim for if it wants to keep engineering in its title without getting laughed at. As long as programmers consider themselves part artists, that's hard to achieve, but as the field matures, there is hope.
Note that some fields are trying to be both. For example architecture. There it's solved by making a more or less clear distinction between the pleasing art part (that's what the architect does) and the functional engineering part (structural engineer). Both roles are not being conflated. In software, we still do that.