March 2011
32 posts
If I waited to know “who I was” or “what I was about” before I started “being...
– Austin Kleon - “How To Steal Like An Artist (And 9 Other Things Nobody Told Me)” (via allisonweiss)
3 tags
4 tags
Using Composition Instead of Inheritance
Favoring Composition over inheritance is a quote from the gang of four book about design patterns. Today I want to take a another look at the TeaPot class example I used when talking about the Open/Closed principle.
To review, here is how our object was structured in the previous post.
TeaPot Class
class TeaPot() {
function TeaPot() {
//constructor
}
function makeTea() {
...
4 tags
Liskov Substitution Principle (SOLID Part 3)
Part of my SOLID programming principles series.
What is the Liskov Substitution Principle?
This Liskov Substitution Principle states that you should be able to replace any object with a sub class of that object and have all of the code still function properly. Any code that uses these objects does not need to know or care what it is getting passed.
Benefits
The benefits of this principle...
3 tags
Tangentially — it’s amazing how many people say exactly this and...
– -Peter Kastings from the Google Chrome development team, in response to someone thanking them for keeping Chrome simple.
read the rest of the Q & A over on reddit
3 tags
Open/Closed Principle (SOLID part 2)
Part of my SOLID programming principles series.
What is the Open/Closed Principle?
The Open/Closed Principle states that “software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification”. This is mainly accomplished via inheritance, although there are other means. The main idea is that once an object is completed, it should only be...
2 tags
3 tags
Amazon Cloud Drive →
Seems pretty nice. Doesn’t have the convenience of the dropbox folder, but you can get more storage for a lower price. (including 5gb free vs. Dropbox’s 2)
2 tags
software entities (classes, modules, functions, etc.) should be open for...
– Bertand Meyer
4 tags
Single Reponsibility Principle (SOLID part 1)
Part of my SOLID programming principles series.
What is the Single Responsibility Principle?
The single responsibility principle is pretty self-explanatory. When designing objects, they should only serve a single purpose in a program. This also works in the inverse, in that each responsibility of your program should be handled, and completely encapsulated by a single class.
Benefits
There...
yayinter.net: Netflix CPO on A/B testing If I had... →
yayinter:
Netflix CPO on A/B testing If I had to summarize our learnings in three words: “simple trumps complete.”
In a follow up comment, he elaborates: “Simple trumps complete” - a 5% feature (used by less than 5% of all users) is a distraction for all the other users, and is better removed,…
4 tags
SOLID Programming Principles
This week I wanted to take a look at five principles of object oriented programming, known as the SOLID principles, and write about practical applications of each.
Single Responsibility Principle — An object should only serve one purpose.
Open/Closed Principle — An object should be open to extension, but closed for modification.
Liskov Substitution Principle — objects in a...
1 tag
3 tags
3 tags