Mad Mode by Dan Connolly

Remembering OS-9 on the CoCo

During an annual purge of old file boxes, I came across my 5 1/4 CoCo disks. Much of what I know about unix and linux actually dates back to OS-9 on the CoCo:
OS-9 - Wikipedia, the free encyclopedia: Even on the CoCo, a quite minimalist hardware platform, it was possible under OS-9/6809 Level One to have more than one interactive user running concurrently (for example, one on the console keyboard, another in the background, and perhaps a third interactively via a serial connection) as well as several other non-interactive processes.
I wrote a shell in assembler; I ran across a hardcopy of the source a week or so ago. I wonder if the source is on these floppies. I made a copy on CD a few years back before I de-commissioned my last 5 1/4 disk drive.

There’s a Better Way to Build a Smart TV | The Official Roku Blog

This Roku Streaming Stick looks like a pretty good balance between the simplicity of integration and the upgradeability of componentization.
It makes me question my recent strategy of getting a really inexpensive TV (Haier L32D1120 32-Inch 720p LCD HDTV, Black on sale for $200) and streaming Blu-ray player (Panasonic DMP-BD75 Ultra-Fast Booting Blu-ray Disc Player $60). The Blu-ray player does Netflix pretty well, but the TV doesn't have the new MHL HDMI interface.

A big thanks for Web-iPhoto!

My wife does a photo shoot with the boys for the Christmas card each year. I wanted to share a digital copy of the photo, but our family photo archive is a mess, with N iPhoto albums on M macs and K backups on X linux boxes.

I know iPhoto is just JPG's and sqlite underneath, so it kills me that I can't just get at the photos with a web browser. I could code something up myself, but surely somebody has done it before, no? I've looked without luck before, but I guess I was using the wrong search terms. Today when I wished for "iphoto sqlite web server", lo! Merry Christmas to me!

Web-iPhoto

Thank you, Dmytro Kovalov!

It works great on a huge iPhoto library backed up on this linux box.

Here's hoping I can install it on the macs in the house running various versions of OS X. I have lots of experience with python on macs, but not so much ruby. I sure hope I don't have to install XCode.

Capability Security in E, coffescript, python, dart, and scala

A couple months ago, I inherited some Java code and took on the task of fixing a bug in it. The bug turned out to be a consequence of a silent failure; eek! And there were precious few tests and no way to test the parts without being connected to LDAP servers and SQL databases and such. This started me on an exploration of current best practices in testing. And since the job of this code was policy enforcement around patient data, I could finally justify getting my hands dirty with capability-based security. I discovered, as many others have, that both testability and security are well served by some of the same basic object-oriented techniques.

Dependency injection frameworks always smelled like overkill to me, but after watching Miško Hevery on testability, I was convinced. If you're in the mood for text rather than video, see his Guide: Writing Testable Code. Basically, instead of having some policy enforcement object constructor call an LDAP connection constructor, the policy enforcement object takes the LDAP connection as a constructor argument. "Don't call us; we'll call you" is a handy mnemonic. This lets you substitute a mock LDAP connection for testing.

It also forms patterns of cooperation without vulnerability.

For example, take a look at the simple money example in E and the underlying sealer/unsealer pattern.

I have been using these as an exercise to explore some of the recent programming language developments:
The coffeescript translation seems completely natural, to me. Given the right static scope (i.e. without most of the JavaScript standard library), I think it has the same security properties as the E version. And the E idioms seemed to translate quite directly.

Python has not only the API authority issues, but also untold introspection loopholes. Plus, I had to kludge around read-only closures and no-assignment-in-lambdas; and while simulating E's method suite idiom is not too ugly, tools like pyflakes don't recognize the results.

Dart is a big disappointment. Everywhere else I look, Google is pushing capability security. But Dart lacks nested classes, so translating E method suites results in something that is only vaguely recognizable, let alone comprehensible.

Scala works reasonably well. The Java implementation of sealing relies more on  strong typing than the object graph for rights amplification; I might want to think that over some more. Also, It's a little boring to spell out the types. I might have to try it in Haskell. But on the other hand, as Brendan Eich observes:
Dynamic languages are popular in large part because programmers can keep types latent in the code, with type checking done imperfectly (yet often more quickly and expressively) in the programmers’ heads and unit tests, and therefore programmers can do more with less code writing in a dynamic language than they could using a static language.
The balance between static and dynamic languages also shows up in development tools. I had the eclipse with the Joe-E verifier, maven, and mercurial working all together at home one evening. The code really does just about write itself at that point. But when I tried to reproduce it at work, I got so frustrated that I retreated to emacs and python and looking up function arguments manually. The python version of the project has gotten complex enough that I'm starting to miss some of the whole-program consistency that Java tools give, but I'm getting by with a bottom-up approach: flymake, doctest, and the like.


Medical Informatics, Peer Review, and Open Access

Three issues of JAMIA just arrived, weighing not just on my desk but also on my mind: success is defined by my peers in my new field, medical informatics, as publication in a journal where the readers have to pay for access. After fifteen years as an Open Web advocate, this grates on me.

But I see that change is already underway. While JAMIA is the top journal that I hear about in the office so far, a quick trip to Wikipedia shows that it's second in impact to an open-access journal: Journal of Medical Internet Research.

Secure Mashups: CSRF-resistent alternatives to WebID

I think WebID is headed in the wrong direction. It separates authorization from authentication, which is widely believed to be a good practice, but proves spectacularly bad practice when it leads to cross-site request forgery.  I have tried to explain my misgivings to the WebID proponents, but I didn't have much in the way of an alternative to suggest. Until today, when I found Sitelier and Belay Research.

The Voters First Pledge: what do my elected representatives have to say?


I find politics so distasteful that I rarely get directly involved, but on June 4, after I watched Inside Job, I felt compelled to exercise my right to petition government for redress of grievances. I wrote the following to my elected representatives, Moran and Roberts, via opencongress:
Representative democracy in America has clearly been corrupted by big-money interests.

The Fair Elections Now Act S.750 and the The Voters First Pledge look like reasonable steps, to me.

I don't see you among the supporters.

Please sign the pledge, or at least explain to me your position on the bill.

Thanks for your consideration and your service to our country.

Sincerely,

Daniel W. Connolly
I got automated acknowledgement of receipt from both of their offices, but no response since. I don't expect more than a form letter. How long does it take to send one of those? Over a month, evidently.

Sigh.