Ask HN: good reads on real-world software design?

I just recently came across this set of articles by Eric Lippert (senior dev at Microsoft and, among other things, a .net master):

http://blogs.msdn.com/b/ericlippert/archive/tags/graph+colouring/

It's a set of posts on designing a simple graph coloring solver, and while it's sort of a toy problem, one thing I loved about it was how detailed Eric was in describing why he designed things this way and not that. I've been coding for years, but never really had any formal training in software "engineering" so my work has a haphazard, hacky nature.

Anyone have an recommendations on books, blogs, or articles with a similar style?

Basically a walkthrough of a non-trivial problem, discussing pros and cons of design decisions, possible alternatives, etc.? I know I can browse open source projects, but I usually don't get the "why I did this" element from that, and reading e.g. design patterns stuff usually doesn't make the connection with a real-world problem.

An alternative phrasing of the question: assuming you don't have access to experienced software engineers as mentors, how could you teach yourself how to write great code?

  • > assuming you don't have access to experienced software engineers as mentors, how could you teach yourself how to write great code?

    Read great code. I know that sounds flippant, but I learned more from reading other peoples code than I ever learned from books or papers. My personal favourites in 'great code' have changed over the years, but here are a couple of pointers to what I think are great pieces of code because they changed my way of thinking: the freebsd kernel, the hashlife code.

    But there are literally thousands of others, and for me this is one of the reasons that I think open source is the best thing that ever happened to programming.

  • I know no one like to read a text book, but good option would be picking up the Gang of Four design patterns book. http://www.amazon.com/Design-Patterns-Elements-Reusable-Obje... I recently read most of it (preparing for a final exam yay!) and the really nice thing about this book is the examples. Each pattern has a description, a list of pros and cons, a discussion of a piece of real software that used (or often pioneered) this pattern and then finally an example of C++ that uses it.

    Honestly, the discussion of pros/cons and then the use in industry sections make this book a very good read. It won't be quite as entertaining as lippert's blog, but then again it is a Textbook