Browse Month

December 2018

Report Cards (2018 Review)

We are just over an hour into 2019 where I am (Singapore), though it is still 2018 in the UK. For me, the highlight of the year was probably receiving the VCLA Outstanding Masters’ Thesis award in August; the worst part of the year would probably be around April, when I had a month or so of doing primarily reactive tasks and managing technical debt. Nonetheless, every year will have positive experiences (hopefully) and negative ones as well; I’d say my main takeaway from 2018 is that optimisation can be dangerous if one picks the wrong variables.

I set some targets at the beginning of the year. While setting targets without subsequently revisiting them can already spur improvement, it’s useful to consider how one has performed as it informs drafting next year’s goals (in particular, figuring out what is realistic, and what would be too comfortable). The grading system I’m using here is similar to the OKR system – each task receives a score between 0.0 and 1.0, and a straight success (with no extensions or bonuses) scores 0.7. For quantifiable tasks, I usually do a pretty straightforward linear interpolation with zero at 0.0, and 10/7 of the target at 1.0; usually a 1.0 means that the goal either wasn’t ambitious enough, or the relevant area became more important during the year.

A1: Software Engineering: 0.5

Not quantitative. Progress this year, while significant, felt largely incremental (which is maybe unsurprising as I’ve been focusing on similar work in terms of distributed systems and back-end performance).

I’d say most of the “progress” here is in the form of a considerably more principled approach to pursuing performance improvements and building new features. It’s difficult to evaluate improvement in Java skills; I spent some time this year studying Java performance (especially garbage collection algorithms and concurrency). There were a few bugs I remember this year where Java Memory Model knowledge was useful, which I wouldn’t have known as well this time last year.

A2: Logic in Computer Science: 0.9

The original goal here was arguably quantitative, in that it was to present one paper at a logic conference. This was presented – see this AAMAS18 page. I decided to bump the score up from 0.7 to 0.9 as a somewhat related highlight of the year was receiving the VCLA Outstanding Masters’ Thesis award for my work on MCMAS-Dynamic. This was mostly based on past work, though I had to write up a summary of the work that had been done.

This target was intentionally not too ambitious. I do want to finish up one more paper from the thesis – I think four is about the limit of where we can take this (the third paper already had a decent amount of original content) but I don’t anticipate presenting that until possibly 2020.

A3: Innovation in Engineering: 0.7

The goal here was to get two patents in the pipeline, and this was achieved exactly. There might be a third coming from my winter hack-week project, but I prefer not to count things that aren’t done yet.

This goal was conceived as an alternative to the pull-requests goal I had in 2016, as I find a small number of substantive changes to usually be far more motivating than many smaller incremental changes. (A possible danger of this is that I might discount the value of said incremental changes too much!) I’ll probably keep some version of this in 2019, as I find this kind of innovation enjoyable and motivating.

B1: Writing and Blogging: 0.4

The goal was 52 and I think this puts me on 27; I’ll be generous and round up. It seems a weekly schedule is pretty challenging, particularly around holidays and busy periods at work. I do still want to maintain somewhat regular updates here, but a lower target (40, perhaps, to allow for some of these) could be more reasonable.

B2: Travelling: 0.3

The goal was to visit 12 countries, considering the UK as my home base. I’m writing this from Singapore, and have also visited Switzerland, Germany, Norway, Sweden and the US, so this puts me on 6. That would be 0.35 – this rounds to 0.4 by standard conventions, but I’ll round down considering how work-dependent most of these trips were. I do enjoy visiting new places and learning more about them; however spending time with friends and family is also important to me, and in some ways travel allows me to do that. I think some kind of travel-related goal is likely to feature next year, though I’m not sure yet what form that should take.

B3: Walking: 0.7

The goal was to walk an average of 10,000 steps per day. I’m at 10,131 and I can add one more to that average for every 365 steps I walk today. Bumping this to 0.8 would require 213,160 steps today, so I’m fairly confident 0.7 is right.

I commute to and from work by walking most of the time. This provides a form of exercise and also saves money on transport (tube fares in London are expensive). That accounts for around 7-8,000 steps; the rest are accumulated walking around the office, or on weekends exploring. I don’t think this was sufficient in terms of physical fitness.

B4: Music: 0.5

There is some progress; I’m able to hit Bb4 quite a bit more consistently than I used to, but B4 remains difficult and elusive. I came across Meant to Be this year and attempted to sing it – I can just about manage the song (including the female vocal line) which requires consistent Bb4; trying it at a +1 key has not worked. I would not have been able to land consistent A4s even at this time last year, so the improvement could be considered as two semitones out of three.

C1: Gross Savings Rate: 0.8

The goal was a gross savings rate (Savings Rate #1 in this post from Early Retirement Now) of 50 percent, and this ended up at 54.2 percent for this year. I think this is good given that UK taxes can be quite high. This is a difficult chord to play, as one needs to determine how to discount future utility from money put into savings and investments. I think this was slightly higher than expectations.

C2: Minimum Income Standard: 0.8

The goal was to have non-housing expenditures of at least £10,800 for the year; this reached £12,000. This may seem somewhat antithetical to C1, though the issue with savings rate is that higher isn’t necessarily better; I’d prefer a sufficient budget at SR 50% over a tight one at SR 65%. It’s also not impossible to score highly on both goals (by earning more).

D1: Communications and Maintenance: 0.6

This goal is non-quantitative. I think I’ve made reasonable efforts to keep in touch with friends from both Imperial and Singapore. For the most part this has gone well, though there have been some lapses where I haven’t been as responsive as I’d have liked, hence just under the target sounds about right.

2018 in Graphs and Charts, Part 1

When most people think of graphs, they would probably think back to mathematics lessons in middle or high school, where it typically refers to a plot of how quantities change in relation to one another. Graph sketching was for some reason a large part of the university admission process for mathematics and computer science related courses, even if many of the curves that candidates were tasked to sketch could be approached in a rather uninspired algorithmic way.

There is a looser definition, which is closer to what I’d call a chart, which is a graphical representation of data. Some people do say things like “line graph” or “bar graph” (interestingly, “pie graph” is rare).

Moving away from mathematics and data representation, a graph also refers to a glyph or character in terms of typography, leading to terms like digraph for pairs of letters that make a single sound, though I don’t think usage of the term by itself is common.

As a software engineer, there is a fourth definition – a graph is also a structure comprising a set of nodes and a set of edges that connect these nodes. This structure is very useful for modelling many things with network-like structure, such as in communications, path-finding, or reasoning about state machines. You could say the core of my Masters’ thesis about MCMAS-Dynamic was a novel algorithm for exploring certain types of graphs quickly; one of what I’d call my flagship projects at Palantir also revolves around graph algorithms.

There is a risk of shoehorning all kinds of problems as problems solvable with graphs, in this sense (I remember some jokes I had with a couple of friends at university on trees, a specific subset of graphs, applying to everything). Nonetheless, graphs are very useful. I’ll use both the computer-science graphs and the looser ‘graphical data representation’ as I recap some of the things that I did (or happened to me) in 2018.

Travel

There was quite a bit less travel this year, and you could say the destinations involved were maybe a little less exotic (though I still maintain that the trips were good). One thing this map doesn’t quite show is the frequency each route was taken (though looking at this it seems that each path was actually taken once; I’ve made two trips to Singapore, one through Frankfurt and one direct).

I think most of this is just a decrease in travel for work, which was lower than normal. Leisure travel remained about where it has generally been (a total of 32 days this year, though that does include quite a few weekends). I don’t know if this is because of Brexit making my pounds buy less meaning I’m less likely to think about travelling. This could be relevant to the US or Zurich, but not necessarily elsewhere where the cost of living tends to be lower. Writing this, I remember my restaurant-quality six-euro dinner in Croatia…

Going forward, I hope to have a more interesting graph/network in 2019. Hopefully Brexit won’t get too much in the way of that – you might think that as a Singaporean I won’t be directly affected, but I will be. The pound might depreciate, making overseas travel expensive, and the length of the non-EU queues might increase. There is also talk of the Schengen version of ESTA coming up as well.

Logic Puzzles

I joint-set one of the puzzles for Palantir’s 2018 puzzlehunt, and have also been doing quite a few logic puzzles, including sudoku; I placed pretty decently at this year’s UK sudoku championship, and a bit more weakly in the puzzle division. Considering puzzles more broadly, they can be classified into a variety of types. Sudoku probably counts specifically as its own class, but there are also more general ‘number placement’ puzzles – you might have heard of Kakuro. There are other genres – ‘loops’ like Slitherlink; ‘object placement’ like Battleship and ‘shading’ like Nurikabe, among others.

I had the impression I was substantially better at sudoku than most general puzzles (a good chunk of this might just be experience-related), and probably better at number placement too. Conversely, I always struggled a lot with spatial reasoning in school and at Math Olympiads, so I thought my skills with loops would be weak.

One of the sites that hosts these puzzle contests is Logic Masters India. They ran a series of puzzle contests in 2015 that were split by genre. They also have a rating system, to facilitate comparison of skill across contests. A player’s overall rating is an aggregation of rating events; the computation of this aggregation is a little complex, but figuring out the score at an individual rating event isn’t too hard.

  • An event has a raw score, computed from individual puzzles – raw scores are compared to determine overall ranking.
  • Define ranking score (RS) as one’s percentile performance in the contest multiplied by 10. In other words, the top contestant scores 1000, and the median contestant scores 500.
  • Define point score (PS) as the ratio of one’s score relative to the top scorer, multiplied by 1000. The top scorer thus scores 1000; someone who scored half as much as the top scorer scores 500.
  • The overall rating score is a weighted average of the two: 0.75 * RS + 0.25 * PS.

I tried out each of the contests in the set, along with a sudoku contest, and calculated my overall rating scores for each, which are reflected in the graph above. Expectedly, sudoku is strongest (experience, probably). I didn’t realise drawing snakes was considered a genre by itself, though given it is I knew I would be terrible at those as I usually approach those with mainly intuition. I don’t know what the intended standard deviation of ratings are, so it’s difficult to comment on the significance of the differences.

Stock Market

The price over time of a security is a good example of a time series. This naturally lends itself well to a line graph, with price as the vertical axis and time as the horizontal axis.

One can similarly graph the size of a portfolio; the above reflects the value of my workplace pension, re-based to 100 at the start of this year. However, this is for the most part only sampled monthly (or sometimes bi-monthly, depending on whether there were other events that made me look at my portfolio), so the resolution of the data is very limited.

This year has (and it’s good) reminded me why there is an equity risk premium. Consider that a zero-growth environment would mean a straight increasing line, as additional contributions are coming in. Hence, the small decline from January to February or stagnation in October actually refer to periods where the market went down; the steeper-than-normal gain in May and August refer to periods where the market went up. This makes a fair bit more sense if one also looks at the performance of an accumulating world index tracker.

Source: Morningstar. Disclaimer: I do hold as part of my portfolio the Fidelity World Index P fund.

As expected, prices slumped in February and October, while rallying in May and July. Interestingly, there is a rather pronounced late-March to early-April decline that isn’t reflected in our original graph. This is an artifact of sampling – the March reading was taken on the 21st of March, and the April reading on the 23rd of April, by which time prices had already mostly recovered.