A Tale of Productivity

A Screenshot of my rescuetime report for yesterday

If you read my blog regularly, you’d recall that I can be quite obsessive over my productivity. I religiously track my productivity in a variety of metrics and tools – I have a premium account at RescueTime; I use Github to track the commit quantity and quality.

Yesterday was a very good day. The above screenshot shows the RescueTime dashboard report for the day. I had spent 89% of my tracked time on productive stuff. My Github records concur. Yesterday was a good day. I committed 14 commits to my project, and git diff --stat showed in total I wrote 1703 Lines of Code, and deleted 699 Lines of Code.

By comparison, according to RescueTime’s trivia bar, yesterday I was 20% more productive than my usual productivity pulse of 74. I also only usually manage to make one commit at about 200 LoC addition per day to my projects.

I was in short, on a roll. So how did I get so productive? This entire week has been rather productive for me. I believe I may have discovered what works for me when engaging in non-creative work.

[Read More]

Notes on Installing OpenCV in a Vagrant Box

I installed OpenCV in a Vagrant box for a new project. It was a pain in the arse. The basic box I used was Official Ubuntu 13.10 daily Cloud Image amd64. After many trials and errors, these are things to note when installing OpenCV in a Vagrant box: Build without GPU and OpenCL When building, don’t build with GPU options: cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_QT=ON -D BUILD_opencv_gpu=OFF -D BUILD_opencv_ocl=OFF . [Read More]

Pointer Tagging in Go

Let’s say you’re an idiot. You didn’t know about the interface{} type in Go. You didn’t know about switch foo.(type) {} in Go. Now you want to do something really fancy, like interpreting integers as floats (why would anyone do that?). Maybe you just want to circumvent the very excellent type system in Go. Or maybe you want a much faster type switching/assertion in Go. Or maybe you’re just a bit nuts.

[Read More]

A Tour of Coca Cola Amatil's Distribution Centre

The smell of cheese and sweaty shoes wafted in the air as I disembarked from the car. Ahead of me, a large sign that says COCA-COLA AMATIL. Walking past the three safety signs that lead to the office, the tour was about to begin. As part of a hackathon sponsored by Coca-Cola Amatil, I recently got the opportunity to learn more about logistics and operations. A tour of the CCA distribution centre was included in the hackathon and did I have a fun time!

A fridge full of Coca-Cola Amatil products greeted us as we entered the office. We were issued high visibility vests and were required to sit through 10 minutes of safety briefing, coupled with some safety tests. I sipped on a juice box as we took the safety briefing test. After that, our tour began. Our tour guide was Mark Hopkins, One Logistics Project Manager of CCA. He started off by rattling off interesting facts about the distribution centre while I furiously typed away my notes on Google Keep.

He explained that the distribution centre is entirely covered in 500kW solar panels. It was an investment that only recently paid off with the building of the new preform plant. Prior to the preform plant’s construction, the solar panels were generating excess electricity during down times, but now that the preform plant – capable of making 750 bottles per minute; and runs 24/7 – has been built and is running constantly, they now use their energies efficiently enough. Then time came for us to actually enter the warehouse.

CokeDistroCentre_Small [Read More]

Don't Be A Gearhead

I own a Canon 40D with a couple of large constant-aperture lenses. I also own a number of coffee making equipment, from the Aeropress to a nice Rancilio Silvia V2. I have a computer with a fairly nice processor and a fairly decent graphics card, with a large amount of RAM and 3 SSDs. While these things are slightly older now, I acquired them when them when they were rather new. [Read More]

Thor: The Dark World

I never thought I’d blog about another comic book movie since my post on Man of Steel. But I actually found another movie that far surpasses Man of Steel in terms of enjoyability. Perhaps not as deep in subject matter as Man of Steel but far more enjoyable. I’m talking of course, of Thor: The Dark World. There are many things to talk about Thor: The Dark World, but mainly it’s the feeling I get from watching it. [Read More]

Latte Art As Signalling

I had this thought the other day: latte art is signalling. To pour a rosetta in a cappuccino, you would need perfectly brewed espresso, and perfectly steamed and textured milk. If you do not pull enough crema in your espresso shot, or if the crema dissipates too quickly, you cannot pour a rosetta. If the milk isn’t properly textured, and there is too much air in the milk (or too little), you won’t be able to pour a rosetta because the milk wouldn’t drag across the surface of the crema easily. [Read More]

etaoinshrdlucmfwypvbgkjqxz

My previous blog post must have lead many readers of mine (hello to the both of you) into thinking I had gone mad. I hadn’t. It must have been maddening, what with self-linking posts and complete and utter gibberish. This is the story of how I dreamt up an encoding for the English language.

I had been lying in bed, late last night, thinking about my own perception of time and space. I have often convinced myself that I perceive time and space rather differently than most people. Last night was one of those nights. I had an imaginary conversation with people in my mind, explaining how I perceive time and space. I gave an example: imagine a spoon falls from a table. Rather than perceive the motion of the spoon falling, I would often perceive it as a solid block between the table and the floor. The solid block would be in the shape of the trajectory of the spoon falling.

Now of course this is all mental. It’s an additional layer of processing my brain does for some odd and undocumented reason, and only under certain mental circumstances (for example, when feeling extremely relaxed). But it’s a good way of explaining to people how I very occasionally perceive time and space.

I then began to think about writing. Our writing is very much based on a deterministic pattern. If I write the rune ‘A’, I would expect the rune to only represent one alphabet (‘A’). What if, however, a rune would represent all possible representations? A good way to frame this would be to think: when you put a pen to paper, at that point an infinite possibilities of runes that could be drawn exists. As you draw more of your rune, the number of possibilities drop until you have a rune that represents one alphabet. Imagine if you will, a person who is able to see a lot of the possibilities would draw a rune that represents all those alphabets. Perhaps this clip from Fringe would help:

And as I thought about it, I too thought about ETAOIN SHRDLU. What if we could encode a rune based on its possibilities? ETAOIN SHRDLU provides a very good basis, given that it’s the frequency each letter is used in the English language. So, the question became: what if we could encode multiple letters into a rune and make a language out of it?

The thought stayed with me for the whole day and after work today, I decided to write a quick and dirty script to encode and decode into this language. To give it some extra mystique, I picked out 26 utf-8 symbols to form the basis of this encoding. Although there are 26 symbols, they do not map 1-1 to the English alphabet – as such, statistical analysis will not yield much. I’ve actually had some difficulties in writing the decoder myself!

This blog post will explain how I did it.

[Read More]

etaoin shrdlu cmfwyp vbgkjq xz

ᕜɷ ՓლᏜⵙᎺኡႣǬ ※Ꭴኡⴿ ՓኡփᏜ ᙢႣփᏜ ⵓⴾⵙᕶ Ꭴᕶⴾლ ᙢⴾᎺዯ ლᕶⴾӼᕶლփ ኡᗎ ᙢᏑǬᕶ (ⵓᕶӼᎤᏑ ᏜᏑ ᏜⵓᏜ ※ᏑᏜⵓ ኡᙢ ዯኡႣ) ᏑǬᏜᏑ ᏜⵓᏑᎺᖝᏑᎺⴿ Ꮡ ⵓⴾლ ⴿኡǬᕶ ᙢⴾӼ. Ꮡ ⵓⴾӼǬ’Ꮬ. ᎺᏜ ᙢႣփᏜ ⵓⴾⵙᏜ ※ᕶᕶᎺ ᙢⴾლӼᕶǬᏑᎺⴿ, ɷⵓኡᏜ ɷᎺᏜⵓ փᕶӼᗎ-ᎤᏑᎺᖝᏑᎺⴿ ՓኡփᏜփ ⴾᎺლ ᕜኡᕜՓᎤᕶⴾᕶ ⴾᎺლ ႣᏜⴾᕶⵓ ⴿᏑⵙ※ᕶლᏑǬⵓ. ᏜⵓᏑփ Ꮡփ Ꮬⵓᕶ փᏜኡⵓዯ ኡᗎ ⵓኡɷ Ꮡ ӼლᕶⴾᙢᏜ ᎤՓ ⴾǬ ᕶᎺᕜኡӼᏑᎺⴿ ᗎኡლ Ꮬⵓᕶ ᕶᎺⴿᎤᏑǬփ ᎤⴾᎺⴿႣⴾⴿᕶ. Ꮡ ⵓⴾლ ※ᕶᕶᎺ ӼዯᏑᎺⴿ ᏑᎺ ※ᕶლ, Ꭴኡⴾᕶ ᎤⴾփᏜ ǬᏑⴿⵓᏜ, ᏜⵓᏑᎺᖝᏑᎺⴿ ⴾ※ኡႣᏜ ᕜዯ ኡɷᎺ ՓᕶⵓᕜᏜՓᏜᎺኡǬ ኡᗎ ᏜᏑᙢᕶ ⴾᎺӼ ǬՓⴾᕜᕶ. [Read More]

Why 1 && 2 == 2

This question was bugging me for a bit and I spent about 3 hours researching it: What is the result of the logical operation of 1 AND 2? Conversely, what is the result of the logical operation 1 OR 2?

Clearly upon first look, this doesn’t make any sense to evaluate in a vacuum. In normal English, if someone were to ask you “1 AND 2 equals?”, you’d probably reply “3”. Then the OR version of the question is asked… and then it devolves to non-sense. Formal logic, however, does provide us with some explanations. Everyone is familiar with the truth table:

P Q P AND Q P OR Q
TrueTrueTrueTrue
TrueFalseFalseTrue
FalseTrueFalseTrue
FalseFalseFalseFalse

However, True and False are boolean values. Under the principle of bivalence, there can only be two truth values: True or False (in computers, they’re encoded as 1 or 0). I’m not going to discuss the philosophy of logic, so for the rest of this blog post let’s just accept that the logical operators AND and OR (generally) operate on boolean values.

[Read More]