Monday, September 25, 2006

I got here several times

I got to this page several times to write something new, but unfortunately each time I would get distracted by something else. This blog now looks like a toy that a kid grows out of. No, don't worry, I still love blogging and it's something I am passionate about.



While I am here, I might as well tell you that the second edition of the Dragon Book is out. I have admired Al Aho and J D Ullman all my life. I can't wait to get hold of the Indian Edition of the book.

Friday, August 11, 2006

My first Wiki Page

You might think that I have been up to no good these days; not updating my blog recently. I have been caught in a maze of work and studies. While, I did do a lot of things I want to blog about, I'll start by telling you about my first Wiki Page about the Linux ABI

Read it, enjoy it, complain about it, comment on it or update it. You have full control!

Friday, July 21, 2006

Blog outage and other updates

Blogspot has been unavailable in India since the last few days. I called up Airtel to find out when access to blogspot will be allowed again. I was told that "the site has been indefinitely blocked".

My growing frustration got me to look into Yahoo 360. I was pleasantly surprised with the blogging facility. I could post formatted HTML and it came out very nicely. As an experiment, I have uploaded my first python program. The really cool thing is that with every post, it is also possible to setup a mini-poll and see what people think.

Please visit my Yahoo 360 blog and give feedback. Through the poll and otherwise.

Sunday, July 16, 2006

First major contribution to the Linux Kernel

The code is now in linux-2.6.18-rc2 the feature is called per-task delay accounting. It gives me my first set of copyrighted files in the Linux kernel, download -rc2 and open up kernel/taskstats.c, include/linux/taskstats*, Documentation/accounting/getdelays.c

The Documentation/accounting directory has a lot of details on how to use and extend our feature. The review processes was very informative, learning and entertaining.

If you are interested in seeing how the review happened, the process, let me know and I'll post the relevant URL's. In case you are interested in what's happening in the Linux Kernel front, Andrew Morton gave a talk at OSDL Japan, about the new features and their current status.

Wednesday, July 05, 2006

Learning a new language

I am usually faced with a problem while trying to learn something new, specially if it is a new computer language. The problem is that some basic language concepts and constructs are very obvious. What I am usually interested in is -- to become productive in the new language as quickly as possible and avoid learning things I already know. I have been trying to put together a language learning template. Here's the first draft of it

Phase 1

  1. Learn simplest form of I/O (learn how to accept user input and display output)
  2. Learn how to write comments
  3. Learn about numeric types and numeric operators
  4. Learn about strings and arrays
  5. Learn the basic constructs of the language like if, while, for
  6. Learn about strings and arrays
  7. Learn about functions, classes, error handling
  8. Learn about simple File operations (open, read and close)
Keep Phase I as simple as possible. Try the simplest of examples to learn the jist of the language.

I am still working on what one could learn in Phase 2. I would appreciate comments, suggestions to make the list complete. Phase 2 is very language specific and its hard to come up with a good list of things to learn. I'll probably pick a language and see if I can follow Phase 1 and come up with a template for Phase 2.

Monday, July 03, 2006

Simple C tidbits (tasty morsels)

I cam across the term tasty morsels in the book Expert C Programming: Deep C Secrets by Peter Van Der Linden. I have been thinking of accumulating them myself, the challenge is to avoid duplicates and keep them interesting

My friend Phani Babu asked me a simple question

"Can we declare static variables in a struct, if no why; if yes where will it be stored?"

My answer was

"We cannot from what I know. struct is a data type declaration keyword, specifying storage might not be acceptable there. But the case for c++ is different where you can have static variables in the class and later on define them outside with the syntax [type]: [class]:[var] [= value]"

The requirements for both languages are clearly different. C being a structured language had no support for methods within a structure or a class. With the addition of classes came the concept of instances of a class. With instances came the need to share data across instances. This could be done using global variables, but it would be ugly. The solution was to allow shared per class data across instances.

Any add-ons will be credited and appreciated.

Sunday, June 18, 2006

Finally they seem to be held together

My bookshelf

The latest addition to my geekdom. It is a good well balanced, self contained beauty. Its decorated with my first love, come by and admire it!


Tuesday, June 13, 2006

Google Earth for Linux


Google earth for Linux is available for download . Beta 4 looks pretty impressive!

Thanks to Riaz for bringing this to my attention

Sunday, June 11, 2006

Books I want to buy

The first one is called Performance by Design. It looks like a really useful book for any computer programmer. Its a bit expensive (in terms of Indian currency), but I can't wait to buy and read it.













The second one is called Digital Typography. It explores the relationship between computers and typography. Again, its a bit expensive, but on the top of my buy and read list.

Tuesday, May 30, 2006

What's new and geeky on the web (30 May 2006)

  1. Jeff Ullman has put up new lecture notes on Advanced Compiling Techniques
  2. Chirstos Papadimitriou is working on an undergraduate book on Algorithms. Here is the preview
  3. Stroustrup has an article on Specifying C++ Concepts
  4. Bruce Eckel Interviews Software Luminaries: Thinking in Code
  5. Ronald L Rivest has an interesting set of links for cryptography
  6. Bruno R Preiss's collection of Data Structures and Algorithm keeps growing (PHP, Ruby, etc)
  7. Ulrich Drepper has an article on SELinux Memory Protection Tests
  8. Greg Kroah-Hartman has announced a new Linux Device Driver Kit
  9. Scilab has announced version 4.0

Think your stuck with a problem?

There are several ways of creatively solving problems. Here's a list of interesting links

  1. http://www.mycoted.com/Category:Creativity_Techniques
  2. http://www.arachnoid.com/lutusp/crashcourse.html
  3. http://www.winwenger.com/mind.htm
  4. http://www.cpsb.com/resources/download.html
If you've got any interesting links, send them across and I'll add them here

Sunday, May 28, 2006

New web page (work in progress)

I am also trying to setup a web page at http://bsingharora.googlepages.com/
I plan to use it as a support site to this blog initially. The site would contain supplementary material, source code, papers, etc

Saturday, May 27, 2006

Picasa on Linux

Picasa for Linux is available from google labs. Wow! way cool. Now I can edit and upload pictures from Linux itself (isn't that way cool)



The interesting part of the Linux distribution is that it runs on wine.

What are you waiting for go? Download it!

Coke -- No more!

I am a big fan of diet coke and diet pepsi. I made the mistake of trying to chill my diet coke by putting it in the freezer. Why a mistake you wonder - look what happened



Yes, the cans exploded (almost ruining the freezer). Surprisingly, there is nothing on the can that says "Do not freeze"

My theory for what we saw is simple

The water froze, causing the gas mixed in the water to pressure out and explode the cans.

If anybody else has a better theory - I am all ears

Friday, May 26, 2006

Now, it might be Linux's turn

The TCP Compound patch talks about a Microsoft research technical report from which the idea is being used. Don't know if it will get in, but its interesting to see ideas being shared.

Tuesday, May 23, 2006

What have I been upto in pictures (Quiz)







These pictures show you what I've been upto today. The first person to guess it correct gets a treat from me (if you live in my city), else you get credits for getting it right. Seriously, it is not that hard. I need complete details of what I did, the more complete the details, the higher your chances of winnng and FCFS of-course (you win because you came to my blog earlier :-))

Hint: I am not violating any license agreement and the pictures themselves are links

Friday, May 19, 2006

Smart Browser Client Applications

I have almost migrated to using only Linux. Some of the biggest challenges I face with the migration are

  1. Web Browsing
  2. Multimedia
Firefox and mozilla did solve the first problems for me ages ago. I was recently frustated with my internet banking. My problem was

It worked well with all browsers on Windows (including firefox) and it just would not work with firefox on Linux.


Message from internet banking

After debugging the problem for a couple of hours (thanks to the built-in javascript debugger that comes along with the mozilla suite). I finally figured out the exact cause of the problem. The problem was that the banking js code was trying to be smart in trying to support browsers.

If you have the same problem, then add the following code to your $HOME/.mozilla/firefox/.../prefs.js

user_pref("general.appname.override", "Microsoft Internet Explorer");
user_pref("general.appversion.override", "4.0 (compatible; MSIE 6.0+;
Windows NT 5.1)");
user_pref("general.platform.override", "Win32");
What these preferences do is that they change the navigator.appName, navigator.platform and navigator.appVersion returned by the javascript code running in the browser.


Login screen visible after making the changes suggested above

If you think of this as hacking, please read Forget Your Password: Be Google
for a very tempting hack.

Disclaimer: I do not advocate hacking for illegal purposes, hacking is supposed to be harmless, fun and learning experience.

Interesting links

Here are a couple of must read interesting links (especially if you are fond of India)

Software for palaeograpy of Indic scripts (I met Harald at FOSS.IN, where he happend to mention the the same thing). I found the project to be really cool!

I got a linux kernel trend URL from Jaya Kumar. Also, check out the Processor (AMD, IA-32, IA-64, PowerPC, Xeon Trends. Isn't the trend analysis amazing?

If you are found of Photography, visit Sanjay Arora's work at flickr. Also check out Beyound Shotz.

I hope you love the links. They have been collected from other blogs I read of the internet, I hope you find them worthwhile.

If you like the concept, I can do this more often

privacy

Some of the policy from the app automation refers to https://rclone.org/privacy/ if you are a general blog reader, follow Google's polic...