The Ruby Raven

You might have heard of Raven . Its a rake and Rubygems based tool for building/managing Java projects.

Looks like upgrades to rake and rubygems has broke raven and my search for “Ruby Raven” led me to this:

Quite amusing.

Of Hate and Humane

‘Hey, Mr Cunningham’
The man did not hear me, it seemed.
‘hey, Mr Cunningham. How’s your entailment gettin along?’

Mr Walter Cunningham’s legal affairs were well known to me; Atticus once described them at length. The big man blinked and hooked his thumbs in his overall straps. He seemed uncomfortable; he cleared his throat and looked away. My friendly overture had fallen flat.

‘Don’t your remember me, Mr Cunningham? I’m Jean Louise Finch. You brought us some hickory nuts one time, remember?’ I began to sense the futility one feels when acknowledged by a chance acquaintance

And It goes on to demonstrate something thats truely humane. I know, probably its fiction.

It also pretty much sums up state of Online Communities. Be it open source/free software, bloggers or some other social networking platform. You will be amazed to find so much hate there. Its mostly pointless and perhaps triggered by mere fact that, people know that nobody will perhaps ever show them the mirror. Worst of all, it plagues Open Source projects and its people.

New year has begun with all the usual obnoxious stuff, perhaps we can make this place better by just raising our tolerance level a bit higher.

Lyrical Whisprings #4

Eastern to Mountain, third party call, the lines are down
The wise man built his words upon the rocks
But I’m not bound to follow suit
The trees will bend, the conversation’s dimmed
Go build yourself another home, this choice isn’t mine

REM

BackgrounDRb 1.0 released

Although its been quite sometime since 1.0 release of BackgrounDRb has been out in the wild, yet a belated post mentioning its features is nonetheless welcome.

Although README document available at, http://backgroundrb.rubyforge.org is quite comprehensive and there is precious little I can add, yet I shall try.

  • BackgrounDRb is a Ruby job server and scheduler. Its main intent is to be
    used with Ruby on Rails applications for offloading long-running tasks. However unlike other libraries BackgrounDRb offers tight integration with Rails and hence you can check status of your workers, pass data to workers and get response back, register status of your workers, dynamically start or stop workers from rails and stuff like that.
  • BackgrounDRb doesn’t have any DRb in its skin now. Its based on networking library packet, (http://packet.googlecode.com)
  • Its stable.
  • It has support for thread_pools, storing of results in MemCache clusters
  • It comes with its own scheduler and hence you don’t need to muck around with crontab anymore

A Quick overview of installation:

  • Get the plugin using:
     piston import http://svn.devjavu.com/backgroundrb/trunk/ backgroundrb
  • Remove or backup older backgroundrb scripts/config files in your rails root directory
  • Run following command from root directory of your rails app:
     rake backgroundrb:setup
  • Have a look at generated config file, RAILS_ROOT/config/backgroundrb.yml and see if there is anything you would like to change.
  • Generate a new worker using :
     ./script/generate worker foo
  • Read the detail documentation about writing workers and stuff on http://backgroundrb.rubyforge.org
  • Start your BackgrounDRb server with:
    ./script/backgroundrb start
  • Stop your BackgrounDRb server with:
    ./script/backgroundrb stop

Special Weapons And Tactics ( SWAT ) app

Updates
Getting gtk-ruby installed is a bit tricky, look into the comments for getting it installed. Also, you don’t necessarily need Emacs to use this application.

Another important thing is, it stores your todos and metadata files in a directory called, ~/snippets, so make sure you have that directory. Although newer version of app, automatically checks for the directory. I put up lots of bug fixes, and a tab for viewing completed tasks too, So make sure you are using latest version. Thanks.

Version 1.0.2 of Swat App

Install it with:

sudo gem install swat-1.0.2.gem

Hey there,

Curse me for making this app if you will. But the truth is all the todo applications in GNU/Linux suck, then I thought ok, may be they do not suck enough. So, with some ruby skills at my disposal, I wrote a todo application in Gtk Ruby.

swat App Small

So whats swat?

Swat is a todo list manager for Gnome & Emacs.

Heck : Emacs?

Features:

  • Manage your todos, add them according to priority and category.
  • Move your todos to wish list, when not feeling like working on them.
  • libtomboy bindings for global shortcut(Alt-F11).
  • Nice stats for number of tasks finished and added.
  • All your todos are in a .org file and hence can be managed from Emacs as well.
  • System tray integration.

KeyBindings:

  • Alt-F11 : from anywhere, brings the todo window to front.
  • Esc : to dismiss todo window.
  • Control-N : to add a todo.

Installation :

  • sudo gem install swat

Code:

  • http://packet.googlecode.com/svn/branches/swat/

Java Network Programming

I had to recently write a smallish TCP/IP server in Java. It has to be written in Java, because of yet another obsession of corporate world with Java. The API that I had to use was javish, and although people who wrote it, would claim that API can be used easily in any language, it was not so. Whats more, I had to use that API from rails, so you can understand my situation.

Well, So i googled and found the book for “Java Network Programming, Third Edition”.
Java Network Programming

What a crap. My main issues were:

  • I hate a book, which pretends that its examples are ready to run, but they don’t run, because they need tinkering. I am all for snippets, that demonstrate a thing or two. But when you are saying, ok this example is ready to run, with import and everything in place and It doesn’t run on actual machine, it just freaks me out.
  • Although the book has 776 pages, its surprisingly free from useful stuff. Seriously, when I compare this with book by Richard Stevens, this book looks like shit. Although author had more scope here on how to write REALLY scalable networking applications. He wasted 776 pages, talking nothing and perhaps reserved good stuff for “Advanced Network Programming with Java” ( Soon, after reading the book, I found that indeed there is a book on Advanced Network Programming )

Wierd problem with IE6,Content Encoding and Flash in Rails

Our flash guy, uses usual loadVars for loading external data in a flash movie and do some funky stuff like plotting of nice looking portfolio charts.
Portfolio Chart

But somehow, we saw some issues with loading of charts in IE6 running flash. A quick ethreal packet sniffing showed us, that although client is making
request with “Accept-Encoding: gzip,deflate”, its not able to decode the gzip response of web server. And parsing of gzipped response at flash obviously fails.

This is quite a corner case, I suppose, but I did this, to prevent Content-Encoding for that particular controller.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class OutputCompressionFilter
  def self.filter(controller)
    controller.response.headers['Content-Encoding'] = 'identity'
  end
end
 
class FlashController < ApplicationController
  no_pref true
  after_filter OutputCompressionFilter
  layout :set_layout
  include REXML
  def index
  end
end

Managing todo lists

Heck, my all attempts to manage a todo list has failed.

I tried these in order:

  • dev-to: A command line todo list handler
  • Emacs-org mode
  • gTodo : A Gnome TODO thingy
  • Tomboy: Tried few times
  • Evolution: todo thingy

What does it indicate, time to write yet another todo manager for gnome?

Lyrical Whisprings#3 : The BOC perspective

I mean and I really mean, these guys are brilliant. I can’t really say, what I like in their music, but all their tunes sound oddly familiar and coming from a distance, like a bazooka from past. I love it, I wish I could do that.

Terrifying thing is, they are not afraid to release their albums in numbers like 100 or even 5. Now, how the hell, a poor guy sitting in India would ever get his hands on something like that. I am yet to see any of their records on a music store shelf.

Here Marcus talks about artists who are too fucking big:

“No. We think they’re brilliant,” Michael demurs. “I think Kid A’s the best thing they’ve ever done,” adds Marcus in his thicker Scots slur.
“Artists whose status is somewhere between Radiohead and God,” answers Marcus, mystifyingly

Above quote is the context, when Marcus criticizes mainstream musicians or rather musicians who make
music based on pop culture. The interviewer prompts,

“Who are these Bigger Guys, Radiohead?”

Needless to say I hate this moron of interviewer.