Fun with tags
I've been playing with groovyconsole the other day to experiment with some 'tag' (yes, the web2.0 tags) :-) manipulations, etc. Let's say I wanted to build the del.icio.us style 'for:username' tag trickery, to send a message, save bookmark, etc. to any particular user's 'private inbox', etc. Extremely easy with Groovy:
tags = ['tag1', 'tag2','for:dima','tag4','for:someoneelse']
usersWhoShouldRecieveSomething = tags.findAll { it[0..3] == 'for:'}.collect { it - 'for:' }
assert usersWhoShouldRecieveSomething == ['dima','someoneelse']
Later...

3 comments:
lol
does it worth a post?
Sure why not. On the other hand, what should the criteria be for 'worthwhile material' for posts? :-)
well said! it's your blog after all ... if you wanna talk about pink underwear, then do it! :)
Post a Comment