Patchbin.com open to public

I swear this project was jinxed. Everytime I sat down to finish, deploy and make a release, something always ends up distracting me. Finally, after a long sunday evening of debugging and wrestling with crazy python syntax errors and horrible confusion resulting from not remembering what git branch I was tracking, I think it’s ready for public use.

So here we are: Patchbin.com

For example, here is the famous DeOMGifying commit from Ruby On Rails – the agile, pragmatic web framework for LOLCats :) http://patchbin.com/Lfgb9d

Now for some well deserved coffee!

meep! Turns out the host went down for some reason just after I finished deploying.

Sneak Preview – Patchbin!

A little sneak preview of my latest project.

While talking over chai with Ramkumar, I thought aloud that it might be a neat idea if I could start a code review by just pasting a patch in something like pastebin and get a code review functionality like Google’s Mondrian or Reviewboard. I should be able to paste a patch like in Pastebin and see a visual diff and also be able to send it to mailing lists where people can make comments. I was looking to write a small app to brush up on my django skills and to practice deployment on a production server and this seemed like an ideal opportunity.

The project was a little more complex than the original one-weekend timeframe I anticipated, but I’m happy with the way things have come out.

Here’s a sneak preview of the near-complete app. I’m just fine-tuning the diff parsing algorithm and need to purchase VPS hosting and deploy the app, and hope to do that by tuesday.

Here are some screenshots: 1. Pasting a new patch:

  1. The default diff view:

  1. Creating a comment

  1. Replying to a comment (you can reply on either side):

Hopefully this will make collaborating on patches a lot more I was using this patch from the linux kernel patchwork site for display here. The backend is completely open-source and is written in django and will be hosted on prgmr or linode.

Amon Amarth live!

I love Amon Amarth. Their album – With Oden on our side – is my favorite album of all time. And there would be no way in hell I would miss them – an off-mainstream swedish outfit – performing in India!

I’d purchased a large (40”) flag bearing the cover of the “With Oden on our side” Album a few months ago. It adorned my hostel room wall next to my bed. (Hence I lived literally “With Oden on my side”.) I took it back home and painstakingly stiched and duct-taped it onto a eleven foot pole so I could raise the flag and fly it high!

And here is the result (look for the flag in the first minute or so):

Some bloke even mentioned it somewhere online:

“Someone in the crowd had mercifully brought an Amarth flag that flew high and proud” [source]

Overall the concert was absolutely mindblowing! I never expected to see these guys perform anytime unless I went to some european place. My only regret was that the show ended too early because the Police closed the concert as nothing can run after 10 around here. They couldn’t even play their crowd-pleasing hit – “Pursuit of Vikings”. I felt that the other opening bands and “Textures” (who played before them) got too much time.

The exact same thing happened when Megadeth came and performed – Machine Head could play a full setlist leaving the main act short and the audience desperately wanting. I just hope this encourages show organizers to avoid trying to get a “woodstock” like experience by cramming many bands in and realizing most people just come in to watch one or two famous bands.

Either way, it was one of the most awesome nights of my life. I had seen Amon Amarth. Nothing else would’ve mattered.

Marathon time!

Yay! Last weekend I successfully ran the 22 km half marathon at the Bangalore Midnight Marathon. It was an absolutely fantastic experience, which took all of 2 hours and 10 minutes to complete. This was the longest I’d run at a single stretch until now, and it wasn’t as difficult as I’d originally expected.

The first 10 kilometers were a breeze, something I was quite used to. The next 4 kilometers were the hardest, after which it became surprisingly easy, as long as I kept my mind completely distracted – an easy task for me!

The run was great! Several hundred people turned up. A lot of people were skeptical as they had to run the same stretch of road 10 or 20 times for the half and full marathon. Many people I know opted to stay out of the run citing boredom and monotony, but the real passionate runners turned out in big numbers. Even my parents thought it was slightly weird – why would I drive out 30 kilometers to run 22 more at midnight and drive back afterward? I am not too sure myself, but I’m real glad I did it.

Hopefully by next year, I’ll be able to run a full marathon.

First year dreams

So I’ve been quiet over here because I’ve been awfully busy off late. One of the things occupying my time was preperation for the WTMS Annual Production. WTMS is an society that plays music inside the institute. I had the honor of being one of the three Governors of the society this year, which meant a lot of work over the past few weeks.

The show was great. We experimented with a new sound technician which didn’t go too well. But the crowd was nice, the music was good and the finale was explosive. I asked my friend Anutosh to photograph the event and some of the photographs were great, and I thought I’d share some here. Thanks to my friend and depmate Karthik Prabhu for taking photographs as well(he’s keeping the best pics from me, to edit and polish, so you might get a follow-up post).

A little bit of history now. Back in first year, when we really didn’t play anything, me and two very good friends – Ved and DC – spent more time fantasizing about stage antics and imaginary bands and songlists (trivia: we still call ourselves “Ved’s Imaginary Band” or VIB even when we perform on stage), than we did actually playing anything.

One of the things we most wanted to do is to line up next to each other, point the fretboard at the audience, not unlike the thing very characteristic of Iron Maiden. Something like this:

And four years later – lo and behold:

FYI, that’s me on the left of the image. With my best friend Ved in the middle. Vibhav – on the right – was supposed to line up as well, but he stuck to where he was prolly due to the fear of messing up the “Dance of Death” lick. We were like “clean playing be damned! it’s the photo op that counts”. In his defence his solo came out great!

Wait… Something’s not right. DC was supposed to be along with us as well. Kindof difficult since DC plays keyboards (he’s a “synthie” as they call ‘em down here). Thankfully, his E-mu XBoard 49 Midi controller keyboard comes into the rescue.

Errr…. success?

The show closed with local hero and grade-A-nice-guy Ankit “Godwa” Prasad playing a _perfect_ rendition of Pink Floyd’s “Comfortably Numb” – the long extended Pulse Live version. We even projected a video of the concert in the background.

Anyways, the show was great. I was thoroughly exhausted at the end of it. An entire day of setting up several thousand watts worth of sound, setting patches and playing with some of the most talented people I’ve met in my life. And lie down on a stage – just because I could. (image – I’m in the blue shirt, DC’s in black)

Thanks to everyone who came! Hopefully I’ll get to play at Kharagpur once more before I graduate. Until then!

SafetyNet – Easy error reporting for C#/Mono/GTK# apps

Screenshot for the impatient:

SafetyNet

What is it?

SafetyNet is a framework for error reporting and analysis for C# apps on Mono/GTK#. It is shown when an exception cannot be handled appropriately. The user, when faced with the exception can choose to send the stack-trace of the application along with any other information to a central server, where the developers can be informed of potential bugs.

It’s inspired in concept by Google/Mozilla’s Breakpad and the server-side component – “Socorro“. SafetyNet aims to be less of a install-and-forget solution to send dumps after the crash, but rather aims to try and fail gracefully, and give the user a choice to try and save the data before shutting the program down.

Why should one use it?

It is easy to integrate with your existing applications. Since all the failing stacktraces are in one place, it is easy enough to perform rudimentary frequency analysis to find out which sections of the code are failing more often.

Integration will require considerable amount of plumbing – handling crashes, recovery requests, save and die requests, etc are all to be implemented by the developer and application agnostic.

Clientside features (mostly not implemented yet):

  • Show a GTK window presenting details about the error which can be filed as a bug report.
  • Send a SOAP/vanilla POST request to a server containing debug information
  • Integrates with System.Diagnostics by providing a TraceListener to also dump your logs to. The logs will be sent to the report (if allowed by the user).
  • Investingating integration with System.Diagnostics.Debugger
  • Hopeful integration with the global assembly cache – sending more diagnostic information
  • Attaches screenshots of the failed program if required

Server-side features:

The server currently accepts an error report in XML format and stores it to couchdb. It currently does nothing except dump all the error reports together for downloading and offline processing.

Usage:

There’s a singleton class which acts as a central access point. It’s thread safe (I think) and is used to trigger the exception dialog and expose other functionality like the TraceListener, DebugListener, etc.

API:

TODO

Integrating with existing codebases:

A lot of design decisions were based on MonoDevelop’s ErrorDialog, which only shows a stacktrace. My guess will be to put everything in a try-catch

Current status of development:

SafetyNet was extracted from another top-secret project. It’s still in a very early stage with very few features – due to more time dedicated to aforementioned top-secret project. The code will be released as soon as the solution is sufficiently decoupled. All code will be MIT/X11.

Porcupine Tree to play in Mumbai, India!! Oh yeah!

Follow me down, to the valley below. They were arriving somewhere, but not here, but not anymore! Porcupine Tree, the progressive rock band will be headlining Mood Indigo, the IIT Mumbai cultural fest on 21st December. Their website confirms that they will be playing their final show at Mumbai!

Needless to say, I’m so going to be there! I absolutely love their last three albums, and their new album “the incident” is due a week from now. Hopefully, they’ll play some of their more popular songs along with material from the new album.

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Send to pastebin from within MonoDevelop

I wrote a small addin last evening for all the beautiful MonoDevelop users. This allows you to send your code (either the whole file or a selection) to PasteBin.com from right inside the IDE.

Here’s a quick screenshot: Hosted by imgur.com

This is the first of many text-editor productivity centric addins I hope to release in the future. You can find the code here: http://github.com/ninjagod/MonoDevelop.EditorTools/tree/master. The code is under the MIT/X11 license.

To build, check out MonoDevelop.EditorTools into extras, and build against a built copy of MonoDevelop (and make sure that the newer version of the assemblies are present in your search path). This has been tested against trunk. It builds an addin directly into main/build/addins. I hope to merge this into the MonoDevelop trunk though it’s a really really small feature.

Still to be finxed: 1. The “Copy link” button does not work because I don’t know how to use the clipboard through C#. 2. I need to retrieve the user’s name from the settings 3. I need to remember things like subdomain, name, etc and load them up from a PropertyBag.

And the elusive download link: PasteBinHelper.dll [via] (You can put this in the md-trunk/main/build/Addins/MonoDevelop.EditorTools/PasteBinHelper.dll) and it should work. Since the Addin specifically requests assemblies of version 2.1.0 (trunk), it might not work with 2.0 (don’t let that stop you from trying though)

Migrating website

My two year hosting deal that I purchased with the Wordpress Plugin competition prize money is coming to a close in a week, and it’s been a good run so far. I purchased a Virtual Private Server for my new top-secret project and thought of hosting it on that, but setting up and hardening a lamp server might not be worth the trouble. I decided to give Wordpress.com’s domain hosting service a try. If anyone knows a nice way to host a blog for a domain that isn’t too much of a hassle, a shout out will be much appreciated.

In all probability, you won’t even notice anything :)