rblog

Beta testing the new Sport Tracker application

Sport Tracker was first an application provided by Nokia, but is now maintained by Sports Tracking Technologies. Cut’n paste from their webpage, here are the key facts

  • Sports Tracking Technologies was founded 2009 by Ykรค Huhtala, Jussi Kaasinen and Antti Sorvari, after a successful spin-off from Nokia
  • Headquarters in Helsinki, Finland
  • Nokia Sports Tracker beta was released in 2007 by Nokia and it has millions of users worldwide
  • Sports Tracker for Nokia S60 5.0 touch phones was released by Sports Tracking Technologies in April 2010

As one of the lucky few responding very fast to a post on Facebook I got to beta test the new product. I had already downloaded the early-version, but had not tested it more than once since the GPS-connection failed. So I just kept on using the old version from Nokia since I considered it bulletproofed. Might have been just a one time issue, but since the webpage was not up and running enabling me to upload workouts I did not bother finding out.

But, now I have the updated version, and it is just running smoothly. Some updates to the user interface, but no big changes leaving me lost in menus and such. Some screenshots from the application

Starting a new workout, you now have even more activities to choose from, but as before also the opportunity to define you own.

The calendar as before, but they have added the line separating the weekend from the rest of the week, a small change, but making it even easier to view your workouts.

Here you see the summary of my workout today. A bit more info added, together with the map. Must admit I find for instance Google Maps more detailed than OpenStreetmap but this is really no issue since they don’t use OpenStreetmap on the webpage.

Testing replay of the workout on the phone. Must admit that I was not aware of this functionality, mainly because the previous Nokia version is translated to Norwegian and the word “gjentagelse” did not explain to me what it did, and I did not bother to find out either. But “replay” in the beta version made me interested…

Here you see the summary before uploading a workout to the webpage, also enabling you to add a description of the workout before uploading.

Now you also have the possibility to share your workout on Facebook, done directly from your phone while uploading.

As I am aware of right now the new version is missing something that I really liked in the old Nokia version, that being

  • The possibility to say that your new workout is based on an old route. I did for instance have to saved routes which I used frequently – to and from work. Not that I spent time comparing my times each day, but it would be fun comparing competitions from one year to another and having saved routes are easier than navigating based on dates to find what you will compare your workout against.
  • The possibility to share your workout while your doing it, meaning that someone can view your current position on the webpage. When out on singletracks all by myself, I enjoyed the possibility to share my current position, so if I where to have an accident and knocking myself unconscious the ones at home would be able to see approximately where I was. Luckily I have not needed this…yet ๐Ÿ™‚

Would have been nice to test the HR-functionality as well, but I do not bother to buy new stash for my Polar watch, been using to gadgets for the past seven months and I’m ok with that.

Entering special characters in VI/VIM

Had an issue with the c with cedilla character and therefore needed to enter it in VI. Was using SSH to log on to a Linux-server with no other editors available so it was no option to use the character map to get the c-cedilla. After having spent some time trying various Google-searches I found a description on how to enter special characters on the Vim wikia. Entering diagraphs using ctrl-k was the solution to my challenge.

B2Evolution on my laptop and RTFM

Spent a couple of hours setting up my blog engine B2Evolution to run on my Ubuntu 10.4 installation. The most tricky part of doing so is often to get your webserver up and running together with PHP and MySQL. That challenge is easily solved by using XAMPP, or LAMPP in my case since I’m running Linux. By installing XAMPP you get Apache, PHP and MySql (with PHPMyAdmin) together with a bunch more stuff just like that.

All I had to do was to copy my local blog folder to the /opt/lampp/-folder, then run /blog/install and voila, B2 up and running.

But then I had to provide the blog with content downloaded as a SQL-file from my “real” blog. Had to struggle a bit with that one. Using the PHPMyAdmin console to do the import failed, first by a timeout, then because the SQL-file was to big. Soon found out that the best option is to use command line to import data to MySQL. First I tried the command MySQLImport, but I never got it to work. A bit embarrassing to realize that this was a case of RTFM (Read The Fucking Manual). First of all, note that the filename of the SQL-file must match the table you want to import data to, then when realizing that I understood that MySQLImport was not what I wanted. I want to import data to several tables, so I had to use the MySQL-command like this.

Now I have B2Evolution running on my local computer with content from hellem.org, based on my latest backup, because I backup regularly and I’m also able to do a restore ๐Ÿ˜‰

IBM – Open Source friend of foe?

IBM has for a long time been a contributor to the Open Source community involving themselves in various projects, just take a look at http://www.ibm.com/developerworks/opensource/ Eclipse, WAS CE and many more. All this in areas where there are many competitors, Microsoft being the main competitor I would guess. Point is, all this in areas where IBM are not alone.

But, IBM has monopoly of one area, and that is the mainframe. They have full control of the whole value chain, both the hardware and the OS and then many tools as well. So here comes Hercules mainframe emulator trying to let people run mainframe applications on other hardware…and the response from IBM…lawsuit of course. I would assume mainframe being the most valuable asset IBM has control over. But I won’t try to dive into all the nifty details here, but instead just provide you with my sources, see

The last one in the list above diving a bit into the details on why IBM is making the lawsuit (apart from protecting their money). I would assume that most people understand why they do it, but that they have chosen the wrong weapon to fight against competition.

Reinstalled Ubuntu on my T60

Yesterday I spent just about an hour reinstalling Ubuntu on my laptop, so now I’m running Ubuntu 10.4 LTS. Since I had tested so much on my 9.10 installation that I had lost control of what was running or not I reinstalled instead of upgrading. Used rsync to sync my pictures, videos and such to my external disk, then just booted with the cd and started the whole process of reinstalling. 7 dialog windows, then it installed itself in just about 30 minutes or so, and then it downloaded the updates from Internet. Really fast, compared to my previous windows installation that demanded about a day to be up and running.

Blog upgraded

Now upgraded from 3.3.2 to 3.3.3, it has been out for nearly half a year, but I have just not noticed it. Just a few bug fixes, easy and simple upgrade – b2evolution rocks!!

Creating my first Build Forge adaptor

This week I’m attending a two day course as an intro to Build Forge, followed up by a two day workshop on the use of RAFW. Between the lessons I have tried to create a simple adaptor to Build Forge which does nothing more than call a batch file and return the current date to the Bill of Materials. Not rocket science, but I need to start simple to learn it ๐Ÿ™‚

I got the bat file from http://www.tech-recipes.com/rx/956/windows-batch-file-bat-to-get-current-date-in-mmddyyyy-format/ I just edited it a bit, making this the last line

echo Current date: %dd%.%mm%.%yyyy%

Calling a bat file like this might seem kinda stupid, but since adaptors are meant to enable you to call executables using command line, stupid is ok for now. The XML for the adaptor calling the bat file is like this

<?xml version="1.0"?>
<!DOCTYPE PROJECT_INTERFACE SYSTEM "interface.dtd">
<PROJECT_INTERFACE IFTYPE="Source" INSTANCE="7.02">
<template>
<env name="FILEPATH" value="path_to_file_with_ending_slash" />
<env name="FILENAME" value="name_of_bat_file_to_run" />

</template>
<interface name="ByDate">
<run command="command" params="$FILEPATH $FILENAME" server="$BF_SERVER" dir="/" timeout="360"/>
</interface>
<command name="command">
<execute>
$FILEPATH$FILENAME
</execute>
<resultsblock>
<match pattern="^Current date: (.*)">
<bom category="Result" section="CurrentDate">
<field name="currdate" text="$1"/>
</bom>
</match>
</resultsblock>
</command>
<bomformat category="Result" title="Current Date">
<section name="CurrentDate">
<field order="1" name="currdate" title="Date"/>
</section>
</bomformat>
</PROJECT_INTERFACE>


(Using Blogcrowds to escape the XML)

Note that you also need to create an environment in Build Forge containing the two variables in the template-section. The adaptor xml only describes them, it does not instantiates them. So create the environment and refer to it in your project or the step.

I would also recommend playing around with the bomformat-tag, which enables you to format the “Bill Of Material format”, creating headers, sections and fields.

Bash – Insert content of one file into another file

Had to insert a XML-snippet into another XML-file at a given location in a Bash-script. Reading the snippet into a variable is quite easy, just by using cat. The trouble was how to find the tag to replace most efficiently, then replace it with the xml-snippet. Learned that reading the file content using stdin/stdout in a bash-script can cause side effects not easy to figure out, so that was no option. Instead I first tried to use sed, but sed had problems with the fact that the content of the snippet is XML-code. So instead with good help from Geir we ended up using Perl, which made it all very simple – everything done in just 2 lines of code.

First it searches for <!– END jaas –> then replaces the string with the content of the snippet variable and lt;!– END jaas –>

value=$(cat jaas_snippet.xml)
perl -pi -e "s#<!--\sEND\sjaas\s-->#${value}\n\t\t<!-- END jaas -->#" jaas.xml

Comments:

  • Using # instead of ` – while struggling with XML in the variable $value
  • \s = whitespace, like \n is newline and \t is tab
  • Double quote’s so that perl uses the value of the variable, and not just reads it as plain text
  • In this case we expect only one occurrence of the end-tag, so we have skipped the /g parameter at the end of the search-string. /g meaning global, compared to for instance the usage described in my previous blog post at WPC.

Perl is power!