Thursday, July 27, 2006

Good article about job interview

http://jobsearch.about.com/
and
http://www.acetheinterview.com/
Really Helpful!

Monday, July 24, 2006

Running Tomcat

Tomcat is a free servlet/JSP container. The use of Tomcat on Windows does not need installation, so I just downloaded it and unpackaged it on the lab computer.
But there was a problem when start running the Tomcat server. When I ran the server using "startup.bat", there appeared an error saying " JAVA_HOME is not defined correctly, it should point to jdk instead to jre" and " the system cannot find file -Dsun.io.useCanonCaches=false". It was ridiculous for the server to give such an error message, because I was 100% sure that the variable was pointing to the JDK directory. So there must be any other missing in the environmental variable. Was it the CATALINA_HOME variable? I tried but it still didn't work.
Finally I found that the classpath variable was not defined in the windowXP system. I added this variable and made it point to the tool.jar in the jdk lib directory. And I found the tomcat server could be run.
So it's really important to check all the environment variables of jdk to make the tomcat work. But the error message in tomcat server is really misleading!

Wednesday, July 12, 2006

Forgot to use "analyze"

I was really unsatisfied about the performance of my event stream processing engine using Threshold Algorithm. Today, I suddenly realized that I didn't update database statistics after I created the indexes, and loaded some data. As a consequence, database could not use the indexes to optimize the query execution plan.
Statistics can be updated using "analyze" command in PostgreSQL and MySQL. After I executed the command, I'm really glad to see that the performance is twice as good as before!

A good article about DB2 performance tuning

Today I took a look at some database performance tuning techniques, and I got a good series of articles about UDB performance tuning written by Roger Sanders in DB2 Magazine.
The links are:
Basic Performance Tuning, part 1
Basic Performance Tuning, part 2
Basic Performance Tuning, part 3
These 3 parts focus on tuning rules, system configuration and database design respectively, and the content is easy to read and comprehend.

Other sources include:
SQL Server Performance Tuning in SQL-Server-Performance.Com
Database Administration with Weblogic , which I believe focuses on the application design domain. (didn't read it yet)
PostgreSQL Performance Tuning, I'm a little bit familiar with it.
Another Performance Tuning of PostgreSQL, everybody likes free products!
SQL Performance Tuning Using Indexes , it seems that the author has a misunderstanding between clustered index and integrated index. Or maybe it's a product-specific issue.
Best Practice for Tuning DB2 UDBv8.1 in IBM Developer Networks.
Getting Started with DB2 Application Tuning, it contains some sources for other technical papers.

Interesting sites:
IBM Information Management Products Training
Oracle Database Site
Oracle 9i Documentation collected by Leiden University
DB2 Magazine
SQL-Server-Performance

Friday, July 07, 2006

Referential Integrity in MySQL

When I work with database products like MS SQL Server, MySQL, PostgreSQL, I have to check the manual very frequently, because the DDL and DML for these products are not exactly the same. Even these statements are universal, it's also hard for me to memorize them all.
User manual of MySQL is not so good for us to immediately get a solution, because there are not many examples and they just provide long, long definitions.
These days I'm working on 2 tables in MySQL which need referential integrity. The statement is too long for me to recall, so I just put it down here for later copying&pasting. The following is a table creation statement which enforces referential integrity to another table:
create table channels(ChannelID integer primary key auto_increment not null, Title varchar(1000) not null, URL varchar(1000) not null, LastUpdated datetime not null, FolderID integer, index (FolderID), foreign key (FolderID) references folders(FolderID) on delete restrict on update restrict);

A source for referential integrity in MySQL: http://www.databasejournal.com/features/mysql/article.php/2248101 .

Thursday, July 06, 2006

First sight at Visual C#

As my laptop crashed several months ago and I have not had it repaired yet, I just do most of my work in the lab. Today I asked the administrator to install the visual C# for me because I would like to play with it and gain some experience with this Java-like language.
The installation process was very very very long (including .net framework, sdk and C# express), like other new products with the "Microsoft" label, although the PC I use has a 3.2 GHz CPU and 1 G memory. It seems that Microsoft can always find the way to consume the hardware resources no matter how much hardware capability has been improved.

However, whenI tried to run it for the first time (again, the first-time run is very slow), I found I really liked it, partly because of its fresh green appearance, just like my blog. After playing with Java for so long, I feel that I'm still fond of the design of the tools from Microsoft. But the price for enjoying developing with Microsoft tools is that you should pay both Microsoft and hardware vendors like Intel first.

This C# Express edition is offered without any costs, which is not usual for Microsoft, who's always trying to sell everything he's got. Anybody who wants to try it can download and install it if your hardwares meet the requirements. Besides, you need to register the product within 30 days. The address for free download is http://msdn.microsoft.com/vstudio/express/visualcsharp/ .
A guy called Bob Tabor provides some video to support the learning of Visual studio products, in the address: http://www.learnvisualstudio.net/ . So, start to enjoy it!

Monday, July 03, 2006

Good article about C# and Java

I just knew that "C#" is pronounced as "C Sharp" in English today. C# is a Microsoft programming product, which I believe is designed by Microsoft to compete with Java. It absorbs a lot of smart features from Java language/platform, which leads to great similarity between these 2 languages. By the way, .NET framework is also similar to J2EE platform.
There's a nice article describing the commonality and difference between C# and Java, which is available in http://msdn.microsoft.com/vstudio/java/gettingstarted/csharpforjava/ .
I always like the capability of nice, convenient GUI design offered by Microsoft Visual Studio products, and I have the feeling that programs written in VB, VC++ are more efficient in run-time than those written in Java on windows platform. So maybe if it's time for me to migrate from Java to C# if C# is really like Microsoft Visual Java :)