Tuesday, November 18, 2008

Best Python debugger

I don't use pdb often, but today, I needed one. I suspected that there should be a pdb module for emacs. Although GUD requires separate wrapper to PUD, there is a built-in module in Emacs. I just realized that GUD is a wrapper for another process instance. Not a big deal.
Create this file in somewhere PATHable and name it pdb.

#!/bin/sh
exec python2.6 /usr/lib/python2.6/pdb.py $1 $2 $3 $4 $5 $6 $7 $8 $9

And then, you are good to go. Someone mentioned that backtracing does not work across modules. I didn't test that because his/her post was dated long time ago with emacs 21.
With pdb, 'C-x +' (balance-windows) will be very useful.

Friday, November 14, 2008

Emacs pinky problem

I am not talking about L-CTRL sitting on a lower left corner. I already switched CAPS and L-CTRL. However, as Emacs still requires so many CTRL key strokes, my left pinky is getting tired. Now I am using R-CTRL and R-ALT. This works in my work desktop, but several problems await me.

1. Some machines don't understand R-ALT and R-CTRL.
2. Laptop and Desktop keyboard layout make me confused for these keys.

Intentionally, xmodmaps are turned off these days to remind myself to use Right side.

Friday, November 7, 2008

Nehalem architecture

Intel took a new approach to resolve the bandwidth problem, traditionally Intel suffered. If Intel Core 2 duo was focused on more efficient computation, this is major replacement of architecture design. As a programmer, we can just enjoy more clock cycles on less power consumption :)

Here is an article about a very nice overview.

Friday, October 3, 2008

Like a stone, Audioslave

This morning, I ran a random list in amarok, and this song was played. I purchased this song from Rhapsody several years ago. Once again, I felt touched when listening to this. Another song that I like is Cochise.
Not his song, but he is very special to my life. I loved rock music when I was young. I loved to play guitar. When I was early 20's, Korea was not ready for Rock. There were people who love rock music, but popularity came from dance music mostly. Also, the media didn't carry much of rocks. So, I was thirsty about rock culture. Only way to access was spending money on CD.
The fall of 1994, I came to US. Luckily, I happened to have a chance to watch M-TV. And I enjoyed ROCK music all night long. For the first time in my life in the first night in the US. I remember there were "interstate lovesong" from 'Stone Temple Pilots', something from 'REM', "When I come around" from 'Green day'. But most amazing songs were from Sound Garden. "Spoon man", "Fell on black days", and "Black hole Sun". I think I watched "Fell on black days" on that night and amazed. The vocalist of Sound Garden is the one in Audioslave...

Just a memory, 14 years ago...

Thursday, October 2, 2008

KDE4.1 on Fedora Core 9

It is pretty busy days. I can't find time for a technical post. But, I want to mention that I am happy with new KDE 4.1 update with FC9.
I generally don't follow updating my work desktop. Recently, I did it and required rebooting for kernel 2.6.23 update. After logging in, I found KDE is updated to 4.1. It had enhanced look, and I updated my nvidia card from livna, and OpenGL based theme worked. It looks much cooler.

Thursday, September 25, 2008

Good excuses NOT to use version control

Recent post from stackoverflow.com made me laugh. 'No version control' execuse. I have to reveal my stupid experience for this. It was my first year in career. I developed a replacement of production data feeder. It had a significant improvement, and I was sure it will make other people's life easier. But, suddenly, an accident happened. At that time, neither did I version control, nor backed up a source. The fact that first year professional doesn't know version control system should not be a good execuse, but I didn't know that.

My intention was to clean up test data like this:

$ rm -fr $PRJ_HOME/data

But, actual command was issued like this:

$ rm -fr $PRJ_HOME/ data

With just an extra space, I screw up the $PRJ_HOME. Fortunately, I had spare partition with enough disk space. I dumped /dev/sdaN to a single file. It was too big to open in vim, so chopped in pieces, and went through ugly binary format searching for my piece of code. After recovering all of my sources, I learned CVS and spent a week to learn to setup and manage CVS. Now it became Subversion.

There is no execuse, no good reason not to use VCS(Version Control System).
I can think of one. Temporary project only, which will create noisy commits on main VCS. However, even though the project is temporary, building on my own subversion tree locally and stuff into it before going to main VCS is not a bad idea.

Tuesday, September 23, 2008

Emacs, company-mode

I ran into a company-mode. This is a new completion style, and I like it. I recommend to watch its demo screencast.

company-expand-common function will take your TAB key away. I rebound it to [C-tab].
Very useful and good looking.