Archive for January, 2006

The Search: A Google story

Written on January 29th, 2006 by
Categories: Information Insemination, Nerd Public Journal?

During the previous Aidil-Adha public holiday, I managed to finish reading the book The Search: How Google and Its Rivals Rewrote the Rules of Business and Transform Our Culture. It shocked me myself that I finished the 300 pages book in just 4 days, that by that time I was also busy with raya and stuff too. .

 

Google is a company that for me is unique, in the sense that it was established by the time the internet bubble burst, valued USD 3 Billion in just 5 years, different ways of running the business, and many more to list. It’s the fastest growing company in history, and as for today, the stock price for google is USD 412 per share, a 400% increase in just a year. It doesn’t even hurt it’s founders and CEO that now they are paid USD 1 for their monthly salary (previously it was USD 250,000 per month for the founders) as they can get more by selling fractions of their stock, which valued few billions just for each of them.

It’s interesting to read how the company actually get started, how do they actually run the business until where it is now. Another good read is Paul Graham essays, which is good to open up the mind of some of us.

Initially I was also looking for the book titled The Google Story, but during my 2 weeks visits to both kinokuniya and MPH, it was running out of stock and doesn’t seem to be available in the nearest time neither. Along with the book I also grabbed these general topic and mini books for my light readings:

 

Except for the Linux Pocket Guide that I finished reading in just a day, I’m not sure myself if I’ll ever finish reading the books. Not to mention the other books that are already in my colllection… I’m currently into the MySQL book, and hope to finish it in the nearest time. Gambatte shakir! :)

Happy New Year

Written on January 25th, 2006 by
Categories: Nerd Public Journal?

In just a month, we Malaysians celebrate 3 new years; based on the Gregorian, Chinese and Hijri calendar. Chinese New Year will be on this 29 January while Awwal Muharram would be on the 31 January. The 2 days CNY holiday that also falls on Sunday will be brought forward to Wednesday, making it a total of 5 days of break. With the previous New Year and Christmas, Malaysia really is a wonderful country when it comes to public holidays. Hooray for that.

This orange is nothing related to CNY but I got this from someone few days back. It’s a special orange as it tastes really good, or perhaps just because the someone who gave it to me was special, but the best part of all, it’s actually an "orange within orange". This photo save my words;

Happy New Year to all…

Subversion with Eclipse

Written on January 25th, 2006 by
Categories: Information Insemination

It has been sometime that I’ve been working with the ecollege project now, and I’ve come to think that I need a meachanism to effectively have a revision history for the project. Previously what i did was to copy the working directory to the backup/revision directory something as the following:

$ cp -r /project/working/directory /project/backup/directory/<date>

It’s not really smart, but I’ve been practising it since I was doing my bachelor degree, and was good enough for assignments that even till now I’m promoting that method for my juniors. Well, at least it’s better for the students than having no versioning system at all where at one time when they screw up with the code they just couldn’t get to the previous working codes. I wonder myself what’s the percentage of university and college students that actually keep snapshots of their works as they are working on it..

Based on reviews and comparisons in the internet, I decided to go with subversion over CVS. Subversion plugin for Eclipse is subclipse and it can be found here. Subversion also has a great online book that have everything to get started, up to the advanced topic. 2 hours after knowing subversion, I’m already good to go with my eclipse + subversion, and here’s subclipse in action on my desktop:


The complete tutorial will be available in my wiki site.

Gentoo Linux on Inspiron 6000 moved, gave birth to wiki

Written on January 12th, 2006 by
Categories: Information Insemination

As the Gentoo Linux on Inspiron 6000 series is longer than expected, I’ve created myself a wiki page, and the guide on getting gentoo to work with Inspiron 6000 will be continued there.

The wiki page will hold the more technical side of me, and this blog should balance it with my other sides..

Gentoo Linux on Inspiron 6000: DRI for ATI X300

Written on January 6th, 2006 by
Categories: Information Insemination

My Inspiron 6000 comes with ATI X300 graphic’s chipset, and some might come with intel graphic’s driver, depending on how do you customize your order.

Starting from Radeon 9200, ATI had closed it’s graphic chipset’s specification, making it hard for linux developers to develop drivers for it. Users with later models will onlly get 2D acceleration using the normal drivers.To get DRI and/or 3D acceleration to work, I’m aware of two options:

1. get the open source driver from r300.sourceforge.net, or
2. use the proprietery driver from ATI itself.

Though naturally I would promote open source, but since the r300 project hasn’t come out with a stable release yet, and installing the proprietary driver with gentoo is a snap, I go for the later option. Gentoo portage system make things really easy when it comes to installing packages;

1. Configure kernel: Kernel configuration need to be as the following

Loadable Module Support --->
[*] Enable loadable module support
[*]   Module unloading
Processor type and features  --->
[*] MTRR (Memory Type Range Register) support
Device Drivers --->
Character Devices --->
<*> /dev/agpgart (AGP Support)
<*> Your_AGP_Chipset_Here
[ ] Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)

2. Emerge/install the ati-driver

# emerge --sync
# emerge ati-drivers

3. Switch to the ATI OpenGL libraries

# opengl-update ati

4. Configure

fglrxconfig

The fglrxconfig will ask for questions regarding your system, and in the end it’ll produce the /etc/X11/xorg.conf. Here’s my xorg.conf file just in case you couldn’t get yours right.

If thing goes well, we should get "direct rendering: Yes" when running the glxinfo command;

# glxinfo | grep rendering
direct rendering: Yes

Optionally we can test the performance by running glxgears

$ glxgears

GCC 4 in Gentoo

Written on January 4th, 2006 by
Categories: Information Insemination

Last weekend I managed to try GCC 4 on my Gentoo box. My inspiron 6000 comes with Pentium M, but with gcc version of <3.4, I can only use pentium3 optimisation flag instead of pentium-m, whic is not very nice. My Pentium M 1.86 outperforms Pentium 4 2.8 (ht) by 40% in a test program compiled with pentium3 (my laptop at that time) and the Pentium 4 desktop compiled the same program without cpu optimisation. Later when we tried it with -march pentium3 and -march pentium4 respectively, my Inspiron 6000 + gentoo was just 3%-5% slower than the Pentium 4 2.8 running SuSe :) That gives the idea that this is not just for fun but might as well give performance benefit at the end. Driven by that, I wish to see if my machine can outperform the much higher clocked Pentium 4 when compiled with gcc 4 and get the pentium-m flag to work.

Methodology:

Currently my gentoo is installed with GCC 3.3.6. With gentoo upgrading the compiler and glibc was easy. First of all, unmask the to be installed gcc and glibc version.

#echo "~sys-devel/gcc-4.0.2 -*" >> /etc/portage/package.keywords #echo "~sys-lib/glibc-2.3.6 -*" >> /etc/portage/package.keywords

Sure, we’ll need to emerge:

#emerge binutils glibc gcc

Next up, choose the gcc version that we would like to use.

To get the listing of available versions:

#gcc-config -l
[1] i686-pc-linux-gnu-3.3.6 *
[2] i686-pc-linux-gnu-3.3.6-hardened
[3] i686-pc-linux-gnu-3.3.6-hardenednopie
[4] i686-pc-linux-gnu-3.3.6-hardenednopiessp
[5] i686-pc-linux-gnu-3.3.6-hardenednossp
[6] i686-pc-linux-gnu-3.4.4
[7] i686-pc-linux-gnu-3.4.4-hardened
[8] i686-pc-linux-gnu-3.4.4-hardenednopie
[9] i686-pc-linux-gnu-3.4.4-hardenednopiessp
[10] i686-pc-linux-gnu-3.4.4-hardenednossp
[11] i686-pc-linux-gnu-4.0.2

The one marked with an asterisk is the one currently used. Now, choose the desired version:

#gcc-config i686-pc-linux-gnu-4.0.2

and then rebuild the whole system..

#emerge -e system && emerge -e world

Don’t forget to also change the cpu type in kernel configuration to pentium-m, and we’re done. Ah yes, do re-compile the kernel..

Results and Discussion:

Many programs failed to compile during the emerge -e world. gcc 4 is more strict when it comes to adhering to the letter of the C/C++ specifications, and that might be the reasons for some kde package and ati-drivers, among many others, failed to compile. As some of the failed to compile packages are essential packages, I chose not to go on with gcc 4.

I need to switch to earlier version of gcc and hope everything to work as normal again. As pentium-m flag works with gcc 3.4 and above, I fall back to gcc 3.4 instead of the original 3.3.6.

#gcc-config i686-pc-linux-gnu-3.4.4
#emerge -e system && emerge -e world

Things compiled flawlessly. I couldn’t find the original program that we used to benchmark my laptop and the other desktop previously, and so I just test if the flag and gcc really boost some speed with glxgears. It managed to get the gears to rotate at 1900+ fps on average, as previously it was only rotating at the average of 1800+ fps. 100 fps (frame per second) increase is not so bad after all.