Too much sorting

So, it's two o'clock in the morning, and I really should be going to bed rather than writing this blog. But at the same time, I am determined not to let things slide.

The reason I'm awake at this time is because we've been trying to prepare for tomorrow lecture about complexity and O-notation. For this, we were attempting to write different reverse-list algorithms in Haskell, some of which should have been slower than others. We then spent about two hours being seriously confused why the algorithm which shouldn't have been linear was linear, and why the algorithm which was supposed to be linear was slower. The answer: "we hold zero candles and are still making confused faces'.
So we decided to move onto more useful things like sorting algorithms. We managed to write quicksort by looking at a cheat sheet. But when it came to bubble sort, we kind of went a little bit nuts, writing four different versions. Timing some of these functions didn't produce as weird results in terms of being linear when they weren't supposed to be, but it was also rather random in terms of which implementations actually improved upon speed ...
Haskell is fun, but someone give me a baseball bat to hit the type system with occasionally.

In terms of what we did outside of staring at computer screens, we taught another class (which is where we actually started coding some of the Haskell), and went downtown to go back to the restaurant where students are supposed to take notes while the food is being prepared. The food was quite nice last time, but we also seem to have made a slightly better choice in what we chose last time. I don't even really know what 'Mutton' is ...

We may have also run into the world's worst pick pocket today. Obviously trailing, and not even spotting the fact that he had been spotted. We were starting to get a bit very confused of why he was not just walking away with his dignity slightly more intact.