Home
Me
Here is an excerpt from "The Way of Testivus", translated from ancient languages by Alberto Savoia. A must read for everyone.

The pupil asked two master programmers:
“I cannot test this code without mocking and violating encapsulation. What should I do?”

One master programmer answered:
“Mocking is bad, and you should never violate encapsulation.
Rewrite the code so you can test it properly.”

The other master programmer answered:
“Mocking is good and testing trumps encapsulation.”

The pupil, confused, went out for a beer.

At the local watering hole he saw the great grand master programmer drinking beer and eating buffalo wings.
“Great grand master,” said the pupil, “I thought you did not drink.
And aren’t you a vegetarian?”

The great grand master smiled and replied:
“Sometimes your thirst is best quenched by beer and your hunger by buffalo wings.”

The pupil was no longer confused.

PS: Hope I'm not stepping on anyone's copyright

Ugh

  • Mar. 22nd, 2009 at 1:36 PM
Me
Some days, you just can't do anything right.

Tags:

Me
I'm going to start to use my blog as a backup for scripts/code that I don't want to lose.

I lost a lot of data in a stupid Hard Disk corruption when I got a Kernel Panic (due to intel video driver) in F-10.

Anyway, here is a nice script for using git-svn with kde git repos in such a way that you can submit it to http://reviewboard.kde.org. This expands on the code by Marijn Kruisselbrink, but takes care of most cases (such as if working tree is dirty, etc...). Most parameters to git-diff are passed here directly.

Anyway. Here is the function (formatted of course, so I don't break planets)
function git-kde-diff {
        PARENT=`git merge-base git-svn HEAD`
        REV=`git svn find-rev $PARENT`
        git-diff --no-prefix $PARENT "$@" | \
        sed -e 's/^+++ .*/&  (working copy)/' -e "s/^--- .*/&  (revision $REV)/"
}

Tags:

Valentine's Day resolution

  • Feb. 12th, 2009 at 6:28 PM
Me
I didn't really get to make a New Years resolution, as I was too busy with Exams at the time, so I'm making a St. Valentine's Day resolution.

I have college on Mondays, Tuesdays and half of Wednesday. That leaves the rest of the week available for me to work on My 8th Sem project(don't bother clicking link, but if you /do/, then checkout the tag 'lblock-demo').

So my resolution is to spend every Thursday working on something FOSS related. Hopefully something KDE related. Right now I've been working on some classes to help punch holes in your firewall (using IPTables) for applications which need ports opened.

Tags:

Samir as a 2 wk old puppy

  • Feb. 11th, 2009 at 8:53 PM
Me
So Dr. Cashus decided to play a cruel and unusual trick on me, by Tagging Me in the lastest blogging thing-a-majigy.

The rules state: Find the Sixth Picture in the Sixth Image folder, and blog about it. Quite simple enough, assuming that you have an Image folder. However, I do flickr, so I'm deciding to write about the sixth image I can see in my flickr account.

As luck would have it, the picture turned out to be a very cute picture of my dog as a puppy (no, I didn't plan for it :). This picture was taken roughly the time that we took the puppy in, when it could hardly move around.

And yes, my dog's name is Samir. No I'm not trying to disrespect ${Insert_Offended_Party_Here}. But Samir means the wind, and we found it a very appropriate name for the little dog.

Samir being a puppy brings back a huge set of memories, from the days when I was able to carry the thing (you know how Labradors grow). We used to feed him cerelac, and when he ate from the bowl, we had to hold his paws back, because he'd get over excited and jump into his bowl of milk. His belly would then swell up from all the milk, and he'd be too full to walk, and basically fall asleep right in the kitchen.

Now for passing on the baton. I'm choosing Suraj P, Sunayana, Shreyas, Anjali, The almighty Pradeepto, and His Royal Kalluness

Tags:

Happy Sankranthi

  • Jan. 14th, 2009 at 8:00 PM
Me
Nokia decided to give the Qt community a nice present on Sankranti

An LGPL license option for Qt

Sweet

Tags:

Technobabble

  • Jan. 12th, 2009 at 10:11 AM
Me
Is it just me, or has the technobabble in mainstream movies and television starting to become more and more accurate these days.

The movie Swordfish had some of the crappiest, nonsensical, technical shit that I've ever seen in a movie. Things like "I'm going to drop a logic bomb in that system" and other assorted pearls of wisdom. Of course, one of the hackers was Finnish, and named after Axl Torvalds. No surprise, the movie was rated pretty badly, and generally quite boring

Untraceable actually had some useful things one could pick up on. Someone talks about how a admin runs his DNS server(s) with a low TTL value, so that users are continuously forced to re lookup the IP address of his webserver,which prevents the FBI from shutting down his website (by killing the box on which the website is hosted, at least).

TV shows like The IT Crowd and The Big Bang Theory also have dialog that (at least) makes sense. PS. Watch these two shows. They are hilarious.

Happy New Year

  • Jan. 1st, 2009 at 12:13 AM
Me
[gja@yoda ~]$ date
Wed Dec 31 23:59:59 IST 2008
[gja@yoda ~]$ date
Thu Jan 1 00:00:00 IST 2009
[gja@yoda ~]$

We are KDE - The Video

  • Dec. 18th, 2008 at 12:02 AM
Me
This is a little song called "We are KDE" as sung by Adriaan de Groot at FOSS.IN/2008.

The background dancers are some of the KDE Hackers from India, Pradeepto, ShivaSharan, Piyush, and Sheshank.

I missed this one due to the need to rush to college that one day. But this video is so awesome I need to post it.

We are KDE! - FOSS.IN/2008 - Through the eyes of Aamod Nerurkar

Bash AutoCompletion

  • Dec. 16th, 2008 at 2:04 AM
Me
If you are using Fedora, then please:

# yum install bash-completion

God, I wish I had known how to get this working earlier. Earlier I used to manually copy completion scripts to my home folder

Now BASH makes intelligent choices for autocompletion.

My favorite is for dbus send. Wow

Try out the following example:

dbus-send[tab][tab][tab][tab]sy[tab][tab][tab][tab]p[tab][tab]o[tab]fr[tab]A[tab][tab][tab]A[tab]G[tab]H[tab]

which, for those of you who are quite lazy, simplifies to:
$ dbus-send --system --print-reply --dest=org.freedesktop.Avahi / org.freedesktop.Avahi.Server.GetHostName
method return sender=:1.10 -> dest=:1.2526 reply_serial=2
string "yoda"

PS: for strict accuracy, the script above is actually provided by "dbus-glib-devel-0.76-3.fc10.i386". Get this too. However, the bash-completion script provides autocompletion for more useful things, such as svn, git, sudo (most important), yum and man.

Christmas Party

  • Dec. 14th, 2008 at 12:35 AM
Me
Just got back from a Christmas party with at a friends place. Good food, good drink, and a bunch of really close friends getting together, and celebrating for a number of reasons.

Thank you all for making it possible (you know who you guys are).

And thank you Mark for the Christmas Present (The One and Only PESIT religion)

Kopete-Bonjour for KDE 4.0 and 4.1

  • Dec. 9th, 2008 at 2:13 PM
Me
As of KDE 4.2, bonjour is making it to stock Kopete. Hense, people who are using 4.0 and 4.1 (specifically, those who are using Fedora 9 and 10), can get the rpms over here:

http://tejas.fedorapeople.org/kopete-bonjour-1.0.1/

Warning, I'm no RPM guy, so that spec file which says depends on kdenetwork >= 4.0.0 is quite random.

Anyway, feel free to port to any other platform. I /might/ try and apply a few patches to this every now and then, but my tree in extragear seems to have vanished (wtf!!!). And there is at least one commit I've made to trunk so that trunk needs KDE 4.2 to build.

Introducing git-svn-deepclone

  • Dec. 8th, 2008 at 6:36 PM
Me
I am a git fanboy. KDE uses SVN. Therein lies the problem.

There is a nice little app called git-svn, which allows you to push and pull from an SVN repo. I was using git-svn to pull and compile KDELibs, and KDEPIMLibs, but it just kept failing when I tried on KDEBase (and KDENetwork and KDESupport).

git-svn fails on one major account. git-svn does NOT handle svn:external tags, so if a repository refers another one (or itself), then you are more or less screwed. This is why I was able to pull some repo's while others seem to 'fail silently'. But git-svn DOES write what it ignored into an unhandled.log

git-svn is also not all that friendly, as you need to manually figure out what the latest commit to that particular directory was (via websvn or otherwise) while cloning. This is not an OPTIONAL feature. The exact command is:
git-svn clone REPO -r REVISION_NUMBER

I decided to go back to my shell scripting roots, and went about making a script which automated these two "bugs", for people who use git-svn like me, ie, want the latest trunk/tag and probably not going to edit what is there in the external repository.

Enter git-svn-deepclone. It's a nice shell script that uses vanilla svn to get the latest revision number (git-svn already has an svn dependency in fedora, so no guilt there), then clones your repo via git-svn. And then it goes ahead and fetches all the external repositories for you, and adds it to your .git/info/ignore folder so that git doesn't track changes to the external folder.

I also made a git-svn-deeprebase so that it is easy to run git-svn rebase on all of the repos.

Make sure to make these scripts chmod +x and put them in your bin.

You can get the scripts over here:
http://tejas.fedorapeople.org/git-svn-deepclone
http://tejas.fedorapeople.org/git-svn-deeprebase

I'll try to move these scripts to the kdesdk/scripts folder (so far I've only tested this with KDE repo), but if the git guys want to include this, go ahead :)

Tags:

Me
I just committed my first patch into KDE Libs so that makes me an Uber KDE Hacker, ha ha :). /me makes a funny :p

But in all seriousness, since FOSS.IN, I have been working on a small patch to move all the Avahi specific code out of the Kopete Bonjour plugin, and "Upstream" into KDE Libs.

Basically there are two methods which Avahi Provides which are not present in the DNSSD Libraries:
org.freedesktop.Avahi.Server - ResolveHostName(string)
org.freedesktop.Avahi.Server - GetHostName()

These methods basically are basically used to resolve a hostname via mDNS, and to get the hostname which the mDNS server broadcasts as. These functions can now be found in the DNSSD::ServiceBrowser class.

The first method is particularly useful for Fedora as it allows the resolving of mDNS hostnames without the use of the nss-mdns plugin, which allows you to resolve a .local hostname (via mdns) as if .local was a valid TLD. This seems to be bundled by default in other distros, but not in Fedora (it needs to be yum installed). So now there is a proper "KDE" way of doing this :).

Many Many Many Many thanks to Jakub Stachowski who I constantly pestered with my patch. I really appreciate the time you spent on this.

A Note to The Fedora Gods

  • Dec. 6th, 2008 at 6:28 PM
Me
Puhleze for the love of god make it easier for people to open port 5298/tcp and 5353/udp if they are installing avahi on their box. If I get one more complaint bonjour isn't working because someone's firewall is blocking everything :P.

Plasma Themes

  • Dec. 2nd, 2008 at 8:15 PM
Me
I am really glad to see that KDE 4.1 has an EASY way to change the plasma theme. I mean thank god. Unfortunately the default KDE plasma theme is so dark and more than a little depressing.

With the new Fedora 10, you can easily change your plasma theme (right click on desktop->desktop settingss). My panels are now back to a whitish theme.

Also, everything works well with PulseAudio now. Fedora guys -> make sure that PA is the default output device! Right now it is alsa, and falls back to PA.

Also, it would be nice if KHotKeys started when it was supposed to, but starting it manually is not too much of a big deal. Also, I wonder what happened to katapult?

All in all:
+1 Fedora 10
+1 KDE 4.1
+1 PulseAudio
+1 NetworkManager 0.7

Fedora 10

  • Dec. 2nd, 2008 at 6:00 PM
Me
I got Fedora 10.

Wow, It's just amazing.

Most of the things that were broken in Fedora 9 (wrt KDE anyway) seem to be more or less fixed!!!

Way to Go!!! Still waiting for KDE 4.2, but for now, I am very happy.

As an added bonus, NCTUns seems to install (and probably run... will try) on Fedora 10, even though it uses the Fedora 9 Kernel (2.6.25).

Meanwhile, git-svn is working out very well for KDE svn repos. You can easily git-svn clone the kdelibs and the kdepimlibs repositories, but it is a bit tough for kdebase and kde support (and kdenetwork) thanks to the presence of svn:external tags. One reason to switch to git is something I found out the hard way while using KDE svn.

If svn update fails in the middle, your svn will just hang. If you finally kill it with a -9, then your directory is now in an unsafe state (whoopie). No matter how much svn cleanup you do, it will never work.

Ugh

  • Nov. 26th, 2008 at 2:39 PM
Me
The Bonjour plugin for Kopete crashed when I turn it on here at FOSS.IN/2008.

I suspect it may have to do with duplicate names

Ugh, this event is why I wrote the thing in the first place. Cruel Cruel World.

Typealyzer

  • Nov. 21st, 2008 at 7:35 PM
Me
According to Typealyzer I am ESTP - The Do-ers


"""The active and play-ful type. They are especially attuned to people and things around them and often full of energy, talking, joking and engaging in physical out-door activities.

The Doers are happiest with action-filled work which craves their full attention and focus. They might be very impulsive and more keen on starting something new than following it through. They might have a problem with sitting still or remaining inactive for any period of time."""

And apparently I am a "Thinker" and "Practical"

My Twitter URL Says the exact same thing

Advertisement

Latest Month

July 2009
S M T W T F S
   1234
567891011
12131415161718
19202122232425
262728293031 

Syndicate

RSS Atom
Powered by LiveJournal.com
Designed by Teresa Jones