Satisficing is one of those funny looking words that a few academics use, but almost everyone else thinks must be a typo. It is however a subtle and wonderfully simple concept, and a valuable tool for anyone making decisions in a resource constrained world. Which is almost everyone...
Clubhouse is a great tool for software teams to manage their work. It includes a Slack integration that can pick up ticket URLs in chats and expand them with details, and can also generate a message feed of activity on those tickets. What it can't do however, is narrow down that firehose to just a few types of activity that are of interest. This post shows how to use Microsoft Flow (similar to IFTTT or Zapier) and Clubhouse's webhooks to build it yourself. In the gallery below, you can see the gist of the flow: 1) The flow's trigger is receipt of a JSON payload into a webhook destination. This webhook URL is added to Clubhouse's webhook integration in the Clubhouse settings. 2) The schema of that JSON is automatically created by posting in a sample payload from Clubhouse's webhooks API documentation (or just copy the code sample shown below) 3) A few conditions are checked - `actions` is present and set to `update`, `changes` exists under that and is set to `completed`, etc - and finally the inner block of JSON under `changes` is parsed to expose the fields of interest. 4) Finally, a message is posted to Slack that reports the activity type we're interested in. Ultimately, the output ends up as a nicely formatted Slack message with a direct link back to the original ticket. The flow itself runs once per activity on any Clubhouse ticket, but only posts to Slack for those activities that we actually care about. It would be great if Clubhouse would update their Slack integration to allow us to use multiple of them per workspace, and filter the output directly - but until that's possible, this hack has helped us raise the signal to noise ratio! It's also possible to query the Clubhouse API directly from a flow (or an IFTTT, or a Zap). For example, I could have updated this to query the ticket details and pull out the owner's names, or the date it was started, etc. I'll leave that as an exercise for the reader... JSON Schema for Base Webhook Payload
JSON Schema for `changes` payload
I recently spent a week locked in a boardroom with my management team and chairman developing our company strategy for short, medium, and long-range horizons. At one point during that week I stumbled upon a new way of representing and evaluating choices between different projects, each with different resource requirements and benefiting different customers or segments. At its core, it's a directed graph. In this simplest of examples, there's a project A which costs 2 units. Project B depends upon 100% of A and itself costs 5 units. What does B really cost? B + 1.0 * A = 5 + 2 = 7 units.
Simple enough, right? Nodes are projects, and have costs. Edges are dependencies between projects, and have weights. The full cost of any project is the weighted sum of all its dependencies and its own internal cost. Sales of board games will go gangbusters.
Wait, what? How is that related to autonomous vehicles? Ok, let me back up a bit... This question specifically asks for the least obvious ways autonomous vehicles will change the world in the next two decades. Given that, let's establish what progress autonomous vehicles will have made in that timescale, and also start with a list of obvious things to get out of the way. Current middle-ground estimates for when legally approved autonomous vehicles will be able to operate on public roads range from "next year" to 2025. From a technology standpoint I agree, but I'm not confident the bureaucracy will follow suit so quickly - perhaps in a few places, but certainly not everywhere. (Even as I write this, Google's self-driving car division is pushing the US government to make changes to federal laws that are expected to take decades to implement [1].) But within five to ten years of the first cities having the benefits that autonomous vehicles bring, there'll be sufficient public and industry pressure to force the laggards into line. When the benefits are so obvious, and the safety record puts humans to shame, you'd be a very short-lived politician if you tried to buck public opinion and insist on banning them. We're already seeing every major vehicle manufacturer [2-5] putting massive resources into the technology, and even 3rd parties like NVIDIA building technologies [6] specifically to support this industry. It's a safe bet that within that same sort of timeline (5-15 years) the technology behind vehicular autonomy will have become commoditised enough that every brand will have at least a few autonomous models or options. Within the two decades allowed by this question, I'm confident not only that autonomous vehicles will be commonplace, but that most societies will also have changed their laws to allow unmanned vehicles (i.e. empty vehicles, or passengers only - no human driver/supervisor) to operate on public roads. That covers my expectations of how far the technology and social acceptance will change, so given that, what are some obvious ways the world will change?
Here are some not-so-obvious, but very likely ways that autonomous vehicles will change the world - and remember - within the next two decades.
The world will change significantly in the next two decades, and autonomous vehicles will most certainly be one of the most impactful forces. While much of their impact is obvious and inevitable, the cascade of changes they bring about lead to an exciting concert of possibilities. I've presented some of those I feel are both non-obvious, yet also likely. I can't wait to build the future and prove myself right! References: [1] Exclusive: In boost to self-driving cars, U.S. tells Google computers can qualify as drivers [2] http://www.audi.com/content/com/brand/en/vorsprung_durch_technik/stream.html#topicFilters=vdtexp:Technologie/piloteddriving [3] BMW autonomous car [4] Volkswagen Group of America [5] Ford Tripling Autonomous Vehicle Development Fleet, Accelerating On-Road Testing of Sensors and Software [6] http://www.nvidia.com/object/advanced-driver-assistance-systems.html [7] Robotics [8] http://assets.dft.gov.uk/publications/climate-change-transport-choices/climate-change-transport-choices-full.pdf [9] Barriers to cycling [10] Demand Response | Department of Energy [11] Quanergy Announces $250 Solid-State LIDAR for Cars, Robots, and More [12] Hobby Games Market Climbs to $880 Million (Originally answered on Quora at: http://qr.ae/ROxTTi) There's a great question on Quora that asks people to explain their theses in layman's terms. (Every Ph.D. should be expressible in a single sentence, and some of the answers here have this down to a fine art!) It certainly isn't simple to explain where I blew three and a half years of my life, but here's my attempt. My research answered the question of how you solve problems when the problem itself is changing while you try to solve it. Imagine you're trying to work out the fastest route from one side of your city to the other, but while you're working it out people keep having car accidents that block roads, tow trucks keep clearing previously blocked roads, and the local council is constantly building new roads (really really quickly!) Adding to that, even when you've worked out what you think is a good route, while you're driving it the roads are still changing constantly. My work showed that in most interesting applications of this problem (not just roads and driving, it applies in lots of other contexts as well), the time you spent working out a solution is quite large. If you want the 'perfect' solution, it could be so large that you would have been better off to drive a slower route but not spend so much time thinking about it in the first place. I found a way to quantify all these factors, and a way to solve what you really want; not "find me the fastest route across the city", but rather "get me to the other side of my city as fast as possible". I was also able to prove that my method was guaranteed to be at least as fast as any other method, and most of the time was much faster. Oh yeah, and I built a robot to do the driving... :-) ![]() In a lot more detail, here's how the technique actually works. (And I'm not just being self-indulgent here - somebody actually asked for this...) Everything comes down to time. If we stick with the driving example that'll help. What you really want is to get to the other side of the city in the shortest amount of timing, starting RIGHT NOW! Let's focus on just the one decision point right at the start - whether to set off instantly on a beeline for your destination, or to sit and plan a better path for a few minutes and then set off. Let's use some easy numbers and say it's 100 minutes drive across the city via the best route, and 200 minutes via the worst route (the one you can calculate instantly.) Let's also say it takes 20 minutes to calculate that best route. Your two options are: a) Planning time of zero, plus driving time of 200 minutes = 200 minutes. b) Planning time of 20 minutes, plus driving time of 100 minutes = 120 minutes. Obviously, b) is the better option. But actually, this isn't just a binary decision. There are many other options in the middle ground. (Straying away from common parlance, there's a class of algorithms called anytime planners that help find these middle points.) Often, problems turn out to have a solution that takes perhaps 1 minute of calculation time, but results in a driving time of 101 minutes. So, it's not the best route, but the total time is 102 minutes which is better than the total time for the best route. (In technical language, this is the Pareto optimal decision.) The key point is that the "best" route is not the best route when you take the planning time into account. (Except when it is. But that doesn't happen much in practice!) Ok, let's step it up a notch. There's actually a catch here too - assessing all the possible points on the spectrum between the worst and best routes also takes time. Let's call that the Decision Making time. Since that counts for the total time too, you'll need to minimise it as well, which might mean that it's better to only think about perhaps 5 options, rather than 50. Perhaps... Alternatively if the right option was one of the 45 you didn't consider, then maybe it would have been better to spend the Decision Making time to find that option, and then ... ARRRGGGHHH!!! If you're thinking this is all getting a bit meta, you're exactly right. This class of problems is called Meta-computing. Ok, let's step it up yet another notch! In the driving example I discussed in my answer, the roads keep changing while you're driving. Ignoring a few of the less interesting considerations, this effectively means that you have to go through the same decision making process all the bloody time! So the best you can do is to start moving (as long as it's in roughly the right direction) and keep adjusting your route while you're driving. Whenever you settle upon a new choice of route, start driving it, and simultaneously start thinking about what you might want to do next. Do that until you reach your destination, at which point you can collapse in an exhausted heap, completely unable to think of anything else. Why did you need to drive there again? In terms of what you actually need to do with all the choices you make, it comes down to the problem at hand. First you guess how much Decision Making time to spend, then you spend it evaluating the options - which involves guessing how much Planning and Driving time each option will require. Then, you pick the option you've guessed is the best, and you start planning it. Finally, you take the plan and start driving it. Then you repeat. It's at this point that you re-read that last paragraph and ask "so what's with all the guessing?" Well, unfortunately, reasoning about time is reasoning about the future. You don't know how long something is going to take until you've actually done it, by which point it's too late to use that information because you've just done the thing you had to do to get the time it was going to take to do the thing you were just having about to had been done. I think... The only solution to this is to guess. Much of the contribution of my thesis was designing and testing a whole bunch of different ways of doing these guesses. In the end, what you can say about this technique is that it is guaranteed to be no worse than any other technique that has access to the same information. I proved that. It probably doesn't sound like much, but it's actually very important because a lot of the time you're actually much better than other techniques if you use my technique. And since you're not going to be worse, you might as well use mine, just in case it's better! So that's the common parlance explanation. In mathematical terms it's: where y* is the optimal set of parameters to apply to the system out of the set Y of all possible sets of parameters, and the 't's are the Decision Making, Planning, and Driving times respectively, summed over all future time until the destination is reached. Well this has been an eventful evening. My wife was going out with some friends, so she made me park on the road (since I'm only 80% of the way through digging a new driveway.) Nothing eventful here, but this is what writers call "foreshadowing"...
Once she's gone after dinner, and while my son is in the bath, the dog goes absolutely bananas barking. I pick up the wet and now angry son, rush downstairs, let the dog out the back door because I assume she wants to wee, and go back upstairs to the finish the bath. About 30 seconds later, I hear demented barking from outside the house. Oh shit. I could have sworn I saw my wife shut the gate. Oh shit. Oh shit. Oh shit. I grab my son, plus towel, run downstairs towards the back door, only to almost trip over a frantic dog who is sprinting back inside. I slam the back door closed, turn off the light I'd left on out there, and start drying my son properly. Still a bit curious about what she was barking at, I'm preparing to take the child back upstairs to get into his pajamas when the barking starts again from inside the house! Oh - there's actually someone at the front door. Well that makes more sense. It's a very grumpy neighbour I've not met before. He's just been knocking at the front door, then some crazy neighbour set the dog on him, then he went round to the back door only to have it slammed in his face and the lights turned off. Oops. "No worries mate. I'm actually here about your car..." "Uh, what about it?" "Did you park on the road tonight?" "Yes. Why?" (Oh shit. Oh shit. Oh shit.) "Well you parked in a really stupid place mate, and I've gone and backed into it in the dark." *sigh* "Oh shit." "Shit! Daddy said shit!" "Hey! Don't say that word!" "Sorry Daddy" "I don't think it's too bad actually. Just some of the white paint is scratched and there's a bit of a dent in one panel." "Hang on - my car is red." "Oh. This one is white." (Woohoo! Not mine!) "Sorry mate, I don't know whose that is." "Ok, sorry to bother you." ... "Car went crash!" "Yes buddy, car went crash." Finally, I read my son a story and put him to bed exhausted. There's a tiny black spider on his radiator. I grab and squish it in my fingers as I leave the room, thinking I'll just rinse it off in the bathroom on my way back downstairs. That's odd - why does it have a red blob on its back? Oh shit. ![]() I've had a vague plan to augment my coffee table with some media centre controls for a while now, but when my brother's partner bought two MakeyMakeys for my son I uh... "borrowed" one for myself. Today I finally kicked off this project by re-mapping the inputs to keys I wanted it to trigger, but hit a difficulty with non-standard media keys for volume control. Essentially, the MakeyMakey presents itself as a USB HID device - like a keyboard/mouse combo - and you then hook up anything conductive to an input, and use that to complete a circuit through to ground which then triggers a key or mouse movement. My plan is to have some coins or brass discs embossed into the surface of the table, and use these as attractive (and toddler-proof, since there will be no moving parts) keys. Unfortunately, under the hood the MakeyMakey is essentially an Arduino board, and the HID implementation is designed to help Arduino's target market - not embedded software engineers. One irritating feature is that they want users to be able to easily say something like sendKey( 'a' ) rather than sendKey( 0x61 ), and in their infinite wisdom they've managed to implement this in such a way that you actually cannot send anything other than an ASCII character or modifier key. Great, we can signal to our typewriters to reset their carriage feed, but not send a volume up command because typewriters only have two volume settings anyway; 'loud' and 'obsolete'. I swear that joke was more funny before I wrote it down. At any rate, for my first ever Arduino program, I've gone in and edited the core library to workaround this. This commit shows the necessary changes to the MakeyMakey code, but the additions may well be helpful for any other Arduino based projects that require HID device work. I spent a while refreshing my HTML front end skills while trying to get a basic electric imp prototype going. Since the EI forums have a paucity of information on this topic, here's a basic guide and some sample code. The point of this code compared to others you might find is that this one doesn't require access to the electric imp Agents beta test, doesn't require the use of jQuery, doesn't need you to have a PHP-capable webserver, and is really really simple. This demo code is a basic webpage with five buttons corresponding to servo motor positions. You could use a slider instead, or toggles, or drive LEDs - whatever. The point is that clicking the buttons uses asynchronous javascript to POST to the EI API without loading the API response as a new webpage. So you don't see the "OK" and have to hit your back button. Simply dump the index.html file on your webserver with your HttpIn node's API endpoint, and your impee's UID in the obvious spots. Yes, this is a security risk, but for a basic prototype I and you probably don't care. Later on, when everyone is using Agents anyway, this won't be a problem. For now - enjoy! Update 18/09/2013 - Added code for doing the same thing if you do have access to the Agents beta test. The HTML code stays the same - other than pointing the httpRequest to agent.electricimp.com/... instead of the older api.electricimp.com/v1/... - but you can remove your HttpIn node from the blueprint, and then use the attached Agent and Device scripts similarly to the original. |
This blog is very seldom updated. Having kids will do that.
Archives
October 2019
Categories
All
|