Category Archives: Uncategorized

openssh on Mountain Lion via brew – grumble

I don’t recall why but I installed brew’s verison of openssh using the instructions here on my OSX 10.8.5.   10.8.5 is Mountain Lion.

Ssh stopped working.  ssh -v revealed it would hang at “debug1: SSH2_MSG_SERVICE_ACCEPT received” which after I while I traced down to a hint that ssh-agent might be wedged.

Sure enough launchd’s org.openbsd.ssh-agent was failing.   Console was reporting: ” (org.openbsd.ssh-agent) Throttling respawn: Will start in 10 seconds”, a lot.

This failure arises because the org.openbsd.ssh-agent plist passes a -l switch to ssh-agent, and the one brew provided doesn’t have this undocumented switch.  You can see the switch in apple’s variant, just look for l_switch.

There are assorted pages complaining about this problem, but no solution.  My solution was to change the org.openbsd.ssh-agent plist to use the apple version of ssh-agent that resides in /usr/bin/ssh-agent.

I think I’m happy now.

Continuous v.s. Batch: The Census

Log, from Blamo: Civil War Reenactor

Log, from Blamo: Civil War Reenactor

I am enjoying this extremely long blog post about how logs can form the hub for a distributed system, by Jay Kreps from Linked-in.  It’s TLMR “too long, must read?”  It reminds me of my post about listening to the system, but more so.

He has a wonderful example of batch v.s. continuous processing.  A dialectic worthy of its own post at some point.

The US census provides a good example of batch data collection. The census periodically kicks off and does a brute force discovery and enumeration of US citizens by having people walking around door-to-door. This made a lot of sense in 1790 when the census was first begun. Data collection at the time was inherently batch oriented, it involved riding around on horseback and writing down records on paper, then transporting this batch of records to a central location where humans added up all the counts. These days, when you describe the census process one immediately wonders why we don’t keep a journal of births and deaths and produce population counts either continuously or with whatever granularity is needed.

Cute.  My goto example has always been the difference between the annual cycle(s) that arises from agriculture and tax law revisions v.s. the newspaper’s daily cycle in service of the demand for fish wrapping.

jobscalculatedriskBut of course that’s not really continuous, it’s just batch with different cycle times.  And yet I once encountered a continuous system that involved a pipeline across a desert.  Each time the sun would emerge from behind the clouds the pipe would warm up and a vast slug of material would be ejected out the far end into a hastily build holding pit at the refinery.  Maybe slug processing would be a good fall back term for the inevitable emergence of  batches in continuous systems.  Blame the clouds.

 

Sybil’s Peanuts

Clay Shriky tells a story in his book “Here comes everybody:…”

“Fans of the TV show Jericho were so upset when CBS canceled the show that they started mailing peanuts to CBS in protest using the NutsOnline delivery service. This effort cost the fans real money, so there was no mistaking their commitment, especially not when twenty tons of peanuts eventually arrived at CBS.”

As an illustration to one of the “solutions” to what an apparently insoluble problem in distributed systems known as a Sybil Attack.  Sybil attacks are all about sock puppets.  For example I knew somebody, let’s call them Alice, once who maintained a handful of email addresses (let’s call those Bob, Bill, and Betty) all subscribed to the same mailing list.   When Alice ever got into a debate on the mailing list with another party one of her sock puppets would speak up to support her.

Socket puppet are the bane of lots of systems.  Ebay reputation, Google linking algorithm, voting of all kinds – but particularly on-line voting.  And the only solution that works dependably is to shift the problem to some other identity system – i.e. a central authority that hands out unique identities.  And that solution isn’t hard to critique either.

Assorted schemes have been invented to temper the problem.  The peanuts in the example above are one instance of schemes where you use cost (sometimes called proof of work) to help.  Which of course only means that the rich get more votes.

If you interested here’s a survey of tricks people have come up with.

Years ago i needed a way to generate unique identifiers for components in a distributed system.  This was years before people invented GUIDs.  I was pleased with my little trick.  In the manual I prescribed a little algorithm for generating the component’s ID:  take a one dollar bill and use its serial number, then deface the bill slightly with a smile-face so nobody else will use that bill for this purpose.  Cheaper than a peanut.   As an aside I continue to be surprised how currency serial numbers don’t have check digits, etc.

I was reminded about that trick recently when I bought a candy bar.  This candy bar was part of a contest Google was running.  Each wrapper had number printed inside for use in entering a contest.   I got to thinking that could be used for a unique identifier.   What is nice about the dollar bill and these candy wrapper numbers it they are pretty anonymous.

But if you were going to try to mix those into your trick to temper a Sybil attack you could encode some more information into the candy wrapper numbers, such as information about where they were distributed.  That might be used to invalidate batches of them when an attacker, who would obviously buy in bulk, was identified.

Apparently in the 2nd world war the US stamped all the currency in Hawaii so that if it fell to the Japanese they could declare currency with that stamp upon it to be invalid.  I inherited from my father the habit of occasionally asking a retail clerk if they accept Hawaii money?

 

 

Distraction

distractionI let myself be baited into one of those soul sucking debates that occur on mailing lists.

So, here’s an interesting paper on distracted driving.   The researchers ran a very carefully designed experiment using a driving simulator and then measure maybe a dozen different things as the drivers engaged in various tasks.   They then summed up those measures into a metric they call workload.  What I found surprising is how all forms of conversation are basically equivalently distracting – talking to a passenger, talking on a classic cellphone, and talking on via a handsfree device.   Their scale runs from 1 to 5 where the task that anchors #1 is driving their course, and #5 is an obnoxious task where the driver has to listen to and solve word and match puzzles.

  • 1.00 Driving
  • 1.21 Listening to the radio
  • 1.75 Audio book
  • 2.27 Hands-free cellphone
  • 2.33 Talking to a passenger
  • 2.45 Handheld cellphone
  • 3.06 speech-to-text email system

In the US the legal limit for drunk driving is 0.08, and apparently talking on a classic cell phone is equivalent.   I’ve not found any research on how distracting thinking about internet trolls is.

Inequality .

This chart comes from the Financial Times by way of Roger Pielke.   The horizontal axis runs from poor to rich.   The vertical axis show how much their income changed in the last 20 years.   For example the poorest 10-15% saw their incomes rise by 50% over the last 20 years.  That’s about 2% a year.

So how much did the world economy grow (per person or household) during this 20 years.  I’m not clever enough to answer that question quickly.  This other chart shows world GDP (it has a very cool horizontal axis).  And that suggests that growth was 4% during the first decade and effectively zero during the second.  But I’d take that with a grain of salt.

world_income_change_last_20_yearsOf course, given how skewed the income distribution is, it takes a lot more money to raise the top 10 percent by 2% v.s. the bottom 50%.  This chart totally obscures that.  So while it’s good that the 5%..70% saw their incomes rise I’m not confident that they got a reasonable share of the over all growth.

None the less, a thought-provoking chart.

repurposing a phone

I don’t think I ever mentioned here, in the blog, a little hack I enjoyed doing a while back.  I bought an old android phone ($10 on eBay, boy was it junk!) and repurposed it to fill the role of an Airport Express, i.e. so I could route music from iTunes to the phone and then to a set of speakers.

Naturally that got me thinking of all the curious things you might do with an Android Phone.  For example put it in the car as a nav system, use it as a webcam, or tracking/security device.  If you poke around you can file lists of suggestions (for example).

Some of my more self amused fantasies involve using the camera to look at a sensor, say a thermometer for an input signal and then using the flash, speaker, or bluetooth as the output signal in some over engineered control system.  Say to boil water, or heat a fish tank.

I see that you can now buy a new android phone for $30 at Radio Shack, or online from Best Buy.

Freemium signals stability

SugarSync, a well liked Dropbox competitor, announce it would no longer offer a free pricing plan.  Josh Gans says all the usual things over here, plus one more thing:

That said, it is hard to see this move as a positive one for the company. One of the things I worry about with backup services is that they will always be there when I need them. But the worry is that the company may go under. This move from SugarSync does not inspire confidence in this regard. It is suggestive of a company under pressure and looking to a possible change in industry practices to keep it going.

It’s true.  You appear mean, desperate and weak If you don’t give a lot.  That’s not an industry practice, it’s a universal.  The details vary.

Lost Prevention v.s. Insurance Companies

Consider a fire insurance company.  It sells you some fire insurance.  A bit later you get a letter.  They offers to drop by the house and do a free consultation on how you might lower the risk of fire in you house.  This seems clever and wise on the part of the insurance company.

This is why the insurance industry is very active in setting safety standards across most industries.  A lot of social benefit arises from the pooling of risk, and this kind of standard setting is an example of that.  Agency is not always bad, eh?

But does it ever go the other way?  Can we find perverted situations where the insurance company wants more claims?  Were the loss prevention department becomes the loss assurance department?  Yes we can.

In this story we see the phone companies have intentionally avoided taking steps that would reduce loses that they sell insurance against, i.e. stolen phones.  They intentionally engineer things so there is a vibrant market for stolen phones.  That assures more phones are stolen. That increases demand for insurance.   Insurance policies is very profitable.  It’s good! for the phone company that least.

“Nice phone you got there, would be a real shame if something bad happened to it.”

I’ve written before about scenarios where the problem solver becomes the problem’s advocate.

ROSWHEEL LCD Waterproof 14 Functions Wired Bike Computer 81491

roswell_bike_computer_81491I was unable to find this info on the web, so this post’s purpose is to provide the info for other folks.

I bought a ROSWHEEL LCD Waterproof 14 Functions Wired Bike Computer 81491 from China via eBay for $3.95.  Naturally it takes a while to for delivery.  The instructions were in Chinese.  I think I’m happy.

If you want to get it into setup mode when you first install the battery.   At that point you need to work quickly.   You can expect to repeat the setup a few times till you get the hang of it.  Once in setup one button advances the setting, and the other button advances thru the steps of the setup (speed units, wheel circumference, initial odometer setting).

There many videos on the net illustrating how to set up other bike computers.  Watch those for further suggestions on how this one works.   There I learned there that it’s a good idea to wrap all the extra wire around the front brake cable.

The wheel circumference is in units of 10mm. I had issues getting the magnet screwed on to the spoke, so be careful about that.  I suspect if you pay slightly more you might get a better design for that, and 1mm units for the wheel circumference.

Later, I recalled the Google Translate app claims  to translate little snippets of text.  It is much improved since I last tried it.  Now, it works!  It’s tedious.  It’s very cool.

I bought it from this eBay seller.

Adding Javascript to a WordPress blog post.

I want to put a bit of JavaScript into a blog posting.  Here’s an example doing that.

This is an example!

In WordPress, toggle the editor to “Text” and then insert your Javascript similar to the following example.  Here I load jQuery and then use it to animate a div.

<script type="text/javascript" src="/wp-includes/js/jquery/jquery.js"></script>
<script type="text/javascript">
jQuery(function(){
var x = jQuery("#a1148");
var f = x.css('font-size');
var restore = function(){ x.animate({fontSize: f}); };
x.animate({fontSize:'120%'}, restore);});
</script>
<div id="a1148">This is an example!</div>