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.

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.