
I came across this car while driving eastbound on the Santa Monica Freeway this past Saturday. Do you think the license plate is referring to the Ubuntu Linux OS or just the Ubuntu philosophy?
It also had some funny stickers and decals:
* Evolve FISH Logo Decorative Silver Car Emblem
* Goodnight Bush: A Parody
* Got Hope Bumper Sticker
Wednesday, April 08, 2009
Ubuntu License Plate on the Santa Monica Freeway
Wednesday, January 14, 2009
Products I Can't Live Without - 2009
Inspired by this post from Michael Arrington of TechCrunch, I thought it would be interesting to make my own annual list of products and services that I can't live without. Here we go for 2009 (in the order that they came to mind):
Gmail, Google Calendar, Remember The Milk, iPhone, F-Spot, Quicken, Google Reader, Facebook, Google Sites, Flickr, iTunes, Twitter, Jungle Disk, Dropbox, Delicious
Gmail
I use this every minute every day for both personal and work email (my company uses Google Apps for email and calendar). I just love the user interface and ease of accessing it on the web and the iPhone. Beats the hell out of Outlook for work email.
Google Calendar
Again, this is how I keep track of temporal events in my life both at home and at work. I love that I can get text messages with alerts for calendar events.
Remember The Milk
Ever since reading David Allan's Getting Things Done, I was in search of a tool to put his ideas to work. About a year ago, I settled with Remember The Milk (RTM) and have used it ever since for task management. The user interface is outstanding and I can access it from the web and iPhone. Perhaps the best feature is that it integrates perfectly with Gmail as a "Gadget".
iPhone
I don't identify with being an Apple person, but I couldn't resist the lure of the iPhone. It really adds a lot of value to my life as I can manage email, read blogs, listen to Podcasts, use Google Maps, locate GeoCaches, and even SSH to a server at work. Oh, and visual voice mail rocks!
F-Spot
This GNOME desktop application is what I use to manage photos. It stores photo metadata in a SQLite database which I can easily access if I ever want to export the data somewhere else. It also makes it easy to upload photos to Flickr.
Quicken
I have been using Quicken for years to manage my personal finances. I upgrade it to the latest version every even year, so right now I have Quicken 2008. Honestly, I would love to stop using Quicken and switch to a web-based solution, but I can't find one that is fully-featured enough for me. I just have to have the ability to create arbitrary asset accounts for my wallet (cash), reimbursements, etc. Most web-based services don't offer this yet. I've got my eye on Mint which, I have a feeling, will get good enough for me to make the switch one day.
Google Reader
I read a lot of blogs. I couldn't possibly keep up if I didn't use a blog reader. In late 2008, I switched from Bloglines to Google Reader because the user interface for Google Reader just kept getting better and eventually it won me over. A big part of this was the excellent user interface of Google Reader on the iPhone.
Facebook
This barely made it to my list. Maybe I could live without it, but I do find myself checking it almost daily because so many of my friends use it and somehow it makes me feel like I'm in touch with all of them without ever really talking to them :). Also, Facebook is the platform I used to develop and launch my book sharing application We Read which continues to grow slowly, but steadily each day and recently passed 1000 users.
Google Sites
This past year I finally committed to using a wiki for my family. I have been using wikis for years for work and open source software projects, and always thought it would be useful for keeping track of personal things like lists of gifts to get people, account information for utilities, financial services, and contractors, etc, etc. I tried setting up and hosting wikis like XWiki and Confluence, but ultimately went with the free, online Google Sites which was formerly JotSpot.
Flickr
I purchased the Pro Account and now use Flickr for all my online photo sharing needs. The pro account allows me to upload an unlimited amount of photos for about $25/year. My family depends on this to see the many photos I take of my son as he grows up.
iTunes
I hate the fact that iTunes doesn't run on Linux machines, but I can't resist it because it is really the only good option for managing music and videos on an iPod. I use it daily to load up my iPhone with podcasts.
Twitter
I use Twitter a lot. I blame Twitter for killing my urge to blog. It is just so much easier to share things 140 characters at a time. I have Twitter linked with Facebook so that each Tweet I send out ends up updating my Facebook status.
Jungle Disk
This might be one of the most important services I use. It keeps my music, videos, photos, and other important files backed up on Amazon's S3 network. At only $.15/GB, it ends up being pretty cheap to store a lot of data. This way, if my house ever burns down or someone steals my computers, or I experience a hard disk failure, I will always be able to restore my precious data.
Dropbox
I have started storing all files that I access often in a special directory on each computer (home, work, laptop, etc) called the Dropbox. Each directory gets automatically synchronized so I have easy, local, access to the files I need wherever I am. It also makes it extremely easy to share files with other people that use Dropbox.
Delicious
I store all my bookmarks in Delicious and take advantage of its Firefox plugin to easily tag sites and recall sites I've already tagged. I don't do a lot with the social features of Delicious like bookmark sharing, though. Maybe it's just because I don't know which of my friends use Delicious too.
Well, there you have it! I can't wait to see how this list compares to the one I'll make in January 2010.
Wednesday, December 03, 2008
Groovy Best Fit Line
An engineer on my team at work asked if I could help with coding an algorithm for calculating a line that best fits a given set of data points. I thought, "what a great excuse to practice some Groovy", and got started right away.
A few Google searches led me to this 10-yr-old page on Regression Functions by Stefan Waner from Hofstra University. Stefan outlined the exact algorithm I was looking for.
Here is my implementation in Groovy:
// Prints the start/end points of a line that best fits 4 sample data points
pts = [[1, 1.5], [2, 1.6], [3, 2.1], [4, 3.0]]
println bestFit(pts)
/**
* Given a set of points, uses a linear regression algorithm to find the start and end points
* of a line that best fits the set of points.
* Returns the two points as [[x1, y1], [x2, y2]].
* The algorithm is from
* http://people.hofstra.edu/stefan_waner/realworld/calctopic1/regression.html.
*/
def bestFit(pts) {
// Find sums of x, y, xy, x^2
n = pts.size()
xSum = pts.collect() {p -> p[0]}.sum()
ySum = pts.collect() {p -> p[1]}.sum()
xySum = pts.collect() {p -> p[0]*p[1]}.sum()
xSqSum = pts.collect() {p -> p[0]*p[0]}.sum()
// Find m and b such that y = mx + b
// m is the slope of the line and b is the y-intercept
m = (n*xySum - xSum*ySum) / (n*xSqSum - xSum*xSum)
b = (ySum - m*xSum) / n
// Find start and end points based on the left-most and right-most points
x1 = pts.collect() {p -> p[0]}.min()
y1 = m*x1 + b
x2 = pts.collect() {p -> p[0]}.max()
y2 = m*x2 + b
[[x1, y1], [x2, y2]]
}Running this script prints the following:
[[1, 1.3], [4, 2.8]]You gotta love Groovy!
Saturday, November 22, 2008
A Personal Hosted Confluence Wiki for Free
I had been searching for a way to use Confluence as a personal wiki for me and my wife. I couldn't find a cheap hosted solution where I could just get an account for 2 people on an instance of Confluence maintained by someone else. I also didn't really want to pay a hosting company like Linode or Slicehost $20 a month for my own virtual machine on which I'd have to install and maintain Confluence myself.
Recently I heard about Morph Labs which describes themselves as a Platform as a Service (PaaS). They offer free hosting accounts that give you up to a 1GB database. I immediately got the idea to try running the personal edition of Confluence on this service. Eventually I got it working, but the process to get up and running was not at all easy. In fact, I struggled for serveral nights.
The rest of this post documents the process I went through. I hope it will help someone else avoid the many hours I spent learning how to work within Morph AppSpace with a third-party Java web application. Good luck, and if you have any tips or corrections, please comment and I'll update this post.
Start by signing up for a Morph AppSpace account with Morph Labs. Create a new subscription and setup a new database for that subscription. Be sure to choose Java, not the default Ruby on Rails, when setting up your subscription. Choose PostgreSQL for your database as this seems to work best with Confluence. Once your subscription is setup, download the Properties File, morph_deploy.properties, and Deployment Jar File, morph-deploy.jar, that can be found in the Java Tools for Morph AppSpace Deployment section.
Next, go get your free license for personal Confluence. It allows you to register 2 users. Hold on to that license text. You'll need to activate Confluence once it is installed. Then download the latest version of Confluence which is currently 2.9.2.
Unpack the file you downloaded somewhere on your computer. Inside, you should find an edit-webapp directory. Any files you need to modify should get copied into this directory. The contents of this directory get overlayed on top of the contents of the eventual Confluence WAR file that you're going to build, so make sure to adhere to the standard WAR directory structure. The whole purpose of the edit-webapp directory is to keep your local changes separate from the distribution so when it comes time to upgrade Confluence, you can just replace it and you'll know what you had to modify.
Copy confluence/WEB-INF/classes/confluence-init.properties to edit-webapp/WEB-INF/classes/confluence-init.properties.
Edit the copied confluence-init.properties, specifying the home dir as /var/java/
Copy confluence/WEB-INF/web.xml into edit-webapp/WEB-INF/web.xml.
Edit web.xml adding the jdbc datasource:
<resource-ref>
<description>Morphlabs Datasource</description>
<!-- any name will do for the res-ref-name -->
<res-ref-name>jdbc/morph-ds</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
and the JavaMail session:
<resource-ref>
<description>Morphlabs Mail Session</description>
<!-- any name will do for the res-ref-name -->
<res-ref-name>mail/Session</res-ref-name>
<res-type>javax.mail.Session</res-type>
<res-auth>Container</res-auth>
</resource-ref>
I had to disable Confluence's JMX-based monitoring because of problems registering MBeans. This isn't a big deal since, for a personal instance of Confluence, I don't really have any need to monitor performance and gather statistics. This web page explained how to disable JMX. Download jmanageContext.xml from the URL shown on that page. Then, copy jmanageContext.xml into edit-webapp/WEB-INF/classes.
Remove mail.jar and activation.jar from confluence/WEB-INF/lib. Morph AppSpace already includes those in the Jetty server and having an extra copy in your WAR might cause class loader issues that would prevent JavaMail from working properly. This is the only change that you'd have to remember to do again if you were to ever download a new version of Confluence.
Now it is time to build the WAR file. Run ./build.sh which creates dist/confluence-2.9.2.war. If you need to make any changes to any files, be sure to run this build script again.
Download morph_deploy.properties and morph-deploy.jar from your subscription within the Morph Control Panel.
Run
java -Xmx512m -jar morph-deploy.jar --config morph_deploy.properties confluence-2.9.2/dist/confluence-2.9.2.war
Now, sit back, relax, and wait while your WAR is being uploaded and deployed on Morph AppSpace. This could take up to 15 minutes, so be patient.
Hit your-subscription-name.morphexchange.com and if all went well, you should see a Confluence installation web page. Following the Confluence installation wizard, entering your personal license text. Choose Custom Installation, External Database, Connect via a Datasource.
Enter java:comp/env/jdbc/morph-ds as the datasource.
Confluence takes a long time to setup the database, so the page may appear to hang. Each time I tried this (I had to try many times before figuring all this out), the page timed out. I don't know if something went wrong or Morph AppSpace just has a time limit on waiting for a page to render. Even though the page timed out and I saw some kind of "Proxy error" message, the database still seems to have been initialized properly, but the application wasn't able to recover. I had to go into the Morph Control Panel to restart the application. Once I did that, Confluence was up and running!
Coming soon to this post: Setting up a mail server and using Groovy and XML-RPC to perform a daily backup of your confluence data.
Sunday, September 28, 2008
MacBook to HDTV via Mini DVI to DVI to HDMI
Since the MacBook is so good at playing different kinds of media, I plan to make it the media center of my life. I will store all music, videos, and photos there.
This led me to try to connect my MacBook to my Sharp Aquos LC46D64U 46-Inch 1080p LCD HDTV. I did some research and found that there was only one option if I wanted to have digital picture quality. I needed 2 cables because there is no such thing yet as a Mini DVI to HDMI cable:
The MacBook lets you choose between having 2 monitors and mirroring the same monitor. The settings are all under System Preferences > Displays.
Now, I can show photo slide shows when the family is over, I can watch video podcasts and YouTube videos on the big screen, and I can even enjoy the Twitter election feed from my couch.
Next I will look for the best way to get the sound from my MacBook hooked up to my Denon receiver.
