Self-Applying Monetary Incentives to Improve Sleep Schedules

Sleeping Indira

For the next week, I will donate $1 to charity for every hour or fraction there of that I stay up after midnight. This is a one week experiment. Next week, I’ll evaluate it and decide if it’s something that I want to continue.

Motivation

I have been trying to get on an earlier schedule for a while. One strategy that I’ve employed is to make myself to get up earlier. This semester, I took an early morning exercise class once a week. I made it to all classes and although there were a few painful days in which I was very sleep deprived, this has helped a lot.

However, I still find myself staying up later than I intend to do. When I’m on the computer, it’s just too easy to get sucked into thinking that I’ll just read one more article or post one additional email. When I’m out with friends, it’s easy to think that I’ll just stay up a few minutes longer. I’m instituting this experimental policy so that I’ll have an incentive to go to bed earlier. I know there will be times when staying up late is necessary or highly desirable which is why I’ve decided to use flexible monetary incentives rather than a hard and fast rule.

Notes: I’m counting the time when I’m in bed with the lights out rather than when I actually fall asleep. Calculating the exact time that I fall asleep is difficult and not something I can totally control. This project may have been inspired by this alarm clock.

Sleep, Don't Weep

Credits: Images courtesy of flickr  users kudumomo and Tambako the Jaguar (CC BY-ND 2.0)

 

Update: 29 April 2012 – Here are the results after 1 week.

Titanic Vintage Dance Weekend

From Titanic Vintage Dance Weekend

This weekend, I had the pleasure of attending Titanic Vintage Dance Weekend — a series of special events commemorating the 100 anniversary of the Titanic’s fateful maiden voyage. The dance weekend was run by commonwealth vintage dancers who always do an excellent job reenacting the historical ballroom. The attendees mostly worn historically accurate dress and their outfits were a treat to behold.

Although everything took place on land, they captured both the style of the ragtime period and the elegance of the RMS Titanic. Things started on Friday with a steerage dance reenacting the type of ball the that 3rd passengers might have had. Though comparatively informal by vintage standards, it was still classy and fun. Saturday featured an elegant formal tea luncheon at the historic Hawthorne Hotel followed by a formal dinner and grand ball at Colonial Hall at Rockafella’s. We finished off the weekend with a costumed stroll at the Peabody Essex Museum on Sunday morning and then a concert by grammy winning artist Ian Whitcomb in the afternoon.

While the events were festive celebrations of the kind that would have taken place a hundred years ago, the attendees frequently talked about the tragic loss of Titanic. At the 100 anniversary of the moment that the iceberg struck the ship they paused the grand ball and had a moment of silence out of respect for the victims.

The weekend was a unique opportunity to experience an earlier era. It was also a chance for me to catch up with old friends and make new ones. I’m very glad to have attended and would like to thank all those who worked so hard to make the weekend a success.

Here are some pictures here if you’re curious about the event.

Titanic Vintage Dance Weekend

The State of Perl

The last decade of Perl could be summarized as follows. Around 2000 Perl was essentially the goto scripting language for system administration and dynamic web sites. The design process for Perl 6 was announced in June of that year by Perl creator Larry Wall who hoped to remove “historical warts” from the language. It was expected that Perl 6 design and development would proceed quickly and that within a few years Perl 6 would displace Perl 5 the way Perl 5 displaced Perl 4. As a result development of Perl 5 stagnated, while the Perl community expected a Perl 6 which never really materialized. Perl 5.8 was released in 2002 and the 5.8.x branch remained the current version for 5 and a half years until Perl 5.10 was finally released in December of 2007. The Perl community eventually began to view Perl 6 as a parallel project rather than a replacement for Perl 5 but the damage had already been done.  Perl had lost much of its mindshare and was increasingly being displaced by languages such as Php, Python, and Ruby.The Perl community has returned to improving Perl 5 with renewed vigor. The community aims to release a new point release of Perl 5 every 6 months and numerous modules have been created to improve the Perl 5 experience. It’s hard to determine what the mind share of Perl will be a few years from now.

Perl now faces both technical and marketing challenges. In many ways, it is a victim of its own success.  Because Perl has been around so long, numerous outdated tutorials are still floating around the web. When Googling it can be difficult to figure out which pages tell the best way to do something in Perl now and which tell you what was the best way 10 years ago. Debian GNU/Linux and derivative distributions such as Ubuntu are essential written in Perl. While this increases Perl’s mind share, it also means that the system Perl can not be easily upgraded. Unlike updating the Java version, changing the Perl version has widespread implications that require extensive testing. As a result, Ubuntu release tend to include the version that was current 6 months before the actual release rather than the latest version.

More generally, Perl suffers from outdated perceptions. Yes it was once possible and common for people to write unreadable Perl programs that resembled line noise. (The old joke was that “Perl is like a toothbrush — you should use it but you don’t want to use someone elses”.) But this is no longer the case. Simply adding ‘use strict’ prevents a lot of bad code. Using good style practices prevents many of the rest of the issues. It’s certainly true that Perl allows people to do things that might not be a good idea such as using arbitrary regular expression delimiters but in real programs, this is the exception rather than the rule.

This has been a short discussion of the state of Perl and the issues facing it. I write this as someone who is knowledgeable about the language but isn’t a Perl partisan. I’ve known Perl for over a decade and used it as a primary development language for the last three years. However, I’ve also used other languages and know that every language has its strengths and weaknesses. In subsequent blog posts, I plan to further explore the state of Perl and the efforts of the community to improve it.

Waltz Instructor app is available as promised

 Dance at Bougival

I’m pleased to report that my Waltz Instructor Android application that I mentioned last week is now available for download.

I’ll be submitting it to the Android market soon but you can install in directly by going to the following link on your Android phone.
 https://rapidshare.com/files/3469971229/…

 

Click the download button. After the Download is complete select WaltzInstructor.apk from the list of completed downloads and the application will install.

Note that you may need to enable Applications from 3rd party sources for this to work.

UPDATE: The early reviewers have convinced me that the application needs more work before being released on the Android market. I’m reluctantly holding off on publishing while I make some improvements.

Dance Application Coming to Android Soon – Beta testers wanted

Dancers
In an earlier blog post, I discussed the possible uses of smart phones as dance aids. I’m pleased to say that this idea is now a step closer to reality. I’ve been working on the application and I hope to have a beta version available on the Android market later this week.

 

If anyone is interested in providing feed back on the application before it’s released, please contact me and I’ll be happy to provide you with an advance copy. The application is going to be Android only initially (sorry iPhone people) but if you have an Android phone, I would greatly appreciate your help beta testing.

 

I’ll provide more details later this week when the application is officially release.

Image Source: Petr Novák, Wikipedia  http://en.wikipedia.org/wiki/File:Ballro… (Creative Commons Attribution-Share Alike 2.5 Generic)

If the Computer Industry Made Sewing Machines

My sewing machine and my current sewing project.
I’ve been working on my first real sewing project and I’ve gotten the sense that sewing machines could be simpler to use. Below, I suggest how sewing machines would be different this they were designed by computer companies particularly those companies that make inkjet printers.

Having to wind thread through the machine and thread the needle is a bit cumbersome. Having to separately fill the bobbin with thread and insert it just seems like an unnecessary complication. Ideally a single color of thread would only need to be inserted into the machine once in a single location. If the computer industry made sewing machines, instead of spools of thread we would have thread cartridges that could be inserted into the machine quickly and easily in a single location.

If you want to use a different color thread on a sewing machine, you need to remove the current thread  and place the new thread in the machine using the cumbersome process outlined above. If the computer industry made sewing machines, they would be able to store multiple colors of thread and it would be easy to switch between color without opening the machine.

Downsides

Of course there would also be some downsides of computer industry made sewing machines…

Currently you can buy thread anywhere and know that it will work with your sewing machine. If the computer industry made sewing machines, each machine would require different incompatible kinds of threads. Furthermore, manufactures would actively try to prevent generic thread from working with their machine through means such as authentication chips and DMCA law suites.

Currently thread essentially lasts forever. If the computer industry made sewing machines, thread would have an expiration date and machines would refuse to work with it past this expiration date. Manufactures would defend this practice by making badly supported claims about the quality of thread decreasing over time even if it’s unopened and argue they were only trying to protect customers.

Currently sewing machines are a tad expensive but thread is cheap. If the computer industry made sewing machines, thread would cost as much or more than low end sewing machines themselves. Low end sewing machines would be sold at a loss but thread would likely cost the equivalent of $30 a spool.

Currently if you run out one color of thread a sewing machine will still let you use other colors of threads. If the computer industry made sewing machines, machines would store multiple colors of thread but would refuse to work if one color was depleted, even if that color wasn’t needed. On low end machines, multiple colors of thread would sold as a single unit or cartridge, once one color was used up, the entire cartridge would need to be replaced — even if there was plenty of thread left in the other colors. On high end machines, it might be possible to replace only a single thread color. However, in both cases, the machine would refuse to sew with any color of thread until the depleted color was replaced.

Sending photos to the Philippines

My great uncle lives in the Philippines and I decided to send him some photos of a recent family wedding. He doesn’t have email so I needed to send him prints. Rather than have them printed locally and mailing them or have them printed in by an America company and then shipped internationally, I decided to use a Filipino website Digiprint.com.ph. This seemed like the most efficient approach — the photos would be shipped from the United States to the Philippines as bits instead of atoms.The process of ordering prints on digiprint turned out to be more difficult than I expected though in fairness this may be because I run Linux. Their site has multi-file upload functionality which they implement using the Jquery uploadify plugin. They only allow you to upload files with the following extensions: jpg, jpeg, png, and gif. This may seem reasonable but these extensions are case sensitive. Since all of my files were copied directly from my camera, they had the following file name format SAM_XXXX.JPG. The extension .JPG was considered different than .jpg so these files couldn’t be uploaded. To get around this, I copied the files to a temporary directory and batch renamed them to have the .jpg extension instead of .JPG.   I used the Unix commands find and rename to do this:

dlarochelle@server:~/Pictures/$ cp `find -newer SAM_1555.JPG -not -newer  SAM_1679.JPG ` /tmp/wedding/

dlarochelle@server:~/Pictures/$ cd /tmp/jay_wedding/

dlarochelle@server:/tmp/jay_wedding$ rename ‘s/\.JPG/\.jpg/’ *

The next huddle was that Digiprint only allows 20 pictures to uploaded at a time. Since I had over 120 pictures, this meant that I had to upload multiple times. This was an added hassle but something I could do  while I was doing other things on my computer. The next step was selecting the print size. Since the Philippines — like pretty much every country but the United States uses the metric system rather than U.S. customary units — they didn’t have the sizes that I was familiar with. Instead there were sizes such as 3R, 4R, and 6R. However, a bit of Googling revealed that 4R was essentially 4”X6”, so that’s what I selected.

I was able to check out using Paypal which simplified the process since I didn’t have to worried about my credit card company getting suspicious about a charge from the Philippines. My total come to around $20 US which works out to around $.17 a print. This is about what CVS would charge for in store prices. However, that price includes shipping and having to pay for postage from the US would have substantially increased the total cost.

Screen Shot of http://digiprint.com.ph

Screen shot of http://digiprint.com.ph

iPhones and the Limits of Curated Security

Abstract: The Apple App store uses a curated model in which all applications must be approved by Apple before they are published. In has been argued that this provides better security than Android where applications are published immediately and only removed if they are found to be problematic. We study the cases of Smurf’s Village and similar applications and argue that the protection offered by this form of security is limited. We conclude that the image of Apple as a benevolent dictator acting as a neutral arbitrator to promote the best user experience is dangerously naive. Apple’s economic interests will often be different than their users’ security interests.

In the Apple App store for iOS devices such as the iPhone and iPad, all applications must be approved by Apple before they are published. That is in contrast to Android in which submitted applications are immediately published and only removed if they are determined to be problematic. The Apple approval process has been criticized as being arbitrary and confusing. Many accuse Apple of exercising excessive control. The App Store Review Guidelines are 8 pages. The introduction contains statements like the following:

  • We view Apps different than books or songs, which we do not curate. If you want to criticize a religion, write a book. If you want to describe sex, write a book or a song, or create a medical app.
  • We have over 350,000 apps in the App Store. We don’t need any more Fart apps.
  • [If] you’re trying to get your first practice App into the store to impress your friends, please brace yourself for rejection. We have lots of serious developers who don’t want their quality Apps to be surrounded by amateur hour.
  • If your app is rejected, we have a Review Board that you can appeal to. If you run to the press and trash us, it never helps.
  • If it sounds like we’re control freaks, well, maybe it’s because we’re so committed to our users and making sure they have a quality experience with our products.

The rest of the Guidelines contains specific rules about what is and is not allowed. It is generally acknowledged that all submissions are not reviewed equally. For example, Apple includes a ban on offensive or mean-spirited commentary but specifically exempts professional political satirists and humorists. Additionally, well known companies and organizations are thought to have an easier time getting their apps approved than individual developers.

Though many have criticized those restrictions as excessive, it has been argument that they will provide protection against malware. Indeed, Jonathan Zittrain, among others, has worried that the iPhone will be adopted because it provides increased security even though this security comes the cost of the freedom and flexibility that has led to significant innovation in the computer industry. But just how effectively will the Apple review process protect users? Software auditing is time consuming and expensive. There are a variety of technical measures that would allow malicious developers to hide unapproved functionality from Apple’s reviewers. I may discuss these techniques in another, geekier, post.

In this post, I use the existence of Smurf’s Village and similar apps to argue that a curated app store is not a security panacea. These type of apps, many of which are targeted at children, are free to download but have very expensive in app purchases for items. For example, Smurfs’ Village, which is is based on the Smurfs tv show, sold a wheel barrow of Smurf Berries for $99. Many children amassed huge bills playing these applications on their parents phones. One 8 year old girl amassed a $1400 phone bill playing Smurf’s Village. (See http://newsandinsight.thomsonreuters.com/New_York/News/2011/05_-_May/Class_action_firms_go_after__free__Apple_apps/ ) Whether these type of applications should count as malware or badware, is a question of semantics that we will not attempt to address. However, it is worth noting that the financial harm suffered by the parents of these children is likely to be greater than those whose PCs or Android phones are infected with traditional malware.

Why does Apple allow these applications in their app store? An app like Smurfs’ Village might be justifiable based laissez-faire arguments in an open market but that argument makes no sense in the context of Apple’s curated market. It is impossible to know Apple’s exact motivation but economic incentives may provide the answer. Apple requires that all game items be purchased using their In APP Purchase API payment system and takes a 30% cut of any transaction. Thus Apple has an incentive for users to spend as much money as possible. Indeed Apple’s guidelines contained no restriction on excessive pricing of in game items even though they contained restrictions on just about everything else. (Apple’s 30% commission is much greater than the amount taken by credit card companies and consequently they have a much greater incentive to allow expensive purchases.)

Apple has since taken some steps to mitigate the problem. They now require a password to be entered before every purchase (previously the password would be cached for 15 minutes) and allow in-app purchases to be disabled in device settings. Whether or not these mechanisms are sufficient to protect parents from these specific type of applications, in app purchases are a rich target for exploitation. In the future, there will likely be new and different attempts to exploit it that are both creative and disturbing. In the media, there is the popular stereo type that undesirable software originates from super hackers who are either anti-social western males or Russian gangs. The danger of this myth is that it causes us to be overly trusting of corporate software. The extent to which Apple uses developer reputation in the approval process may make them more likely to approve unsavory software if it has the veneer of corporate legitimacy.

It is clear that Apple’s review process does not prevent users from being harmed by unsavory applications. Indeed the image of Apple as a benevolent dictator acting as a neutral arbitrator to promote the best user experience is dangerously naive. Apple’s economic interests will often be different than their users’ security interests.