Archive for October, 2007

Different handling of image maps for Firefox and IE 7

It’s interesting to learn that Firefox and IE 7 handles image maps differently. Firefox does not need the # character in usemap="#mymap". While IE 7 requires it. Thanks to James for the explanation and Jim for the example.

Comments (9)

Debugging JavaScript with IE 7

One thing unfortunate about working with JavaScript is the need to debug on major browsers. So, I had to spend some time looking into compatibility issue on IE 7. Fortunately, I found this blog and it was very helpful. So, I installed Visual Web Developer 2008 Express Edition beta 2 and was able to quickly identify the root cause, which was in the difference of data structure representation.

I was disappointed that FireFox and IE would construct different data structure representations. For example, in the array that I am worked with, the data were in index 0 for IE and 1 for Firefox. I also had to use target sub-element within an array element for Firefox to find the data I was looking for, while I don’t needed to use it for IE. As a result, I had to find an IE detection code to add special conditional processing code.

Comments (5)

A second look at Ubuntu 7.10

I just installed Ubuntu 7.10 on another machine. I am disappointed to learn that RAID configuration was not available in the desktop installer. It was available in the earlier releases, specifically 7.04 server. Beyond that, I found this page useful for installing Google Earth and Skype, much easier than this way. I also found wine is easier to install than what I did here. Just got it from universe repository.

Leave a Comment

A quick scan of “The Future of Programming Environments” article

Andreas Zeller’s “The Future of Programming Environments”, provides an high level overview on the current trends of development tools. In this article, Zeller stated that development tools are evolving from extensible frameworks that supports integrated tools and their automation to “automated assistance in all development decisions”. Zeller further pointed out many known techniques that collects data about a piece of code in both static form and during run-time, then apply various automated analysis techniques that leads to visualization, statistics, data mining and machine learning to increase the productivity and code quality.

The paper serve more of a “review” or a “digest” of current trend of tools development than a “research” paper. Zeller certainly stated various recommendations that can serve as “best practices” for developers of tools. I would treat these recommendations as more of “common sense” than “design patterns”. This certainly is a good introductory paper with some interesting ideas and examples on what others have done in the tools space.

Leave a Comment

First impression with Ubuntu 7.10

Yesterday, I installed Ubuntu 7.10. This time, I downloaded the desktop image instead of the server version, which I learned from my previous experience. I was a little disappointed that 7.10 didn’t resolve the kernel/acpi issue that I had on a machine that I use. It’s not a big deal, I’ll just need to continue adding acpi=off to the boot parameter as usual. Besides that, the installation went smoothly just as expected from Ubuntu.

After installation, the first thing that I did was to run Synaptic to add more packages. I did notice the new repository interface, which allowed me to choose additional repositories by check off a few boxes instead of finding them on a web site and past in the URLs. This is a nice touch.

Even with the enhancements for Synaptic, I didn’t notice any visual enhancements that people have been raved about. So, I checked the configuration and realized that it wasn’t enabled by default. So, I suspected it was because that I need to install the restricted video driver for this system. So, I found this howto and this forum that helped me to enable the cool effects with CoompizFusion. I also found some widgets .

How Ubuntu 7.10 handles browser plug-in installs such as flash is also nicely done. Just go to a flash enabled web site and that triggers package download and install at the OS level.

I am certainly impressed with Ubuntu and felt a lot easier to work with it at the first glance than another OS. Yes, gnucash works out-of-box. :)

Leave a Comment

NetBeans 6 beta 1 is more JavaScript friendly than earlier releases

I’ve been using NetBeans 6 beta 1 for a while now. Today I just found out that if I am working on a static file such as a JavaScript file, all I need to do is to redeploy the project to the local server instance to see the changes. No need to rebuild or recompile. This is very cool. I don’t have to wait for the compilation of all that Java code in the same project to see changes in JavaScripts. This saves me a lot of time and I don’t have to go to a command line and do the copy myself. Again, very cool!

Comments (2)

First impression on package mangement on Mac OS X

Ok. I’ve only used a Mac for a couple days, they were certainly long days with many steep learning experiences. Here are some of my comments:

On Mac OS X, you have several options to install an application. You can use pre-packaged binaries such as Universal Binary or a platform specific installable binary for your Intel or PowerPC based Mac computers. This class of binary is equivalent to setup.exe/intall.exe on Windows except this is much better at the first glance. From the user point of view the installation process typically involves double click or click OK/Yes until you are done, which translates to about 3-4 times and this is much shorter than most other installation steps that I am used to. To me, the impressive aspect of installing applications from pre-packaged binaries is the concept of drag-and-drop of a single icon into just about anywhere you want to install the application. Behind that, there are a lot of other complexities that is being abstracted out for the user. That level of simplification is an eye opening experience for me.

Working with installable binary directly by point-and-click your way through essentially means you are managing the application portfolios by you self. This reminded me of early Fedora days when I would go to different application repositories or web sites to download individual rpm packages. Having to manage individual packages you self can become a challenging task. At least, you may loose track of which packages are getting outdated and need to be updated. In the worse scenario, you may need to figure out all the dependencies you self and install them in the correct order. This certainly isn’t the most optimal way to manage a modern operating system. Even with extreme ease of use from UI point of view, I still have to do all the clicking on each package isn’t all that exciting.

Besides the regular installable binary, you can use a package management system, Fink. It provides both a repository for many open source software and a popular command line tool, apt-get, to easily manage the packages. apt-get is a very popular tool among Linux distributions and it made me feel at ease initially. What’s unusual to me about Fink is that it isn’t just a binary package management system, it can even handle install from source code, similar to how the emerge tool from Gentoo. You can configure it to use newer unstable version of the source tree and with a single line of command, you can essentially trigger the system to download the source package from the repository, compile and install the compiled binary in a sequence that satisfies all dependencies. In addition, all software are installed in an isolated directory so they do not conflict with any existing software you may already have. This essentially is the same approach as blastwave.org’s way of manage applications. Fink combines many great designs and features among many modern package management systems and it certainly looks great on paper.

In practice, I found it also suffers similar issues as emerge on Gentoo when you venture beyond the stable binary into unstable source packages. A software package may fail to build. If a such error does occur, the user may have do some heavy-weight lifting to troubleshoot the error. I did tried to build Gnucash and it failed on me. One big difference that I found between Fink and Gentoo’s emerge it it’s community. When I encountered an error when attempting to install or upgrade a package, all I had to do was go to Gentoo’s we forum and past the error message. Most of the time, I would see people’s discussion about that specific error. Many would post suggestions and solutions. Having such “howto” materials available EASILY was really useful, important, and educational to me. on the other hand, my first impression with Fink when venture out to the unstable tree has left me stranded for several days so far. It appears to me that the community activities among Fink circles wasn’t as active as other forums among major Linux distributions that I’ve worked with. So, be careful when you are thinking of turn that switch to unstable tree. I would advice you to do some search for support materials first.

In addition to Fink, you also have the option of Macports, which is a source based package management system. It requires you to download and install Xcode, a free development tool from Apple. Xcode basicly contains gcc compilers, an IDE and utilities that are geared toward developers to write applications for Mac OS X. At about 923MB download size, Xcode certainly makes Macports a much more heavyweight than other package management options. Macports works similar to Gentoo’s emerge command, except you use port command to install applications. One thing typical of a source based package management system is that it takes a lot of CPU cycles to build each application from source. If you don’t mind keeping your computer on and generating heat for extended period of time, such “need” should not bother you much. If you are mobile or have a need to shut down your system form time-to-time, you may wish to plan your windows of opportunities to use Macports. This means less practical for laptop users, who typically have a need to shutdown the laptop from time-to-time.

Furthermore, Macports is only single threaded. This can be both a good thing and a bad thing for dual-core CPU owners. It can be a good thing because you will have the other core doing something else while one core is busy working for Macports. It can be a bad thing if you don’t need to use the other core and wish that Macports can take advantage of all the processing power you have. To me, this is where I wish to see Gentoo’s behavior. Back when I had only one slow core running Gentoo, the system can be 100% busy compiling sorce code while I do my regular light-duty Internet browsing and emailing without feeling any lag. I could even pushed the system a little by watching a video, which normally pushes CPU utilization higher on a slow CPU. The trick that Gentoo did was to set the priority of the activities emerge to low to avoid slowing down any user activities. If Macports can do something similar while multi-thread the compilation process, it will be a lot more efficient, especially with the new quad-core CPUs.

In my short experience with Macports so far, it has failed to install Gnucash and MySQL correctly for me. Such efforts cost me many hours of troubleshooting and searching through the Internet for possible solutions. The out-of-box experience certainly left me underwhelmed when comparing to rest of the OS or even to popular Linux distributions.

Am I bitter? Not at all! This is kinds of stuff I deal with every day and I am learning a lot going through all these hoops. If I don’t try to experiment with all these technologies, or attempt to break it, I won’t know how it works. ;) Even if I end-up not able to resolve some of the issues, I learned to appreciate with a sense of accomplishment when I am able to solve some of these wicket problems or finds a much easier or efficient alternatives. Such as installing MySQL from a pre-build package in .dmg format, than trying to agonizing over the issues when using Macports or found out after the fact that Fink’s MySQL is one release behind what I need. :)

Comments (2)

my.cnf for MySQL

Thanks to to folks at AFP548.com for the tip on my.cnf file. It worked for me beautifully.

Leave a Comment

svn on Mac OS X

Thanks to Martin for the binary

Leave a Comment

Java SE 6 Mac OS X 10.4.5 binary (Intel)

For some reason, Apple pulled the binary. With some effort, I was able to find this thread, which points to this link.

Comments (39)

Older Posts »