Go Straight to Content

What I'll Be Ranting About

Good development practices bring us quality code, confident systems, and missed launch windows. When do you refactor and when do you factor in the passing time? As engineers we need to design what is possible and capable. As programmers we need to turn imagination into reality without a physical product. As developers we need to bridge the gab between that engineered vision and the end product.

I also blog more personally over at my tumblr page.

I am available for small contracts, consultations, tutoring, and other development services. My "skills" as a technical writer are also available. If you've got anything you'd like to talk to me about or for me to see, drop me a line.

Monday, February 08, 2010

DeferArgs on GitHub

A time ago I wrote a library called DeferArgs and I used it when I was still in Twisted code every day. I no longer have that fun, but I was reminded of the code and decided to throw it onto GitHub for anyone who cares for it.


http://github.com/ironfroggy/DeferArgs

An example usage, where foo could take any deferreds and would be called when they all fire.

@deferargs
def foo():
    assert False
@catch(AssertionError)
def onAssert(error): 
    print "OOPS"     
@catch()             
def onOthers(error): 
    print "I WOULD BE REACHED FOR ANYTHING NOT CAUGHT ABOVE."
@cleanup                                                    
def _(r):                                                   
    print "The result was: ", r

 

0 comments:

Blog Archive