Miscellaneous, etc.

tips, tricks, speculation and conjecture

Java Swing Demonstration

I recently stumbled into another conversation about Java Swing here at
the office. It's been a while since I've worked on a Java GUI
application of any significance and I'm surprised that we still don't
have any exciting examples of solid, attractive Swing
applications. The library is mature and while it may not be the
easiest to approach, it is powerful and applications that leverage
Swing can look great.

When I was working at Miller Samuel, Inc., I worked night and day on
a real-estate appraisal management system and we leveraged Swing
heavily to provide an attractive desktop application. Below is short
demonstration video we put together towards the end of the development
cycle.

Swing has a lot of functionality and the object model is, perhaps,
more complicated than it needs to be. That said, it's definitely worth
the effort!

Flower and Distributed Data Stores

Whenever people are talking about the storage and management of their medical information, privacy is always a key concern. The fear is that deeply personal information about ourselves will somehow be used against us. This is an important concern that still hasn't been adequately addressed by health care organizations today.

Privacy and security are huge topics, much too large for me to even attempt to treat in a comprehensive manner. What I will talk about is one step we can take towards a more secure environment and that is to distribute our personal data only to those organizations that we trust or have a relationship.

1 What's Wrong with a Clearinghouse?

From a technical perspective, the easiest solution to architect and implement would be one large central storage location. Everyone's data would be stored in one place and everyone would know where to go when they needed the information.

On the face of it this sounds reasonable. It meets some of our most importation criteria: it's simple and easy to understand, it makes sense. But think about this for a minute… What other successful system is setup in the same way? How did we architect other really important systems, like banking?

Most of our important infrastructure is distributed. First, it helps us avoid the largest architectural flaw: a central point of failure. When we spread our resources across a network, we ensure that at least some of those resources are available even in the case of a disaster. Second, it supports a secure environment by spreading out our resources. If someone were to get unauthorized access to our clearinghouse, they would effectively have access to everything we are storing. In a network, when a node is compromised is can be cut off from the rest. Only one small chunk of our data would be exposed in the case of a break-in.

Lastly, it's difficult to find someone to be the caretaker of such an important data store. All of the medical data about every person in the country is an impressive idea and we'd want that data protected by someone who we can trust. Someone who is above corruption. In reality, probably someone who doesn't really exist.

In a network, we're talking about smaller stores of data, it's less scary right off the bat. We're talking about ourselves and our immediate family. We're talking about the data that our primary care physician's office manages, we're talking about the data that our dentist is managing. We know who these people are and we already have a relationship with them. In many cases we are already trusting them with our health and well being, with our lives.

In the network scenario, you know who is storing and managing your data. If you feel that your primary care physician's office isn't storing your data according to your wishes, you are free to find another primary care physician and move your data. That is one of the most important pieces of the puzzle: you, the customer, the patient, have the final call on who manages your medical data.

2 What Does Flower Mean by Distributed?

It's still early days for the Flower project. We are hard at work and at this stage we are still sketching out what the specification would look like. Still, even now, it's clear that a network is the way to go. Health data needs to be distributed, it needs to be managed by the people who the patient has entrusted with their information.

In the Flower ecosystem, each health care organization would manage their own Flower node. The organization would store (or replicate) all of their customer's data in their Flower node. For instance, if the organization didn't have an electronic medical record system they might be able to put a very simple system together that interacted with their Flower node directly. If an organization had already made an investment in a system, that system could interface with their Flower node by letting it know whenever a patient's data had been changed and pulling new data from the Flower network through the node and into their system.

In most cases your primary care physician's office would represent your "Flower Home", the place where most of your medical data was stored. While you won't be required to keep all of your data in your Flower Home, for most people this will be the easiest way to manage their data.

Let's say you are referred to another physician, Dr. Daviss. Your primary care physician would most likely be in communication with Dr. Daviss and they would have already discussed your care. Dr. Daviss would send a request to your primary care physician's Flower node for the data about you that they feel they need. You would be notified, perhaps by an e-mail, and you would need to approve that request. Once you approve that request the two Flower nodes would be linked, your primary care physician's office would be sharing some of your information with Dr. Daviss' office.

The model is that of publishers and subscribers. Your primary care physician is publishing some of your data (the information Dr. Daviss requested and you then approved) to Dr. Daviss. When your physician adds or updates your data, the Flower node would publish the bits of that information that was shared out to Dr. Daviss. In effect Dr. Daviss is a subscriber to some of your medical information.

The beauty of this system is that information can flow both ways. In most cases your primary care physician would also request access to the data that Dr. Daviss is writing about you. This would be another request that you would need to approve and, most likely, you would do so. Your primary care physician would then become a subscriber of Dr. Daviss' office. Whenever Dr. Daviss updated your medical data, these changes would be published to your primary care physician.

3 Isn't a Central Data Store Sometimes Good?

Sometimes there are very good reasons for a central data store, the Flower system can participate in a clearinghouse. The only catch is that every person represented in the clearinghouse will be required to grant that clearinghouse access to their data.

This works identically to the example above. You, the patient, would be required to grant the clearinghouse access to some of your medical data. If at some point in the future you decided that you no longer wanted to participate, you would revoke the clearing-house's permission to your data.

4 Security and Revocation of Rights

As I said, the Flower project is just starting to heat up. Things are in flux and subject to change. Right now we are envisioning Flower nodes directly connected to the public Internet. Each Flower node would use the same industrial strength encryption that is used by your bank, Transport Layer Security (TLS) and Secure Sockets Layer (SSL). In this setup, each node would provide a certificate that establishes it's identity through a trusted third party.

The rights of access that you grant will reside with the publisher. In the above example, your primary care physician would keep track of the organizations to whom it was publishing data on your behalf. If you were to sever your relationship with Dr. Daviss, you would have your primary care physician's office cease publication to Dr. Daviss' Flower node.

There might be situations where you wanted to actually remove data that you had shared from another organization's Flower node. Perhaps an organization you used to work with is changing focus or merging with another organization and you don't want them to retain your records. Your primary care physician will stop publishing data to that organization's node but what happens to data that the node has already received?

This is a situation where Flower only specifies the behavior that it can control. No one expects Flower to erase the memories of your data from another physician or health care provider's mind, likewise the Flower network has only limited control over the nodes on that network. In this situation the publisher's node will issue a revocation message to the subscriber's node. The request will detail the information that the subscriber's node is required to purge. The subscriber's node will then purge the data and send a confirmation message to the publisher.

The responsibility for purging the data lies with the subscriber's node. Technically the Flower network cannot force the purge, it is conceivable that the subscriber node could send the confirmation without purging the data. Information that had been shared by the Flower node with other systems that the subscriber works with are also beyond the control of the Flower network. This level of enforcement needs to be handled legally, perhaps through agreements that all members of the Flower network need to abide.

5 Stay Tuned…

In my next installment I'll talk about identity and how the Flower network identifies individual people and organizations as a whole.

Filed under  //   flower   hcflower   healthcare   replication   speakflower  

Thinking About Flower

I work for a company that generates most of it's income from health care and I've been hearing more and more about the Flower, the electronic soon-to-be lingua-franca of health care organizations. As I do more research and gather more information on what Flower is and isn't, I'll write a series of blog posts that summarize what I've learned.

1 What is Flower?

Right now Flower is in flux, it's early days and people are only beginning to outline the goals for Flower. What has been decided is that…

  • Flower will provide the mechanism that health care organizations use to transmit medical data between each other.
  • Flower will provide an interface that people will use to ensure that they have control over who has access (or has accessed) their medical data.
  • Flower will provide an easy-to-use and intuitive mechanism that will enable health care professionals to ask a patient for access to some or all of their data as well as a mechanism for people grant or deny that access.

Flower isn't trying to provide a personal health or electronic medical record. What they are trying to do is sketch out how an emergency room physician at your hospital might reach out to your primary care physician to find out more about you, and how this can be done in such a way that you feel in control and your privacy is protected while at the same time ensuring that you get the best care possible. It is no small feat! If you look around for other products that are working to meet this need, you won't find much. Flower looks to be the trailblazer, in fact, they may be the only people trying to address this very real need.

2 What Problems Will Flower Solve?

Right now there isn't a formal process for getting your medical records from one organization to another. More likely is that everytime to work with another health care professional, they open their own file about you. For instance, your primary care physician may refer you to a specialist. That specialist won't have any information about you at all and will start collecting by asking you about your history. Anything new that the specialist learns may not make it back to your primary care physician. That information is effectively locked up, it's only available if you instruct other health care professionals to contact that specialist and collect that information.

When you get into a situation where you are seeing more than one or two specialists, the situation quickly becomes difficult to manage. If you were to get into an accident and were receiving care from an emergency room, collecting all this information quickly becomes impossible. If you are incapacitated and can't speak, there's little that can be done; the emergency room physicians will simply do the best with what little information they have on hand.

The situation with prescriptions is not much better. Because communication between health care professionals is loose and ad-hoc, it's very difficult for them to keep in touch with each other. Surprisingly, the Internet hasn't helped this situation much at all. While it's true that they could send e-mail back and forth, e-mail itself is not a very secure method of communication. Even if it were, it's difficult to sort the important information from advertisements and junk-mail. Take a look at your own inbox and I'm sure you'll get an idea of what I mean.

This is the problem that Flower will solve: communication between health care professionals. Even better, it will also help them communicate with you!

3 Patient Control of Patient Data

One of the interesting things about Flower is the role of the patient. In Flower's view, the owner of the data should be the person making the decisions about where that data goes and who has access to that data. In almost all cases, according to Flower that person is you, the patient.

The vision is that when you visit a health care organization, the professional you are dealing with, let's say Dr. Stanley, will let you know what kind of information about you they need. If you are participating in Flower, they will send a request (via Flower) to the health care organization that has that information, in this case your primary care physician Dr. Morris. The system that Dr. Morris works with will receive the Flower request that Dr. Stanley sent and will check to see if you have granted Dr. Stanley access to this data. Dr. Morris' system will see that you have not and will hold the request, it will not send any data.

You will then log into your health care portal, which is also participating in Flower. The new request from Dr. Stanley will be visible and you will have the opportunity to approve the request. Once you do, the information that Dr. Morris has will be provided to Dr. Stanley's system.

The architects of the Flower system are discussing the nitty-gritty details of how this access will be managed right now. Perhaps you will grant Dr. Stanley access to the information he needs for a specific window of time. There's also talk of a mechanism that lets you revoke access, for instance if you end your relationship with Dr. Stanley.

The key difference between Flower and the competition is the role of the patient: it's your data and you decide who gets access to your data.

4 Health Care Professionals Get Only the Data They Need

Another way Flower is challenging our notions of how data is shared is the idea that not all data needs to be shared all of the time. When a health care professional begins a relationship with a person, they don't necessarily want access to the entirety of their medical data since that person's birth. That's a lot of information and they often know exactly what information they need.

Every time a health care organization collects data about you, they become responsible for insuring the validity, integrity, and security of that data. The less data they need to store, the less data they need to worry about. Flower takes a good amount of this concern about privacy and security out of the hands of health care professionals. For the most part, if they have access to some of your medical data it's because you granted them access to that data.

When you decide that a health care professional or organization shouldn't have access to your data anymore, Flower will ensure that they know it.

5 What's Next?

While all this sounds great, how does this Flower system work? Where is the data stored and how does it get from one organization to another? There was talk about people managing their own medical data, how does that work?

I will explore these topics in the coming blog posts as more information comes to light. Even though is early days for Flower, there are still exciting things happening. Putting together the nuts and bolts of a decentralized medical data storage system is an exciting task!

Are We There Yet?

I've been participating in the Strictly Professional podcast with some of the other developers out here in Western MA. Chas has done a great job organizing and inviting people and it's been a lot of fun.

http://strictlyprofessional.wordpress.com/

He's linked all of us to our websites and, as you can see, I don't update mine all that often. I'm going to try to do a little better in that regard. Of course, I've said that many times before.

Are We There Yet?

Rich Hickey's presentation at the 2009 Java Virtual Machine Language Summit was briefly mentioned in the first Strictly Professional podcast but wasn't discussed much in that episode. It's a really interesting presentation and if you haven't listened to this yet, you really should. He tries to challenge a lot of our assumptions about what a programming language should look like.

http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey

Most of the time we argue about what makes one implementation language better than another, why some people are devoted to Python and others to Ruby or Perl or Java. Every so often Linus Torvalds will take a pot shot at C++. At first they all seem so different, but after you work with four or five of these languages they start to seem more alike than anything else. They all make some assumptions and, for the most part, they are all the same assumptions.

In his presentation, Rich Hickey highlights one of the big assumptions that these languages make: the conflation of state and identity and the role of time. He spends a lot of time talking about mutable variables and why they are bad and how they make it difficult to model the complex interactions of systems. In the course of this discussion he skates across some important philosophical concepts like the nature of perception and the meaning of identity. At the end, he mentions that he has his own language and that tries to deal with some of these issues, that language is Clojure. 

http://clojure.org

I have done some work with Clojure and I will say that it is a very different way of looking at the problems that developers are trying to solve. It's very interesting, if for no other reason than that it's so different from many of the more popular languages. It doesn't take long to appreciate how different it is, right off the bat you have to deal with variables that cannot be changed.

It's also exciting to see computers becoming fast enough and complicated enough that we need to look for solutions like Clojure. Ever since I've became involved with programming in the late eighties people have been telling me that we are on the verge of very real and shocking change, yet, for the most part, we write code in the same way people wrote code in 1960's. For the first time in my life, I'm starting to believe the hype, I think we may be on the cusp of a new era in software development and code construction.

Filed under  //   development   philosophy  

Changing My Polyphasic Sleep Schedule

My plan was to adapt to the Uberman sleep schedule (one 20 minute nap every four hours) and stick with it for at least a month, hopefully longer. After nine grueling days I started to feel like I was backsliding, on the ninth day I could barely stay conscious and, when I was conscious, I was no fun to be around. I had taken a week off from work to adjust to the schedule and my time was up. At 2:00am in the morning, I went to bed and slept until nearly 8:00am.

 Everything I had read about the Uberman schedule implied that most people start to feel better around day five or six although some people might need seven. That it was taking me so long pointed to something going wrong. My thinking is that maybe I was a little too good at taking naps. I enjoy naps already and I'd fall asleep soon after my head hit the pillow, perhaps this lengthened my adjustment period.

 I was planning on abandoning polyphasic sleep alltogether but I decided to shift over to the Everyman schedule (one core nap of 3 hours and then three 20 minute naps). I figured I had already suffered nine days of sleep deprivation, I should do whatever I could to reap some kind of benefit. I'm on the second day of the Everyman schedule and, so far, so good. I've been pretty productive at night, right from the start.

 The adaptation period to the Uberman schedule is widely believed to be about a month, for the Everyman schedule it's estimated to be between two and three months. There's plenty of time for my to mess up the schedule and end up back at square one, wish me luck. :)

Another Sleep Update

Things are definitely getting easier, last night (Friday) was definitely the toughest. I had to spend a lot of time jogging in place just to keep my eyes open and every activity needed to be completed while standing. Tonight was much easier, I had trouble waking up but once awake I stayed awake.
 
There haven't been any slip-ups in my schedule since Tuesday, I'm really proud of that. It's tempting (and easy) to let my guard down. Tonight I'm starting to see some pay off. I sat down at around 4:15am and completed some freelance work, I was a little slow but not enough to make the work frustrating.
 
Changing the temperature of my office has made a huge difference. I turned the temperature down to 65, it keeps me slightly uncomfortable and that makes the drowsiness easier to handle. After I wake from my 11:00pm and 3:00am naps, I've been riding the bicycle trainer fairly vigorously for about half an hour. I top that off with a bracing, ice-cold shower and at that point I'm mostly awake. Staying alert seems to be one part posture and one part activities.
 
The numbers are shocking, I've been on the new schedule for 168 hours. In that time, I've only slept 14 hours! Now that I'm becoming more productive my mood is improving and I can feel some of my excitement for this project returning.

Filed under  //   polyphasic   sleep  

Polyphasic Sleep Experiment Update

I'm about halfway into the third night of my polyphasic sleep schedule and, so far, things are going pretty well. I've mentioned it to several friends and there seems to be some real interest in my progress, I thought I'd try to describe the last couple of days in this post.

 First off: "polyphasic" means more than one phase of something. Any sleep schedule that has more than one chunk of sleep in it is polyphasic. This would include sleeping for five hours at night and then another hour in the afternoon as well as extreme schedules where you only sleep for twenty minutes every four hours. Dustin Curtis wrote a nice article about these kinds of sleep schedules: http://dustincurtis.com/sleep.html.

 I'm going with the most extreme schedule, I am sleeping for twenty minutes every four hours. I nap at 3, 7 and 11 in the morning and at 3, 7, and 11 at night. So far things are going much, much better than I expected. I thought I'd be really cranky and kind of a jerk to the people around me, I've been planning on being too mentally exhausted to do complicated chores. So far, neither of these has come true. Sometimes I get a little cranky right before my nap but when I'm awake I'm pretty much all there. I may not feel comfortable writing code but I'm okay to do almost anything else.

 I enjoy drinking coffee but I don't want that to interfere with my adjustment to the schedule, I'm actually cutting down on how much I drink. I'm allowing myself one cup in the morning (after my 7:00am nap) and then one more cup in the evening (after my 11:00pm nap). I'm also avoiding beer and alcohol this week and, as much as I can, I'm eating soon after waking from a nap.

 Right off the bat I found it easy to take the naps. During the first couple of naps I'd mostly just lie still, but by my first 3:00am nap I could really feel a difference. When I lie down for my nap I can feel my breathing slow and I fall asleep very quickly. Every time the alarm goes off I'm surprised to discover that I had been dead asleep. We wanted to see the new Harry Potter movie this afternoon, I took my 7:00pm nap in the car and went out like a light, no problem.

 I'm experiencing almost no sleep deprivation during the day. At night things are harder, I feel pretty tired in spurts that usually last the better part of an hour. So far I can get through these by jogging in place and doing some stretches. I'm expecting tonight to be pretty tough but I'm optimistic that I'll stick to my schedule.

 I have only messed up a scheduled nap once so far, this morning I overslept by about ten minutes (my wife was watching out for me, she woke me up). Much to my surprise, I was a complete zombie when I awoke. I had trouble concentrating and was a total clutz, I banged my toes several times. Even though it was only an extra ten minutes the impact was substantial and lasted the better part of two hours. Eventually I went for a bicycle ride and that managed to clear the cobwebs.

 To sum up: so far, so good! I'll post another update in a couple more days. Actually sleeping during the nap periods is one of the biggest challenges and I seem to have an edge in this regard. If I make it through tonight's bout of sleep deprivation, things should start getting easier.

Filed under  //   experiment   polyphasic   sleep  

Parakeet, Another Twitter Client for Emacs

I have been working on a simple Twitter client for Emacs and I finally have something working...
 
  http://github.com/cmiles74/Parakeet
 
It's not super exciting but it does let you post your status and read through your friend's feed. I've been working on teachiing myself Elisp, this is my first project. There are some other Twitter clients for Emacs out there but it was such a fun thing to code up!

Snapz_pro_xscreensnapz001

Filed under  //   emacs   parakeet   twitter  

Looking forward to bailing out of work to see "Star Trek"

Some of the software developers and I are bailing out of work around lunchtime to catch the new "Star Trek" movie. It looks like JJ Abrams is starting the series from scratch, I think this franchise is ripe for a reboot. The "Enterprise" series seemed stilted and cardboard, perhaps in part because the weight of all the imaginary history was too much to bear.
 
"Star Trek" is one of the shows that I used to watch over and over with my father when I was a kid. He loved anything science-fiction, from the relatively high-brow "2001: A Space Odyssey" and Frank Hebert's "Dune" series all the way down to the shockingly bad "Logan's Run". While not every episode of the show was a classic, I loved the vast majority. They fit in well with what I think of as the "Isaac Asimov School" of science fiction where a really interesting idea is explored throughout the episode. The ideas are what the show is really about, the characters are there almost entirely to support the new concept.
 
The new movie looks like it will spend more time on the characters, developing their back-story and explaining their motives. This isn't something the franchise has ever been comfortable with and it's a dimension that was rarely explored. Sure, there were some "Next Generation" episodes that spent time on one particular character but it was rare for specific character traits to play a real role in the long term plot. This connection with the character is one of the things that makes a show like "Lost" so compelling.
 
Anyway, I am excited about the movie. I'll try to remember to post back when it gets out. ;) 


Filed under  //   movies   nostalgia   star trek  

Cheese Club!

It's another cheese club week! I get to reap the tasty, feety benefits of Joanna's expensive membership. Bistro Les Gras in Northampton, MA always picks tasty ones.

Photo

tags: cheese, cheese club, food

Filed under  //   cheese   cheese club   food