Tuesday, 15 September 2015

Faster than quicksort, merge sort, insert sort...

Sorting networks. It turns out that if you have a fixed number of items to sort, there is a much faster approach than the general sorting algorithms.

eg. you regularly have exactly 6 items to sort. You use a predefined series of compares and swaps, and afterwards you can be certain that the items are in order.

From the Wikipedia page:
Sorting networks differ from general comparison sorts in that they are not capable of handling arbitrarily large inputs, and in that their sequence of comparisons is set in advance, regardless of the outcome of previous comparisons. This independence of comparison sequences is useful for parallel execution and for implementation in hardware. Despite the simplicity of sorting nets, their theory is surprisingly deep and complex. 

Thursday, 10 September 2015

"You Only Live Once" subjectively interpreted

I recently attended MicroConf Europe, a conference for "self-funded startups". I found myself sitting in the back row next to Peter, the Irish cofounder and CEO of https://www.teamwork.com/. Peter has been extremely successful; he shared information with me about that level of success, but I'll assume it was for private consumption. What I can say is that in seven years teamwork.com has become a highly profitable, growing company with dozens of employees. Peter has a found a level of business success that is rare to achieve.

I asked Peter why he works hard to keep growing the company. After all, by now he could sell out or coast, and probably be financially well off for the rest of his life. His answer: "you only live once."

A good answer. But it got me thinking why I took two afternoons off this week to go to the beach, and why I recently ran my company part time while travelling for seven months. My answer: "you only live once."

For Peter, life's limits encourage him to strive for business success. For me, life's limits encourage me to take it easy, be content with what I have, and enjoy lots of leisure time. Who's doing it right? Both. Neither. Some things you just can't compare.