Python decorators, SRP, and testability

Posted by Mike on Jun 4th, 2010

On the SRP:
For those unfamiliar with the Single Responsibility Principle (SRP), it states that there should never be more than one reason for a class to change.
That is to say: do one thing, do it well.
Decorators (not to be confused with the decorator pattern) can add behaviors or side-effects to a method, and this can [...]


Show me the $80 million dollar Blue (#0044cc)

Posted by Mike on Mar 18th, 2010

So what’s this fancy shade of blue that made Bing so much money look like?

 

Eh. Doesn’t really do it for me as a blob of color.
How about on a link? Well, that is actually quite pleasant against a white background.
Regardless, the takeaway from the whole story isn’t that you should switch all your [...]


Categories