Wednesday, December 26, 2007

import this

The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

Wednesday, December 12, 2007

Lovely December

I miss my dog. I don't know what state he is in now. Hope he is well. I loved him. When i used to hug him he used to make affectionate noises. The first time when he was brought to me in a bag, i marvelled at his existence. There was a creature which can think. He stared at me straight in my eye for minutes. He was shivering, more from fright than cold, even though it was a cold December. It was exactly two years before. There is something magical about Decembers for me. It was fun always. This year i am forgetting and and forgiving myself and just enjoying my existence.

Saturday, November 24, 2007

Nelson on facebook

An interesting bit from Nelson Minar on facebook. The day i signed on facebook, i knew that i will delete it very soon. So far i have only invited only two friends to join on facebook because i thought the feed feature coupled with the movie i watched would be interesting to them. I am sorry for my adrenaline.

Wednesday, November 07, 2007

Facebook Ads

So now Facebook is directly competing with Google with its new Social Ads. I like this concept and i wonder what Google will do now.

An interesting quote from Dave Winer
Long-term, however they both have problems because advertising is on its way to being obsolete. Facebook is just another step along the path. Advertising will get more and more targeted until it disappears, because perfectly targeted advertising is just information. And that's good!

Monday, November 05, 2007

Gym

Finally after one year I'm back to gym again. I ran for 1.5kms on the treadmill and was pretty happy about it. Then the instructor took some 7-8 of us and started doing some ground exercises. The guy almost killed everyone. All i could hear was groans and moans :). It was fun. With the help of this instructor and a paintbrush, i intend to become like SRK.


BTW, if you want real inspiration keep Daniel Craig in your mind while doing exercises (suggested by my ex roommate cum drinking partner)

Programming fonts

I use windows at work and use Courier New as the font for programming purpose. (It's the default in eclipse, visual studio 2005, idle etc). Now Microsoft has come up with Consolas, a monospace font for programming purpose. A monospace or a fixed width font is one whose characters have same width. Courier New is one such. A monospace font would look ordered and you can draw tables etc easily because all characters are of same size. Try setting your ide's font to Ariel or Verdana (which are not monospace) and see the difference. You won't be able to code in those fonts. One of the fonts which i loved coding was a monospaced font in Gnome Redhat 7.0. I believe the font was BitStream Vera. Anyway Consolas is the new font which i like in windows and it simply is the best. Try it out. Make sure that you have ClearType switched on. Below are some code in 3 different monospace fonts from my system. (blogger screwed the images totally, so better try it out in your system and see the difference).

Courier New

Consolas

BitStream Vera

Saturday, November 03, 2007

OpenSocial

So Google today released the OpenSocial apis. Funny that the google pages look very similar to facebook developer pages. Google is using the atom format for data exchange. It's time to look inside atom.

Friday, November 02, 2007

past

i ran
i ran with the memories of the past
for the past holds the heaven
and everything else is just nothing
-dog

Battle without honor or humanity

From XKCD
That track ('Battle Without Honor or Humanity') -- like 'Ride of the Valkyries' -- improves *any* activity.
Post Office Showdown

Wednesday, October 31, 2007

Within Temptation

I've been listening to Within Temptation's songs for last two days. Sharon Den Adel's voice feels like Evanescence's and to some extend Dolores O'Riordan's voice.

Here are some of their songs

Angel


Memories


And this is the song that got me introduced to them


somebody point me to more songs like these please :)

Thursday, September 27, 2007

Wednesday, September 26, 2007

Monday, September 24, 2007

substring bites

Last week i copied some string splitting logic from C# to Java and didn't bother to test much. Today i fired up one of the Duet appointments and typed max value in the location field (256) and it bombed! .. after debugging i found
C# substring is - substring(startIndex, length)
Java substring is - substring(startIndex, endIndex)
crap.. Java's is more like Python's where it's called slice syntax - str[startIndex:endIndex]
but we don't have slice syntax in Java or C# .. and i like C#'s better

Friday, September 07, 2007

random

Martin Fowler never ceases to amaze me. I was banging my head over timezone issues yesterday and today morning i see this. He gave Microsoft Office the worst timezone experience award. Interestingly i'm working on the exact same thing for one of the scenarios. I do think trying to be clever might ruin user experience. We have 3 major layers (outlook, java server, SAP backend) with each running in 3 different technologies (.Net, Java, ABAP) glued together using XML and proprietary protocols. The nuances of each of these technologies bundled with the bugs in them makes life a living hell.

I saw The number 23 yesterday. Neo ruined the movie unknowingly :) few years back. I'm also finding number 23 at many places. I look at my phone and its extension is 4739. Add it, you will get 23. Phone displays today is 07.09.07 again 23. My birth date is August 15 (15-08) again 23. My cubicle no is 23! Not so creepy anyway :)

Monday, August 13, 2007

QuakeCon 2007

QuakeCon went by and i didn't even know sigh :(
Id announced their new game Rage. It runs on Mac, PC, XBox 360 and PS3 from the same source base. The major technical feature is MegaTexture where artists now don't need to worry about the texture size and they can make surface as detailed as they want without performance hit.
The major announcement for me was that Quake 3 is going to be made a web game. It's called Quake Zero. Anyone will be able to connect to internet, download Quake Zero client(?) and start playing online for free. They will use advertisement business model. Id is now split into two teams and one team is doing this work. The other team is working on Rage.
You can download the keynote from here.

Thursday, June 28, 2007

Hans Reiser

I try to avoid judging people. I do it anyway sometimes, but when i think it in larger context it makes no sense.

Hans Reiser: Once a Linux Visionary, Now Accused of Murder

Friday, June 15, 2007

Use ClearType!!!

Apple has released safari for windows. So i downloaded and started using it. The first thing which i noticed was the fonts. They were smooth. It brought back memories of Gnome, Microsoft Office 12, Iternet Explorer etc. A little investigation pointed to this post by Joel Spolsky. Next thing i did was enabling ClearType on my XP.
If you are using Windows XP and haven't enabled ClearType, please do it now. The quality of fonts is amazing. You are going to love your coding, reading whatever!

Monday, June 11, 2007

lolcats

I Can Has CheezBurger?

Read the story

and this LOLPython :)

IN MAI datetime GIMME date LIKE DATE

SO IM LIKE FIBBING WIT N OK?
LOL ITERATE FIBONACCI TERMS LESS THAN N /LOL
SO GOOD N BIG LIKE EASTERBUNNY
BTW, FIBONACCI LIKE BUNNIES! LOL
U BORROW CHEEZBURGER
U BORROW CHEEZBURGER
I CAN HAZ CHEEZBURGER
HE CAN HAZ CHEEZBURGER
WHILE I CUTE?
I AND HE CAN HAZ HE AND I ALONG WITH HE
IZ HE BIG LIKE N?
KTHXBYE
U BORROW HE

IZ __name__ KINDA LIKE "__main__"?
COMPLAIN "NOW IZ" AND DATE OWN today THING
IZ BIGNESS ARGZ OK KINDA LIKE 1?
N CAN HAS 100
NOPE?
N CAN HAS NUMBR ARGZ LOOK AT 1!!
GIMME EACH I IN UR FIBBING WIT N OK?
VISIBLE I

Thursday, May 24, 2007

xkcd also?

Choices: Part 4

Previously Part1, Part2, Part3

Dreams

There are dreams. Some for which you would stake your life. Some achievable. Some worth. Some impossible. Some you wish had happened. Some you wish would never happen.
Do i have an advice? maybe no. maybe..
Well, the past is gone, I know that. The future isn't here yet, whatever it's going to be. So, all there is, is this. The present. That's it.

Wednesday, May 23, 2007

Mental Frames

Paul Buchheit writes...
For example, if you are interested in startups, but work in a big company, you are in danger. If you stay there too long, you will be drawn into the big company frame shared by the other "lifers". Startups will all seem too risky, frivolous, or impractical, and you'll spend the rest of your life in that big company (and posting bitter comments on TechCrunch).
Sigh.

Wednesday, May 16, 2007

Patents

Mark Pilgrim on patents...
The patent was original, it was innovative, and it was still shameful.
It’s hard to live up to your principles. If it were easy, your principles probably aren’t worth a damn anyway.

Monday, May 14, 2007

Days go on and on. They don't end...

Saw Taxi Driver this weekend. Twice. And as if that was not enough, it came in TV at night. Coincidence? I've been wanting to watch this movie for quite some time .. make that some years. I guess i saw some pics of this movie when i was in school. Right time to watch the right movie. The music haunts me ..

Wednesday, May 09, 2007

Processes

Guido says
Just because Java was once aimed at a set-top box OS that didn't support multiple address spaces, and just because process creation in Windows used to be slow as a dog, doesn't mean that multiple processes (with judicious use of IPC) aren't a much better approach to writing apps for multi-CPU boxes than threads.

Monday, May 07, 2007

Thursday, May 03, 2007

AACS in limelight again

Kevin Rose writes

But now, after seeing hundreds of stories and reading thousands of comments, you’ve made it clear. You’d rather see Digg go down fighting than bow down to a bigger company. We hear you, and effective immediately we won’t delete stories or comments containing the code and will deal with whatever the consequences might be.

If we lose, then what the hell, at least we died trying.

via Freedom to Tinker

Wednesday, March 21, 2007

Yet another day

So let me start blogging here again. Frankly i have been shit tired of everything. The new year eve was one of the worst day of my life. And what followed was even more worse. I started a private blog, and I'm sure reading it would inspire many people .. but it's private :) ..
I've been watching movies a lot these days. Few of the ones i remember are

Little Miss Sunshine made me think how screwed up other peoples life were.
I loved After The Wedding. I loved the mood of the movie, though towards the end it was not so great.


The Quiet was a shit movie. I watched it for Camilla Belle. I did like her in When A Stranger Calls.

Children Of Men was a disaster. I expected a lot hearing it was a science fiction, but all in vein.


The Illusionist was the last movie i saw. I really like it. Edward Norton is fantastic.

Tuesday, January 16, 2007

AACS is unbreakable

Read from Freedom to Tinker one, two, three, four, five, six, seven