Saturday, November 07, 2009

Chrome: Little UI touches

I forgot to mention that I made a life changing decision change of browser about 2 weeks ago. I've been exclusively on Chrome ever since. I love the minimalist look, the great search features for downloads and the best feature is perhaps Ctrl+PgUp/Dn to switch tabs. Its also very fast on shutdown and startup compared to my firefox, almost Firebug like Developer Tools, really awesome view-source: component ( inspired by kio? ). I love the fact that I can kill some flash/java applet without crashing the browser. So fellow archers go and grab the PKGBUILD

But the really interesting thing I noticed today is this:

Hide the bookmarks toolbar. Open a new tab. In SpeedDial, notice how the bookmarks are shown at the top. Now show the bookmarks toolbar. Voila, bookmarks are hidden.

As for the firefox plugins, well I don't miss any of them yet, except for the Delicious plugin, which I try to compensate for using the bookmarklet.

Monday, November 02, 2009

Macros for Observers

Here are two little macros too make implementing the Observer design pattern less repetitive. This is C++

File: observermacros.h




#ifndef DDM_OBSERVERMACRO_H
#define DDM_OBSERVERMACRO_H

#define MAKE_OBSERVABLE( obscls ) \
private:\
std::list< obscls *> m_observers;\
public:\
void addObserver( obscls *obs ) {\
m_observers.push_back( obs );\
}\
void delObserver( obscls *obs ) {\
m_observers.remove( obs );\
}

#define NOTIFY( obscls, obsmethod, argument ) \
for( std::list::const_iterator it = m_observers.begin();\
it != m_observers.end(); it++ )\
(*it)->obsmethod( argument )

#endif




Now if you want a class to be observable do



#include "observermacros.h"

class NeedsObserving
{
MAKE_OBSERVABLE( Observes );
};



Observes is the name of the class which will observe NeedsObserving.



// add/del observers
NeedsObserving no;
Observes o = new Observes;
no.addObserver( o );
no.delObserver( o );

// To notify observers of changes

void NeedsObserving::didSomething()
{
// CoolThing *coolThing is modified/used here
// ...
NOTIFY( Observes, coolThingDone, coolThing );
// Calls Observes::coolThingDone( CoolThing * );
}


The code is pretty naive, but it might help. Cheers

Saturday, October 24, 2009

Spectacular failure ( success? ) at IEEEXtreme

Solved 2/12 problems in the first set successfully. Tried to solve 2 more, but not accepted. Can't take the straight concentration anymore. I'm hungry, dropping the contest. This was more appropriate for twitter, but I don't have an account. :o

Thursday, October 22, 2009

Non-trivium

When you don't post for a long time, it usually means you have nothing interesting to do. But for me it usually means that I have a lot of things to do. And the last month have been horrible in terms of free time.

We had a really great one day trip to Diu, but from then on, it was all underhill :)

You might want to check out the Synapse website which was crafted from scratch with a little help from these guys. This was done under constant pressure of the not so great marks I received in the first midsem exam and the looming second insem, so I applaud myself.

This was accompanied by Concours 09, the first time DA-IICT ever held an inter-college sports fest. We reached the finals and lost! (in football). But now the exams were just a week away.

This exam week was the worst of my short stint in DA. Never before have I skipped football for 5 days straight. And the woozy feeling in the head when I soaked up about 1024Kb worth of signals and systems and put more than half out on the paper. This followed by Algebraic Structures meant that I was with tics for the whole day. Whoo what a semester this is turning out to be...

Thankfully I've been home for almost a week now, enjoying great food after quite some time. But my football holiday is now up to 15 days! I have hacked on the Synapse registration, read 3 chapters of Programming Scala, watched the first part of A curious course on Concurrency and Coroutines, submitted a first code review of kwin-tiling, and procrastinated on some other things. Through all this I also read a few books, and watched the first 5 episodes of Heroes Season 4. That was a lot of stuff in retrospect. Meanwhile FOSS.in is starting to pick up steam and I'm looking forward to when the registration for simple attendance begins.

I'm also on the look-out for an internship.

In the next 48 hours, its back to DA, and time to get cracking on IEEEXtreme, at which I am going to fail miserably, since I don't get time to do pure algorithm practice.

And I thought I was on a holiday :(

PS: I wish some one would sponsor me to go to Camp KDE or atleast Akademy.

Saturday, September 26, 2009

KDE introductory talk

The Open Source Initiative in DA-IICT is our effort to get more students interested in open source, and get them to start contributing to projects. As part of that I evangelized KDE, showed off our cool apps, and demonstrated how Krunner + Kwin + Plasma come together to improve productivity a LOT. Here are the slides, Unfortunately my notes were handwritten, so you can't glean much from here. But someone else might be able to use it ( please attribute it to me though, thanks ).

Download the slides ( pdf, 461k )

Monday, August 24, 2009

Tiling screencast

With a lot of requests to see tiling in action, I've uploaded my first ever video. Unfortunately I couldn't get my microphone to work. There are also a few glitches, forgive me for that.

Friday, August 21, 2009

Dynamic layouts are here

kwin-tiling now features dynamic layout switching per desktop. Use Meta+PgUp for Columns and Meta+PgDn for Spiral. Watch the windows change their place on the fly!

A few bugs in both the layouts are also fixed. Overall kwin-tiling is pretty stable for now, so give it a whirl and notify me of any bugs you can find.

What it still lacks is Xinerama awareness, but otherwise its virtually feature complete for the first release.

Unfortunately since college has begun I've been able to work on Kwin for only a few hours a week, so progress is a bit slow.

But the good news is that since GSoC is over, we should start seeing loads of new features being integrated into trunk/ to play around with.