Author Archive

Python vs. Lisp (Your favorite dish)
October 3, 2007

Using Python is like eating delicate gourmet foods. You know, great and innovative ideas, small portions, cheering up your mind, and tasting of the “Good Life”. Whereas using Lisp is like cooking that food.

All JavaScript Passengers, Attention Please
September 28, 2007

This is an example why should one follow the rule of using ‘===’ and avoid ‘==’
var a = [];
[!!a, a == false] == [true, true]
You get !!a == true and at the same time a == false, now you are confused, ain’t you?
Therefore never ever you should be using in your code ‘==’ operator.

[!!a, a [...]

HotKeys
September 16, 2007

jQuery Keyboard Shortcut Hooker Plugin is now called Hotkeys. Make sense, right? The script was tested on Linux, Windows, and MacOS, IE, Safari and Firefox.
The final result is relatively small file (121 lines of code). But do not let this fact misleading you by underestimating its value.
> See Live Demo  
Read more at Google Code [...]

jQuery Plugin for Keyboard Hooking.
August 29, 2007

I rewrote (granted permissions by author) the great JavaScript module by Binny V A shortcut.js as a jQuery plug-in.
Code Sample and download a pre alpha version are available at Google Code
Cheers,

Uncache IE Ajax Cache (XHR GET)
August 27, 2007

In IE (v: 7.0.5730.11) all GET request are cached. Go figure why.
In order to solve this issue, you can either switch to POST, or add a time stamp to any url you send.
function uncache (url){
return url + “&uncache=” + new Date().getTime();
}

Who made reddit?
August 18, 2007

Today I noticed that Aaron Swartz’s name is missing from the list of those who made reddit. For some reasons I think the name is missing on purpose.
When I read Aaron’s post Office Space, I felt the same as I felt When I read How Software Company Dies. These are the mistakes done every day [...]

Looking at gift horse in the mouth (or Google Reader is missing a core feature)
August 18, 2007

I know they said: don’t look a gift horse in the mouth. Yet, since I have been riding on this horse for so many miles, I feel comfortable to point out few missing features I believe would make this a-grade web application even better.
I could not believe that a *Made In Google* application will miss [...]

10 Years of Rendering Proprietary Vector Graphic Content
August 11, 2007

1997 was the releasing year of Macromedia Flash 2. Since then, GNU/Linux became the most progressive operating system, mySQL is one of the most popular database on earth. Firefox has bitten and beaten IE, and Open-Source software is the hottest thing Intel processors ever calculate. Yet, at this moment, in case my artistic soul has [...]

Calc start date and end date of a given week.
July 16, 2007

from datetime import date, timedelta

def calc(year, week):
d = date(year,1,1)
d = d - timedelta(d.weekday())
dlt = timedelta(days = (week-1)*7)
return d + dlt, d + dlt + timedelta(days=6)

Numbers are passion, Python is fascinating, I am amused
July 16, 2007

The following 4 lines says it all:
x = 2
for y in range(2,24):
… x= x*x*y
… print x, ‘\n’
Watching the generated numbers running on the screen get me so high that I feel I can start writing poetry.
Try it for yourself

Count lines of code
June 23, 2007

import os, re, sys
from os.path import join

rootdir = ‘/’
filter = ‘.*\.js$|.*\.py$|.*\.html$|.*\.css$|.*\.sql$|.*\.cs$|.*\.cpp$|.*\.c$|.*\.h|.*\.java$’

def usage():
print ‘USAGE: python loc.py /<rootdir>’

def loc(fname):
try:
f = open(fname)
return len(f.readlines())
except:
[...]

What is this blog all about?
August 7, 2006

I am trying to find my way in the open-source world. So far, for almost a decade, I did all kind of projects mostly database-driven applications, all using Microsoft tools running on Microsoft servers and desktops.
Even though I was generally satisfied with my achievements, I coudn’t ignore this growing community of smart people who twist [...]