Monday, December 28, 2009

Google Wave Development - Robots in Netbeans 6.7

In this post I hope to describe how to create Google Wave robots in Netbeans 6.7. The instructions are adapted from a blog post on GAEJ Experiments regarding the use of the WADRobotFramework in Eclipse. Thanks to Romin Irani for the information on GAEJ Experiments and Jerome Baton for the WADRobotFramework.

This post assumes that you have a Google App Engine account and have Netbeans 6.7 setup to allow the deployment of Java applications to the Google App Engine. To deploy to GAE from Netbeans 6.7 you will need the GAE for NB Plugin. To check if it is setup correctly follow the tutorial here.

To begin with download the WADRobotFramework. It is a single JAR that should be copied to a directory on your machine. I used C:\Java_Utils\Wad. You will also need to download the Wave Robot Java Library from Google Code. I place all the files from this location into the directory c:\java_utils\waverobot.

Once we have all the files downloaded and copied to the correct directories I can create a new Web Project in Netbeans.

 

The project should be created with the name you want the robot to be names within Google Wave. I  have called mine CoxyDaveWaveRobot.




Ensure that Google App Engine has been selected as the Server.


Once the wizard has completed creating the project you can delete the index.jsp file as it is not required for the Wave Robot.

The next step is to add the required libraries to the project to allow us to use the WADRobotFramework and the Google Wave Robot Client.



Go to the Project Properties...Libraries panel and add each of the above libraries. Ensure that the Package checkbox is marked.

We can now start to build our Google Wave Robot. Create a new Java Class called MyAppenderRobot and once the wizard has completed add an import for org.wadael.waverobotfrmwrk.simple.BlipAppenderRobot and change the class declaration to extend BlipAppenderRobot. Netbeans will indicate that you need to 'Implement all Abstract Messages'. Use the wizard to implement the abstract methods. Replace the body of the getTextToAppend to the content shown.

public class MyAppenderRobot extends BlipAppenderRobot{

    @Override
    protected String getTextToAppend(String arg0) {
        return "I am replying to your blip!";
    }

Open the web.xml file and add the following servlet details:


        MyAppenderRobot
        coxydave.waverobot.MyAppenderRobot
    
    
        MyAppenderRobot
        /_wave/robot/jsonrpc
    

Add a new directory (_wave) to the WAR file as shown and add a new XML file called capabilities.xml




Add the following content to this file:


  
    
  
  1


Ensure the app-engine.xml file contains the following:


    coxydavewaverobot
    1


At this point you should create a Google App Engine Application with the same name as your project. This will allow Netbeans to automatically deploy the war file to this application.




Once the application has been created it should be possible to 'Build the Main project' and use the 'Deploy to
Google App Engine' on the context menu for the project.

Once the application has been deployed to the Google App Engine, my application  is accessible within Google Wave using the following email address: coxydavewaverobot@appspot.com. Yours will be the ApplicationID@appspot.com. To use the robot just add the address to a new or existing wave. The robot will say hello and then wait for someone to add a new blip. At this point it will return the message in a new reply blip.

Hopefully this was useful. If anything is unclear please leave a comment on the blog and I will respond accordingly. Thank you.



Thursday, December 3, 2009

Google Wave Development

I finally managed to obtain a Google Wave account (thanks Harvey!).

After playing with Google Wave for about an hour I decided to that I should try to develop a robot for Wave. I used the tutorial on the Google Wave site to create a python Wave Robot, deployed it to Google App Engine and tried it in my wave. It works!

Python however is not my language of choice and I am going to learn how to use JAVA to produce Google Wave robots. I have found an article that explains how to use the WadRobotFramework to simplify the creation of JAVA Wave Robots.

If you would like to chat to me on Wave my address is coxydave at gmail dot com.

Friday, November 20, 2009

Google Releases Chrome OS Open Source Project

According to the Official Google Blog, Google has released the first cut of the Google OS source code. The code is open-sourced and Google is hoping that the open-source community gets behind this and helps to develop this product.

The following video describes the background behind the Google OS project and some of the drivers.




Stay tuned for more.

Update

After watching some videos about this announcement I am a bit disappointed in the approach Google has taken with the Google OS. Although the idea of an OS that makes use of the 'cloud applications' is a good one I think that for users in Australia it will be a disappointment due to the lack of a persistant network connection that is reasonably priced.

Most Australian cities do not have good coverage of wireless hotspots and the use of the 3G network for this device would be very expensive. It would also compete directly with Google Android.

Maybe in a couple of years we may find that the wireless networks are more ubiquitous and this type of device  will be more useful. Until then most users will require a netbook that is able to be used without a network connection.

Tuesday, November 17, 2009

CNET Interview with Eric Schmidt from Google

An interesting interview with Eric Schmidt the CEO of Google. Discussions about Google OS, Google Search, Android and Google's motto of 'Do No Evil'.

Saturday, November 7, 2009

Using JAK and Google Geocoder Part 2

In this second post about using JAK and Google Geocoder I have included a new application that processes a CSV file containing a list of descriptions and addresses. It uses a library from http://ostermiller.org/utils/ which simplifies the reading of CSV files.

The following code snippet shows the usage of the CSVParser class from OsterMiller.org.

String addresses[][] = null;
try {
   CSVParser csv = new CSVParser(new FileReader("restaurants.csv"));
     try {
         addresses = csv.getAllValues();
         } catch (IOException ex) {
         Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
         }
   } catch (FileNotFoundException ex) {
      Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
      }

Once the string array has been loaded with values we can iterate through the array and use the Geocoder class to find the latitude and longitude of each of the addresses in the file. The code below shows this process and the adding each of the placemarks into the KML file.

for (int i=0; i<addresses.length; i++){
  try {            
      location1 = Geocoder.getLocation(addresses[i][1]).toString();
      } catch (IOException ex) {
         Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
      }
      final Placemark placemark1 = document.createAndAddPlacemark()
                  .withName(addresses[i][0])
                  .withDescription(addresses[i][1] + addresses[i][2]);
      placemark1.createAndSetPoint().addToCoordinates(location1);
      }

The full code for this project is here. I hope that you find it useful.

Tuesday, November 3, 2009

Create your own font

Would you like a font that matches your handwriting? Try this new service from FontCapture. It will create a TrueType font from your own handwriting. All it requires is a printer and a scanner.

An example of a font created by this tool is shown below.



Edit: this service is no longer free. The font costs between $9.95 and $14.95 to download. (24/08/2010)

Saturday, October 24, 2009

Using JAK and Google Geocoder

In a previous post I mentioned that I would be doing some experimenting with the JAK - Java API for KML. I have now created a simple program that creates a KML file using co-ordinates obtained from calling the Google Geocoder.

If you wish to review the whole program I have made it available here (4mb).

The main parts of the code are as follows:

GeoCoder class
  • converts a street address into a longitude/latitude point.
  • call getLocation method with a string representing the address.
  • class uses Google Geocoder.

Refer to the Geocoder.java class file in the download for more information on how this works.



Main Class
  • assigns an address from the first command line argument
address = args[0];
  • calls the GeoCoder.getLocation method with Address String
location = Geocoder.getLocation(address).toString(); 
  • creates a KML file using the location value returned by the GeoCoder class
final Kml kml = new Kml();
kml.createAndSetPlacemark()
   .withName(address)
   .withOpen(Boolean.TRUE)
   .createAndSetPoint()
   .addToCoordinates(location);

try {
kml.marshal(new File("HelloKml.kml"));
} catch (FileNotFoundException ex) {
     Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}

In the future I will expand on this application to provide more information in the KML.

Sunday, October 11, 2009

Egreat EG-M31B Network Media Tank

The Egreat EG-M31B is a Network Media Tank (NMT). A NMT is a network attached device that also has connections for output of media to display devices such as HD TV Panels and CRT devices.



The Egreat M31B is a NMT based upon the firmware of the Popcorn Hour A1XX series and implements all of the functions of this player as well as an eSata port for the connection of external hard drives at SATA speeds.

For full details of the specifications of the player see the Egreat website.

Part of the appeal of the NMT devices is the active development community that surrounds them. The centre of this community is the NetworkMediaTank site. This site provides support for all aspects of the devices, but in particular provides a forum to discuss plugins, extensions and themes for the device.

The easiest way to make use of the more popular 3rd party applications is to download and install the NMTInstaller. The NMT Installer takes the hard work out of installing 3rd party applications such as Jukeboxes, Webserver, Automatic Downloaders, Themes and Web Services.

Development on this platform is in PHP, Javascript or in C directly on the device. Further details can be found on the NMT Wiki.

Friday, October 9, 2009

JAK - Java API for KML

In a previous blog post I showed how it was possible to take information recorded by a GPS device and mobile phone and plot the resulting track using Google Maps.

Recently, I found a link to a JAVA API that allows you to interact with the KML files produced by the process using a JAVA application.

The project aims to provide an

"automatically generated full reference implementation of the KML object model defined by OGC’s KML standard and Google’s GX extensions. It is an object orientated API that enables the convenient and easy use of KML in existing Java environments."
Over the next couple of weeks I am going to do some experimentation using this API and try and develop some simple applications to take GPS tracks from Nokia Sports Tracker and my GPS and create interesting KML files.

Stay tuned...



Wednesday, August 12, 2009

Fitness First Membership Cancellation

I recently decided that my Platinum Membership to Fitness first was not providing enough value to justify the almost $100/month membership fee.

After reading some real horror stories from people trying to cancel membership I did some research to see what the best way to do this is. What I found was a Fitness First Cancellation Letter Template from Choice Magazine.

This letter includes all the details required to satisfy the contract requirements.

I handed the letter into the gym and was contacted 4 days later stating that the last payment would be taken in 3 weeks time. The contract would be canceled at the end of the current month.

I was not required to have a meeting with a Customer Service Representative at the club however I was contacted via telephone to ask the reason for cancellation and ask if I would like to transfer the membership to somebody else.
After the three weeks had elapsed I checked the bank account and the final amount was taken. It is now half-way through the next month and there have been no further debits from my bank account.
I encourage anybody who wishes to terminate their Fitness First contract to use the letter template from the Choice website.

Edit: I have updated the link to the letter. Choice Magazine have changed their site structure since I wrote the post. If this disappears again a link to the article about gym contracts is here. Alternatively, you should be able to search the Choice web-site for Gym Contracts.

Tuesday, August 11, 2009

Sunday, August 9, 2009

MoWeS Portable Webserver

The MoWeS Portable Webserver is a light-weight web server that can run from any writable media (USB Drive, HDD, or flash-card).
MoWeS stands for the three letter abbreviation Modular Webserver System and makes it possible, to run a webserver based on Apache, MySQL and PHP from an USB Stick or any other writable media (harddrive, flash cards etc.) without installation under Windows (98 to Vista).
The installation process also includes the ability to install various web software packages. These packages include:
Setup is easy and I completed the setup of the web server on a USB stick within 1 hour including the installation of MediaWiki.

This is great way to have a portable version of some of the best CMS and Wiki software available.

Monday, July 13, 2009

Google Chrome OS - An OS for the Internet Age

For a number of years pundits have been discussing whether Google would release an operating system. On the 7th July 2009, Google announced the existence of the Google OS.
Google Chrome OS is an open source, lightweight operating system that will initially be targeted at netbooks.
From the Google Blog announcement we can glean the following details:
  • Linux kernel
  • Runs on x86 and ARM
  • Uses the Google Web Apps in the Google Chrome browser
  • New Web Apps are in the pipeline to take advantage of the platform
  • Will work best with a persistent internet connection
The OS will initially be released on netbooks and Google has been in discussion with a number of vendors including Acer, Asus, HP and Toshiba to release netbooks with the new OS in 2010.

The Google OS will also be open-sourced later this year to allow the community to benefit from the work Google has done.

Sunday, July 5, 2009

Is this the Future of Magazines?

The Model Railroad Hobbyist magazine is a new (3 issues published) quarterly magazine published on the internet by a group of Model Railroaders. It is free to download and is supported by advertisers.

The magazine is published as a rich media PDF and includes video clips, audio clips and 3D virtual reality images.

Two versions of the magazine are available each release; a Standard Version and an Embedded Version. The standard version is a smaller download and will work with Adobe Reader 7+. The embedded version is a large download and requires Adobe Reader 9+. The benefit of the embedded version is the inclusion of all the rich media in the download and can therefore be read offline.

Other features of the magazine are:
  • Direct links to advertisers websites
  • Bill of Materials for projects with links to suppliers
  • Access to Premium Bonus Extras for 3 months after Issue Date
The content in the magazine is well presented and is informative. Content includes product reviews, layout visits, how-to articles and editorial columns.

An interesting magazine, very well designed and implemented.

Sunday, June 21, 2009

GPS Mapping

Over the last 10 years I have ridden many of the trails in the Central Coast area, often more than once. Recently, I have started to map these trails using a GPS with the aim to document them so other riders may enjoy them.

To do the mapping I use the following hardware and software.

Hardware

Software


An example of the embedded map produced by this technique is below. It shows the various information available from the file produced from Nokia Sports Tracker.


View Larger Map

Capturing the Data Points (GPS Track)

To capture the data used for the KML file I use my Nokia mobile phone connected to a bluetooth GPS Module. Nokia have released an application called Nokia Sports Tracker which allows you to record a GPS track. For further information on the use of Nokia Sports Tracker visit the Nokia website.

The Nokia Sports Tracker application has the option to output the file of data points to a variety of formats (GPS, CSV, or KML). We are most interested in KML here because it allows us to import the track into Google Earth or Google Maps.

Viewing the Map

Now that we have a KML file we can open this file directly into Google Earth to check that it looks correct. If you have Google Earth installed, double-clicking the KML file in Windows will open the path and display.

To use the path in Google Maps is a little more involved as you need to host the KML file somewhere on the web. I use a folder on my hosting provider.

Once you have the KML file hosted on the web you can now use it within Google Maps. To use within Google Maps copy/paste the URL into the Google Maps Search Bar and press 'Search' button.


Google Maps will now display the path on the map with some additional information about the path from the KML file.


Embedding the Map

Once you have the map displayed you can now Print, Send, or Link to this map. To embed this map into a blog or another web page use the 'Link' menu and paste the HTML in the second box into your website code.

You can use the 'Customise and preview embedded map' to change the settings of the embedded map.

For more information refer to the examples on the Google Maps site.

Wednesday, June 10, 2009

Google IO 2009 - The Myth of the Genius Programmer

An interesting talk given by Brian Fitzpatrick and Ben Collins-Sussman on the 'Myth of the Genius Programmer'. Brian and Ben talk about some of the collaboration issues that people experience on open source software projects.



Although the talk centres around open source projects and particularly fledgling projects with only small numbers of developers, some of the points about collaboration can apply to teams working on software projects within larger organisations.

Thursday, June 4, 2009

Kariong Hieroglyphics - More Photos


Here are some additional photos taken of the Kariong Hieroglyphics. Refer to my previous post for more information on the carvings.


Posted by Picasa

Saturday, May 30, 2009

Google Wave - the Future of Collaboration

The hot topic of Google IO 2009 was the preview to developers of the Google Wave collaboration platform. Google hopes that this open platform will provide a rich web based collaboration tool that
will supplement such tools as email, instant messaging and document collaboration.

The Keynote for Day 2 of Google IO 2009 was dedicated to the developer preview of Google Wave and provided an overview of the capabilities of the platform and some of the work already completed.

Some of the features demonstrated during the Keynote are:

  • Message threading
  • Collaborative editing
  • Integration with third party tools (Twitter, Bug Tracking, Blogger)
  • Image and Video Embedding
  • Google Search Integration
  • Language Translation

Although the product is not yet available to the general public, Google is actively signing up developers to the sandbox of the product to encourage development of the platform. The plan is for the platform, protocol and client code to be open sourced to encourage development by third parties. It will be possible to run your own internal version of Google Wave.

For further information on Google Wave

http://wave.google.com/
http://wave.google.com/help/wave/about.html
http://code.google.com/apis/wave/

Thursday, May 28, 2009

Sunday, May 24, 2009

Kariong Hieroglyphics

The following series of photos of the Kariong Hieroglyphics were taken on the 5th May 2003 and were the result of a couple of months of investigation into these rock carvings.

Countless websites exist to debate the authenticity of these carvings and the official and archaeological view is that they are modern day fakes and were created in the last 80 - 100 years.

Regardless of the authenticity they are still a unique and interesting part of the history of the Central Coast area and are well worth a visit.

The carvings can be accessed via the Kariong Trig point which is reached via a fire trail starting at Woy Woy Road. Once you reach the Trig the carvings are slightly further down the slope.

The carvings are situated in a steep sided crevasse between two large blocks of stone and are entered via a duck-under from the main track. This can be identified via the well worn stone at the entrance (the area gets many visitors these days).Once inside the crevasse you can see the hieroglyphs carved into both rock walls. Whoever carved these glyphs were very busy over a number of years.

At the top of the crevasse under a large rock resting across the crevasse was a hole which reportedly descends underneath the boulders to a chamber. Many have speculated on the origin of the chamber.
Posted by Picasa

Saturday, May 23, 2009

Old Wharf at Point Clare, NSW

This old wharf is on Fagans Bay, Point Clare.

Photo taken on the 25th June 2001 at 2.38pm.


View Old Wharf at Point Clare, NSW in a larger map

Thursday, May 21, 2009

TED (Technology, Entertainment and Design)

Are you interested in listening to some of the worlds most inspirational and influential speakers talk about a diverse range of topics. If you are then you need to visit www.ted.com.
TED is devoted to giving millions of knowledge-seekers around the globe direct access to the world's greatest thinkers and teachers.
Enjoy.

Wednesday, May 20, 2009

Wolfram Tones - Sound Generator using Cellular Automation

While investigating the latest search engine craze - Wolfram|Alpha I discovered another of Wolfram Research Labs projects called WolframTones.

According to Wolfram Research Labs:

WolframTones works by taking simple programs from Wolfram's computational universe, and using music theory and Mathematica algorithms to render them as music. Each program in effect defines a virtual world, with its own special story--and WolframTones captures it as a musical composition.
The tunes generated can be saved as MIDI files to be used on mobile phones. Try it out!

Thursday, May 14, 2009

Sandstone and Glass

The old and the new at Hickson Road, Pyrmont

Welcome

Welcome to my blog. This is a place to store information that I find on the internet that I might need in the future or relates to something I am investigating now.