Some Progress in Mail Archive Tool

This week was really dominated by Teaching so I was only able to slip a few hours in on the weekend to work on MailArchvie performance.
I pretty much unbroke the MailAction.java bits – mostly making the single message view work again with the new focus on not reading all the messages into memory.
My next steps are doing the Oracle variants of the database limit stuff and testing. Then I make an initial back-port to 2.4 and have Thomas do some testing for me. Then it is on to cleanup and final testing of the post 2.4 and post-2.5 branches.
Then it is time to move this toward trunk and clean up bits of the Storage API while I am at it.

Saying: About Teaching…

Teaching in a Web 2.0 world is a new experience for me. People pick technical things up so quickly that this saying summarizes my feelings about teaching technology:
“In teaching, I no longer have a goal to know more than my students and impart my knowledge to them – my new goal is to get my students to the point where they know more than me as quickly as possible.”

Ruby on Rails Teaching Edition

Wow – busy few days. I built three small distributions of Ruby on Rails 1.2.6 for use in my course. There is support for Windows and Mac OS/X 10.4.
The basic idea is to come up with a distribution that works from a USB drive for students working in a lab as well as a really simple distribution that does not mess with your system configuration and it can be put anywhere in a directory structure including on a shared file server.
Then I built printed documentation for each of them and a podcast for each version to walk my students through the installation process.
This whole thing is available at:
www.rubylearn.com
Have fun.

Continue reading

Wiping Out The Effects Installing the Rails GEM

Pretty much useless information – warning – this might mess things up.
gem environment
RubyGems Environment:
– VERSION: 0.9.4 (0.9.4)
– INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
– GEM PATH:
– /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
– /Library/Ruby/Gems/1.8
– REMOTE SOURCES:
– http://gems.rubyforge.org
cd /Library/Ruby/Gems/1.8
rm cache/*
rm sourcecache
rm gems/act*
rm gems/rails*
rm specifications/act*
rm specifications/rails*

Keeping my post-2.4 portal branch up to date

This is from Ian – I am sure that it will make more sense when the time comes for me to use it :)
https://source.sakaiproject.org/svn/portal/branches/post-2-4
When you want to merge from trunk into a working copy of the branch. do…
to get the copy point do
svn log –stop-on-copy https://source.sakaiproject.org/svn/portal/branches/post-2-4
then merge will be
svn merge -rxxx:HEAD https://source.sakaiproject.org/svn/portal/trunk .
where xxx is the last copy point revision
into the working directory, followed by a commit.

Pedagogy: Permitting Anonymous users in Sites

I have used a feature in Sakai where you add the “.anon” role to a site and then give .anon site.visit and other permissions as you see fit.
This makes it so that the site is directly accessible via a URL – without any login process at all. You as the instructor have complete control over what these anonymous users see and can do in your site. Sakai smartly hides and shows buttons based on the permissions you give anonymous users.
I have this all set to the point where I have a completely public site for the course I am teaching at
http://www.si182.com/course.htm
Note that you need no account nor login to see my course materials and peruse the site. I currently have the e-mail archive tool hidden for privacy issues. But I could unhide the E-Mail tool and you could see our course mail list too.
I will continue to experiement with this – I have already found a few little things that could be improved for anonymous users – I will file JIRAs on this stuff and work on it.
I take inspiration from this from the excellent keynote from Hal Abelson at the Amsterdam conference where he encouraged us to think open first and then hide materials only when there is a reason to hide the materials. Also Bodington hs the notion of making materials trivially public at its core as well.

Going for the Gusto in Sakai’s Storage Layer SAK-12387

As I have been blasting my way through improving the performance of the MailTool – it is pretty clear that we need to improve our APIs for things like Messages to allow tool writers (and Web Service consumers) to Filter, Search, and Page on pretty much any call that returns a List.
Otherwise we just won’t scale and we won’t be cool at all. The Mail Archive tool keeling over just happens to be the first place our lack of rich search, filter, and paging options in our APIs makes us look very uncool and unscalable.
So I whipped up a JIRA to talk about it. Actually I am already about 25% done with this because I had to knock the cobwebs out of BaseMessage and Storage APIs to make MailArchive work well. Now I want to do it everywhere. I don’t want to make all the implementations super-fast like Mail will be (actually mail will be superfast most of the time and tolerably slow on searches). Most importantly Mail Archive will not crash servers and tick off impatient users.
Here is the JIRA:
http://bugs.sakaiproject.org/jira/browse/SAK-12837
I include the text of the JIRA below. The people who mostly care about this are Ian, Beth, Glenn, Zhen, Jim, and me. These are the folks who own tools that are using the old DbDouble and DbFlat series of self-built ORMs from the CHEF era.

Continue reading

Cool Mac OS/X Time Machine Tip – Starting a Backup Manually

Funny about TimeLine – initially I thought it was “ho-hum” when I first got Leopard – now I get nervous when I have not backed up for a while.
So sometimes I want to trigger a backup. Here is the line:
/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper &
Here are some URLs that helped me:
http://www.macworld.com/article/131323/2007/12/tmterm.html
http://www.macworld.com/article/131534/2008/01/tmeye.html?t=101
ALso to check on how things are going on your backup open the console application and put backupd in the search box. It is not to talkative but can give some info on little problems – you see messages like this:
1/21/08 6:50:45 PM /System/Library/CoreServices/backupd[3102] Starting standard backup
1/21/08 6:50:45 PM /System/Library/CoreServices/backupd[3102] Backing up to: /Volumes/Backup/Backups.backupdb
Actually console is a pretty cool application.

Not Skipping Unit Tests in Sakai – Maven 2

I have been using -Dmaven.skip.test=true for so long in Sakai – I had hard-coded it into my settings.xml

The whole Sakai now compiles with unit tests and the Continuum Build running at Cambridge does its builds with unit tests turned on. Nightly2 does not yet compile with unit tests turned on.

As a developer – you might want to start turning unit tests on or you will break the Cambridge build. I got caught when I checked in something that broke the Continuum build at Cam build but not nightly2. Thanks to Aaron and Ian for being gentle – and thanks to Aaron for his IM advice that led me to the solution below – I felt like I was in Sakai beginner school because I felt so lost.

There are two ways that unit tests get turned off. First, my mvn commands always looked like this:

mvn -Dmaven.test.skip=true -Dmaven.tomcat.home=/Users/cs ….

Just remove the obvious suppression of the tests in your mvn command – but for some of us we just coded it into our settings.xml which is stored in

~/.m2/settings.xml

I had a line that looks like this:

<maven.test.skip>true</maven.test.skip>

Now I have taken it out and joined the ranks of the hip and cool unit testers in Sakai. Also it reduces the number of times I am embarassed when I break the Caret build. Also it means that I am happy to add some stuff to the already existing unit cool tests in the portal made by Ian so my new work is also unit tested.

You might still want to to turn off unit tests when you compile all of Sakai after a fresh checkout – it adds some time to the process. But when you are working on a chunk of Sakai and in particular before you check something in – make sure to pass unit tests before you check new code in.