Project Euler – Problem 6
July 6, 2009
Download folder with all of its subfolders using FTP
July 2, 2009
Connect to the host.
[promt] ftp <hostname>
Set mode to binary
ftp> binary
cd to the directory to be download
ftp> cd /folder/to/download/
Get rid of comfirming every transfer
ftp> prompt
Download folder and its subfolder
mget *
Project Euler – Problem 5
June 30, 2009
Ok. I have to admit this took more time in getting there.
I did not want to brute force the answer and I did not remember how GCD is calculated.
I do like that looping – its sort of fancy – but am afraid I wont be using it any time soon, if ever.

Project Euler - Problem 5
Project Euler – Problem 4
June 29, 2009

Project Euler - Problem 4
After a while I had time to play around with Project Euler again.
This is again a pretty straightforward solution. The ruby value from this exercise is that I found ruby does not have increment or decrement operator, which is a departure from C and Java. The argument for this design decision is here.
The only hint I think may be useful for someone just stuck at what looks like a pretty good palindrome is that look at your loop again may be there is a greater number that you never reached because you broke the loop.
By the way, this is a great resource for ruby newbies like me!
Compress a specfic folder using tar
June 24, 2009
Generally a folder is compressed by
tar -czvf archivename.tgz /path/to/folder/
The problem is that when archivename.tgz is untarred the folder structure would be
path > to > folder
For the archivename.tgz to have just the folder and all of its contents, use the -C (change directory) option
tar -C /path/to -czvf archivename.tgz folder/
Why I like bing.com
June 16, 2009
There has been a lot of talk about Bing and after using it on and off for a while, I think I like bing.
Well, it can search.
I have not done a keyword search comparison between Bing and Google but my search experience with Bing has been satisfying. I did not feel that Google with the added information that it gets since am logged in does a better job, which means that bing has a smart way of solving the cold-start problem or Bing has understood that people will search the way they search as if they were using Google, which is trickier than one may think since it adds constraints to an already complicated problem.
I know Microsoft is marketing it as a decision engine, now thats a forward-looking approach which semantically makes Bing somewhere between Google and Wolfram|Alpha. I am not claiming that they are there already or that the users have grown to understand how decision engines work nor is it very clear where a commercial search engine (which by default is google) ends and a decision engine starts. It may be just a marketing trick but its working.
It looks good.
Its very un-microsoft. Now maybe microsoft has changed but the microsoft sites that I have to visit on my day job are always an information-overload-trying-to-sneak-another-application, which is worse since the firm has an across-the-spectrum account with MS and if there was a new product we’d buy it too. MSDN is comprehensive bordering on verbose but since its community-driven, which makes people like me part of the problem, I’ll let it slide. Back to bing, it is refreshing. Since the rise of Google search, theres been a somewhat tacit but widely accepted agreement that a spartan, functional look was the answer to the overdose that is Yahoo. But bing, is neat without being stark. The images on the mainpage are as a rule always interesting but never overpowering. The images have not so subtle showcases about bing’s power and sometimes they can surprise you.
The search results look good. I like the extra-fetch when I scroll over the search result. The extra-fetch blob is clickable, so I can open the result in a new tab right from there with minimum mouse movement. I like that. I dont like the sponsored links because with immediate previous searches & similar popular searches on the left and the sponsored results on the right I get less space for my results!
The name is smart.
Its a small word, pretty accent-agnostic and it has a potential to be treated as a verb. I’ll google bing it. Its smart, maybe far-fetched and would not have crept in if I did not think bing was here to stay.
It could do more, I hope.
I wish there is an option to collate my existing search result with my previous search or a popular search (the ones that show up on the left) which is more than just the result of the putting all the keywords in the search field. Something like google squared but better.
The Forever War – Dexter Filkins
June 15, 2009
This is the kind of book I have been dying to read. Its unbiased and yet
ambiguous.
The New York Times reporter for Iraq has shared the time he spent in Iraq. His writing has no agenda, it has his opnions, but this is not muddled by the washington rhetoric, its beyond the fake righteousness of the right and past the loopiness of the left.
His writings are one man’s struggle to understand the obsfucating greyness that is Iraq today. The book is a collection of essays, mostly in chronological order, tiny tidbits compared to the articles that are printed everyday in newpapers. They are stark portrayals of a troubled people in a troubled land. But the style of writing has a jaded resignation, like the author expects to get up any moment from this hellish nightmare. I think this is the ultimate journalistic benchmark. To pretend to be unaffected such that the reader has to ask: ” Is this happening somewhere in the world right now and all I can do about it is read?“
There are strikingly honest descriptions of soldiers and terrorists. How the policy and fanaticism has faded in the background and these people are trying to survive a war, all sides trying to outlive the other. Kids, american and iraqi, lost to the madness of a civil war; forever.
I have little respect for conventional journalists, especially the american journalists seem too complacent with their own 20 second sound-bite or the 200 word op-ed, but this is radically different. This is bold, genuine and unapologetically thought-provoking.
I LOVE TRAINS
February 23, 2009
from http://dave-h.com/
There are 4 kinds of people
January 11, 2009
Those who read
Those who read to write – am here!
Those who write to read
Those who write
My Name is Red – Orhan Pahmuk
January 2, 2009

My name is red
I like the way Orhan Pahmuk thinks. Alas, some play in the way he writes may have been lost in translation. But this an interesting read. The style of writing is different from Istanbul. And if it wasn’t set in the same city I would not have guessed that its by the same author.
Its like a Sherlock Holmes mystery written as an intertwined James Clavell tale set in a medieval Ottoman Cluedo game.
Took me 10 odd pages to get an handle of the tone. But once used to it, the multiple point of view buildup makes it an impatient read. Theres much more to it than the mystery, with which the book opens. There are tales within tales that sometimes hint and sometimes misguide. I like the formality in speech coupled with chicanery of thought of the players. The wordplay, the deliberate obfuscations, the oriental ‘go-between’ . There aren’t many that can capture of all of that in a first person narrative.