Introducing Mahalo Journal

5 Mar

Posted in: Mahalo Journal

Mahalo Journal is a new web application I’ve been working on the past 2 weeks that allows you to keep a “gratitude journal” online. Today, I think it has reached a point where it is ready to be released for public use (although I am still making tweaks here and there)!

Mahalo Journal (top page)

The idea for the site came to me after watching this video, where Harvard professor Tal Ben-Shahar briefly mentions the concept of keeping a gratitude journal, and how doing so can have a dramatic impact on your overall happiness.

The idea is simple: Each night before bedtime you type in 5 things, small or great, that you are grateful for. Doing this on a consistent basis will get you into the habit of noticing things that make you happy and gradually shift your focus to a more positive outlook.

Mahalo Journal (main screen)

Having used Mahalo Journal for a while now, “5 items a day” seems to be a good number as there are usually 2-3 obvious things that you think of right away, but filling out the remaining items really forces you to think through your day (and life in general!) and I feel like this process is making me better at finding joy in the small things.

Mahalo Journal (calendar screen)

If you’re wondering: “Mahalo” is a Hawaiian word meaning “thanks, gratitude, admiration, praise, esteem, regards, respects” so I thought it would make a good name for the site!

Mahalo Journal)

Mahalo Journal is available now in 3 languages at www.mahalojournal.com!

Low Ground – Brand new album from Sub Delay released!

18 Dec

Posted in: Sub Delay

Sub Delay - Low Ground

After 7 years of silence (well, disregarding the two side projects “Live at Enyen” and “Zonelet”) we have finally been able to release our desperate grip on 9 new songs and set them loose upon the world. Here is the track list for the new album:

  1. Sleep in Secret
  2. 100 Thirty Five
  3. 67 Times
  4. Hotand
  5. Smile
  6. Kiddo
  7. Slide Off The Map
  8. Surfing
  9. New Skies

Sub Delay - Low Ground

7 years is a looong time to work on an album, but I think we finally have the “how to make music while being separated by time and distance”-thing sorted now. Anders being based in Denmark and me (Jens) currently living in Japan, the making of this album involved a lot of digital data traveling back and forth over the internet web tubes and a lot of e-mail and skype-meetings. All vocals were recorded by Anders in Denmark and sent to me for further production, with the result that I haven’t actually ever met any of the vocalists in person! I hope I will have a chance to put a face to the vocals sometime.

On that note, many thanks to all the musicians who participated on this release:

  • Jana Oberender
  • Marie Raabye
  • Anke Struve
  • Karen Poulsen
  • Joannes Holm
  • Christian Meyer

The album is available as a digital download from www.subdelay.com now so go check it out! CDs are currently in production and links will be posted on the site as soon as they become available.

…and on a final note, we promise, PROMISE, that the next album won’t take another 7 years to see the light of day…:P

Zonelet CDs now available!

30 Nov

Posted in: Sub Delay

Zonelet CD (outside)

The album “Zonelet” is now available in CD format including full color artwork and a 4-page booklet!

Zonelet CD (inside)

Marking Sub Delay’s first full-length instrumental album, the CD can be purchased directly from Amazon’s CreateSpace from today. Set to follow are the rest of Sub Delay’s discography and of course the long-awaited new album so stay tuned!

Zonelet available in CD format

Easy version management for Rails apps using VersionMaster and Capistrano

19 Nov

Posted in: Work

Working on the new version of subdelay.com I came up with a couple of plugins for Rails that although functionality-wise are dirt simple turned out to be rather useful. Therefore I have decided to open source them on GitHub and also do a little writeup here on the blog.

VersionMaster

Sub Delay Version Number

First up is VersionMaster. I needed a simple way to manage a version number (eg. “v1.0.8″ etc) for the site, in order to keep track of minor and major updates as I changed things around and added new features. More importantly, I wanted to have this happen automatically whenever I deployed a new release using Capistrano. I first took a look at toland’s app_version but it didn’t quite do what I needed so I came up with my own little implementation.

Using VersionMaster

Install the plugin using

script/plugin install git://github.com/balvig/version_master.git

The file “version.yml” will be copied into the config directory:

You can edit this file to manually set the version number or use the rake tasks below:

You can also use the built-in Capistrano recipe to update versions when deploying (which is how I use it):

You can then use the constant APP_VERSION in your views or elsewhere to display the current version.

Get VersionMaster from GitHub.

Sub Delay 3.1 released!

12 Nov

Posted in: Sub Delay

Hurray! The new version of www.subdelay.com I wrote about a while back is finally done. Visually I have kept it in the same style as the previous version so the overall feel of the site should be familiar, albeit with a few notable changes:

All music is free

subdelay.com album page

Yep. All of it. Full-length streams and downloadable 192 kps mp3 versions of all tracks are now available for free. Tracks can be downloaded individually or as an album package complete with full-color artwork. I encourage everyone to download and share the free mp3s with as many people as possible! Of course, for those who care a little bit about sound quality, high quality 320 kps and FLAC versions are also available as paid downloads, with CDs going to become available soon.

Blog & Twitter aggregation

subdelay.com top page

Anything posted on the blog, Facebook or Twitter related to Sub Delay will be aggregated and shown on the site so you can also stay up to date with the latest Sub Delay news.

New artwork & albums

Sub Delay in iTunes

As mentioned, we are consolidating all our music under the name “Sub Delay” and the artwork for the albums has been redone to reflect this fact. The two Zonelet EPs have been combined into one full-length album including a new track “Inlet”. Also, album covers are now embedded into the audio files so they look great when played in iTunes or on your iPod/iPhone/iThing.

iPhone optimized interface

subdelay.com iPhone interface

I love my iPhone just as much as the next guy so it only seemed natural that the new site should support this format. Accessing the site with an iPhone or iPod Touch will present you with an optimized interface that takes advantage of the device’s touch screen capabilities.

No more Flash

A bit ironic given it seems like only days ago I was writing about implementing the site using Flex, but even though a working Flash version was almost completed, after a while I realized that it would be much more efficient to do the whole thing in good old HTML (thus the 3.1 version number).

If you haven’t done so already go and check out the new site (and music!) at www.subdelay.com (if the new version doesn’t show up at first try refreshing your browser a few times).

MapDiary 1.2.2

21 Sep

Posted in: MapDiary

Version 1.2.2 of MapDiary is now available in the iTunes App Store. This is a maintenance release that resolves some memory issues that could otherwise cause trouble for people running iPhone OS 3.1.

MapDiary and time zones

10 Sep

Posted in: MapDiary

MapDiary now correctly calculates and displays local times based on the actual geographical location of your posts. This feature currently relies on the free Geonames web service which can be a bit unstable at times (a fact I found out the hard way…), thus when this service is unavailable the application falls back on the time zone set in your Twitter settings.

Thanks to everyone currently using MapDiary! Seeing posts pop up from all corners of the world on my little app is great fun. :)

Woohoo! New music software for me.

17 Jul

Posted in: Sub Delay

Goodies from Native Instruments

Just in time for…me not to have time to play with it at all :(

Applying DRY principles from Rails to Flex + Cairngorm

13 Jul

Posted in: Work

I am currently in the process of re-building www.subdelay.com in order to accommodate some of the changes I mentioned earlier and also to make the site more maintainable and easier to expand upon than the current version.

The original site was created in Flash 7, meaning that everything was done in “good old” Actionscript 2. The second incarnation of Actionscript never really had a good structure for keeping code organized and this paired with the fact that I at the time to be honest didn’t really know what I was doing and was picking up things as I went has resulted in a…shall we say less than pretty codebase, that wouldn’t be much fun to try and clean up and re-use at this point.

Hence the decision to completely rewrite the site, and in an effort to keep things a bit systematic I have been using Flex for the task this time around. Also, while the original site uses PHP as its backend, with all the Ruby work I have been doing lately it only seemed natural to have the new version run on Ruby on Rails.

I am however a newcomer to Flex and have been relying on the book Flex on Railsfor support. The book does a fairly good job of explaining how to plug a Flex frontend into a Rails app, but there is one thing that has been bothering me a bit about the whole process.

Although the book touches upon the virtues of keeping things “DRY” on the Rails side of things by employing “convention over configuration” and making good use of the refactoring techniques that seem so natural when using Ruby, from reading the book it seems that these principles don’t apply when writing the Actionscript 3-based Flex code.

In the case of subdelay.com I am using the Cairngorm framework, and from reading through the examples in the book, it seems that the way to do things is to:

  • Create a “delegate” for every resource you have (for subdelay.com this might be “Artists”,” Tracks”, “Albums”, “Cart” etc).
  • Create an “event” for every user gesture/application event (”PlayTrackEvent”,”EmptyCartEvent”,”LoadAllAlbumsEvent”,”LoadAllArtistsEvent”, etc)
  • Create a corresponding “command” for each event that tells the program how to react whenever an event occurs (thus we have “PlayTrackCommand”, “EmptyCartCommand” and so on)

Now, each of these are represented by a separate file with a separate class definition, and to me this just seems like an unnecessary amount of similar code divided among an unnecessarily large number of files that you have to keep track off for something that seems like it should be much simpler.

The part where it gets particularly weird for me is when creating the delegates. You are basically creating a class for each resource you want to access on the Rails side, but the code in these files end up being almost completely identical since all they do is expose the typical REST-based methods (”index”,”show”,”create”,”destroy”,”update”) for different Rails controllers with only a few variations for the controllers that have additional non-standard methods defined (such as the method “recent” in my case, for loading only the most recent albums). Using subdelay.com as an example you then end up with a file structure that looks something like this:

So many delegates..

This just didn’t seem right to me, so I went ahead and had a go at replacing all the individual delegate classes with one generic “RestfulDelegate” class, which works with any Rails-based resource I care to throw at it and contains the 5 basic REST methods as well as a 6th generic method that allow the use of any custom methods as needed.

When calling out to your delegates from a Cairngorm ICommand you would usually write something like

var delegate:AlbumsDelegate = new AlbumsDelegate(this);

and have AlbumsDelegate hardcoded to use the “albums” service. Instead, when using RestfulDelegate you simply write:

var delegate:RestfulDelegate = new RestfulDelegate(this,'albums');

Passing in “albums” as the second argument ensures that the right service is selected (configured in Services.mxml) and therefore only one class is required for all resources exposed in the Rails app, and I don’t have to create a new file for every new resource I add. Having the generic “send” method also allows me to deal with situations where I have added custom methods to a controller. So for example the “recent” method found in the AlbumsController can be called in the following way:

public function execute(e:CairngormEvent):void {
var delegate:RestfulDelegate = new RestfulDelegate(this,'albums');
delegate.send('recent',{limit:5});
}

I guess I could even have gone as far as to replace all the other methods with this one method to even further reduce code, but for the time being I kinda like the idea of having the basic bread/butter methods hard coded.

It’s all very basic but I am wondering, is there something I am missing here? Am I doing something that will get me in trouble later?? :o I realize there might be some sense in having a separate delegate for each resource if you are planning on replacing the Rails backend for that resource with an external API or something like that at a later stage, but apart from that I don’t really see the advantage of having to deal with all those files and classes.

I am currently trying something similar to reduce the amount of code repetition required for events and commands, but haven’t yet figured out the best way to go about it. Will let that be the subject of a future post I guess!

Mapdiary 1.2.1 available for download

4 Jul

Posted in: MapDiary

The newest update to MapDiary has finally been approved by Apple and is now available for existing users as a free download from the iTunes App Store.

New in this version:

  • Fixed problem preventing some devices from connecting to the net
  • iPhone OS 3.0 compatability