home | news | contact | about
New Looks~
11 April 2009 posted by John
At last the site's new layout is finally finished. It has taken me quite sometime to actually make an effort changing the layout, experimented with css, a little bit of head scratching, and now here it is - a brand 'new' look... But in the end it feels like nothing has really changed. What actually happened is, the site's hosting was changed recently due to some issues with the previous one, and I thought that it would also be nice to do some sort of site-spring-cleaning as well. The result is as you can see, similar bluish gradient at the top, just slightly shorter, and a widened viewable content area, making some of the quite lengthy articles somehow appear less lengthy... Of course there are some other changes too. The first one is a new commenting system implemented for every article and news entry such as the one you are reading now. Hopefully this will encourage people to give their thoughts, give suggestion, and point out errors. The second one is a contact page for people to give feedbacks regarding other stuff such as site suggestion and bugs reporting. If you do find one, I kindly ask to be informed of it. Among other things, there are some new and old materials laying around but not yet ready for publishing. It is my intent to get back into the drafts and start putting in new materials online as soon as my free time allows me.

Are you new to the site? Although it shouldn't be much a mystery to figure what the site is about, there is actually a page dedicated to do the explaining. It is in the about section if you care to read.
4 September 2009
Quicksort probably is the most used sorting algorithm than any other, thanks to the relatively simple implementation and yet has great performance on a variety of input datas. That doesn't mean there is no shortcoming though. Quicksort is recursive, not stable, and fragile: which a small implementation mistake can go unnoticed until a spectacular disaster happens. On average quicksort does N log N operations for N number of elements, but on the worst case scenario it takes N^2 operations! Sometime programmers choose shellsort over quicksort due to the possible exploitation of its worst case of N^2 operations, or the effort of making sure correct quicksort implementation just cannot justify the application - especially when the sort mainly processes only small amount of input data. Quicksort however does outperform shellsort up to 10 times more for huge number of elements.
17 July 2009
Shellsort is actually a simple extension for insertion sort. The primary difference is its capability of exchanging elements that are far apart, making it considerably faster for elements to get to where it should be. For example if the smallest element happens to be at the end of an array, with insertion sort it will require a full array steps to put this element at the beginning of the array. However with shellsort, this element can jump further instead of just one step a time and reach the proper destination in less exchanges.
17 July 2009
Ahh~ the elementary sorting algorithm that is actually worth using. Although its improved cousin shellsort is better (actually *much* better), insertion sort excels when it comes to how much effort is needed on implementation. That is a given really, in fact insertion sort is the basis for shellsort so it has to be simpler right? Now if it tickles you to jump directly into shellsort, I'd like to remind you shellsort is quite complicated for an elementary method and can be confusing without prior knowledge of insertion sort. Give insertion sort some love shall we? I'm sure this will be an act to be appreciated very very soon.
17 July 2009
Selection sort is probably the easiest sort to remember and implement - arguably even simpler than bubble sort. It works as follow, first find the smallest element and swap it with the first (left-most) element. If the smallest element is the first element itself then nothing happens. Secondly find the smallest element starting from the second element and swap it with the second element if necessary. Do the same for third, fourth, and so on until you reach the last right-most element which should be automatically be the biggest element. Sounds complicated? Don't worry, if this is difficult to imagine you can check on the following applet to see it in action for yourself.
17 July 2009
Often taught as introductory material in classes, bubble sort is an elementary sorting algorithm that relies on brute force. The algorithm works in a way that it keep passing through the array of interest, exchanging adjacent elements if necessary, and when there is no more elements exchanged, the array is sorted. This algorithm is now considered as a deprecated method so try avoiding it even for small problem with little elements. There are better elementary algorithms for instance the insertion sort or its improved cousin shellsort.
5 July 2009
Trilinear interpolation image scaling is an extension for bilinear interpolation image scaling and used in conjunction with Mip Mapping. Scaling image with this method requires two reference images of different size where one of it should be only half of the other. The purpose of trilinear interpolation is to interpolate an image not larger than the first image and not smaller than the other half-sized reference image.