Archive for the ‘Uncategorized’ Category
My phone number is pretty awesome
If you take f(n) to be a function that gives you the nth prime,
( f ∘ f ∘ f ) (141) followed by the largest fermat prime you can get your hands on is my number
Installing java in ubuntu lucid
Hopefully this saves someone 10 mins:
sun java was moved in the partner repos for lucid.
So, you’ll need to add deb http://archive.canonical.com/ubuntu lucid partner to your sources:
sudo echo "deb http://archive.canonical.com/ubuntu lucid partner" >> /etc/apt/sources.list
then update and install:
sudo apt-get update sudo apt-get install sun-java6-jre sun-java6-jdk
PuSH Support follow up
Just a quick follow up from the last post.
I’ve just added bots that send you updates via email or jabber. Go to rackjam.codereviewr.com to check it out.
It’s a little rough around the edges in terms of UX but it gets the job done. And, although there were some constraints that will probably cause me to move, all this was ridiculously easy thanks to the google app engine.
Release & iterate and codereviewr PuSH support
I have recently been working on CodeReviewr. It’s motivated by the need to have a place to easily stick up code and discuss it with minimum hassle. I have rewritten the code numerous time using various platforms(from mochiweb to node.js to tornadoweb) towards multiple goals (collaborative coding, reviews, etcs) as I succumbed to feature creep, premature optimization, not built here, et al.
Anyway, a couple of weekends back I decided to just deploy it so that we could use it for rackjam. I don’t consider it even close to finished. For eg, you have to refresh in order to see comments you just made (ack), and there is no documentation on how to use it. But, it’s finished enough. I decided to stop trying to release something perfect and go with the release and iterate model. So, I rounded off the minimal feature set and let dog fooding sort out the priorities.
A few weekends later, I am still adding features. BUT, these are user driven requirements. And I have a website that people are using
It’s surprisingly good motivation to keep trying to make something better when you see people actually using it. Driven by feedback, I have added support for multiple versions, diffs between versions, better diff visualization, ability to download raw files, free private domain support etcs etcs. Funnily enough, I still haven’t been asked to fix commenting to address the refresh annoyance! More than anything else, this has taught me the importance of release+iterate as opposed to trying to imagine complete use cases. Of course, I will throw in real time comment updates in there, but not before the core featureset.
But this blog post isn’t only about extolling the virtues of MVP, release+iterate, dog-fooding blah blah blah. It’s about a new feature I have been asked to add; the ability to get emails when a review or set of reviews you are interested in changes. Before beginning this task, I wanted to make sure that sending subscribers updates should be as painless and decoupled from the current code as possible. The web app really shouldn’t care who gets updated and how. And anyway, I definitely don’t want the webapp sending email. So, my ideal solution is 1 line of code fire off an event so w/e subsystem or subsystems are in charge of updates inform interested parties as (and when) they see fit. I also wanted the update management subsystems to be as pluggable as possible. The first thing that I thought of was a message queue(à la beanstalkd) where I push out messages whenever an update occurs. Interested consumers could then process the message and send updates to whomever and however they wanted. All the logic in handling the complexity in delivering the message would be solely in the consumers, the webapp fires [off an event] and forgets. Sounds pretty perfect. Could we do better? Enter PubSubHubBub. (I’m going to assume you know about it, or will do the required research to get up to speed if you are interested). After some prototyping I decided to go with it because
- It met the 2 requirements I set forth.
- It’s easy.
- And, it allows me to have an interim solution for free that
was good enough (rss feeds).
So after adding rss feeds to reviews (append .rss to the url) and subdomains (/feed.rss), creating a hub at superfeedr, and adding the 1 line of code to ping the hub when there is an update, I am 100% there w.r.t providing users with a way to receive updates and 80% there w.r.t email alerts. All I have to do now is to write bots that will subscribe to the hub and push out notifications through w/e medium people want. The best thing about this is CodeReviewr is now PubSubHubBub capable so anyone else can subscribe to the hub right now if they don’t want to wait for me to implement the bots they want
Goals are good + a Cocoa app to help you stay on track
Goals are good; regardless of how they work out, working at them gives you something to show for the time spent. Read the last 13 words again. If you don’t have something tangible to show, you just wasted your time. So, always try to produce something tangible.
With a ~/Code folder full of projects ranging from “twinkles in my eye” to “just need one more day”, I will be the first to admit I suck at this. I tell myself it’s because I have overcome the core technical problem and the only thing left to do is polish and release. It’s really easy to get sucked in by this, especially when you get another idea (and you will). Or, you may get embroiled in feature creep; you add feature after feature after feature. It’s also easy to say “I really learnt xyz even if there was no releasable product” and let it go at that.
However, all these reasons suck. The first gets you in the habit of abandoning projects 80% of the way, the second is tricky balancing act, but the third is merely mental hand waving; the experience that counts, where you actually learn something, is when you have a working product *that people can use*. It doesn’t matter how close something is to being released. Anyone can make things that kinda work; if it wasn’t released, you probably haven’t learnt the most important things or solved the hardest problems.
With this little epiphany that I need to finish projects, I decided to kill 2 birds with 1 stone by writing an application that keeps me on track with projects (no, I didn’t miscount, that’s 2 things). I also set a deadline of starting and finishing it in one day so I could beat feature creep.
Consequently, let me introduce Commit, a OSX app based on the wisdom of Jerry Sienfeld’s productivity secret. Basically, you set up various goals that you commit to doing everyday. The motivation to keep the chain from breaking pushes you over the humps when you really want to take a break. Instead of thinking “I will just miss today” you start thinking “I can’t break the chain today”. If that isn’t enough, you get *A GOLD STAR* for everyday you live up to your commitment
![]()
Commit also generates graphs to help you track your progress:
- All time graph shows you a graph of all days since you started this goal. The dips are the days you missed !
- The weekly graph lets you see what days of the week seem to be problem areas.
- The monthly graph, like the weekly graph, lets you determine patterns of when you slip up, but at a higher level.
So those are some things it currently does. It was hard not to keep on tacking on new features. But, the limit of the one day release really helped, even though I pushed it a bit
Things I decided to forego for now: optional twitter/facebook updates on milestones, group commits(group of people commit together, it tells you who is lagging), more graphs, better interface.
So download Commit now and start collecting gold stars
Quiz time
Here’s a quick and useless quiz to test how many language names you can type out
http://www.sporcle.com/games/psychofish25/hello_world_syntax

Yeah, thats a 22/22 you see
Ejabberd, exmpp install on Snow Leopard:
Installing exmpp wasn’t as easy as ./configure; make; sudo make install ![]()
Regardless of what release I used, I repeatedly got the following non-descript error:
1> exmpp:start(). =INFO REPORT==== 15-Nov-2009::19:44:27 === application: exmpp exited: {shutdown,{exmpp,start,[normal,[]]}} type: temporary {error,{shutdown,{exmpp,start,[normal,[]]}}}
The problem turned out to be erl is 32bits on Snow Leopard. So:
1. Compile both ejabberd and exmpp from source like this: CC='gcc -m32' CFLAGS=-m32 LDFLAGS=-m32 ./configure make sudo make install
The fix was simple enough, but required some fumbling around to figure out the problem. Hope it helps someone else