Skip to main content

Posts

Here's a script from the Groovy book that explains expandos and makes some sense of why you might want to mess with spinning up methods at runtime. -  http://groovy.codehaus.org/ExpandoMetaClass+-+Dynamic+Method+Names The first example might help you pull off some interactive UI. The second lends to a more fluid api.  Run that in your console and smoke it. import org.springframework.web.util.HtmlUtils class HTMLCodec {     static encode = { theTarget ->         HtmlUtils.htmlEscape(theTarget.toString())     }     static decode = { theTarget ->     HtmlUtils.htmlUnescape(theTarget.toString())     } } //So what we do with these classes is to evaluate the convention and add  //"encodeAsXXX" methods to every object based on the first part of the  //name of the codec class such as "encodeAsHTML". The pseudo code to achieve this is below: def classes = [HTMLCode...

npackd for the masses

For the developer masses stuck on the newer flavors of Windows - npackd shows some promise. An apt-get like interface for installing/tracking typical tools on your workstation.  Silently, checks SHA1 and tracks versions for easy update/rollback.  Repository is growing. Finds already installed packages and can scan for additional.
Starting out on Django and reading up on the pieces and parts as I get there. Here's a cool article on the future of Django ORM. Piece out. http://adam.gomaa.us/blog/2007/aug/26/the-django-orm-problem/. Woops. That's a while back. What's the current word on this...
Trying to grow grass but still have moles running around? Borrow a neighbors trap. Great, you need to know how to set the trap. Try this: http://www.youtube.com/watch?v=0k4KVEJApZk. Look out you dirty moles.