The next sorting algorithm in this series is the Merge Sort. Of the algorithms covered so far, this algorithm comes closest to the Shell Sort algorithm. The reason for this lies in how the comparisons are done in both algorithms: instead of working on the entire array, both the shell ...
read moreSorting algorithms: Selection sort
1000 elements to sort.Sanity check. PHP native sort() algorithm took: 0.002461 seconds. Memory used: 48264 bytesRunning SelectionSort sort. Algorithm took: 0.273260 seconds. Memory used: 48272 bytes1000 elements to sort.Sanity check. PHP native sort() algorithm took: 0.002461 seconds. Memory used: 48264 bytesRunning SelectionSort sort ...
read moreSorting algorithms: Shell sort
Third in the line of posts on sorting algorithms (first was Bubble Sort and the second was Insertion Sort) is the Shell Sort. This is basically a variant of the insertion sort, with the difference that you're sorting the array multiple times. Another way of looking at this is ...
read moreScreen blues
Because I'm freelancing for my previous employer, telecommuting in effect, I've become a big fan of screen. I didn't see the benefit of using the program at first, but when you're logging into a machine with ssh and then have to log into one or two ...
read moreSorting algorithms: Insertion Sort
Second up in the line of sorting algorithms I'll run through is the insertion sort algorithm. It's fairly different from the bubblesort algorithm in that bubblesort will go through every element that you're trying to sort and compare it with every other element (meaning, you're looking ...
read moreSorting algorithms: quick update
In Sorting algorithms: bubblesort I started working on implementations of different sorting algorithms. The first obviously being bubble sort. I hadn't worked up a proper framework for the implementations though, so the implementation was just a flat file - not great for reusing code. Seeing as I plan to do ...
read moreSorting algorithms: bubblesort
I decided recently that it was time to add to my knowledge of sorting algorithms. I didn't just want to read some quick descriptions on names of algorithms but to actually prod my knowledge-muscle with some stuff. So, I started out on Wikipedia, reading the article on sorting algorithms ...
read moreWhat lobbying gets you ...
If businesses insist on lobbying, the logical conclusion is to exclude businesses completely from any political decision-making, in any form.
If we accept lobbying, the results will be citizens getting screwed over, again and again.
A quote from the paper:
While there is a correlation between openness and interoperability, it ...
read morePHP switch script
As promised in PHP 5.2.x and 5.3.x side by sidehere's a script that switches not just the php module for Apache but also the command line version
read more1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ...
PHP 5.2.x and 5.3.x side by side
A while ago I ripped out my PHP 5.2 installation (nicely handled by apt-get) in favour of manually installing 5.3 so I could play around. Yesterday I then installed Ubuntu 9.10 (info and download at ubuntu.com) and after quite a lot of installing I suddenly found ...
read more