News for hackers. Stuff that matters.
Re:Ask HN: How best to learn software design principles? by pessimizer on Monday July 07, 2014 @03:46PM (#8000940)
http://www.aosabook.org/en/

"Architects look at thousands of buildings during their training, and study critiques of those buildings written by masters. In contrast, most software developers only ever get to know a handful of large programs well—usually programs they wrote themselves—and never study the great programs of history. As a result, they repeat one another's mistakes rather than building on one another's successes.

"Our goal is to change that. In these two books, the authors of four dozen open source applications explain how their software is structured, and why. What are each program's major components? How do they interact? And what did their builders learn during their development? In answering these questions, the contributors to these books provide unique insights into how they think.

"If you are a junior developer, and want to learn how your more experienced colleagues think, these books are the place to start. If you are an intermediate or senior developer, and want to see how your peers have solved hard design problems, these books can help you too."

edit: a major advantage to aosa is that all the source is available.

Re:Ask HN: How best to learn software design principles? by nikhilalmeida on Monday July 07, 2014 @07:33PM (#8002218)
https://github.com/aosabook/500lines This is a repo of smaller real world applications that are 500 lines or less in length, so as not to be overwhelming to novice / intermediate programmers.
Re:Ask HN: How best to learn software design principles? by svankie on Monday July 07, 2014 @08:31PM (#8002420)
Hey, thank you!
Re:Ask HN: How best to learn software design principles? by theshank on Tuesday July 08, 2014 @11:43PM (#8007957)
This is really helpful ! Thanks a bunch !
Re:Ask HN: How best to learn software design principles? by tuxguy on Tuesday July 08, 2014 @02:02AM (#8003194)
this is very useful nikhil ! thanks a ton ! --ashish
Re:Ask HN: How best to learn software design principles? by tmsh on Tuesday July 08, 2014 @01:26AM (#8003129)
I think this is great and look forward to reading these books. Lots of familiar names.

But I'd say in my oh 10-15 years of programming I've learned that the way to really learn the importance of a pattern is by deriving why it is really needed. You can't really make shortcuts there.

The difference with software is that it's soft. We're not actually creating buildings. Yes we ship products so it's related. But it's more on the spectrum towards disciplined writing or math than architecture in the traditional sense.

It's actually more to your advantage to learn via practicing with the minimum tools for the job.

Anyway, still important to learn others' patterns. But it's less meaningful in terms of how it fits in your mind -- in particular, knowing when to apply them in the future -- than deriving them on your own.

And there's less risk in learning via mistakes unlike with building physical things. Software just has faster iterations.

Re:Ask HN: How best to learn software design principles? by philrea on Thursday July 10, 2014 @07:34PM (#8018011)
amen
Re:Ask HN: How best to learn software design principles? by bthomas on Monday July 07, 2014 @08:41PM (#8002456)
I'm curious if anybody has an example of how one of the designs in this book informed one of their own designs. I love the motivation for this book in theory, but started reading it and couldn't identify any explicit benefits to my own code.
Re:Ask HN: How best to learn software design principles? by kenbot on Tuesday July 08, 2014 @02:53AM (#8003302)
There's certainly great value in reading application source code, but it has nothing to do with physical Architecture. I do wish people would let go of this tired and completely wrong metaphor.
Re:Ask HN: How best to learn software design principles? by jalfresi on Tuesday July 08, 2014 @04:02AM (#8003472)
Personally, I think the metaphor is quite apt. Obviously it is a metaphor so there isn't a complete mapping, but where do you feel the impedance mismatch is between the traditional architecture metaphor and software architecture? I'm genuinely curious to know, because I have found the metaphor to be strong enough that I read traditional architecture books to help me understand architecture and design in general in software development.
Re:Ask HN: How best to learn software design principles? by kenbot on Tuesday July 08, 2014 @06:45AM (#8003865)
They have almost nothing in common, and it's accidental when they do. For instance:

- Designing software in minute detail beforehand is generally neither necessary nor possible.

- It is impossible for someone to be a capable software "architect" unless they are an experienced software "builder".

- It is impossible for someone to be a capable software "builder" unless they are also capable of designing it.

- Software can be reused once built, and this matters while building it.

- Software is rarely "finished", but continues to grow over time.

- Software can be used by an unbounded number of users at the same time.

- Software can be reproduced infinitely.

- Software can be forked and incrementally changed.

- Anyone can design and build their own software, given some talent and a computer.

- The business motivations for software development are fluid, and often change rapidly over the course of a single project.

I could go on and on. As with many (most?) metaphors, it offers some superficial familiarity, but is ultimately harmful to your understanding.

Software is software. Understand it by reading about software and writing software.

Re:Ask HN: How best to learn software design principles? by pessimizer on Tuesday July 08, 2014 @08:15AM (#8004114)
Other than the top 3, these seem to be differences between software and buildings rather than software designers and architects. In addition, I don't think the first three are true. Lastly, these are distinctions without any actual difference in the context of the metaphor, where "architect" could have been replaced by 'novelist' or 'cabinetmaker' and no information would have been lost.

edit: to be more specific about the top three; the first rests on the word "minute" which can be as large or small as you want, depending on what you're trying to prove. The second may be true now, but that's largely because we lack a specific language of high-level software abstraction, so the only way to learn it is to build a lot of things (the general point of the original passage, btw.) The third is just wrong - plenty of people are useful for building parts of software who would have no ability to design a large application. I suspect that those people are a majority of the industry.

Re:Ask HN: How best to learn software design principles? by kenbot on Tuesday July 08, 2014 @11:36PM (#8007940)
The vast differences between software and buildings correspond to the vast differences in designing them.

In context here, "minute detail" is obviously a relative term comparing the requirements of software and architecture design.

You just made up the "specific language" thing. The reason we don't get unicorns to write software for us is they don't exist either.

There are many incompetent software devs out there, but I don't see how anyone can possibly build any amount of software _well_ without having an appreciation of how to design it. This is why I used the word "capable".

The thing is, even if some of these things were similar to architecture, it would be by accident. They are, on the surface, totally different fields. On a deeper level, they're still totally different. The onus is on you to show the linkage, if you believe it to be applicable.

Re:Ask HN: How best to learn software design principles? by mtdewcmu on Tuesday July 08, 2014 @08:34AM (#8004187)
Architecture is about designing buildings that not only serve their function, but are beautiful to look at. I think that's exactly why some people like "software architect." But, to me, "software architect" evokes grandiose, ornate software design, which serves no purpose, because no one sees it. Users see the software's UI, and the UI ought to be beautiful, but trying to make the internal design beautiful is not only unnecessary, it's counterproductive, because it gets in the way.
Re:Ask HN: How best to learn software design principles? by walshemj on Tuesday July 08, 2014 @06:23AM (#8003796)
it's a shockingly bad metaphor for software development.

I used to work for a top5 consulting engineer - architects some times just do the very high level design the consulting engineers actually turn this into a practicable design which is then built by the contractors and the navvy's.

And I am sure that my dept boss Dr Shair (one of the pioneers of the cable stay bridge design) would consider him self an engineer and not an architect

Re:Ask HN: How best to learn software design principles? by chton on Monday July 07, 2014 @03:56PM (#8001003)
This is a great suggestion. Make sure to buy all 3 books. Then, next time you come across an article about any of the techs in the book, spend the time reading how it was built. You'll learn loads.
Re:Ask HN: How best to learn software design principles? by lightblade on Monday July 07, 2014 @03:57PM (#8001013)
^ This

I was going to reply about experience (and code review) being the best teacher, but this is better. Critics from your peers are good, but critics from the experts are even better.

Re:Ask HN: How best to learn software design principles? by weitzj on Monday July 07, 2014 @05:13PM (#8001460)
These are really great books. I stumbled upon them while reading the great article about the Selenium WebDriver http://aosabook.org/en/selenium.html
Re:Ask HN: How best to learn software design principles? by vishnugupta on Tuesday July 08, 2014 @01:17AM (#8003106)
Once in a while I ask my self why do I spend time on HN. All my doubts vanish when I come across gem of suggestions such as this. There's no way I would have stumbled upon this book but for HN. Thank you!
Re:Ask HN: How best to learn software design principles? by bjitty on Monday July 07, 2014 @08:42PM (#8002461)
Awesome thanks for the link. I've seen this book / project a while back but completely forgot about it.