2010-06-02

blog has moved

Blogger's composer window has often caused so much pain that I decided to move elsewhere.

2010-05-19

quoting Paul Graham

So I've bestowed the great honour upon Paul Graham as the best writer on software development, and I've revisited two of his essays and found this one gem:
It's not when people notice you're there that they pay attention; it's when they notice you're still there.

The idea is most likely unoriginal, but he really puts it well. He proceeds to make another interesting observation:
Problems can be improved as well as solutions. In software, an intractable problem can usually be replaced by an equivalent one that's easy to solve. Physics progressed faster as the problem became predicting observable behavior, instead of reconciling it with scripture.

2010-05-18

implementing history using GTK+

There has been feature that has been missing ever since Tracker's dedicated GUI search tool was written and I have now implemented it. The one major brickwall I had to overcome was understading the concepts of GUI design, specifically GtkComboBoxEntry and it's close relationship with GtkEntry, as well as GtkTreeModel and relatives.

Implementing this feature had me slouch through the docs for hours, and even led me to consult source code from a few sources and ended up implementing something similar to xfrun4, XFCE4's run dialogue. An extra nice thing I got from that dialogue is entry completion, which I implemented as well.

[update] The patch, on third try, has been committed!

2010-05-17

recent movies

Set in paradise, Vicky Cristina Barcelona is a masterful work of art filled with wonderful works of art (paintings, music), and has an added bonus of having Penelope Cruz playing a character that's never been portrayed on film if memory serves me well.

Of the highest-rated of Akira Kirosawa's movies, Rashomon is given the stature of Seven Samurai, if not more, but for me it's just a dumb storyline with bad acting. In fact I found its ridiculousness unbearable in this revisit. Regardless, Toshiro Mifune is really an interesting actor, but happened to be given a shitty role, where he practically is a madman.

Far better is Mike Nichol's Wit which chronicles the suffering and thoughts of an intellectual giant during an intense months-long cancer treatment.

[sidenote] I once said that the three guys playing characters who are sheltering selves from pouring rain in Rashomon were good, but on second look only one of them, the inquisitive one who wasn't a witness, was any good, but I maintain he overdoes it still (silly grins, forced laughter). The monk just sucks and the other guy is a good actor (he really shined in Seven Samurai), only his good skill doesn't show up here, due to the shitty role.

2010-05-13

how to access Oracle DB using Python in Debian

environment
  • Debian Squeeze (which should be released in a few months).
  • Python 3.1, but I suspect that this should work well with Python 2.6.

installation
  • get registered on Oracle website (pain)
  • download oracle-instantclient11.2-basic*.rpm from Oracle's website (around 40MB worth)
  • convert the rpm to a deb ($ sudo alien oracle-instantclient11.2-basic*.rpm)
  • install the deb to your system ($ sudo dpkg -i oracle-instantclient11.2-basic*.deb)
  • get cx-Oracle rpm for python 3.1, convert it to a deb and install it

setup
  • $ sudo apt-get install libpython3.1 libaio1
  • $ sudo ln -s /usr/lib/python3.1/site-packages/cx_Oracle.so /usr/lib/python3.1/lib-dynload/
  • $ sudo ln -s /usr/lib/oracle/11.2/client/lib/libnnz11.so /usr/lib
  • $ sudo ln -s /usr/lib/oracle/11.2/client/lib/libclntsh.so.11.1 /usr/lib
  • $ echo export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib >> ~/.bashrc
  • $ source ~/.bashrc

test
If the following executes without printing a message to the screen, the install is most likely successful.
  • $ python3.1 -c "import cx_Oracle"

2010-05-12

my favourite FLOSS

backup
rdiff-backup

desktop
GNOME

development
Geany, Python

misc utilities
grep, Sudo, debmirror, Lsof, less, Meld, Uptimed, top, Tracker, Ex Falso, wajig, GNOME system monitor applet, xfrun4, coreutils (wc, tail)

spreadsheet
gnumeric

terminal emulator
GNOME Terminal

text editor
Geany

anything unreleased and highly anticipated
HURD, APT2

anything dying/dead
Coyotos

non-free
GMail
Blogger (@blogspot.com)

2010-05-10

xfrun4 rocks

The one desktop environment I live in is GNOME, which also happens to be my favourite too. It's got quite a lot of things that can be better of course and one of them is it's run dialogue. I once bumped into XFCE4's run dialogue and have used it since I've discovered years ago. What I like about it is, unlike GNOME's, it doesn't auto-complete using a large list of possible commands  (presumably on the shell's path) but rather a smaller list consisting of commands I have actually run previously. What's more is that it makes those commands persistently available as history (which GNOME's does as well by the way). As if that's not enough, it will store only commands that were successfully launched to avoid storing typos and failed commands in history. These features makes for a superb, fit-for-purpose piece of software.

[update] I found this mail that I once sent to GNOME's list which proves that my opinion hasn't changed since 2007.

2010-05-06

best of the web

These are the best resources on the web that I've found so far:
Site design:

2010-05-05

recent movies

There is not a single performance (and I mean that) in An Education that isn't top-class, but favourites are the girl's silent mom and the glamorous blonde (such beauty!). The director also excels, but all this hides the fact that the characters don't have real depth, especially the girl's mom (door mat!), while the dad is not much more than a caricature.

The fate of the man who got strapped with bombs got me bursting out in tears in the not-so-typical war movie, The Hurt Locker. We also get a whole lot of detail deliberately left out. I'm left without knowing whether to herald such soldiers as heroic or not.

There's a gem here and there in Clash of the Titans but the visual effects are of inconsistent quality (battle with scorpions really sucks; all attacks by Hades are done well) and so is the character design (Hades and the monster, Kraken, are magnificent; the scorpions and it's riders suck). Also, the movie really leaves a bad taste in one's mouth, such that one is compelled to proclaim it bad, and that's not helped by the script.

Nothing this year so far was as exciting as Iron Man 2, which was impressive not only due to great visual effects but also good directing, script, and acting, and there's a nice cameo by Samuel L. Jackson, a normally uninteresting guy whose only other work I appreciate is Pull Fiction. The villain is a pleasure to watch.

2010-05-04

I love the Debian supermarket

I love the fact that whenever someone mentions a piece of software, I can quickly do a aptitude search piece-of-software knowing that there's a good chance that it's somewhere in the Debian repository. That means I won't have to get to the website looking for a download link, which, other than saving time, means I just have to deal with just one interface as well as the confidence that piece-of-software is well-integrated with Debian itself, given Debian's exacting quality standards. Debian really is a gem!

[sidenote]
The term, supermarket, as used in this context, was coined by a Debian Developer, although I mean it in a different and more positive manner.