[yast-devel] OOD reading list

Hi, in the SUSE team developing Machinery [1], we discovered that some team members are not that proficient in writing good object-oriented code. This is certainly not good, so we set a goal to get better in this area. One of the first steps we decided to take was to crate a reading list consisting of materials (videos, websites, and books) that will allow team members to learn something about object-oriented design and related topics. I was tasked with preparing this list. And because I think the topic is also interesting for YaST developers (who recently transitioned from purely procedural YCP world into the new OO world of Ruby), I'm also sending it here. I split the list by topics, added brief description to each item, and carefully arranged the list so that it makes sense to go through it top to bottom. I'm pretty sure that if you actually reach the end, you will become one of the most competent OO designers around. Enjoy :-) OOD (Object-oriented design) ---------------------------- Go Ahead, Make a Mess (Sandi Metz) [Video] http://bit.ly/1s7SXpj Software is always a mess, but not every mess is equal. The talk shows how to manage the bad kinds of mess and how to convert them into good ones. It shows how an OO designer thinks about dependencies and knowledge. It also introduces various OOD principles along the way. Rules (Sandi Metz) [Video] https://www.youtube.com/watch?v=npOGOmkxuio In this talk Sandi introduces 4 rules that naturally lead towards creating small objects with small methods and separating business logic from framework code. These are proxies to creating software more efficiently. As a bonus, the talk includes general discussion about rules and following them. All the Little Things (Sandi Metz) [Video] http://www.confreaks.com/videos/3358-railsconf-all-the-little-things Here an ugly piece of conditional code is gradually refactored into few simple objects. Along the way, you'll learn few things about duplication, abstractions, open/closed principle, inheritance hierarchies, and applying (now famous) squint test of code quality. Practical Object-Oriented Design in Ruby (Sandi Metz) [Book] http://www.poodr.com/ If you liked Sandi's talks, you will like her book even more. It introduces many OOD principles in accessible way, explains motivation behind them, and discusses trade-offs involved. It is the best OOD book for beginners I know of. Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin) [Book] http://amzn.to/1bSAYsh This book is about writing clean code in general, but since OOD has overlap with that topic, it will also teach you some bits of it. The most useful part for many will probably be an extended example, where a piece of bad code gets gradually rewritten into much better shape. Working Effectively with Legacy Code (Michael Feathers) [Book] http://amzn.to/1mD4YxK Michael's definition of legacy code is "any code that doesn't have tests". The book describes how to tame such code and add tests over time, which will allow you to make changes with confidence. The book is filled with examples of both untestable and testable code and shows various techniques how to covert the former to the latter. And because testable and well-designed code are highly correlated, the book also teaches good software design along the way. SOLID ----- SOLID (object-oriented design) (Wikipedia) [Web] http://en.wikipedia.org/wiki/SOLID_(object-oriented_design) Entry point to get an everview about SOLID. SOLID Object-Oriented Design (Sandi Metz) [Video] http://bit.ly/1dJ4eFh Brief introduction into some of the SOLID principles using an example. For me, the best part of the talk is an explanation of how you should depend only on things that are more stable than you. The Principles of OOD (Robert C. Martin) [Web] http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod A series of texts introducing each of the principles behind SOLID, plus few other more high-level OOD principles. The texts are written in context of C++, are slightly outdated, and sometime include a dubious advice (from today's POV), but they still present a nice overview and are a good resource. Dependency injection -------------------- Dependency injection (Wikipedia) [Web] http://en.wikipedia.org/wiki/Dependency_injection Entry point to get an overview about dependency injection. The Clean Code Talks - Don't Look For Things! (Miško Hevery) [Video] https://www.youtube.com/watch?v=RlfLCWKxHJ0 A look at dependency injection mainly from testing POV. Miško explains how passing already constructed collaborators to objects makes test setup shorter, mocking easier, and the whole code less coupled. The underlying idea is that object construction is a separate responsibility and it should not be implemented in objects that implement business logic. I highly recommend to look up other Miško's talks and his blog, there is quite some wisdom hidden there. Refactoring ----------- Refactoring: Improving the Design of Existing Code (Martin Fowler) [Book] http://martinfowler.com/books/refactoring.html A classic that made refactoring popular. It's mainly a catalog of refactoring techniques with motivations and examples. It also contains a list of "code smells", which indicate there is something wrong with your code. For many beginners in OOD, this will be the most useful part. [1] http://machinery-project.org/ -- David Majda SUSE developer -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org

On 7.10.2014 15:19, David Majda wrote:
Thank you, David, we will! :) Ancor: Maybe it would be a good idea to add some of these links (or all?) to Yast page into "For Developers" section? I guess we all want to be better developers ;) Bye Lukas -- Lukas Ocilka, Systems Management (Yast) Team Leader Cloud & Systems Management Department, SUSE Linux -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (2)
-
David Majda
-
Lukas Ocilka