In an effort to add more content to this blog without having to stay up until midnight writing (see my last two verbose posts), I'm going to start adding my better Quora answers here too. This is one of my favourites!
"Programmers are the brick-layers of the computer industry."
When I was 12 and professed an interest in computers and programming, this was the advice my friendly neighbour offerred. Being 12, I can't remember if I had a clever retort to this line, but it certainly struck with me.
The neighbour in question was an engineering manager, running a large enterprise team delivering various aspects of online voting systems for government (amongst other things.) That Australia still does not have online voting available to most of the population probably goes some way to explain his view. (For what it's worth, it's now available in NSW to disabled voters who can't reach a poling booth as a trial run of the service, which has been in development for over a decade. It is a complicated system due to all the negatives ramifications of stuffing it up, but this is still a stupidly long time!)
As I grew up, studied engineering, then physics, then robotics, and then ultimately ended up working as a software engineer (not a programmer? Here's why...), I've thought back to this line more often than you'd expect for such a throwaway remark. But the question that really bugs me is; was the remark engendered by his management of a large team of varying talents on a long, complicated, and tedious project? Or is there actually some truth to it?
I've been reading Michael O. Church's latest blog series on the Macleod hierarchy of worker types in modern corporations lately, in addition to musing over my own role following a series of ennui and recruiter induced interviews. It's a great read (though lengthy!) and I agree with his analysis for the most part.
The short summary is that he's added a fourth class to Macleod's hierarchy (Losers, Clueless, and Sociopaths); the Technocrat. Losers (only in the sense that they realize corporate grunt work is a losing proposition) put in minimum effort for decent pay, and don't bother striving beyond this as their life is predominantly outside work. The Clueless believe that with dedication they'll be promoted into the upper echelons of the corporation, and take on more work for less reward than a rational approach would suggest. Sociopaths manipulate the system for their own ends rather than those of the corporation. They work hard only on projects likely to result in recognition or reward, and ignore, delegate, or sabotage work that doesn't.
Church's addition is the Technocrat, who operates like the Sociopath on the surface, but whose intent is to generate positive sum rewards for herself and the corporation. Where Losers are strategic, team-players, but not dedicated, the Clueless are dedicated team-players who lack strategy. The Sociopaths are dedicated strategists, but definitely not team-players. Technocrats are somewhat more pragmatic; they're strategic at all times, but only dedicated team-players when they sense their efforts will be positive sum and result in a better workplace for everyone. When this isn't the case, they bugger off somewhere else.
Humans being what they are, most people's first reading of this sees them side instantly with the good guy Technocrat, but I tried to analyse myself a bit more rationally. Bailing out of my robotics role because I didn't think it was teaching me enough or my efforts were improving the organisation may well have been characteristic of a Technocrat, but not enough for a strong classification (after all, a Sociopath would have done the same having realized the chances of promotion were negligible.)
I hope it's clear enough that I'm not Clueless. I'm incredibly lazy when I don't think something is worth doing, and I certainly won't due it just for the brownie points. I turned down a job offer only last week because the manager described the promotion prospects as being "Brilliant! After four or five years you'll have a really good chance of making team lead." (And Adrian, if you're reading this and thinking "I didn't say that?", that'd be because I actually turned down two jobs last week and I'm referring to the other one... #humblebrag)
I think I have some traits of the Loser, and not just my haircut. I generally work 9 to 5 only, and frequently take a pleasantly long lunch break. Whilst this is partly laziness, it's also that I'm well aware management is satisfied with my performance, and I don't see any reason to make them realize I'm capable of more effort or hours unless there's a kicker in it for me. I'm not a fan of delayed gratification, and don't fall for it when people suggest reward will come only after all the hard work is given. So this is strategic laziness then; lazy when the effort required to advance isn't justified by the reward offerred. I'm also not entirely referring to money either - recognition, interesting work, and an opportunity for learning are all alternative forms of persuading me to work harder. (And in my defence, I did stay late the last three nights because I had something interesting to work on!)
So, maybe I'm a Sociopath. Let's see now. I'm clearly strategic. I've clearly made several medium sized organisations think I'm a team-player. I've clearly bailed out on a great bunch of people because dedication to the organisation didn't pay. I've used a very positive sounding history of my startup failure to simultaneously leverage both title and salary inflation, and jumped straight into the most interesting chunk of available work in the organisation without having any experience of it. Seems pretty clear that if Church is wrong and there's no silver lining Technocrat class with which to paint myself, then I'm the number one contender for filling the office nerf guns with live ammunition.
Perhaps it's time to analyse my intent. Am I strategic, manipulative, and successful because I'm an asshole? Or is it because getting myself to the right position leaves me better able to deliver value to the organisation? That's certainly what I'd say in a salary review, but is that because I'm a cynical bastard with an affinity for telling people what they want to hear, or because I actually believe it? To answer this, I think we have to analyse the organisations I've worked in (which is a) simple, because there's only three, and b) fun, so just indulge me, ok?)
Academia (caveat - in Australia! This can be quite different in the USA.) is the home of a moderate number of satisfied Losers who love research for its intellectual freedom and accept the low salaries for this and a flexible lifestyle. There are numerous Clueless post-docs and joint-co-Chief Senior Principal Lecturers who for some strange reason never quite get that final title that'll give them stability and an excuse to slack off. Lording it above them all are the few Sociopaths who played the game well enough to grab tenure or switched tack into the bureaucratic arm instead. It's most definitely a rank culture and Technocrats are the strange bunch who've achieved exit velocity and left the gravitational pull of a satisfying Loser existence in the intellectual bubble of an otherwise parasitic and decaying organisation. Ouch.
My next role was in a fully industry funded research group within the same university, but the situation was unique enough that it can be thought of as an external consultancy simply renting space from the uni. That's certainly how it was sold to me, but proximity breeds homogeny, and the pull of the university hampered the success of what was otherwise a thriving self-executive culture with some guild aspects. Both the technical and academic staff had excellent mentoring from senior colleagues, the work was sufficiently interesting to breed dedication and a strong team spirit, and the pay and lifestyle flexibility were nothing to sneeze at. Its main downside was the division between academics and technical staff, both in monetary terms, and for interesting work and recognition. For a flat organisation with a surprising absence of Sociopaths at the top, it still managed to have a fair share of Clueless hoping for change that could never come. Fortunately it has a large number of happy and content Losers who've accepted the trade-off of increased comfort and interesting (if sometimes ignored) work, for a slower career progression and lower pay. There's a big part of me that wishes I could be happy in that position, but I can't.
Which brings me to my current employer, which for a startup is an absolutely canonical example of a tough culture frantically paddling back towards the guild from which it purports to have come, and truly wants to believe it can return. (Whether it can or not is a question for another day, and my thoughts on the matter have flipped a few times already in my short tenure here. Likewise whether it'll have a billion dollar exit or devolve into a semi-bankrupt zombie corporation. My odds are closer to 50/50 than I'd like, and I sometimes wonder if it's merely that e-commerce itself is growing so fast that's keeping us afloat.)
Without intending disrespect, most of my colleagues are Clueless (remember lads, this is a category label, not a derogatory term. You all know your memes better than any other group I've met). As is typical in many startups, they've been sold a dream, and blinded from any sharp realities by shiny toys and the 'culture club'. It also pays well, which the Clueless think is because they're irreplaceable and important, but in reality is because their output is important and probably a positive return on investment. Too few of my colleagues have considered that we're only recently profitable, and the number of business-destroying risks we face (mainly due to technical debt) is flabbergastingly high. Too many think that working hard and being seen to jump into the triage response when shit hits the fan will result in promotion and reward, without realizing that there isn't anywhere to be promoted to, our engineering spend is already too high to raise salaries any more, and fixing the fan mostly just covers you in crap.
There's a small number of Losers. For the most part, these people have been around the block a few times, recognise the high salary and low expectations available here, and happily meet them. They work hard only on the interesting problems (of which there are fortunately a decent number) and the most strategic of them have found their way into roles that avoid working with the legacy technical debt or too much triage. There are definitely a few strategic lurkers, waiting for more information on what the future holds, and who could morph into Clueless if they predict optimistically and incorrectly, or Sociopaths whatever the future as long as they predict correctly. (If it's a sinking ship, they'll bail. If it's a rocket ship, they'll find a path into upper management.)
There are Sociopaths scattered across the organisation, but due to its rapid growth, most have yet to reach upper management, and are effectively Sociopaths-in-waiting. Fortunately, there a number of truly positive-sum individuals who manage to be strategic (at least somewhat), team-players, and dedicated all in one. Their strategic efforts are aimed at projects that reduce technical debt, open up new areas of interesting work, and enhance the team itself. They don't always succeed, but it's clear that they're trying, and that they're not interested in playing politics like the Sociopaths are. It is largely due to these people that I'm still here.
And, it is because of these people that I think O'Church is right, and that Technocrats do exist. Which is lucky for me because otherwise I'd have to call myself a Sociopath, and I like to think I'm not quite that mercenary. If my trajectory looks like that of a Sociopath, I claim it's only because I haven't succeeded yet. I would love to be in a situation where I'm making my own life better at the same time as the corporation lots of money and a better place to be. I believe the best place for me to do this is in a guild culture, but in the absence of them in my field, in this city, at this point of time, I'm pretty happy in an organisation that's at least trying to be one.
So after a long and roundabout trip, I can now declare that I am actually a Technocrat. Relax. I'm not going to kill you after all.
These notes are mostly for my own reference, but will hopefully be useful to other people too.
Get ruby version manager (rvm) plus rails:
Install gcc42 with which to build ruby (because XCode 4.2 now uses clang):
Set rvm to use a recent ruby version by default:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
And stop with:
pg_ctl -D /usr/local/var/postgres stop -s -m fast
This is a quick demo showing how you can use a $100 inertial measurement unit and a light weight laptop as a rough version of the Oculus Rift VR headset. A friend and I have a game idea we wish to build for the Rift but since units won't start coming until around December, and neither of us ordered one (since we didn't have the idea during the Kickstarter campaign), this is our "close enough" workaround.
Sample code for driving a Unity3D camera using an IMU is available on my GitHub page. [edit: 02/07/2013, now updated for the TinkerForge protocol 2.0]
Yesterday I finally received my inertial measurement unit (IMU). This is a tiny unit containing a gyroscope, accelerometer, and magnetometer. The gyroscope measures angular rotational velocities - how fast the unit is rotating around three axes. The accelerometer measures the accelerations along each axis - how fast the unit's speed is changing along each axis. The magnetometer measures the effect of prevailing magnetic fields on the unit - assuming the magnetic fields around the unit are non-changing, this provides a coarse measure of the unit's orientation.
All of this information is mashed together in a Kalman Filter (more specifically, Seb Madgwick's implementation of Rob Mahony's Direction Cosine Matrix (DCM) filter.) This filter integrates the gyroscopic information to determine orientation, and minimises error via feedback from the double-integration of the accelerations and the magnetometer information. This page at TinkerForge describes the IMU unit in detail, and the underlying equations can be found in Madgwick, S. O., An efficient orientation filter for inertial and inertial/magnetic sensor arrays, University of Bristol, April 2010. Overall, and especially considering it costs less than $100, this unit is awesome!
This particular IMU is actually built around a 32bit ARM processor, which does all the filter calculations onboard and processes USB commands to access the API. You simply run a daemon on your PC which translates TCP/IP commands to USB, and this then allows the manufacturer to have very simple APIs in a variety of languages, since they all just talk TCP/IP. Personally, I'm using Python because this project also makes heavy use of OpenCV which has Python bindings.
Ok, so what am I doing with it?
Well, first up, I stuck it to a laser projector. With tape.
Then I wrote some Python code to rotate and translate the image given the IMU's readings for orientation. In the image above, I'm taking my laptop's camera as the input image. I record a base orientation and then measure differences compared to this. The image gets rotated by the opposite of the change in roll. It gets moved left or right by the change in yaw, divided by the horizontal field of view angle, multiplied by the projector's horizontal number of pixels. Likewise, it's moved up or down by the change in pitch, divided by the vertical field of view angle, multiplied by the projector's vertical number of pixels.
For those readers who've not done IMU to sensor frame transformations before, this is one of the dodgiest hacks known to mankind. Despite this, it kinda sorta works.
This picture was awkward to take: My laptop is filming me. The projector is drawing the output on my wall. And I'm struggling to take the photo with my phone.
You know what - I'll just make a video... Stay tuned for part two! :-)
I've talked to a few people offline about the effect Hacker News had on the audience for my recent post. Essentially, what was written as a cathartic rant for my own sanity turned into 24000 page views and an inbox full of job offers. Sure, not all of those 24000 actually read what I wrote, but it's interesting to look at the statistics and work out just how many really did. For those of you with websites that already garner millions of page views each month, this will probably be uninteresting. If however you're like me, and this is more people reading your words than your entire academic output put together, it's worth thinking about whether it's repeatable, and how to use its powers for good (or evil...)
Overall, my post spent about 8hrs on the front page of Hacker News, reaching as high as position #5 (HN has a time-based curve - your post will only stick if it's young with a fair few points, or old with masses of them.) It eventually garnered 93 points and 38 comments. People clicked the Twitter button 101 times (which amazes me, since I didn't even bother doing that and I wrote the damn post) and Facebook 'like'd it 43 times. Clearly a bunch of people manually tweeted about it too, since there were lots of differently formatted tweets about it when I searched.
My webhost's statistics say it was viewed 23841 times and Google Analytics - which I only thought to install about an hour after posting it - tracked just under 17000 unique visitors (obviously missing the first few hours.) In an attempt to work out whether this was representative, I found a few other people discussing the effect on their posts; David Zhang of simply.io, the guys at elastic.io, and a few others. Nowhere near enough data for a representative sample, so label this inconclusive.
Of these visitors, the bounce rate (the percentage of visitors who leave without navigating to another page of the website) was 90%, and a different 90% stayed for less than ten seconds. Ouch. On the other hand, I guess that suggests that those who did actually read the article "converted" by looking over at least something else. In terms of page depth, 5.63% hit two pages, 1.57% hit three, and exponentially lower thereon. It was a long-ish post that probably took two to three minutes to read fully; roughly 1500 visitors stayed at least that long reading it and/or other pages.
More interesting than raw web statistics however are the subsequent effects, especially on my email inbox. I ended up with 26 emails from people I'd never talked to before. Of these, 14 were people thanking me for discussing a topic that resonated for them, or for bringing some reality to the tech media blanket coverage of this and that startup raising millions of dollars (and, often enough, being abandoned within six months.) Another eight were offers of collaboration from people starting their own businesses, or with technology projects in which they thought I might be interested.
The final four were preliminary job offers - I don't mean "this job pays $X and if you say yes you'll start on monday", but more like "you sound like you might be interested in and the perfect candidate for this job, let's have a chat about it". This is the valuable bit. Compared to sending your résumé into the lion's den of HR and hoping your choice of perfumed paper makes the grade, having potential employers come to you instead is a far more pleasant way to operate. I even got a free lunch out of it yesterday - they do exist!
To summarise the Hacker News effect; it's definitely valuable. HN gets ~150k unique visitors in a day. The vast majority only view the front page. Given my post was there for about 8 hours, let's assume 50k of those uniques saw it, which means nearly 50% clicked through. Of those, 90% abandoned it immediately. Of the remainder, only about 10% abandoned before finishing the article, i.e. around 9% of the total HN traffic read the whole thing. This is in agreement with a BoingBoing article that discusses the readership habits of various traffic sources (the original source is here, but the graphs are broken), concluding that HN readers stick around longer than those from any other referrer. Of the attentive HN traffic, around 50% read something else on my site, around 10% tweeted, liked, commented, or somehow promoted it on, and about 2% got in touch with me directly.
If you've read this far, you probably shouldn't follow me on Twitter because I've got very little idea why it's important.
I've learnt a lot of things since quitting my job, but by far and away the most important is how to get a decent coffee out of La Sorrentina.
For those that don't know, La Sorrentina is an Italian coffee maker, reproducing the 1946 'Atomic' design by Milanese designer Giordano Robbiati. It's occasionally denigrated as merely a high-class Moka pot, but is actually far better. Able to reach around 5 bar of pressure, it's possible to get a reasonable crema and excellent steam volume.
However, despite these strengths she's even more temperamental than the infamous Miss Silvia, and making a decent espresso requires a series of tricks, none of which are detailed in the manual. There's a few videos on YouTube (this one is terrible and you can do far better, this one is better but doesn't explain how he got there), but not much by way of a technical description. I hope this post goes some way to fill that gap.
The basic process is simple enough:
There's a lot of "right amounts" in that process, none of which are adequately explained. Chances are your first few attempts will result in some of the worst coffee you'll ever force yourself to drink because you can't possibly discard it after all that effort.
Here's tip #1 - throw away your first ten coffees. They will not be worth drinking, and you'll end up thinking it's a bad machine. It's not, it just takes a bit more care and attention than most.
The process to get a drinkable coffee is a bit more involved - not harder - just more involved.
Firstly, let's resolve those "right amounts".
The right amount of water is easy enough to find. When you empty the remaining water in step 12 of the basic process, empty it into the (cleaned!) coffee jug. Mark this level with a permanent marker or scratch. This is the minimum quantity of water you need. If you're making one espresso, add a 30mL shot more water. Add a dash more (maybe another 15mL if you want to be precise) for the steam. Two espressos, two shots, etc. Any water you add above this minimum will end up pouring through as coffee or get turned into steam. For a single shot of espresso, this extra ends up being about 2mm above the mark I made, and roughly halfway up the jug.
The right amount of coffee is also easy - however much you can fit in the damn portafilter! Yes, this is far more than the manual recommends. Yes, you'll be "wasting" coffee. Shut up. It'll taste better. Trust me.
The right amount of force is also easy. Work out how hard you intend to press down with your tamper, and be consistent. (Experts recommend 15N of force. Unfortunately, my arm doesn't come with a spring balance inbuilt.) That's it. This is now the "right amount" of force - it's right for you, and that's good enough.
The right grind is more difficult, and you will have to experiment. It is nowhere near the "medium coarse" suggested by the manual. It is much closer to "almost as fine as your grinder can get". The best strategy for finding the sweet spot is Isaac Newton's "halving the interval" method:
Start at the coarsest espresso setting and make a coffee. It'll almost certainly be weak, thin, and foul smelling. Move to the finest espresso setting. Make sure you've very firmly attached the group handle to the machine. At this fineness, it'll almost certainly blow the pressure release valve before any coffee pours at all, and you definitely want the valve to blow instead of the entire group handle flying off the machine! (Here's tip #2 - always remember to open the steam valve before removing the group handle. You'll probably have to learn this the hard way too. Trust me, you won't do it twice...) Turn the heat off, open the steam valve fully, and walk away. When the machine is cool and ready for you to try again, split the difference. If it's still weak, split again in the finer direction. If it's still blowing the pressure release, split again in the coarser direction. Repeat until you've found the sweet spot.
This description makes it sound like you'll just know the sweet spot when you see it. Chances are, you'll have a rough idea but so many gradations on your grinder that there's two or three that are all reasonable. Here's tip #3 - the sweet spot is when the pressure release valve does blow, but only after most of the coffee has already poured. Why? Well the first part of the coffee extraction process releases medium-thick, black coffee. Very aromatic, but not the best bit. What you're really after is the brown, very thick crema that comes second. Since this is thicker and less viscous, the pressure in the group head has to increase a bit more to force it out. So you're looking for the early stage pressure to be below the limit, and the later stage to be just above. The machine will be fine with this, but you should ideally be turning the heat off within 15-20 seconds or so of the valve blowing, even if you're busy frothing milk. Be aware that the machine will now be fucking hot. That's a technical term for "don't touch the metal bits."
The right amount of time is easy enough, as it's related to the right grind. From cold water you can expect it to take 5 to 7 minutes. From just boiled (my recommendation) expect around 3 to 4 minutes. You should turn off the heat before what's pouring out is no longer crema but weak thin watery coffee. Sometimes you'll get good crema after a bunch of big oily bubbles, but usually these bubbles are a sign that the crema is ending. In the ideal world the crema will pour as a thin stream, perhaps curling in on itself like a pig's tail. You'll then remove the jug, (replace it with another or a cloth - what pours out now is horrible and will foul your coffee), texture your milk, and turn the heat off either as you remove the jug or in the middle of the milk frothing process. There should be enough steam to make one person's worth of milk with the heat off, but you may need to leave it on for some of the time if making milk for two or more people.
Ok, so that's all the "right amounts" sorted. In summary:
In addition to my first three tips, here's a few more:
Ultimately, after much experimentation, you should be able to get a decent coffee. I'm a harsh critic, but the best I've done is about a 7/10. For some sense of scale, I've only ever had two 10s in my life, I consistently get 8-9s from Campos' (arguably Australia's best coffee) baristas, I could regularly make 7-9s from a $2500 dual boiler ECM Giotto or Cellini Rocket, and I usually think the average cafe coffee is anywhere from 4-6 (7 if the barista has any idea what to do.)
7/10 is pretty damn good for a $400 single-boiler machine. La Sorrentina can make a decent coffee.
If there's enough demand I can make a video of the process, but the real takeaway from all this is that it requires a bit of experimentation. Persist, and don't fall into the trap of thinking it's a bad machine. Let me know your tips or any parts of this you disagree with in the comments below.
This blog is very seldom updated. Having kids will do that.