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:
- Fill the jug with the right amount of cold water.
- Pour into the boiler and tighten the black cap.
- Grind your coffee beans to the right fineness and put the right amount in the group handle.
- Pack it down with the right amount of force.
- Ensure the red milk valve is closed.
- Place the unit on the heat source with the right amount of heat.
- Wait the right amount of time for coffee to pour.
- Froth/heat the milk.
- Turn off the heat source.
- Pour the coffee into a cup and add milk.
- Open the steam valve and wait until it stops producing.
- Remove the group handle, clean it, then empty the remaining water from the boiler.
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
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:
- Water - the quantity of poured coffee you want above the line marked by filling the jug with the leftover water from a previous pour.
- Coffee - as much as possible.
- Force - around 15N, but whatever you can do consistently. Hard, but don't put your back into it.
- Grind - as fine as possible such that the pressure release valve doesn't blow until after some crema has started to pour.
- Time - stop before you reach thin watery coffee, usually just after big oily bubbles start to pour.
- Heat - a medium sized gas hob on max. Don't let the flames shoot past the bottom of the machine. I don't have an electric stove, but I'd expect this to be equivalent to 60-80% of the full heat. You'll certainly want to pre-heat the stove if it's electric.
In addition to my first three tips, here's a few more:
- Throw away your first ten coffees. La Sorrentina requires a bit of experimentation to master, but can make a good espresso if you persist.
- Always open the steam valve and wait until it stops steaming before you ever remove the group handle. This releases any remaining pressure in the machine, and you will certainly know about it should you ever forget.
- The sweet spot for your grind is just fine enough that the pressure release valve usually blows, but only after some crema has started to pour.
- To avoid your crema dissipating in the jug, don't rest the jug directly on the flat metal of the boiler but instead either hold it (this gets tedious) or put a heat proof mat between them. Much of the crema disappears because the high heat required to produce it also means the jug heats up so much that it dissolves while you're collecting it.
- Remove the jug once the crema has poured. Any coffee that emerges after this will be over-extracted and bitter. You'll need either a cloth or a second jug to catch the dregs.
- Start with just boiled water. It's faster (unless your kettle is inefficient!) and makes no discernible difference to the quality of the coffee.
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 was my last job. That's me, in a helicopter, telling an eight-wheeled killer death robot what to do. And getting paid handsomely for the privilege.
It was awesome! So why the hell did I quit?
Well, I had an itch. I thought I wanted to start a company and ride the coming robotics revolution to fun and profit. The reality was something quite different to that, I just didn't know it at the time. Everybody I knew (and I really mean everybody) advised me that this was foolish. That I had a four month old child to support and a wife who wasn't working. That I had a mortgage to pay. That I had a seriously awesome job and an obvious career path into one of the largest and highest paying companies in the country. That the startup lifestyle is hard work, stressful, and nine times out of ten - fails.
They were all right, but I couldn't listen. I had to learn this lesson for myself.
So I started a company
(well, actually, we didn't get around to incorporating it, which turned out to be a good call) with two friendly colleagues, quit my job, and didn't think much about step two. We had some plans for synchronised collaborative whiteboards, and started plotting how to get funding to make this happen. We approached a business incubator who were very keen on us, less keen on the idea, but put in a lot of their time getting us to take a customer development approach.
We did, and it was horrible. Over the next three weeks we talked to lots of potential customers - less than our advisers wanted, but more than enough to discover that our product was too expensive for the marginal improvements over related products. We moved onto product number two, followed the same approach but faster, and found the product to be less useful to people than we'd thought it would. At this point, one of my co-founders decided he'd have much more fun just building things without worrying about whether or not they'd make money, and promptly left.
Product number three actually had a lot of interest. We found a great niche of customers with a big problem, and our product would have fixed it beautifully. Unfortunately, despite the customer development process looking good here, from a product point of view we concluded we couldn't make it cheap enough. (On the up side, in a few more years time all the components should be cheaper and better, so its something worth revisiting in the future.)
After three rounds of this disappointment, my remaining co-founder lost interest and went AWOL. I can't blame him. I'd sold the vision of an awesome startup company building amazing technology and enjoying the process. Instead we'd experienced what is likely much more typical; hard work, disappointment, and not much to show for it other than the knowledge that it was better for these ideas to fail sooner rather than later.
At this point I burnt out. In true burn out fashion I didn't realize this, and kept pushing on with coding, meeting people, talking to customers, and the like until my body engaged in a cunning plan to weaken my immune system and make me get sick so I'd stop. It took a full week of not doing anything at all before I realized what should have been obvious at the outset: I don't care enough about money to run a startup business.
I want to work on cool, innovative, novel, and exciting projects with interesting, motivated, and motivating people. Provided I can earn enough by doing that (and enough isn't even that much in the grand scheme of things) I'm not too bothered whether I work for myself or for someone else.
This begs the question however; why did I quit a job that met all these criteria? The easy answer is that I knew I didn't want to be an academic. But since the job was a stepping stone to a similar, higher paying job in industry, there's a more complex answer hiding away in here somewhere. Ultimately, I think it's that I want to move a bit faster, have more opportunity for learning, and to see my work get used by real people. Academia is slow, procedural, and if more than ten people care about your work, you're probably doing well. As an example, since quitting my job, a paper I wrote eighteen months earlier has only just been accepted.
This whole post has told the story through a lens of failure, but that's not the only way to read it. I recently stumbled upon Robbie Abed's article
on how to find your dream job. Roughly summarised; quit, start a company, expect it to fail, tell everyone about it, build a new network, talk up your product (not yourself), help people out, and finally "Accept Failure. Ask For Help." Sure, I didn't set out like this, but if I tell this same story through that lens instead, then I'm already up to step eight and ready to rock whatever opportunity comes knocking.
Maybe it's your company - if you need an inventive, capable, problem-solving engineer, get in touch
It's an increasingly common refrain of the startup entrepreneur - "Patents are broken!"
Clichéd though it may be, I believe it to be completely true.
This week is my first week working on Triple Point Robotics full-time. I quit my secure, well-paying, and generally pretty awesome job to work on this because I really want to see more robotic technology available to the general public. I know how to make it happen technically, but running a company has its own share of problems which I'm rapidly discovering. I'm pretty sure patents are going to be a persistent, huge, and irritating one.
The main issue is that every obvious idea has been patented already. EVERY. SINGLE. ONE. Regardless of the fact that patents are supposed to be non-obvious to an expert in the field, there are about a thousand patents covering minor - no, let me rephrase that, completely trivial
- variations on already obvious ideas. Even the process of being a patent troll
has been patented!
Have you ever tried to buy a domain name? It's the same problem in a different guise. It's so cheap to buy a domain name that cyber-squatters have literally coded what amount to dictionary attacks on domain name registrars to purchase every available verb+noun and noun+noun combination in the .COM TLD. Patents, although stupidly expensive for startups, are so cheap for big companies that they patent tens if not hundreds of things each week.
In my previous job, I was called upon to skim the patent landscape for devices related to measuring properties of a borehole. I found a patent on transmitting information wirelessly from down a hole to a device outside the hole. I found another on recording information down the hole on any medium, then removing it and reading the information off it at the top. In other words, you can't measure anything down a hole without violating someone's patent. Arguably, even putting a stick down a hole and looking for the water line violates these patents.
How did anyone conclude that measuring something down a hole was non-obvious? What kind of idiots does the USPTO have working for it that they couldn't guess that the logical ways to get information out of a hole are to transmit it out, or record it down there and bring it up afterwards? Why do we allow this kind of crap to be regarded as intellectual property
, let alone intellectual?
The next stage of the problem occurs for slightly non-obvious things, or obvious but technically difficult things. Oh don't worry, they're also all patented already, but there are few if any products available that implement any sufficiently complex patent. Take for example the fairly obvious idea that if you point a camera and projector in the same direction, you can show an image on a whiteboard, annotate it, then record the result. There are at least 80 patents covering this exact same concept
- I know because I've read most of them over the last few days.
People have been having this idea since at least 1990 (Xerox has this one
for example) so why, 20+ years later, can't I buy a product that does this? There are plenty of "interactive" whiteboards (about 80% of these are essentially a camera-projector system with some form of electronic pen, the rest are hugely expensive giant touch screens), but despite all the patents on the idea of doing this for a "Plain Old Whiteboard" as a form of backup, you just can't buy one. (Amusingly, if you search for "Version Control for Whiteboards" you get our products page
:-), and then this hilariously over-engineered protocol
for when people should be allowed to erase stuff from a workplace whiteboard.)
So what's a poor entrepreneur to do? I posed this question on Quora
and the best answer so far is the most obvious - infringe anyway and deal with the consequences later as a cost of doing business in an archaic intellectual property system. There are other options, ranging from 'give up and go home' through 'try to negotiate a license' or 'modify your product to get around the claims' to 'ignore it and hope they don't sue you before you get big enough to patent a bunch of related crap you can use defensively'. But if everyone is infringing, patenting crap just in case it's useful defensively or offensively, or using lawyers to find ways of worming their way around existing patents, then what on earth is the point in the first place?
Am I just a hopeless libertarian for thinking that a world without any patents whatsoever might just be a better one than one in which patents are just a giant tax on doing business? The standard argument trotted out against this suggestion is that big pharmacuetical companies wouldn't ever spend the money on research, animal trials, human trials, and FDA approval if they couldn't have exclusive rights to the drug design. Sounds reasonable, but why not have a special annex for drugs and ditch software and process patents completely?
That argument however, is one for another day. Today was for ranting about the minefield that is patent law. Thank you, Internet, for indulging me.