Thursday, October 29, 2009

Building a Prakticello: Build of Materials and making the body

It's been over a year since I "started" this project, but I finally took some time off to build the Prakticello.  For those who are curious about the plans, here is what you get:



The plans specify spruce for the body of the cello. Spruce tone wood is easy to find for guitar bodies, but its difficult to find the right dimensions because the sides of the cello body are 29". Tone wood can also be quite spendy.  With a bit of searching, I found that airplane builders also use spruce and you can order precut pieces.  I ordered slightly larger pieces so I could cut them to right dimensions.  I ordered the spruce from Aircraft Spruce and Specialty Company for $36 including shipping.  


Additional wood is needed for the saddle, bridge, knee, and chest supports.  I picked up several pieces of popular from my local home improvement store for about $15.  Mr. Nussbaum encouraged me to carve the neck and pegs, but I opted to buy a pre carved neck, finger board, nut and pegs from Metropolitan Music for $166.50 including shipping.  I picked up a tail piece on ebay for $8.00, but its wood and heavy so I'm thinking about getting a Wittner aluminum tail piece.  The remaining items that I still need are strings (Jargar  recommended), a bridge, and an endpin.  Here are the assembled materials:





Although the neck is pre carved, the size of the neck block gives me pause and I'm wondering who I know has a jigsaw or bandsaw I could borrow for a couple of hours.  I built the body of the Prakticello, here it is glued and clamped together.  For scale, the square on the cello is 16".








Nifty database login widget in GeoTools 2.6

Writing yet another login dialog for Postgres/PostGIS in Swing is tedious and mine always look crappy.  So I was happy to find that GeoTools 2.6 has a database login widget called JDataStoreWizard.  Updating the table with new features is also simple as adding your feature collection to the feature store.








Here's an example to call JDataStoreWizard and update a table in PostGIS
JDataStoreWizard wizard = new JDataStoreWizard(new PostgisDataStoreFactory());
int result = wizard.showModalDialog();
if (result != JWizard.FINISH) {
     System.exit(0);
} 
Map connectionParameters = wizard.getConnectionParameters(); 
PostgisDataStore dataStore = (PostgisDataStore)
     DataStoreFinder.getDataStore(connectionParameters); 
FeatureStore myFeatureTable = (FeatureStore) pgDs.getFeatureSource("myFeature");
myFeatureTable.addFeatures(myFeatureCollection);

Thursday, October 15, 2009

Wednesday, October 14, 2009

Gamaray AR Browser Open Sourced

Development on Gamaray the AR browser stopped on September 30th.  Today, the Gamaray source code was released as open source and available for download.


In light of Layar wanting to charge content developers then changing their minds for the immediate future its nice to have alternatives.

Saturday, October 10, 2009

Update on Dell Mini with OSX

It's been six months, so I thought I would do a quick update on my Dell Mini.


What works

  • It's small and light weight: I travel frequently and its nice to be able to stick a notebook in my purse/backpack/grocery bag.  In contrast, my MacBook Pro (the old 15 inch model) weighs around  7-8 lbs with the power supply and requires a laptop bag.
  • It's powerful enough: I typically have 10 -15 apps running at the same time.  This includes MS Office, Eclipse, Apache, Postgres, a couple of browsers, Thunderbird, Colloquy, Tweetie, Evernote,  Python stuff, java web apps, text editors - the list goes on.  If things go pear shaped, it's usually a browser hogging all the memory.  I recently built the GeoTools library and I think the Dell Mini did it in under 20 minutes.  I would have never believed that I could do my typical workflow with a 1.6 GHz processor with 2 GB of RAM.
  • 32 GB of disk is sufficient: I thought that 32gb would be cramped, but I have yet to run out of disk space.  I don't think I've dipped below 5gb of free disk space, but I do cheat a little and use the 16gb SDHC card for storing big files.
  • Wireless works everywhere: With my MacBook Pro, I have dead spots in my house.  This is understandable because my house is old with brick walls and with non-load bearing walls covered with plaster over a wire mesh.  I don't have this problem with the Mini, I get WiFi in every part of the house.
  • Decent battery life: I can easily squeeze out 3 hours of work using the standard battery on a flight between San Antonio and DC, which is a 3.5 hour direct flight.
  • SD card:  Being able to copy photos from the SD card on my camera to Flickr or just on to my drive is teh awesome.  No additional cables needed.
  • Fast boot: So I have to hard boot on occasion, especially if sleep decides to throw a tantrum.  At least I don't have to wait very long, usually under 20 seconds.

What doesn't work

  • Form factor:  Its friggin small, so I use a USB keyboard, a wireless mouse and an external monitor to be productive.  Using Spaces to organize the workspace sort of helps, but nothing beats a big screen.  I've gotten used to the Mini keyboard, but I still prefer the Apple external USB keyboard when I 'm  working.  I installed Melkort's touch pad drivers, but the gestures are not the same; i.e. one finger scrolling on the mini vs 2 two finger scrolling on the MBP.  The keyboard and external monitor are really helpful, but I can work without any of these things, if need be.
  • Sleep:  Sleep used to work flawlessly, now it can be a crap shoot.  Sometime after the 10.5.7 update sleep started acting up.  Not a big enough deal to spend time tracking down a fix though.
  • Watching movies: I've tried several versions of VLC and ran through all the fixes in the forums, but it still has halting problems.  Also sound is bleh at best, even with headphones or external speakers.  Really harshed my nostalgia when watching Space Above and Beyond.
  • Monolingual:  Using Monolingual to slim down the install proved to be a case of being to clever for my own good.  Turns out that I did need some of those printer drivers and superfluous architectures.  I spent a couple hours debugging a make file before I realized that I only had an i386 architecture and that I need to remove the other architectures from the make file.
  • N270 processor does not support virtualization:  This is the biggest thorn in my side with no work around.  More often than not, I have to look at stuff on a different OS; so  I use Virtual Box (gave up on Parallels) on the MacBook Pro.
For what it's worth, I haven't applied the 10.5.8 update but apparently my 10.5.7 update instructions work.  I did upgrade to the dellefi1.2.5a which got Melkort's touch pad drivers to work. Other than that, there have been no changes to the system since the 10.5.7 update.

I've use the Dell Mini as my primary machine for six months under heavy use.  My 15" MacBook Pro is used mostly for running other operating systems and watching movies.  Given that the MBP is 6 times more expensive than the Mini in its current configuration, leads me to question the conventional wisdom about buying the most hardware you can afford.  I think that this goes to show the OSX performs quite well with modest hardware.

   
So far, the advantages of portability outweigh the Mini's shortcomings.  However, that hasn't stopped me from eyeing the 13" MacBook Pros, which would do everything I need, just not in such a small package.

Thursday, October 8, 2009

How To: Jars in a jar using Eclipse

I wrote a utility using GeoTools which uses a couple classes to transform geometry from one projection to another.  Projecting geometry uses EPSG definitions stored in the gt-epsg-hsql-2.5.7.jar which does not get bundled into an executable jar; for my utility to work as executable jar I needed to include the gt-epsg-hsql-2.5.7.jar.  


There are several approaches to building a jar that contains jars.  They typically involve using ant to bundle the files into the jar and a special class loader.  Writing the build.xml file and the class loader can be tedious.  Fortunately, the Fat Jar eclipse plugin simplifies the process and includes the One-JAR class loader.  


Installing the plugin can be done using Software Updates:



Click on Add Site

Enter the web site URL

Select the Fat Jar plugin and click on Install


Click Finish


Restart eclipse to finish the installation.


To build your project with external jars included, click on Export


Click on Other and select the Fat Jar Exporter

Select the project

Enter the name of the output jar, select the main class, and check off the One-JAR option to use the One-JAR class loader.

Clicking on next opens a dialog to select the jars to include, the default selects all external jars.  Unlike a typical executable jar, all the imported classes are not included so take the default and click on finish.  The Fat Jar plugin will build the jar with the external jars included, note that the final jar can become quite large.