Category — Daily life
Knuth Arrives at the Palakodetys’
Right, the greatest CS text in the world has graced the our house and our family is sure to churn out computer scientists for the next few generations.
If you still haven’t guessed it, I have purchased the first volume of “The Art of Computer Programming” by Donald Knuth, professor emeritus of the art of computer programming at Stanford University, receipient of the Turing award, creator of TeX and what not.
The book I have is a low price edition (the benefit of living in Asia) and hence I could get the greatest text of the century for a mere USD 10.6 .
The book is a masterpiece and I couldn’t help figuring out the enthusiast Knuth was. Right on the first page I saw:
“This series of books is affectionately dedicated to the type 650 computer once installed at the Case Institute of Technology, in remembrance of many pleasant evenings.”
I still don’t have volumes 2 and 3 and I will get them soon.
I was worried at first whether I would be able to understand the contents but it turns out that all I need to know to begin using the book is “in my head”.
Here are a few pics of this masterpiece.
Another pic:
Yet another pic:
Its adventure time. I have an ebook on algorithms by Umesh Vazirani but its just so much fun to be able to hold a book and read it.
June 19, 2008 3 Comments
College
I was solving sums from something I found on the webpage of the Berkeley Programming Contest (the sum does not belong to the PSets of the Berkeley Contests). I am pretty bored now and I intend to do something different (the only things I can do are code or sleep). My dad thinks cool posts on the government will land me in jail or something, so thats out of contention. Praising MS is well… stupid on my part. I have not evolved to consider Vista as an alternative to Linux and let us be frank, I never will. Vista is just….. let’s say it irritates me. I am just forced to use it for now as taking Vista off will be like pulling the rug from under my family. Anyway, I haven’t spoken about college plans for a long time owing to the fact that I had this inferiority complex since MIT rejected me. I spoke to my MIT EC (I have been speaking to her quite regularly so I no longer look to her as an EC but as a mentor of sorts). Right, I am going to the home of Debian, the house of the largest cluster in the Big 10 campuses, Purdue University - West Lafayette. Right, those who want to laugh or otherwise can.
Anyway, my cousin who just finished his 4th grade has decided to spend a fortnight at our place and seems to be enjoying it ( he loves DBZ and some other BS ). So, I got a few vids for him and left my Debian Laptop for him to play games at gamegecko.com and some other site.
I engaged in the following conversation with him the other day:
Me: Can you code? Do they teach you stuff at your school?
He: I do small things with the logo turtle. Our teacher in school doesn’t teach anything. But I do stuff with logo at home.
I couldn’t help wondering, we need geeks and this is what our schools do? Believe me guys, this kid is from one of Hyderabad’s most posh establishments at the elementary school level. I am left speechless when I discover the trash that school level computer programs in Indian schools are infused with.
I have no idea where to find purdue badges to put on my site…. so site stays sans promotion. Purdue CS hm… sounds cool. Even Philip Greenspun seems to like it.
I have begun reading PhD comics and I seriously hope grad school isn’t like that.
I will continue with posts on code soon. But right now, I need some alternative to that - writing seems to be one and I hope to come up with some cool posts / essays etc.
Well, stay tuned for more code filled posts soon and yeah, I’m a future Boilermaker.
June 3, 2008 2 Comments
220, Anna Salai - Hurdle Cleared
Woohoo, I’ve managed to clear the hurdle at 220 Anna Salai. But let me tell you guys, Chennai can drive anyone mad. Here is what I recollect from my trip (I do not have a camera so no pics):
- We drop in at a 3 star hotel named Dee Cee Manor ( who rates these hotels by the way? 3 stars is like overrating this establishment’s ridiculous rooms/food ).
- The autos suck. Oh yes! Spencer’s Plaza is a cool shopping center and it is about 2 kilometers from Dee Cee Manor. The first auto driver I met said 120 rupees. F*ck, 120 ? For 2 kilometers? Right, I ask the bugger to put on the meter. He says no. The next guy I meet charges me 60. I climb in and realize that auto drivers in Hyderabad are better than most others
- I then purchased two albums I had been dying to get my hands on, Paul McCartney’s Memory Almost Full and the #1 Beatle’s (I spent all my music aware days listening to the Beatles).
- I then go to the consulate and the doors impress me.
- The VO looks at my i20 and scribbles on my DS156 and then says in 1 week, your passport will be with you. Wee ! No questions !
- Then I went to Tirupathi ( no stupid comments on my religious beliefs. My faith is my own ).
- I took a train to the aforementioned location. A marwari family climbed and make a mess of everything, moving people around to accommodate that king sized, 20 member family of theirs. Bah, they kept shouting, put on music at 100 decibels ( and promptly earned abuse from my mother ). I know a marwari family myself and they are bloody educated and know how to behave in public. I still think people in our nation need to understand the notion of Public property and how all citizens are entitled to silence and deserve as much space as they have paid for ( which is limited to one seat in this case ).
- I then realized that Tirupathi wasn’t something I could survive. Did nothing there.
Oh by the way, I solved a problem ( albiet an easy one ) from the YSU-ACM High School Programming Contest - 1991 ( The best I could perform when the silence was under siege by this bloody family) on the way to Tirupathi. Here is the question: http://www.cs.berkeley.edu/~hilfingr/programming-contest/ysu_94.pdf (the inverted triangles sum).
Here is the solution:
#Author: Shriphani Palakodety
#YSU-ACM programming contest
#1991 PSet
#Premature optimization is the root of all evil.
# - Shriphani Palakodety ( 2008 A.D )
level = "To be given"
level_list = []
while True:
if level != "":
level = raw_input()
level_list.append(level)
else:
break
level_list.pop(-1)
def printTriangle(level):
for i in range(int(level), -1, -1):
print "*" * i
for x in level_list:
printTriangle(x)
Done. Expect an increase in post frequency now. Phew, the consulate appoinment gave me nightmares.
June 1, 2008 No Comments
Hatred for Media, Other News
I have observed a trend in the way people greet me:
“You’ve got brothers or sisters ?”
“No. I am the only one.”
“Ah, no wonder you’re like this.”
Right, wtf is wrong with me? I suppose thats some logic that’s escaped me and no amount of intelligence I use will help me figure out the answer.
Anyway, here is a pic of the South Indian film-star Rajnikanth which neenaoffline (it is a guy) showed me: http://neenaoffline.one09.net/crap/rajnikanth.jpg.
Here is what I think of the guy/girl who created that:
Bloody, worthless, IQ-devoid, Creativity-Devoid imbecile, Creep of the First Water, Plagarist. Ripping off Chuck Norris jokes?
If that came from the third class Indian media, here is the best piece of advice I can come up with:
F**k off and die while you guys are at it. I hate the stupid media.
In case you haven’t noticed, most of the stuff Times Now can come up with about cricketers who don’t belong to India: “mind games”. Symonds has shouted at some player, “Mind Games”. Amazing, I have really seen BBC’s website being updated quicker with news about South Asia than Times Now.
Well, I am learning GUI programming ( wxPython as I was told that it looks excellent ) because I am trying to build something and as usual, no details will be divulged till I finish working on it.
I am a bit sad about the decline in posts on my blog but I will find something interesting to post soon. I have not even solved one problem in the last few days and clearly this needs to change. I will come back soon with loads of posts.
BTW, two people on my Twitter followers list, Abhinav and Prani have finished their BTech Degrees. Congrats, in 4 years I am going to get my BS degree too.
May 9, 2008 No Comments
Tech Shows, Nonsense, Code
I happened to read on the BBC that they’ve managed to do a lot of spooky stuff on facebook with an application ( social networking sites are shit anyway ) which brings me to my current topic:
Why do hosts of “Tech Shows” in India look like the channel’s CEO’s friend’s son who needs a job ?
I am seriously pissed by the nonsense that they air on Headlines Today. The nutcase who hosts the show has no idea what he’s bickering about and one common phrase I hear is “This is the next generation of <insert something that half the people won’t care about>”. I remember an episode where he tried to demonstrate a few appliances you could use to record media and he said, “You can save TV shows on this device in all formats like MP3 ( ! ), MPG, WMV etc”. I was stunned as to how the editing staff, the host and everyone else missed that.
Then comes the great “Times of India”, whose staff knows everything there is to be learned. I once read an article some hare-brained guy wrote on software design:
Let us pick a hypothetical case. Anitha bought a CD and she wanted to play it on her computer. But then she realized that there was no way to skip to the next song. This is bad design on the part of the CD (!)
Then of course, who can forget the paper’s coverage of the Mohd. Haneef case where they detailed a list of uses a 320 GB hard drive could offer.
A 320 GB hard disk is very large memory and can act as a Webserver as well
I was like WTF ? I mean why do these bozos take to writing this stuff if they know nothing whatsoever? Why don’t they verify what they are distributing across a few million households in the nation ?
By, the way, I’ve found a few sums from Berkeley’s ICPC qualifier rounds and they seem to have a few decent questions on string manipulation. I’ve asked them if I can post solutions to their problems on my blog and if it goes down well with them, then it’ll be great ! Else, there’s a lot more places I can look at for problems.
By the way, MIT walked away with second place at this year’s ICPC. Sources at the department of EECS have shown concern over whether next year will be as fruitful as this, considering that the programming heavyweight - Shriphani Palakodety won’t be arriving on the campus. When last asked, Shriphani wasn’t available for comment.
Goodbye anyway !
May 2, 2008 1 Comment
A Book on Algorithms.
My Guru and an individual in whose service, I am ready to spend the rest of my life, Mr./ Uncle / Dr. ( I don’t know what he wants to be called ) Prashanth Mohan recommended that I get this cool book entitled, “Programming Pearls” by “Jon Bentley”. I happen to like the warnings the author puts into his book such as, “Boring Material Ahead. Skip to section 4.4 if drowsiness strikes.”. I love the fact the the pseudocode is laid out in such an excellent fashion ( compared so some “pseudocode” I have seen… ). I jumped straight away to the section on “Searching” and realized that I was doing injustice to the writing capabilities of Jon Bentley ( which deserve a lot of respect ).
The only requirements of the book are knowing how to program in a high level language and thats it ! I would recommend that people pick this marvel of a book and add it to their collection ( although looking at the popularity this book seems to enjoy in programmer circles, you might already have it in your collection ).
Oh by the way, I am working on something extremely useless but its a top-secret mission of mine and I will write about it later.
Got involved in some fight with a bunch of “elites” from India’s “elite” engr. college ( no need to ask ). I happened to mention that I liked CS a lot and the discussion veered to something more unrelated to the field such as the methods institutions chose to fill their computer science classes. I mentioned that those who had programmed should be given first priority because the guys would have had *some* idea about process. I realized that I had made the biggest mistake of my life then and there. What followed is:
elite_guy: CS is not about coding. If you want to code in college, why not take those IT courses that are abundant in this nation.
Me: I know what CS is, I might not have a paper which certifies that I am a Computer Scientist, but I have a fairly good idea of what CS is.
elite_guy: CS is about math.
Ah, the classic statement. Like I never knew.
Me: I know it is about math but its basically imperative knowledge of math as opposed to declarative knowledge.
elite_guy: It is declarative knowledge
elite guy links me to SICP.
There are only two conclusions I could come to with that statement:
- The guy skimmed through the book, encountered the words declarative and imperative and felt happy enough to throw them in without knowing what Prof. Abelson intended to say.
- The guy was not interested in getting what he said, right. His aim was to somehow contradict me, even at the cost of speaking the right thing.
By the way elite_guy is just some stupid nick I could come up with. I didn’t want to stain his reputation by directly mentioning his name.
Got to go and work. Goodbye !
April 26, 2008 3 Comments
New Tablet PC
Right, I am blogging from a brand new HP Tablet PC running Windows Vista - and I will continue to run Vista on it till I get a Ubuntu CD because I have exhausted all my bandwidth and can’t afford to download more ( We’ve got the world’s worst ISPs - they have no idea what their Linux authentication client looks like but they seemingly offer “24 x 7 Linux support” ).
Well, I am not too sure what to make of this PC but I can confidently say that AMDs run bloody hot - just too hot. For instance let me point out my ancient acer travelmate 4500 with 256 MB RAM and 1.6 GHz Intel Pentium M processor. The thing is as silent and the fan only goes whrrr… when I happen to watch flash videos in Mozilla IceWeasel ( from what I hastily gathered a few months ago, IceWeasel was FireFox without its icons but do correct me on this. IceWeasel is turning out to be a PITA since the last few updates ).
The keyboard’s OK and I can’t seem to be able to write anything with the pen but I am not too sure why I need to use it. I currently have this thing set at Maximum Battery life and the fan seems to have silenced.
Anyway, Vista seems to be ok but since I am practically logged in as root all the time on my Debian lappy, I have to get used to it asking the admin whether he really has any intention of changing his network settings ( please don’t comment on how dangerous it is to run as root all the time as those speeches happen to bore me. A true sysadmin always logs in as root
).
Setting up my favorite language on this pc:
Troubles all round.
Python’s website says that the amd64 package is to be used to install Python 2.5. I asked it to install the msi package and it told me something about wrong processor. Turns out that the package marked neither as w32 or 64 is suitable for installing it on my box. Oh well done.
The bright side is that I can finally see a powerful IDE in action ( I am using eclipse which doesn’t really run, let alone fly, on my acer Travelmate ).
I was looking for a tool like Glipper for Windows as I find it extremely hard to do anything with a clipboard that doesn’t have history. I found something called Ditto. It seems to be doing its job very well so I am quite OK with it.
I am still waiting for the Ubuntu CDs to arrive…. going by my experience during the the days of Feisty Fawn, the people at Launchpad take a good 6 weeks to send in those CDs.
BTW, I have taken up a few interesting pragmatic programming ideas and I will blog about them soon. Oh yeah, as my tweet says ( as of 4:04 pm IST ), I have received my rejection letter from MIT and I have scribbled all over it. To think, till a minute before the results, I was dreaming of working on the Semantic Web under prof. Tim Berners Lee and would have given two limbs to be there…… Oh stuff it.
If there’s one thing I suck at, it is ending blog posts, particularly posts like these.
March 27, 2008 2 Comments
Update…
Lots of stuff happening in the past week. Let me begin with that news which should come as a blow to storage enthusiasts. The HD-DVD format is going forever. Toshiba says it will no longer create HD-DVD players/records. Now, I liked the HD-DVD format for its ECMAScript support. Well thats over. Then the US blew up a satellite, China’s pissed and wants to know more about the mission, my board exams are getting closer ( bleagh! ). Anyway, here is an update on my “work” in the past week.
Oh BTW, while solving a question related to the Fibonacci sequence, I found a supercool formula - the Binet’s formula. Let the greatest integer function be represented by “[]”
f(x) = [x]
let F represent the Fibonacci sequence. The Binet’s formula states that
F(n) = [{(1 + sqrt(5))^n}-{(1-sqrt(5))^n} / (2^n * sqrt(5))]
There ! Now you can solve that Fibonacci problem in the project euler archives.
I solved another sum. Here is the question:
Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a ? b, then a and b are an amicable pair and each of a and b are called amicable numbers.For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore d(220) = 284. The proper divisors of 284 are 1, 2, 4, 71 and 142; so d(284) = 220. Evaluate the sum of all the amicable numbers under 10000.
Here is the solution:
#!/usr/bin/env python
#Amicable numbers
def makeFactors(number):
factor_list = []
if number % 2 == 0:
for i in range(1, number / 2 + 1):
if number % i == 0:
factor_list.append(i)
else:
continue
else:
for i in range(1, (number + 1)/2):
if number % i == 0:
factor_list.append(i)
else:
continue
return factor_list
def checkAmicable(number):
factor_list = makeFactors(number)
factor_sum = sum(factor_list)
new_factor_list = makeFactors(factor_sum)
new_factor_sum = sum(new_factor_list)
if new_factor_sum == number and factor_sum != number:
return True
else:
return False
amicable_list = []
for number in range(0, 10001):
if checkAmicable(number):
amicable_list.append(number)
else:
continue
print sum(amicable_list)
Thats it for now, goodbye !
February 22, 2008 1 Comment
Back to square one.
I keep going round and round in circles. I began with perl at the behest of a sysadmin and made the switch to python and then went to perl and then python and thankfully stopped. I wrote two deployable web applications in TG and Django and switched between them a gazillion times before finally zeroing on Django (despite the fact that the design of django itself contradicts my incremental web development style) and then went in a circle with Lisp and Python in April and now I have done it again. After having spent nights writing regular expressions to match patterns in a html file which is 500 pages long ( NEVER USE REGULAR EXPRESSIONS TO PARSE HTML. TYPICAL PAIN IN THE A$$ ), then decided to use pyparsing. Pyparsing’s documentation is as elaborate as the book, “How to please Shriphani Palakodety with horribly written Perl (I admit you don’t need to put extra efforts to achieve that but let us say you spend that extra minute trying to ruin your code further)”. They advertise an ebook that doesn’t have any bloody examples. I had to spend hours reading stupid presentations on the Internet to figure out what was to be done and now I have decided to come back to using orthodox html parsers.
After that long rant, I am once again participating at the GHOP. I have picked task 320 without knowing anything about OpenGL. Lets see how it goes.
January 9, 2008 No Comments
Surprise mail and ideas.
Here is an excerpt from a mail in my gmail inbox:
Hide quoted text -
On Mon, Jan 07, 2008 at 09:31:39AM +0530, Shriphani Palakodety wrote:
> Hello,
> You are my IDOL !!. Every ext2fs utility that I see is made by you.
> There are countless times when debugfs and e2fsck played an important
> part in my “piddling” around with external devices. I applied to MIT
> for a place in the class of 2012 and I aim to be like you.
I’m glad those tools have been helpful for you.
Good luck getting into MIT!!
- Ted
That was a mail from Theodore T’so, the extremely cool maintainer of the e2fsprogs package and one of North America’s first Linux developers. He has like 2 degrees from MIT ( YAY!) and now works at IBM and gets paid to hack on Linux ( in short, gets paid to do what he likes ).
So let’s move on to something else. I happened to see this article on Semantic Filesystems and began thinking about it the entire day. I was trying to figure out the purpose they would serve. I then thought of the now-hacked TWINCLING WIKI (our mistake really). The web2.0 philosophy is more about reaching out using the Web and other nonsense, let us just say one opens up a “publicly editable” content management system - one where without logging into an account, an individual can put content up for the world to see (something like free advertising space - an idea? probably
). Let us say, I install something like drupal and implement FCKEeditor to allow people to throw content on this site. php’s file apis are more or less unix-like. If one gets the weird idea of throwing an “rm -rf” in there and getting it to execute somehow, BOOM!
It might seem easy to recover at first. But beware, once this CMS is removed, there is every chance that the backup is kicked out as well (if the backup is in the same directory as the CMS). Let us just say we had a file-system that knew about this installation and knew where the backups were. Within minutes after the attack, the intelligence the fs possesses should enable it to reinstall the CMS and put all the posts back. This is a better way of doing things than let’s say reinstalling the CMS manually hours after the it has been compromised. Sounds like a far cry, but is possible.
There can be worse situations at times. Let us just say that an administrator has found that a certain movie is taking up too much space on the filesystem(probably the movie is 5 gigs in size). He goes on to delete this file and realizes that no space has been freed. This is because the file will continue to take up space on the drive till the process which opened them is killed. Now that the file has no name, it is much harder to deal with. A filesystem with inherent intelligence should be able to perform the hardkill (signal 9) on every process accessing this file (this process could well be a search application keeping track of the files). Such enormous potential is what intelligent filesystems hold. 5 months till college. I can hardly wait.
By the way, that tweet over there —> will soon change ![]()
January 7, 2008 1 Comment





