First Home Coffee Roast
I’ve recently become somewhat of a coffe guy and decided to try my hand at roasting coffee at home. Below are a couple of pictures and a short time lapse video of the results. If anyone is curious I had the skillet over medium heat for about 10mins until the water was undergoing the Leidenfrost effect being the pan to over 100°C I then roasted the beans for an additonal 10 mins until i thought they looked dark enough (no real science here yet, first time and all). The beans turned out to be a bit lighter than I’m used to but after about 24 Hours the flavour really delevloped and they make a very nice cup of coffee.
The beans were from coffeeparts in Australia (where I live) and they’re the Papua New Guinea ‘Kimel’ beans.
In the future I plan to use more methodic roasting technique but I was happy with the results.

All thhe Beans together

After (left) and Before (right) Roasting
- Elliot
What If I Told You I Made $100,000?
If I told you I had made one hundred thousand dollars in the last month you’d probably think of me as a rich fellow, right?
Well then what if I told you I was also one million dollars in debt.
Finally imagine you were a bank or some other money lending institution, how would you feel if I’d only told half the story surely, being the fine, educated gentlemen (or lady) you no doubt are, you wouldn’t let this sort of thing happen, it doesn’t tell the whole story. In fact the information on its own it not really worth anything.
What’s Going On.
So truth be told I dont have a tonne of money or debt. But I do see things being judged like this all the time, not really in the case of money (no need for another Enron). I see them everywhere, strange one sided metrics that according to a lot of people dictate just how wonderful your new product/web page/idea/picture of your face slightly off colour because it’s hipster/whatever is. You’ve probably realised that I’m talking about ‘Likes’ ‘Plus Ones’ and whatever other popular metrics are circulating these days.
To me it doesn’t really mean much if your page has 40,000 likes on Facebook because there may well be 400,000 people who think it is evil and should sent, with you, to the darkest pits of the universe. There is really no way to tell, did every one of the 40,000 visitors you’ve had think you were super? Was it one in ten or even one in one hundred?
The problem is the kind of people who strive for nothing but +1′s likes and twitter followers are probably not the kind of people that give a shit whether you are interested or not, they are most likely thinking “hey, if it’s one in one hundred we just need need more exposure for more sales; forget the fact that 99% of people think our cat car seat causes air bag failure.”
Think also of apps many people show their download count as a sign of popularity without considering how many of those people use or have gotten rid of their application.
The Alternatives.
The Down Vote
In more technical terms a scaler metric of quality isn’t really acceptable, we need direction to give the information any sort of meaning. By that I mean we need both positive and negative information; Facebook needs a dislike button google needs a minus one and counting tweets should be outlawed because there’s no way to tell what they say just from the number.
If we look at the Stack Exchange model you can see that both questions and answers can be voted either up or down. This gives an indication of not only how many people liked it but how many thought it was below the site’s standards. In most cases you wont see questions will less than -5 votes because they get closed pretty quickly. Also top quality answers are voted up and based on the original asker’s discretion usually end up being marked as an accepted answer. Thanks to this sites on the stack exchange network like stack overflow have a pretty positive community of people who provide, on the whole, well worded and clear answers to well written and clear questions.
Another example perhaps not handeld so well is reddit on reddit there is basically the same up down voting system which is good for filtering out stuff that is spam or a repost or doesn’t follow the guidelines or what have you. Where the system falls short in comparison to stack exchange is that there isn’t really any restrictions on who can do what. On SE you can post comment and ask from day one but the ability to say something sucks has to be earned. On reddit one could easily create an account and down vote post’s until their hearts are content, and as far as I know this is a pretty common thing. Yeah there are ways to deals with accounts like that but putting a 5 karma cut off on down voting would probably slow this down a lot. A system like this in currently in place on Hacker News and based solely on the things that bubble to the top of the stream it works quite well.
Credible Reviews
So another world that uses one sided metrics is academia. They get away with it however because on the whole only credible sources can promote other people. Peer review and citations by journal articles are only accepted after something gets published which is not simply a case of uploading files to the net. This process obviously doesn’t work everywhere, for one who is the expert on facebook page quality and we shouldn’t we be filtering people’s freedom of speech.
The Apple app store (and more recently Google Play) is another example in which a barrier to entry can help filter (some) spam and rubbish from the system. Apple wants to maintain a certain reputation of providing good quality smut free apps and so all apps submitted for sale are reviewed by an apple employee. Sometimes crap slips through and sometimes apps are denied because they dont abide by some of Apple’s stranger rules but one can imagine there would be a much uglier app store without this process.
Credible reviews don’t have to be made by experts either; you may have friends who’s opinions on certain topics you trust enough to influence a purchase. When Facebook shows that Johnny liked some new shoes or Cindy gave a plus one to a band you were looking at you might think ‘good enough for them, good enough for me’ and give whatever it is a go or ask them for some more information. This sort of thing is already in place with Facebook and Google, with Google taking it a step further and beginning to integrate your friends activity into it’s search results.
The Best of Both Worlds.
So to save this going on forever I think I’ll stop here as you probably get the idea now anyway. I don’t really expect things to change quickly, if at all; no one is likely to put a -1 or a dislike badge on their page anyway and people will continue to fight for pointless metrics to boos their strange sense of fulfilment. That was never really then point anyway; the point of all this was that next time you look at something like this you take a second to question what the metrics mean and whether the information they portray is fair and actually means anything.
-Elliot
(and yes it is a little ironic that most of those social badges below are one sided)
Parsing boolean expressions in Python
I’ve been working on a small DSL at work this past month or so (more details later maybe), but one of the more interesting hurdles was getting from expressions like “a = 5 and ( b = 6 or c = 9 )” to something that I could process easily. I decided to use the Shunting-yard algorithm because I’d played with it in the past and RPN seemed like a good choice for processing the expressions later.
I drafted up a quick python implementation before adding it to the actual project and, as it doesn’t contain any protected content I figured I’d share it. Sometimes if changes are made to the gist it takes a while for them to show up in the embedded version, if you plan to use the code go to the actual gist to make sure you get the correct version.
I can’t promise the code below works in 100% of cases, but it is yet to let me down. Make sure you have spaces in the right place if you plan to use it. The operator list can be modified for your particular needs. Also note that everything that isn’t either in the operator list or a bracket will become a single argument to an operation so “a = 15″ is one element not three.
parse("( S < 16 and T = \"P\" ) or ( S > 16 and L = 50 )") => ['S<16', 'T="P"', 'and', 'S>16', 'L=50', 'and', 'or']Expressions need a space around everything. e.g. "i and ( j or k )" not "i and (j or k)"def parse(statement): arg = "" stack = [] output = [""] consume = False ops = ["and", "or"] for g in statement.split(" "): slashquote = (len(g) - len(g.replace("\\\"","")))/2 quote = (len(g) - len(g.replace("\"","")))-slashquote if quote % 2 == 1: consume = not consume if not consume: if g in ops: while len(stack) > 0 and stack[0] in ops: output = output + [stack.pop(0)] output = output + [""] stack = [g] + stack elif g == "(": stack = [g] + stack elif g == ")": while stack[0] != "(": temp = stack.pop(0) if len(stack) == 0: print "Error Line", i - 1, "Unmatched parenteses" return None output = output + [temp] stack.pop(0) else: #combine everything else into a single token ("i" ">" "16" -> "i>16") output[-1] = output[-1] + g else: output[-1] = output[-1] + " " + g while len(stack) > 0: output = output + [stack.pop(0)] return outputIf you find this useful let me know below.
Elliot
leave a comment