Friday, May 29, 2009

awesome

I just saw this new facility in blogger where I can write in any language

నేను తెలుగు లో రాయగలను , ಕನ್ನಡ ಗೊತ್ತಿಲ್ಲ . हिन्दी हमारा जातीय भाषा हैं। :)

Writing complex code

Ok. I came across one such complex code -

Requirement:
Given an output log from a process which contains temporal information. Based on this temporal information, data need to be split and kept it in temporal directory structure. So, essentially, you have the data which contains when each line is generated and the data needs to be split and kept in directory structure like year/month/day/hour/filename.1 for 15 mins filename.2 for 30 mins worth of data and so on.

here is complicated version:

Have three threads - one is main thread , second thread creates a file for every 15 mins in above structure and third closes files created by previous thread. And the main thread reads each line from input and call write method. the stream handler will be modified by second thread for every 15 mins to point to new file. and will move the previous handler to queue and that is taken by third thread and closes it!!!!

here is simpler version:

for each inputline
check out the date
if it is with in minute domain write to same file
else close the previous file if any opened and create a new one
write inputline to output

close finally if there is any opened stream handler

Wednesday, May 27, 2009

Getting lazy day by day-No more

After my parents had come to Bangalore, I am more relaxed and getting lazy. My mom thinks that I am working too hard and so she never let me cook anything when she is here. :) Yesterday my mom went to my brother's place and it became my brother's duty to get food for us. :) I am sure that I am getting lazy and It might take time to get adjusted again once they go back to my hometown. :(

Huh!!I don't know at what time I started writing this blog. I wrote the above lines on 27th. And just after that minute, I got lot of work from here and there and finally, there is no free time. But this time, it is office work!!

Wednesday, May 20, 2009

Two Birthdays in a year

Can it be possible for any one to have two birthdays a year. ok. Don't think too complex. It is possible. I have two. One is my actual birthday which is in January and one is official birthday which is today. :) And I always forget and I get mail from IITK Alumni wishing me then I realize "Oh. Today is my birthday. :)"

There is a long story behind this. In short, my DOB changed twice in my school once for writing some Govt entrance exam in 4th Std and once for writing 10th class exams. I am elder to myself if I compare my official birthday with my actual birthday.

Tuesday, May 19, 2009

Silly interviews

Some of older memories:

During Microsoft interview:

Interviewer: which operating system you like most
Me : Linux
:))

During Yahoo interview:

Interviewer: What is your dream company - this was not part of interview..this was some casual chat I had with a manager
Me: Google!! :)) :))

Define data mining expert

Studying data mining and Machine learning as one of my course in IIT, when some one says they are dataminig experts- I assume them that they are very good in coming up with trends using some of machine learning techniques. They know what Association Rule Mining, Clustering, Classification mean.

But, in some places where they are not exposed to above, they assume data mining expert mean doing ETL operations and database partitioning/sharding etc..etc..!!!
I feel like shouting at them that this is not what it meant!