Wednesday, July 18, 2007

Gentoo: tip for KDE

Yesterday, I mentioned that I am thinking of gentoo for my office machine and will be planned for later. Wrong! I did it yesterday a while after I posted the article. I admit that I was nervous a little bit because the machine contains many bits and pieces for work. If any of them failed to be migrated, it will cost me extra recovery time.
Then, I thought, "Why not?". It does not cost me loss of data. It only costs me extra work for recovery. As long as, I can bring data back, that's fine.

Things went okay. I backed up most or all of necessary data, and restored them back including pg dbs. My tool for window manager is still KDE. It took me just about a day to bring up. Full blown kde-meta compilation will take longer than that. And, slow.
To make KDE responsive and fast, I do this.

# emerge kdebase-startkde ( for basic kde)
# emerge konsole ( I always need terminal with enhanced control )
# emerge kicker kmenuedit

You can think of KDE with only these three for XFCE, stripped down version of Gnome. Then, build in anything that will be needed. For example, my favorite amarok.

# emerge amarok.

:)

Tuesday, July 17, 2007

Linux: Gentoo vs. Ubuntu

I am a big fan of gentoo. I believe it is the most flexible Linux distribution. My laptops were gentoo. However, in my workplace, I use Ubuntu. My supervisor does not like tweaked solution, and I understand. If I am a manager, I don't want to solve problems harder than necessary. Our deploying target is RedHat AS and my environment is already not matching and it does not need to match. Anyway, my package will be installed with install script. Why not use Gentoo?

I would like to. That is currently a big dilemma. We are pretty busy this summer, but after the summer, let's consider :)

Thursday, July 12, 2007

gentoo on slow system

This is a dilemma. Modern operating system does not like slow system with not enough memory. Let me give my old laptop as an example. This is Celeron 1.1Ghz with 256MB ram. Cache size is 256Kb. First, Windows XP, the mostly used OS these days, can survive barely with fresh install from original recovery CD (Home edition). But, as patches and service packs are added up, getting sluggish. Eventually, fully patched machine will give unusably slow machine. To use this computer, exposing to risk of unpatched status is inevitable.

Second, Windows 2000. Ha ha ha. Unless somebody has a too much time to experiment how long it takes for fully patched with gazillian times of reboot. I don't want to try, but I can imagine myself stuck in this ugly box patching and rebooting repeatedly.

Then, linux becomes the key. However, current ubuntu/kubuntu desktop release will not be happy with 256Mb ram. It will be as slow as Windows XP. We can use debian or ubuntu server and start from there. Light window manager like fluxbox or window maker with small but powerful system monitor like conky will do it. Personally, I prefer fluxbox.

When eagerness to offload unused kernel module or strip down application thanks to USE flags comes into play, gentoo brings serious dilemma. As much I don't want to be stuck updating windows machine, as the same I don't want to be stuck looking at compiling screens.

I can just compile and leave. What if emerge process failes in the middle? Okay, then use the box while compiling. That's what I do. Then, the machine is usable, but not fun. Especially, when emerging, it already lost sometimes half, sometimes fully lost cpu resource. Plus, firefox is slow!!
But, the result will be the cleanest.

The last thing that I want to see is 'update candidate, glibc.'

Wednesday, July 11, 2007

gentoo: ndiswrapper can't find CONFIG_NET_RADIO

I was very interested in tickless kernel for longer battery life on laptop. So, when I saw kernel-2.6.22 on portage, I began to emerge. Although it was 3:00 in the morning, I couldn't go to sleep without finishing the job.

My gentoo system is very slow machine. 5 year-old Intel Celeron (256KB cache) with 256MB ram. Taking so long time for kernel compilation was bothersome especially in sleepy brain. Well, finally finished, (GOSH! forgot to check how long it took. Kernel compile does not leave a log in /var/log/emerge.log )

By reboot, I found two things broken. My sound and ndiswrapper. ndiswrapper 1.44 ebuild was complaining CONFIG_NET_RADIO. At first, I thought, 'I forgot to visit networking section.' :) But, before menuconfig, grep 'NET_RADIO' .config on /usr/src/linux surprised me. Nothing!!
Okay, if an application is complaining an non-existing CONFIG option in kernel, most likely this must be gone. I found this entry from googling:
http://bugs.gentoo.org/show_bug.cgi?id=179951

I turned on new config, CONFIG_WIRELESS_EXT, and spent compiling kernel in sleepy brain once again, rebooting, touching /etc/portage/package.mask and package.keywords for ndiswrapper, and emerging... And it was solved. modprobe successfully loaded ndiswrapper.

Thursday, June 28, 2007

oracle: data with single quote

When using java, prepared statement can insert string with single quote easily. I tried to achieve the same thing with python. I finally got prepared statement using cx_Oracle, but it was very ugly and unintuitive.
I tried this task with postgresql hoping for a better solution. Things were worse in Postgres. I knew that my favorite psycopg2 does not support prepared statement, yet. But, the rest of the drivers, such as pypgsql and all others that I have researched, were in the same status.

Anyway, I found this this link:
http://catherinedevlin.blogspot.com/2005_07_01_archive.html

Oracle had a different idea. Different quote operator. q'| |'. Like python block quote('''), it relieves single quote when wrapped around it.

Insert into tbl(txt) values ( q'|Hello world's geeks.|' );

Coming back to work after the vacation

Thanks to my second son, Jaron, I had a wonderful vacation. It was the best and the busiest vacation that I had. Actually, I came back early this week. I already spent three business days in my office. I was afraid of the big eagerness of leaving my office, but that wasn't too much bad. I sit down nicely and processed pending jobs.
Programming skills needed time to get up to speed. English was troubled for a while, Korean much more fluent :) I hope my kids pick up Korean first.

Now, the good days of vacation is over and the life resumes with an additional responsibility. I don't mind, though. Maybe, Jake will object?

Thursday, June 7, 2007

my new family.

On May 26th, 2007, my second son, Jaron, was born. Having paternity leave now. Yeah~~~. It was the same hospital, the same level, but the room was the other side of hall as we were there two years ago. Funny thing is that not my wife but I am having emotional fluctuation mostly toward happy side with a little bit of tears ( Shame on ME, a man with tear! )
Anyway, his first image brought a deja-vu. He looks exactly the same with my first one, Jake. When getting a chance, I want to show pictures of my sons side by side. My wife and I took a picture on purpose when we put Jaron in the baby basket for the first time. We successfully took the same angle, the same pause, but in different clothes two years ago as we took Jake. If somebody sees these pictures side by side, 'Hmmmm,... Why did you change baby's clothes on discharge from the hospital? Were you guys bored enough?'