HP Touch as a news machine

A better Hp Touch

I decided it was about time I put the HP Touch I received as a lovely gift from my cousins to good use. I wanted a tablet that would provide my with the most recent news but it needed to update daily and work offline as I commute to work using the subway.

I didn’t feel that the native webOS suitable for this so I installed Android  following the instructions at the CyanogenMod wiki. One caveats that I found were that there was no stable version only the nightly but it works fine.

I then installed a number of newspaper apps,  Google Reader and Pocket. My next post will be to get these apps working offline.



SVN issues

Had a problem after I restructured webpage and the coda’s SVN commit failed. The solution was to resolve conflicts and push repository  over the command line.

Commands from this link:
svn remove --force filename
svn resolve --accept=working filename
svn commit

A secondary issue was that theSVN_EDITOR variable needed to be set. A work around is to  use the  -m “” flag.


Time they say is the great healer…

I am currently in the states and as a result I have been communicating with my family using Skype. With the O’Connor clan spread across three time zones I have been confused by the time difference on more than a few occasions. Sure I could just check on google whenever I wanted to call but where’s the fun in that:)

In this post I will describe how I built a page that displays each family members time and locations in a clear, intuitive and fun way.

1. Raphaël and an updated Analog clock.

Raphaël is a JavaScript vector library. I used an existing example of an analog clock which i got from this cool site. Initially it didn’t work  with the current version of the Raphaël library and I had to update the code so it worked correctly. The issue was the rotate function, which appears to have changed in the more recent version of the Raphaël library. The new rotate function is relative to the vectors current position, whereas the old rotate function was relative to the initial vector position.

I like this clock as it works using only JavaScript as opposed to a Flash version.

2. OO in javascript

Next step was to read a couple of articles on OO in JS. I found the concept of no classes a bit unusual, http://www.javascriptkit.com/javatutors/oopjs.shtml was a very useful article. I also bookmarked an article for further reading about the fundamental differences between JS and class based languages.

3. Debugging in JS

While applying the principles learned in section 2  to make the code more object orientated I got my feet wet with the chrome JS console for debugging.

Firebug appears like it could be an option worth considering in the future.
4. Time out function issues

While writing the code I had issues with the setInterval() method. It appears that when using it with OO code the method passed in to set Interval would be called from a global scope and not the class instance scope . I used the work around at http://www.vonloesch.de/node/32 which allowed me to get  multiple clock instances displaying and updating correctly.

For more in depth understanding this article  was also very informative on this topic.
5. Float the divs

Being out of practice with css It took me 5 minutes(too long) to figure out to float the divs to get my clock displaying side by side. This article got me going in the right direction.

6. Time: it’s all relative baby.

Lifted the code from this script and adjusted to suit my needs eg: to get the clocks displaying times in different time zones.

7. Restructure

Did a bit of restructuring, based the layout on the webpage http://html5boilerplate.com/ .

8. Notes

  • There appears to be an issue with synchronisation at times. Possibly because the library is asynchronous.
  • It could be prettier, I’m happy that there is enough functionality and I will make it look good in the future if I can find the time.
  • I could also improve the code structure as this is only the minimum working version.
9. Code
The page is available at www.eoin.ie/tco.html.

10. Versioning

Raphaël 2.0.

MAMP, Coda and BeanStalk: Workflow upgrade

After playing around on the eoin.ie workflow for a bit I have settled on a setup that I’m more happy with. Previously I was simply editing files and ftping them to the live site, a bad setup to say the least. The new setup allows me to edit and preview the site locally using MAMP, commit changes to my SVN repository on BeanStalk and when ready publish the site using Coda. Below the necessary steps taken to achieve this setup are laid out:

1.Setup MAMP

The first step involved downloading the free version of  MAMP, installing it  and running it. The process was a synch and the  I only changed two settings:

  • In the Apache tab I changed the Document root to /Users/my_user_account/Sites
  • In the Start/Stop tab I unchecked the ‘Check for MAMP pro when starting MAMP’ box.

2.Add multiple site support to MAMP

  • First,  I made a folder  /Users/my_user_account/Sites/eoin.ie, where eoin.ie is the new folder that will hold my local copy of the site.
  • Next I changed /private/etc hosts/ to include the name I wanted to use to access this new local copy of the site.
  •  Next I added a virtual host by editing /Applications/MAMP/conf/apache/httpd.conf. This ensures that the local site  uses  the correct root. The full instructions can be found on Brocks blog post .

3.Setup Beanstalk account and import old site

This was a relatively straight forward step. Beanstalk offer a free SVN account so its perfect for my uses, I imported a zip of my current site to the root and had to delete some of the Mac system files that came along for the ride. There is a good video tutorial for this, even if it is a little drawn out for my tastes.

4.Setup Coda

I Installed Coda, added a Site and changed the settings for the site:

  •  I set the local site to be the empty folder from step 2.
  • I set the  the local preview URL to be the address I put in the hosts and http.conf file in step 2,  http://local.eoin.ie:8888/ in this case.
  • Next I entered the details from  the BeanStalk SVN account from step 3 and a copy of  the site got downloaded from the SVN to my new local, previewable copy.
  •  Finally, I entered the settings for the ftp account, available from my web hosting company. Its worth noting that in my case I had to use the /webspace/httpdocs/ subdirectory in my ftp url  for it to work.


I tested the setup and I’m able to commit changes to my repository to my hearts content and only publish when I’m ready. I have yet to test a roll back but I’m sure I will have too soon enough:)

6. Versioning  History

Mac version 10.6.8

Coda version 1.7.4 –   http://www.panic.com/coda/

MAMP version 2.0.5 – http://www.mamp.info/en/index.html

BeanStalk – http://www.beanstalkapp.com