Saturday, November 1, 2008

cd -
toggles between directories.

Wednesday, April 9, 2008

I was using server timestamp in the smacks of Smacklet
So it was just PDT.

Per user request, I've made this truely global :)

User wanted an option of setting timezone. I thought it would be even better if I read the client side time using Javascript's Date() function. This way, even if the user moves to a different time zone, he/she will not have to change the settings! Yay! Me is very pleazed ;)
Learned some git stuff. Installed git in work computer (Windows)

I just skimmed through this:
http://tomayko.com/writings/the-thing-about-git
I should read it again when I use git more intensively.

vim:
I have to use f more often.
I forgot ^r

vim tips learned:
J - join two lines
H, M, L - home,middle,last
zt, zz, zb
using /xxx\> to search for words ending with xxx. likewise \<
D = d$
In visual mode, use o to change the other end (wow!) another o gets you back

Tuesday, April 8, 2008

Watched AppEngine videos. Cool.

Did 'Hello World' in Google AppEngine.

Few days ago I enhanced Optibus.

Wednesday, April 2, 2008

Recently Learned
  • Threads in Python - Used it to send 3 queries in parallel to metrokc for my OptiBus project
  • Using re.sub to remove all tags and thereby convert html to txt
  • Contructing POST requests using urllib. (Note2Self: I should use urllib2 and pose as IE)
  • More experience with writing bookmarklets for my webapps
  • vim: few cool tricks #
  • 'map' can be used as a faster 'for' #

Thursday, March 27, 2008

Got a sudden insight now :-)

x=[11,22,33,44]

To get last element, we use x[-1]

Instead of using the negative index directly, we can use the bitwise NOT operator ~, since ~0=-1 and ~1=-2 etc!

So you can simply say x[~0] to access the last element, x[~1] for last but one etc.

[Hacker News discussion]

Monday, March 17, 2008

Learned pdb basics: http://www.ferg.org/papers/debugging_in_python.html

Wow IDLE debugger is impressive: http://www.python.org/idle/doc/idle2.html#Debugger

I was playing with 'Path Browser' in IDLE (came to know about it only today) and discovered that Berkeley DB comes with py (at least a simple interface). Just an 'import bsddb" will do.