It’s that time for Codemash again. So I’ll be doing some stream of conscious type blog posts again. If others find this information kind of interesting I’ll expand on it some more, but mostly it’s for my own recollection. The first session I attended during the pre-compiler was “Software Engineering Fundamentals Workshop: OOP, SOLID, and More” presented by Jon Kruger. He kindly has the slides up at http://jonkruger.com/solid/OOP-SOLID-CodeMash.pptx. Some of the points of his presentation:
* Started out talking about OOP. Good analogy between Legos and code. Glued together Lego pieces are like tightly coupled code.
* “Just because you are using an OO language does not mean that you are doing object-oriented programming.”
* “Avoid Not-Invented-Here syndrome”. Promote reuse of objects, not just methods. And not via copy-and-paste.
* Great example of Encapsulation –> home electrical wiring. You have abstraction/interface on top of abstraction/interface on top of abstraction/interface. You only need to know what’s under the hood if you really HAVE to, otherwise go with the easiest interface.
* Object-orient programming is about behavior, not just fields. Encapsulation is about hiding the fields and the only interaction is via behaviors.
* Rethink about object Inheritence by using composition. It helps break down large methods. It’s like going to a grocery store to choose what food is available to you vs. being a farmer and tied to what food you grow.
* Easier programming does not mean you shouldn’t learn new techniques/programming languages/etc. It’s sometimes FAR easier to learn something new to help you out overall.
* The SOLID talk is very similar to what I presented to the ALL.NET group awhile back, but focused more on “Don’t do something that you really don’t need to do because it doesn’t fit your situation” and “Think before you implement.”
I have to give kudos to Jon for integrating the pairing session into the session. It was a great opportunity to take an existing (crappy) application and refactor it using the techniques he had just presented. I paired with Curtis Mitchell which was a great time, despite the fact we didn’t get a chance to dig too far into actually fix much of the code.
No comments:
Post a Comment