Monthly Archive for August, 2009

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 :)

Summer of Code – Wrapping up

Sometime in late May, I embarked upon a project to extend MonoDevelop, an open-source C# IDE, to give it Task-context functionality and integration with Bug-trackers, not unlike what Eclipse’s Mylyn provides.

7630 lines of code, and several times my bodyweight in Coffee later, there’s something to show for my work. This may be the end of the program, but I am going to continue working on this for several months to come. After some more testing, I’ll release a very small preview version with some of the unstable/experimental features phased out on the MonoDevelop mailing lists. It’s still far, far, far from complete. It needs several months of work before I’m happy with what it can do, but the basic skeleton is starting to take shape, allowing me to focus more on features rather than worry about the backend.

I had several issues during the program – primarily the fact that I was interning at a company and had to do this on evenings, and weekends – which became extremely tiring. Add to that, the horrid Bangalore traffic, two hour commutes, etc, it became pretty hard. Moving closer to the office with a relative provided some respite. While it would’ve been ideal to hack on my code in the evenings at the office, I couldn’t for legal reasons, so I would hang out at a friend’s place nearby and occasionally work at his place.

My mentor, Michael Hutchinson was so overwhelmingly helpful, it was almost a little embarrassing. When he was unavailable for sometime in the middle, I almost started panicking; it’s really not easy wrestling with such a huge codebase. The other folks over at #monodevelop were incredibly helpful and patient as well. There was one time when I spent two weeks on the backend trying to refactor the code over from a serialization-based storage system to a Database storage system, because the former wouldn’t work because of some circular-dependency constraints. Thanks to some help from the guys on the channel, I realized my woes can be cured by a simple API call I didn’t know about, and thus threw away two weeks worth of work, and moved things back to the old backend. (though in the long run the database would’ve been excruciatingly painful to work with)

Anyways, I need to do some more housekeeping, add some comments here and there and maybe an easter egg or two.

Sneak preview

Sneak preview

Again, this is a very early version and will be subject to massive changes. I will write again soon describing what it’s all about.

Rise and shine :)

About a year ago, I started on a project where I logged detailed statistics on all my regular activities like sleep, eating, exercise, work, etc. I was unsure of what exactly to do with it, but the primary goals was to track improvement, detect negative trends, and infer useful information.

My golden motive was to figure out what altered my erratic wake-up schedule. I have a lot of trouble getting up in the morning most of the time, and it’s one of my long term goals to rise early and effortlessly. I pulled up the spreadsheets last night and tried to see if I can find some correlation between my sleep length and any other factors.

Contrary to what most people think, I found very little correlation between the time I went to bed, and the time I woke up. There’s some correlation between the time I had to get to class or work, which is expected, but nothing that would point to any ‘aha’ moment. There was no evidence showing that exercise affected how much I slept (though there was a surprising correlation between how much I ran in the evening and how good I felt before sleeping).

But one thing really surprised me. When I examined all the days when I had my last meal before 10PM, it was almost always followed by an early rise. Some more examination showed that there was some clear correlation between when I last ate, and when I woke up, regardless of what time I fell asleep.

I decided to try it out for a few days – No food or coffee after 9PM. Period. And I was amazed at the results – regardless of what time I slept, I had no trouble waking up at all. Today was the ultimate test – I had a critical class in the morning at 8:30 AM and I was up till 2:30 AM finishing up an assignment, though I hadn’t eaten after 8PM. I was tempted to get a snack before I slept (I’m in a university – you get food all the time around here), but I refused.

Sure enough, I was up at 7:30AM fresh as a daisy. In fact, after a good breakfast, I found it was actually quite easy to go about and didn’t feel sleepy at all through the rest of the afternoon.

So I encourage you to give this a try – avoid food intake beyond a certain point, and see if it helps being able to wake up early in the morning.