September 30, 2007

Historical Material from October 2006 - What is the Right License for Sakai?

This material was prepared for and submitted to the Mellon-Funded Retreat on Intellectual Property Issues held at Indiana University October 16-17, 2006.

I am publishing this on September 30, 2007 now that the Sakai Board has adopted the ECL 2.0 license for Sakai.

http://www.opensource.org/licenses/ecl2.php

If you read the whole document below and see my recommendation for an ECL 1.1 - this is *not* what happenned - instead the group came up with ECL 2.0 which is a tiny variation on Apache 2.0. I am pleased with the outcome - particularly since has OSI certified ECL 2.0. I think that the folks at the Indiana retreat did a great job and identified some precise use cases that clearly differentiate ECL 2.0 from Apache 2.0.

I did not attend the Indiana meeting because (a) I already had accepted an invitation to attend and speak at the Cal State CIO Retreat and (b) I was probably too emotional at the time about ECL 1.0 to be a positive contributor to the meeting :). Brad Wheeler and I agreed that I should submit my concerns formally and let the sausage get made - in retrospect this was a wise choice as everything turned out very nice - and I played a great round of golf in Santa Barbara looking out over the Pacific Ocean - it was the only round of golf I have played in the last 10 years.

The material below is my unedited submission to the Mellon-Funded Indiana Intellectual Property Retreat. Please read it in the context of October 2006.

October 2006

What is the Right License for Sakai?

My goals for a software license are effectively to give those who might find a use for our software maximum flexibility in how that software will be used. When we produce software today we cannot begin to imagine how that software might be reused in the future - so our gift to those future adopters is maximum flexibility. Our gift of this software must not require *any* interaction with the copyright owner - in the future - the copyright owner may no longer exist - or may have been sold or have transferred their interest to a different party. The license must have no strings attached at all. The critical underlying goals:

- Allow the code to be forked without limitation
- Allow the code to be included in any other application without limitation as to the license of the including application
- Allow the code to be used, retained and modified and re-released in perpetuity
- No requirement to communicate or interact in any way with the holder of the license - the software itself is a "bearer instrument"
- Effectively this can all be summarized as the owner of the license and one who simply possesses the software have equal rights
- These rights should be unaffected if the ownership of the copyright is transferred from one organization to another

The only acceptable limitations:

- Reasonable attribution when the software is included in another application
- Respect for the trademarks and brands of the producers original software - typically this means that you cannot "fork" the code and distribute the code under the same (usually trademarked) name as the original software

The BSD, Apache, and MIT class of licenses generally meet these criteria.

The Sakai Board's Intent When Drafting the ECL

The Sakai board intended to produce a license that meets all of the above goals - is commercial friendly and was explicitly *not* to be a copyleft license like the GPL. The Sakai board saw copyleft as commercial-unfriendly and preferred the commercial friendly Apache approach which was in the line of the MIT/BSD licenses.

"Copyleft is a general method for making a program or other work free, and requiring all modified and extended versions of the program to be free as well.".

http://www.gnu.org/copyleft/copyleft.html

The Sakai Board agreed on th ebasic principles and then looked at a number of different licenses and combined elements of those licenses together to produce the ECL 1.0 license.

The ECL Controversy

In May 2005, there was a discussion in Moodle forums about the fact that the ECL license was not GPL-Friendly.

http://moodle.org/mod/forum/discuss.php?d=22988 (login as guest)

Martin Langhoff's assessment was that Saki was not GPL-friendly and not fork-friendly.

-- Martin Langhoff Quote ----

This makes the GPL pretty strict, that is certain. But most projects consider it in their best interest to use a GPL-compatible license (BSD, LGPL or GPL), specially because it has been estimated that 80% of the FOSS code out there is covered by the GPL.

Well, the ECL has two clauses:

Notice of any changes or modifications to the Original Work, including the date the changes were made.
Any modifications of the Original Work must be distributed in such a manner as to avoid any confusion with the Original Work of the copyright holders.

The first one is relatively harmless, and can be satisfied with a clear changelog. Still, if you fork and fail to maintain the changelog faithfully, you'll be in breach of the license, as you'll be misconstruing the extent and character of the modifications made.

The second one quoted here can be interpreted in a number of ways, but the traditional application of it is that a customized project will be distributed as a tarball containing the original files and a series of patchfiles. This is what happened to Minix, and it frustrated Linus (and others) enough to switch to Linux.

--- End Martin Langhoff Quote ----

I have had several other similar conversations with laywers with several organizations that concluded that the ECL was not GPL friendly looking at the two clauses - with the biggest problem being the patches clause.

What is Wrong With the Patches Clause?

First this clause is vague - giving no specific guidance as to what is considered acceptable conformance. At some level, with this clause being so vague - the only way to resolve whether an adopter's notification is acceptable is to test the clause in a lawsuit between the copyright holder and the adopter. The specter of requiring a court decision to interpret this clause is disquieting to many potential adopters who read this carefully.

Wen a lawyers or organizations reviewing the ECL 1.0 take a very conservative reading of this clause and interpret this as allowing the copyright holder (Sakai Foundation Board in this case) as having a hold over future adopters that they would exercise at their option by filing a lawsuit against an adopter at the discretion of the Sakai Foundation Board.

Most organizations do not do an in-depth analysis of the ECL, simply assuming that it is the Apache or BSD-like license because Sakai's overall message is "our license is just like Apache". I have been told by some organizations that their lawyers simply did not think that the clause was likely to cause a problem and not worth being concerned about.

The problem comes when an organization takes a more rigorous approach to their licensing - often when considering embedding Sakai in their own product. In these scenarios, lawyers are more sensitive to small risks and tend to take the most dour interpretation of the clauses.

Where Did This Text Come From?

It is likely that the clause came from the OKI OSID license which was looked at during the development of the ECL:

Notice of any changes or modifications to the O.K.I. Work, including the date the changes were made. Any modified software must be distributed in such as manner as to avoid any confusion with the original O.K.I. Work.

http://okicommunity.mit.edu/javadoc/org/osid/SidImplementationLicenseMIT.html

The ECL words almost are identical to the W3C software license.

http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

"Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)"

This is similar to the thrust of this clause in the GPL (http://www.gnu.org/licenses/gpl.html)

"You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change."

These clauses all are in the GPL vein of not allowing folks to make changes to code and not share the changes publicly and broadly. This text is part of the backbone of copyleft: "Copyleft is a general method for making a program or other work free, and requiring all modified and extended versions of the program to be free as well.".

http://www.gnu.org/copyleft/copyleft.html

So ultimately the ECL 1.0 is a remix of the MIT, BSD, with just a tiny touch of copyleft sprinkled in.

Is the ECL GPL Friendly?

The most common complaint that I get about the ECL 1.0 is that it is not "GPL-Friendly" - often pointing to either the patch clause or the advertising clause in ECL 1.0.

Lets compare the clauses in the ECL 1.0 to the clauses in the W3C license:

http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
http://www.opensource.org/licenses/ecl1.php

ECL Patch Clause:
Notice of any changes or modifications to the Original Work, including the date the changes were made.
W3C Patch Clause:
Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)

ECL Advertising Clause:
The name and trademarks of copyright holder(s) may NOT be used in advertising or publicity pertaining to the Original or Derivative Works without specific, written prior permission. Title to copyright in the Original Work and any associated documentation will at all times remain with the copyright holders.
W3C Advertising Clause:
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.

Other than parenthesis - these are identical.

Just for reference, according to GNU, W3C *is* GPL-friendly
http://www.gnu.org/philosophy/license-list.html

But bright lawyers lawyers looking at the ECL decide that the ECL is GPL-unfriendly. Hmmm.

Perhaps people have a general bad taste in their mouth about advertising clauses because of the original BSD clause (http://www.gnu.org/philosophy/bsd.html).

All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors.

Read the above URL for a good explanation of the problems - modern advertising clauses like ECL and W3C are much more reasonable - in a sense - they restate basic obvious trademark law.

Is the Apache 2 License GPL Friendly?

Interestingly nearly all people *assume* that Apache licenses are compatible with the GPL. Sadly this is not the case according to GNU.

--- Quoting: http://www.gnu.org/philosophy/license-list.html ----

Apache License, Version 1.0
This is a simple, permissive non-copyleft free software license with practical problems like those of the original BSD license, including incompatibility with the GNU GPL.

Apache License, Version 1.1
This is a permissive non-copyleft free software license with a few requirements that render it incompatible with the GNU GPL.

We urge you not to use the Apache licenses for software you write. However, there is no reason to avoid running programs that have been released under this license, such as Apache.

Apache Software License, version 2.0
This is a free software license but it is incompatible with the GPL. The Apache Software License is incompatible with the GPL because it has a specific requirement that is not in the GPL: it has certain patent termination cases that the GPL does not require. (We don't think those patent termination cases are inherently a bad idea, but nonetheless they are incompatible with the GNU GPL.)

--- End Quote: http://www.gnu.org/philosophy/license-list.html ----

Interestingly, the GPL license is not compatible with Apache because Apache intends to *not* be copyleft - GPL declares that Apache 2 is *almost* GPL-friendly but not quite due to a small technicality that the GPL folks feel is a good clause but - sadly "only 99.99% compatible with the GPL". Hmmm.

Summary to This Point

Sakai intended the ECL to be commercial-friendly, copyleft-free, and GPL-friendly. At some level none of these were accomplished. If I were on the way to argue in court - I would suggest that I could prove that ECL *is* GPL-friendly as long as I had a chance to face the charges "ECL is not GPL-friendly". I would posit that when organizations are making the GPL-friendly analysis it is often an attempt to move a product choice into a license choice decision.

If you can get Sakai (using the ECL) declared as GPL-unfriendly at an organization that has policies about GPL, then Sakai is automatically out of the running in terms of consideration.

So the GPL-friendly analysis is a little "subjective" at best.

What is a Project Who wants to Do the Right Thing to Do?

All we want is a non-copyleft GPL-friendly license. Is that so hard? Lets look at the possible licenses we can use:

ECL - Has a whiff of copyleft - smart people and smart lawyers find ECL to be GPL-incomatible sometimes

Apache - Not GPL-compatible - Maybe this is resolvable - but this smacks of a soap opera - probably want to stay away.

GPL - Has a lot of copyleft (not surprisingly)

BSD (modified) - http://www.opensource.org/licenses/bsd-license.php - The advertising-free BSD license. Not too bad. GPL friendly and commercial friendly. Could benefit from a clause about the use of product names and trademarks. A little thin.

MIT license - http://www.opensource.org/licenses/mit-license.php - this minimalist and probably needs some of the clauses about trademark, etc.

What is the Real Problem Here?

There are two dimensions of licensing. Lets just look at GPL and Apache for the moment. Both licenses generally grown and get more complex over time as new problematic use cases are identified and new wording is needed to cover these issues.

As the Apache license grows, it adds more and more complex wording that makes it increasingly likely that something in the long Apache 2 license will conflict with something in the long GPL license and the even longer GPL 3 license.

Maybe the big guys will work this all out with an Apache 3 and GPL 3 that fit like a glove and then we will only have two licenses for ever going forward. No one will every change a word for the next 100 years so as not to break the interdependencies. A thought I have is that they simply share identical text where there is overlap between Apache and GPL.

So what do we do trying to survive the clash of the titans.

Lets Invent Our Own License and Not Make Mistakes this Time

We tried that and after 1.5 years it is still painful with the ECL. But then we still end up having to fight to get respect and validation from the GPL and OSI.

A case study in trying to start from scratch and do the right thing is here:

http://en.wikipedia.org/wiki/Academic_Free_License
http://www.opensource.org/licenses/academic.php

- This license has gone through versions 1.2, 2.1, and now 3.0 - all in trying to get everyone happy. This is a four year effort by Lawrence E. Rosen, general counsel of the Open Source Initiative itself. The AFL license set out to do everything right - but in the end is simply not GPL-friendly no matter how hard they tried.

http://opensource.org/licenses/academic.php

Is There *any* Hope, or is this Simply Impossible?

The essential problem is that GPL holds the "strings" to the "GPL-compatible" certification and OSI holds the keys to the OSI certification. So I just decided to "give up" and look through the already GPL-Friendly Licenses and see if we find one we like. Avoid the "too simple licenses", copyleft licenses and insist that the license be OSI certified.

Go through this URL with me: http://www.gnu.org/philosophy/license-list.html

Too Simple:
Modified BSD, Intel Open Source, MIT

Kind of Messy:
Python

Hint of CopyLeft
W3C, ZOPE

Not OSI Certified:
OpenLDAP, Vim, ZLib, Clarifiied Artistic, Vim, Ruby, X11, FreeBSD

So guess what - after 20 years of genetic evolution of Open Source Licenses - There is no license in existence which meets all four criteria of (1) non-trivial, (2) non-copyleft, (3) GPL-friendly, and (4) OSI Certified.

So What to Do?

I literally cannot believe that after all of this analysis, I have reached the following conclusion. You have no idea how much I have grown to dislike the ECL license and the burden of working with a non-mainstream license.

I think that the next interim step is to revise the ECL and remove the copyleft clause. Not change another word. Submit this to GNU to see if GNU would declare it GPL-compatible. If GU sees ECL 1.1 as GPL-Compatible submit the license to OSI - OSI will claim licens proliferation - but based on the analysis above - Uh - there is no suitable license available (Modified BSD is the closest).

If GNU declares ECL 1.1 as not Compatible with the GPL or if OSI refuses to accept ECL 1.1 - then I would suggest that we pitch it ECL and simply go with Modified BSD. I do not like this because ECL has more modern wording (see also ZOPE) and includes some nice "state the obvious clauses".

I feel in my heart that this is an interim step and that eventually Apache and GPL will work things out and Some version of Apache will be GPL-compatible. On that day, I would drop the ECL in a heartbeat and switch to Apache.

Placing my Comments in the Overall Meeting

My comments in this document are solely focused on the choice of license of the final product.

Looking back at the Sakai experience - the Contributor Agreements have been a far more complex issue and the Apache CLA's that we adopted in Sakai have had real challenges as they CLA's have been examined by various organizations and found to have legally unacceptable clauses in them. Because much of Apache's participation is centered on the individual and not the organization - the Apache CLAs are sufficient for Apache.

Clearly project like Sakai, Kuali, and the Student Services project are characterized by the significant involvement of organizations in addition to individuals. Some of the legal exchange in the Apache that individuals just ignore and sign when joining Apache (I signed a 30 page document when I joined JSR-286 as an individual) are simply not acceptable when a university officer is signing the document. This is particularly true when Universities do have wide ranging patent portfolios and other aspects.

I think that what this group needs to talk about is to fully tease out the right/responsibility flow in the CLA's and make the right choices by finding the right balancing point. In essence the discussion of a CLA that is Higher Ed focused is breaking wonderful new ground and ground that needs exploration. The current CLAs that we see work OK for individuals and kind of OK for companies - but need some adjustment for Universities.

Just like when Apache had to go form a simple individual oriented CLA to a corporate CLA - when presented with a unique new problem - with demonstrated new use cases - we need to build a new solution.

I will just state for the record that I am completely *not* an expert on CLAs and as such not much use in a CLA discussion - I feel that the people coming to this meeting are ideally suited to make some wonderful progress on evolving a new for of CLA that will meet the needs of higher education IP and TT. My guess is that it will be a variation on the Apache CLA that ends up looking at the experience of customizing that to fit the various schools.

Another important secondary topic is the discussion of a Membership agreement for organizations like Kuali Foundation and Sakai Foundation which use consortium-style memberships . We find that we are evolving our understanding of membership agreements as we negotiate each membership agreement with each new member. Again, like the CLA, policies, laws and procedures at some schools simply make it impossible to sign an unmodified membership agreement. To me this territory is even less charted than the CLA area which is about 2/3 charted by Apache. SO if the group has time left over after talking about CLAs for two days - perhaps membership agreements could be a fresh topic to consider.

The key distinction is that the license is how we license the output of our collaboration and the contributor and membership agreements define the legal structures which we use to work together so as to *produce* the product. Lets keep those separate. Membership agreements and CLA's are the backbone for the business model for university participation in consortial development. We do not need to push our "business model" up into the license agreement.

Good luck to you and have a successful meeting.

Charles Severance
Executive Director Sakai Foundation

Posted by csev at 11:49 AM

September 20, 2007

Getting a Ruby Application Working on HostMonster

I recently bought an account to run my Ruby web sites at a place called HostMonster. This promised to have out of the box support for Rails - it seems trivially worth $120 for a year to save having to figure it all out myself.

I worked through their pretty clear knowledge base article. I created my tables using rake db:migrate instead of hand-making the tables in MySql - because I like abstractions!

I got the DB working and then when I clicked on "About your application environment" on the Welcome to Ruby page, I got my 500 error:

Application error

Rails application failed to start properly"

Nothing in the logs at all - it was clearly not starting Ruby - I was sure it was a little configuration error. I made a few fresh apps with the same results over and over.

So I called technical support - they really answered after about 5 monite on hold - the guy on the phone was not on a rails expert - he said to make a trouble ticket - which I did. Several days later I got a kind of generic - "did you look in the knowledge base?" response from Level 1 support. Grrrr. Yes - only for about 4 hours! And searched the forums and searched Google, and hacked my .htaccess etc etc.

I snarked back at Level one support repeating the problem - I told him that I just tried it *again* and it still was not working.

Then 9 days later I get a nice note from Level 3 support asking if it was all fixed - he checked my site and he though it was OK. I said "no it was not" and that I was tired of trying. I was about to think of my $120 as sunk cost and go to Deamhost where my pals have things working and so I could at least look at their stuff.

One day later the Level 3 guy (Thanks Jacob) got back with me with this message:

There were just permissions issues within the rails application. I tested imsti.rubylearn.com and is working now. You can't view the application's environment using the link from the default public page for security but it no longer give an error about the application failing. Also I would suggest using the dispatch.fcgi in your configurations.

I looked at the working directory and one that was broken and the problem was that my umask on UNIX had left group write permission all over the place. And Apache was silently saving me from a life of being hacked. I quickly did a hack on my other dirctory:

chmod og-w public
chmod og-w public/*
chmod og-w public/*/*

And my old directory started wrking slick as you please! Damn - I *knew* it was something simple.

Now I have to do this all the time so I whipped up a little C-Chell script that I now run in each newly minted rails application. Here is my script called fix-perm.csh

#! /bin/csh

foreach i ( ` find . -print` )
echo chmod ag-w $i
chmod og-w $i
end

I keep this in my rails_apps directory and use it like this:

cd ~/rails_apps
rails appnew
cd appnew
csh ../fix-perms.csh

Viola! Please let me know if this works for you. I wish that Hostmonster would add this to their knowledge base.

Just to be clear when you press "About my application environment" and see this message:

For security purposes, this information is only available to local requests.

This is working *properly* - it means that Ruby is running and giving you the message instead of RUby failing so you see the 500 error (above).

Again - thank to Jacob who did not give up - I was quite patient because I was busy on other stuff and glad they did not let the ball drop. Thanks HostMonster.

Posted by csev at 10:01 PM

September 18, 2007

Using Keynote and OmniDazzle at the same time

I LOVE to scribble on slides. OnmiDazzle is awsome - pretty much perfect - but it fights with Keynote while presenting.

But you can make it work much better with this:

Keynote -> Preferences -> Slide Show

Enable "Allow Expose, Dashbard, and others to use the screen"

Yayay - I am a scribbling fool from now on.

Posted by csev at 11:39 AM

September 17, 2007

I am in love with the Sakai Assignments Tool

I just used bulk download of assignments - so nicely done!

Posted by csev at 10:39 PM

Using Ruby instead of Awk/SED/Grep/SH/Perl

I have been recently wondering if Ruby is a better language for script kiddie stuff. The kind of stuff I use awk, sed, grep, csh, and sh to accomplish. Some crazy people use perl to do this. But some folks suggest that Ruby is good for this. This is a very different application from Rails - it is super-perl.

I read on the Internet somewhere that Matz had a plan to make a better and more consistent perl when he started Ruby and you can see that in its design and what it has out of the box.

I recently decided to switch to the iPhone (previous post) and had to switch from MeetingMaker to iCal / iPhone / Google Calendar. But all my contacts were in Meeting Maker - what to do?

Meeting Maker has a text export of the contacts - the file is tab delimited and they do line-ends DOS-style. The Apple Address Book takes VCARD format.

Usually faced with this, I write some sed, awk, and shell script stuff - but this looked a little too nasty for that. Usually when I am writing multiline awk programs in separate files to get the job done, I realize that I have gone too far. Often I fall into something like Java at that point and kind of have to start over - but ultimately I get it done in Java feeling kind of bad about it.

So this was the perfect high-motivation situation for me to try Ruby on the command line.

Short story isthat I really liked it - it is simple but powerful - want to make an object? Do it. Want to split lines - do it? Want to ready the whole file into a string and break it into an array of strings based on CRTL-M - do it.

All in all I ended up with a pretty nice Meeting Maker to VCard conversion script. I will likely clean it up, add some doc, and then release it - I include my basic version below.

#!/usr/bin/ruby

# how many columns we expect
MAX = 25

FIRST = 0
LAST = 1
TITLE = 4
COMPANY = 6 
EMAIL = 12
HOME = 13
WORK = 14
CELL = 15 
NOTES = 25

# These are assumed to be contiguous and in the 
# right order, see below
ADDR = 7
CITY = 8
STATE = 9
ZIP = 10
COUNTRY = 11

records = []
lines = []

#depending on line end - this will either get the
# whole file or the first line
firstline = gets
if firstline
  secondline = gets
  if secondline
    # puts "Reading lines from input ..."
    lines << firstline
    lines << secondline
    while gets
      lines << $_
    end
  else
    # split the lines basedon newline CTRL-M 
    lines = firstline.split("\015");
    # puts "Split lines based on newline" 
  end
  # puts "Lines read: " + lines.size.to_s
else
  puts "No Input - nothing to process"
end

# Ignore the first three lines - 
# the first is a blank line
# the second is "Contacts" and 
# the third is the Column headings
3.upto(lines.size - 1 ) { |recpos|
  # puts recpos.to_s + lines[recpos].to_s
  record = lines[recpos].split("\011")
  # puts record.size

  # Set all nils to empty string to simplify code below
  0.upto(MAX) { |j| 
    if record[j] == nil
      record[j] = "" 
    end
    record[j] = record[j].gsub('\n',' ')
    record[j] = record[j].strip
    # print j," ",record[j],"\n"; }
  }

  # Insist on at least a first or last name
  fname = record[FIRST]
  lname = record[LAST]

  # no need to continue...
  if  fname.empty? and lname.empty? 
    # puts "Skipping "+i.to_s
    next
  end

  print "BEGIN:VCARD\n"
  print "VERSION:3.0\n"

  # "FN:AAA First AAA Last\n"
  print "N:"
  print lname unless lname.empty?
  print ";"
  print fname unless fname.empty?
  print ";;;\n"
  print "FN:"
  print fname unless fname.empty? 
  print " " unless ( fname.empty? || lname.empty? )
  print lname unless lname.empty? 
  print "\n";
  
  unless record[COMPANY].empty?
    print "ORG:"+record[COMPANY]+";\n"
  end
  unless record[TITLE].empty?
    print "TITLE:"+record[TITLE]+";\n"
  end
  
  # print "EMAIL;type=INTERNET;type=WORK;type=pref:email@work.com\n"
  unless record[EMAIL].empty?
    print "EMAIL;type=INTERNET;type=WORK;type=pref:"+record[EMAIL]+"\n"
  end

  # print "TEL;type=WORK;type=pref:734-work\n"
  unless record[WORK].empty?
    print "TEL;type=WORK;type=pref:"+record[WORK]+"\n"
  end
  unless record[HOME].empty?
    print "TEL;type=HOME;type=pref:"+record[HOME]+"\n"
  end
  unless record[CELL].empty?
    print "TEL;type=CELL;type=pref:"+record[CELL]+"\n"
  end

  unless record[ADDR].empty? && record[CITY].empty? 
    && record[STATE].empty? && record[ZIP].empty?
    && record[COUNTRY].empty?
    print "item1.ADR;type=WORK;type=pref:;;"
    # Assume they are contiguous
    ADDR.upto(COUNTRY) { |pos|
      field = record[pos]
      print field unless field.empty?
      print ";"
    }
    print "\n"
  end
  print "END:VCARD\n"
}
Posted by csev at 12:24 PM

September 16, 2007

IMS Tool Interoperability - Alex Balleste of University de LLedia

Alex Balleste spent the last two weeks at the Unviersity of Michigan working with me on IMS Tool Interoperability. We got a lot done including:

  • We have developed a REST profile for IMS TI 1.0
  • We have developed extensions that allows the TI Proxy tool to do configuration and permission setting for the tool and have added it to the Deployment Descriptor and to the LaunchRequest.
  • We have extended the Sakai IMS-TI JSR-168 portlet that supports all of the launch descriptors including the original, SOAP Lite, and REST as well as the Authz and Config extensions - this interoperates with 1.0 compliant placements as well. This portlet works in Sakai and any other JSR-168 compliant portal.
  • We have developed sample tools supporting the IMS TI REST profile that are written in Java, Ruby, and PHP.  These are simple and elegant.  We are also experimenting with using the IMS Tool Interoperability Launch Request to populate an OSID Context to create a new pattern for tool development.

This is related to the Open Univsersity of Catalunya Campus project.

Here is all of the source code:

https://source.sakaiproject.org/contrib/portlets/trunk/
https://source.sakaiproject.org/contrib/csev/trunk/imsti/

This is all very early code and I wish I would have had more time to work on this while teaching. We have made good progress and when Alex gets back to Lleida we will continue to work on this and make the sample implemetations even more complete in anticipation of my trip to the Campus Kickoff in the first week of October.

Posted by csev at 10:33 AM

September 15, 2007

iPhone Conversion - I resisted for over 24 hours

Yeterday morning I bought an iPhone from my nephew - the plan was too expensive for him - so he cancelled it and I bought his 4G iPhone from him.

I have used Treos for years now and really grown to like them - I really like the form factor of the Treo 680. I was going to experiment with the iPhone for a few weeks on Wifi before switching.

But holding the iPhone the past day in my hand it was only a matter of time before I could not resist its lure. 30 hours after it was in my posession - the Treo 680 is off and I am 100% iPhone. Here is my experience.

iPhone Advantages

I *like* the keyboard - I thought I would not like it but in just a few hours it has grown on me - and it is better than the Treo for typing already.

The gestures take some getting used to - but they work. I instinctively grabbed my Treo stylus to see if it would work - nope - the iPhone wants a finger or thumb and works well. Also there is no need ot use a fingernail - I like that. I always scraped the paint off keys on the Treo when I used a fingernail.

I thought calendar was going to be a problem - but I am about to switch to Google calendar for my work - so along with Spanning Sync I am totally off Meeting Maker and on to Google Calendar + iCal + iPhone - full two way synchronization - most excellent. They let you use a perfectly good working copy for free for a while and then you pay like $15.00. What a deal. Apple Corp should buy these guys and include this in Leopard.


The browser is cool - but I need to learn the gestures - I wrote some code in Sakai to make the Sakai PDA portal work well with the iPhone browser and checked it late last night - it was kind of counter intuitive. Tell it that we have a narrow device - keep lines short and use large fonts... Hmmm. But it does look much nicer when you follow their style guide.

I love the WiFi - love it - love it - love it. I wish there were a way to store passwords for logging on to protected Wifi places. This would be a good feature to add.

I love the larger screen resolution - I love the fact that the keyboard is not there when you don't need it - I can read more of E-Mail and understand it better. Funny when the keyboard pops up it feels more like a Treo and there is not enough screen real estate to compose non-trivial responses.

Mac integration is sweet - it just *knows* my mail settings and address book- one sync does it all.

Transfering my old ATT/Cingular to the iPhone was a snap using iTunes. I had to extend my contract - but I kept my rollover minutes. I will save $20.00 on my data plan too. Luckily I was only 4 Mo into this contract. Since I bought the phone used all I lost was 4 Months.

I just swapped my Cingular SIM into the iPhone from the Treo - connected to iTunes - and 10 minutes later I was making iPhone-calls.

The ATT and Cingular folks at the Meridian Mall store and at ATT tech support were really nice to me and helped me along with timely answers.

I like sending photos to my blog using real mail instead of MMS (on the Treo). I am happy to have a real mail client that will queue and retry outbound mail if the network is down. I can also queue up picture mail and then blast it out when I hit a Wifi hotspot.

Also think about this - when I am home or in some other free Wifi zone - I am *not* using the data plan - brilliant. Absolutely Brilliant - particularly when you are trying to keep the data plan reasonable. This means an auto-log in feature for Wifi would save ATT money! Because when I am at my coffee shop with free Wifi with a login - I will be lazy and use my data plan instead of the Wifi because it is fewer clicks.

I am looking forward to going internationally because with WiFi I can actually do Mail reading duriung meetings now - I am too much of a cheapskate to pay data while I am international - but Wifi is free many places.

I like YouTube - it seems to have more stuff than the Apple TV Yotube - I can lay down and watch all of the Rails Commercials or the Apple versus PC commercials from a chair - great fun.

IPhone disadvantages / Treo advantages

I generally hate any help while I am typing - I am finding and turning off any predictive stuff. It keeps changing words I type - thanks but no thanks.

I miss the five way navigation on the Treo - I could do things from memory with click sequences - it means that I need to look at the iPhone more (at least until I have it memorized).

Manipulating web pages works well for things like the New York Times that is a bunch of div rectangles but not so well for something like Sakai which are single pages - I want to move around and zoom - as if it were a photo - and it keeps looking for little square divs in the "newspaper" - kind of frustrating - it is a browser well sutited to read the New York Times it would seem. Of course - why am I complaining - the iPhone browser is far better than anything else on the market. but it would not hurt to look at Blazer and the different modes - Blazer has some nice tricks Apple might want to borrow.

I really wish the Camera had a "Mail this picture" button without having to go into the Album, find a picture and mail it from there. This extra workflow is nasty and will force me to keep my on-phone album very small - Sad. The use case that is needed is "Take this picture and send it to a pre-configured address like flickr in a single click". Treo is not perfect but the Treo supports this work flow slightly better than the iPhone. What I want is a solution that is better than the iPhone and better than the Treo 680.

Also the photo sending program on the Treo has "Quick type" so you don't have to type things over and over. For me all I do is put Flickr tags in - so it is two clicks to add "tags: sakaiger" to the message on the Treo - this will be very painful in the Apple - so some sort of way in the keyboard for me to put commonly used strings available as macros would be very nice. This would be useful in any app using the keyboard - although the clever design would contextualize the macro strings to the application which is being used.

As bad as the Treo camera is - the iPhone is worse in some situations - the iPhone is worse in low light and up close - when the light is good - the iPhone takes nice pictures. But I am really surprised since it seemed that the Treo 680 was really bad with pictures compared to Motorola phones I have - and the iPhone is worse in the low light or close situations. Hmmm. I don't get it.

There is something weird with the iPhone camera - if you just point it and wiggle it around - it is like it morphs and bends the picture - it is almost like there is some compression/decompression going on that is motion-estimation (like MPEG) based becuase it seems to get confused with gentle rocking motion. I can only guess that the camera has MPEG in hardware (not yet used) and that we are using it (for now) as a still camera. As a still camera we are decoding it to still frames and grabbing them. Perhaps I am just seeing things or perhaps I am looking for something to complain about because I am missing my cute little video recorder from my Treo 680.

I wish the new Gizmo widget worked on a iPhone. I had not yet tried it - but it is the kind of fun thing you can do when the platform is extensible.

iChat would be nice - where is it? Probably not there to keep the data plan from being overrun. I doubt that there was a technical or software development timeline reason to hold it back. It is either marketing or data plan that is holding it back

Conclusion

All in all the nicest surprise is that I like the keyboard and that the iPhone calendar/iCal calendar can be made to work with Google calendar. Once I got the calendar working - the rest was almost insignificant. Switching was to be a matter of hours not weeks.

I can see a lot of improvements to the UI - that would not be hard - and could be done in a patch release. But that would probably have to wait unti the next hardware platform.

Posted by csev at 02:52 PM

September 09, 2007

Calling REST Web Services from Java

Wow - it initially seemed much harder to do REST web services in Java than it should have been - it took a while for me to find this web site. Everyone wanted me to download a jar or something - I knew this had to work in a few lines of Java with no jars...

Thanks to: http://xml.nig.ac.jp/tutorial/rest/index.html

My code below.

try {
    // Thanks: http://xml.nig.ac.jp/tutorial/rest/index.html
    URL url = new URL(restEndPoint);

    //make connection, use post mode, and send query
    URLConnection urlc = url.openConnection();
    urlc.setDoOutput(true);
    urlc.setAllowUserInteraction(false);
    String encodedPost = URLEncoder.encode(ret);
    PrintStream ps = new PrintStream(urlc.getOutputStream());
    ps.print("launchData="+encodedPost);
    ps.close();

    //retrieve result
    BufferedReader br = new BufferedReader(new InputStreamReader(urlc
                .getInputStream()));
    String str;
    StringBuffer sb = new StringBuffer();
    while ((str = br.readLine()) != null) {
            sb.append(str);
            sb.append("\n");
    }
    br.close();
    response = sb.toString();

    if ( response == null ) { 
        setErrorMessage(request, "Launch REST Web Service returned nothing");
    }
}
catch(Exception e) {
        e.printStackTrace();
        setErrorMessage(request, "Failed REST service call. Exception="+e);
        response = null;
}
Posted by csev at 08:17 AM

September 08, 2007

Ruby: IMS Tool Interoperability

Well I wrote my first Ruby application. It was an IMS Tool Interoperability endpoint. It has REST Web services and stores sessions in a database. It meets the REST profile for IMS Tool Interoperability.

My overwhelming feeling is that Ruby is absolutely amazing - I now know why Steven Githens uses sash. Having a console to test code even before you put it into a controller is simply amazing.

One thing I was amazed by is that I have to stop and think some times - because code is written so quickly and debugged so quickly - you actually have stop and think more often - the typing of the code is not the rate limiting factor - how well you have throught through your problem *is* the rate limiting factor.

In Java there is so much cruft and the speed of the debugging cycle is so plodding - I have gotten to the point in Java that I can do designs whlie waiting for a compile or server restart. In Ruby there is no such slack time - so I find I need to get up and walk around once in a while to let the idease anneal in my mind. After I settle back down and have the ideas worked out - making them work in Ruby is done in a flash.

Probably my biggest peeve about Ruby/Rails is a lack of a book that tells you everything that you can do - all the books I have are example after example - and they are all too simple - because they are solving a small problem they never who you how to do a subtle thing like declare that a column in a database is not null.

I need a reference manual. Here are some sites that are helping me not go too crazy:

http://www.railsapi.org/
http://zamples.com/JspExplorer/content/rubyUG/

Using Google with things like this works sometimes

ruby string class
rails activerecord class

I use this to find stuff in Java by typing

java string class

But I am looking for a definitive 10000 page manual for Ruby and Rails. I am tred of poring throush 20 line examples :)

I am also really liking Model-View-Controller - but there does seem to be something eauivalent to Components that I am missing. Where do you do things like performance tune, cache, etc etc. I think the Model is too thin of a layer to do it - and the Controller is not the right place either.

I do like the Rails abstraction between View and Controller. I have a lot yet to learn but the fact that Urls are abstracted feels very portlet like and WSRP like.. Hmmm. Me likes.

All in all it is amazing that I need to stop and think because things get coded up so quickly.

Here is a picture of the running app in Sakai:

IMS Tool Interoperability in Ruby

I need to move the from my desktop to a server so others can use it.

Posted by csev at 12:16 PM

September 06, 2007

Pedagogy: Sakai, Roster Management, and Friend Accounts

Having flexible authentication which allows me to really control my site participants is excellent. I already use this heavily and I use the UMichigan friend accounts integrated into CTools/Sakai a lot.

Posted by csev at 02:16 PM

Pedagogy: Early experiences

I have been teaching for almost a week now - this is how I am using Sakai/CTools.

Assignments - this tool is awesome - it fits my workflow for assignments nicely without too many features. I like the following features: (a) The dates to show, open, and close the assignment, (b) the attachment functionality and the fact that files are *not* viewable in the Resources tool, (c) the ability to add an announcement and calendar entry automatically, (d) the ability to get mail as students submit and the ability to get mail only once per day if I want, (e) the richness and flexibility of the grading workflow - I like to grade as the assignments come in - sometimes if we are doing an assignment in a lab I grade the moment the assignments come in.

The only think I would is to add a "show me the assignments that have been handed in but not yet graded" - effectively a "to do" view - I grade quickly and continuously. As I make my way through the grading - it gets hard to find the students who have submitted but I have not graded yet ungraded submissions. The sort on graded/ungraded and the sort on submission date are *close* but not perfect. I would hate to have 400 students in a course and try to hunt through to find the ungraded submissions. This is a very small shortcoming in an overall very nice tool.

Chat - I initially thought this was pointless for the purposes of me interacting with the students - but the students love it to interact with each other during lecture - the help each other out and probably say things like "this prof sucks" :) I am not sure I will find an important use for myself.

Wiki - I made it student-writable - I am trying to get the students to become a "Village" helping each other out and the Wiki would be perfect for this - but frankly Wiki syntax is a non starter for casual use. HTML would be better :( We will see how it goes. For me, to author, I think I will just use Word and PDF. Maybe in time I will learn to like the Wiki.

Syllabus - I found this useless I did not want to paste everything into a bunch of little fields - I just did a word document and put it up under resources. Even the redirect feature failed because I had a PDF - a Web Content tool pointing at the PDF named "Sylllabus" would have been better. Ultimately I put it under Resource and used notification to send out a note.

Resources - Wow - I love the 2.4 resources tool - Harriet, Jim and the other folks that worked on this - it is awesome. Common tasks are done quickly and naturally with little clicking or scrolling - the screens are simple and uncluttered and well suited to the common tasks. The Resource helper is also nice - until I started using it, it felt a bit unwieldy - but the common attachments task workflow moves quickly with all the focus near the top of the screen.

The lack of the page-order tool in the UM CTools installation is still very frustrating - this is a wonderful tool. My left hand side is already getting kind of ugly looking with things just jumbled together in the default order - I really would like to put the most important tool at the top and change names of things to try to give the students an understanding of what is important and what I put there for their benefit. Any one who says that tool order needs to be controlled by thin institution to make tech support easier - Grrrrrr. I cannot imagine that is statement is *ever* true - and not letting me change page order really cramps my style.

Posted by csev at 12:42 PM

September 02, 2007

Reformatting an Averatec 3700 / AV3751-EH1 purchased from Sams

Notes for Installing Averatec 3700 (actually AV3715-EH1 purchased from Sams Club) From Scratch

I inadvertently messed up my restore partition on my Averatec 3700 so I had to start with a fresh Windows XP :( Also Averatec is a pain in the arse to deal with for out of warranty stuff - I really wanted restore disks but was not about to navigate their tech support maze for out of warranty stuff. ALso I had another working system that I tried to sup using ghost - no luck.

So out come the Windows XP disks and the Averatech tech support web site - they nicely do provide drivers for older hardware - this is great - withouit the sitre I would have been doomed.

Here is my experience.

I downloaded all the drivers from the support site this is what I found:

Directory of C:\server\shared\KEEPZIPS\hardware\averatec

08/20/2007 12:35 PM <DIR> .
08/20/2007 12:35 PM <DIR> ..
08/20/2007 12:20 PM 8,263,680 3700_XP_AUDIO_6_14_01_4090.exe
08/20/2007 12:19 PM 1,468,416 3700_XP_CHIPSET_5_1_0_3442.exe
08/20/2007 12:26 PM 13,493,760 3700_XP_LAN_3_44.exe
08/20/2007 12:23 PM 4,718,080 3700_XP_MEDIA_5_1_2600_0.exe
08/20/2007 12:24 PM 2,138,112 3700_XP_MODEM_6_09_07_04.exe
08/20/2007 12:28 PM 4,713,472 3700_XP_Touchpad_5_0_2_1.exe
08/20/2007 12:20 PM 1,282,209 3700_XP_TRAYICON.exe
08/20/2007 12:28 PM 4,566,677 3700_XP_VIDEO_6.14.10.171.exe
08/20/2007 12:35 PM 15,445,504 3700_XP_WLAN_3.0.1.0.exe
08/20/2007 12:20 PM 570,368 All_XP_MSBack.exe
08/20/2007 12:25 PM 32,256 cMEdel.exe
11 File(s) 56,692,534 bytes
2 Dir(s) 81,387,233,280 bytes free

I put in the Windows CD and installed normally.

I then copied the above installers onto a USB stick and then onto the Averatec. I found they wanted to be in a path withouit spaces so

I put them in \averdrv since they sometimes put files in C:\avertech as they extract.

Video - worked perfectly

Audio - took several attempts - this failed completely until I switch to the no spaces path - I had to finally run the install and then

tell device manager to update driver at which point it device manager finally found it.

Chipset - Worked perfectly

Media - Worked perfectly

Modem - Worked Perfectly

WLAN - Failed every time looking for a file :(

Windows Update did find the WLAN driver (whew!) and the Ethernet Driver. I never tried to use the provided Eithernet Driver as the

Ethernet seemed to work right away - I let WIndows Update install the suggested driver over the network.

I have not installed the touchpad yet - the default seems fine.

USB was working but only USB 1.

My only remaining unknown devices are a "USB Controller".

Posted by csev at 12:59 PM

September 01, 2007

Trace Route from Bus Wifi

Trying to figure out what technology the WiFi bus is using. Looks like Sprint.

Here is what bandwidth place says:

Communications 584.9 kilobits per second
Storage 71.4 kilobytes per second
1MB file download 14.3 seconds
Subjective rating Not bad

traceroute: Warning: www.umich.edu has multiple addresses; using 141.211.144.182
traceroute to www.umich.edu (141.211.144.182), 64 hops max, 40 byte packets
1 192.168.1.101 (192.168.1.101) 2.471 ms 2.270 ms 2.020 ms
2 192.168.1.10 (192.168.1.10) 4.394 ms 3.097 ms 2.943 ms
3 68.28.145.69 (68.28.145.69) 137.065 ms 119.144 ms 133.734 ms
4 * * *
5 68.28.147.55 (68.28.147.55) 119.622 ms 142.780 ms 132.869 ms
6 68.28.147.7 (68.28.147.7) 131.470 ms 143.569 ms 129.226 ms
7 68.28.147.44 (68.28.147.44) 129.035 ms 142.601 ms 134.444 ms
8 192.168.0.12 (192.168.0.12) 131.068 ms 119.089 ms 133.249 ms
9 68.28.147.97 (68.28.147.97) 141.639 ms 407.669 ms 134.263 ms
10 68.28.147.19 (68.28.147.19) 140.956 ms 149.499 ms 153.092 ms
11 sl-gw37-chi-12-0.sprintlink.net (144.223.35.149) 218.654 ms 156.697 ms 305.634 ms
12 sl-bb20-chi-5-0.sprintlink.net (144.232.26.69) 197.122 ms 298.044 ms 198.358 ms
13 sl-st20-chi-4-0-0.sprintlink.net (144.232.18.153) 125.861 ms 121.542 ms 134.960 ms
15 ae-12-55.car2.chicago1.level3.net (4.68.101.131) 133.339 ms ae-22-56.car2.chicago1.level3.net (4.68.101.163) 165.458 ms
19 65.77.89.178 (65.77.89.178) 161.851 ms 163.064 ms 152.914 ms
20 v-um-al-inet.r-bin-arb.umnet.umich.edu (192.122.183.46) 172.508 ms 267.149 ms 199.743 ms
21 v-bin-arbl.r-arbl.umnet.umich.edu (192.122.183.94) 162.192 ms 163.380 ms 160.941 ms
22 l3-arbl-cool.r-cool.umnet.umich.edu (141.211.0.130) 158.929 ms 166.103 ms 159.983 ms
23 ge-aldc-cool.r-aldca.umnet.umich.edu (141.211.0.210) 266.750 ms 165.637 ms 158.835 ms
24 www.umich.edu (141.211.144.182) 157.583 ms 153.597 ms 154.844 ms

Posted by csev at 05:53 PM