Category: Uncategorised

The Most Important Invention of the 20th Century

Ladies and Gentlemen! Please join me in honoring the winner of the World’s Most Important Invention of the 20th Century!

Our candidates, first. In no particular order, I give you:

  • Automobiles
  • Airplanes
  • Antibiotics
  • Computers
  • The Internet

And the winner is…

A write-in candidate! It is the Fast Forward button on the remote!

(more…)

A tumblr-like Gallery in Joomla?

I guess a lot of people have noticed the presentation of galleries on tumblr, the image blogging platform, and liked it. I certainly loved it so much that I looked back at the more traditional gallery I use, JoomGallery, and wished it were a little fancier in its presentation.

A little scouting expedition into the depth of the Internet showed that there were many, many extensions available for other platforms, but nothing for Joomla.

Then I stumbled upon a German component named Event Gallery. Apparently, a tech-savy photographer created it to showcase his assignments – considering the name of the component, he is probably an event photographer. The extension had the presentation I liked, but nothing else: the galleries were flat (mine are deeply nested); the focus was on selling images (mine on by-passing the forever despised Facebook), and I had already thousands of images in JoomGallery.

(more…)

Surfing Banyans on a Costco Foamie

banyansMy older brother came to visit with his kids for the first time ever, and they decided to see as much as they possibly could in two weeks. The trip included San Diego, San Francisco, Los Angeles, and the high point Hawaii.

Now you’d think it’s a long trip, even from the West Coast. But Hawaii they had been dreaming, and it was just 5 hours away – compared to the 20 hours they would have had to fly from Europe. I thought it doable, and the kids had been dreaming “their entire life” (which is not significantly longer than the life span of a fruit fly, bless their young hearts).

We booked independently, since we were in a rush, and I ended up at my former favorite hotel, the Castle Kona Bali Kai. I splurged this time, since I was staying only two nights, and got a one bedroom oceanfront suite. From there, you can see the break and decide at a whim it’s time to get into the water. I also have a Costco card, and since there is a store in Kona (not in Hilo, for whatever reason), I stopped and got a foamie instead of renting. It would have come out to about the same!

Costco sells two foamies, both made by CBC, which stands for California Board Company. With a name as inspired as that, you’d think they are as unintelligent when it comes to board design. You’d be wrong.

(more…)

Sea World (Dont’ Forget the Tanning Lotion and Hat!)

Can you believe I set foot in San Diego for the first time 15 years ago, and have been living here for 4 years, and managed never to go to Sea World? That’s really weird, especially considering that the place is just 8 minutes by car from here, a quick jaunt across the bay.

Well, my brother came here with his kids, and we were looking for things to do. Balboa Park was quickly shot down, because Teenagers Don’t Do Museums™. The beach was a favorite, but it seemed a little lame to come all the way from August in Rome to stay at the beach in San Diego. The water park, Legoland, Wild Animal Park, were out of the question. Giant aircraft carriers were strangely not interesting; even Fashion Valley got a mild nod from the girl, who is still eager to land some American hip swag.

So Sea World it was. Leaving on a Monday morning at 9:30. We thought it would be empty.

Turns out it wasn’t. Parking was easy (for $15, I’d wouldn’t wish the opposite). Strangely, the attendants steered us towards a spot much farther away from the entrance than needed, but we managed.

Prices shocked us. I had checked pricing online, and there was a special for $64 per adult (which in the park’s definition is anyone older than 9 years, much to the teenagers’ glee and my brother’s dismay). The prices at the door were quite steep: $79 per person. I managed to reduce the hit with the AAA discount ($72 p/p), but the bill still came out astoundingly high.

(more…)

Password Store

This component and search bot allow users to store notes with encrypted parts in them. You can use this to store passwords, credit card numbers, etc. The notes are strongly encrypted, and the passphrase to the notes is not stored on the server – which means that even if your Joomla installation is compromised, your notes aren't.

For more (and more current information), please visit the Password Store Blog. 

Business Hosted Services

The Internet was awash with application service providers that would allow consumers and businesses to perform tasks, even in the very early days of the commercial web. After a few years and a burst of the Bubble, most of the companies that provided online services disappeared, leaving only a very few winners. This was true across horizontals, where only a few of the many related companies survived, and verticals, where only a few types of solutions did.

The bloodbath of 2000-2002 took a lot of ideas and concepts with it that were indeed unworkable and unnecessary. Many that survived that storm recall with particular amazement how the wave of ASP (application service provider) dot-coms cratered without leaving a trace. Consumer hosted services, on the other hand, did much better, as did business-to-consumer services. The former is most perfectly epitomized by the stalwart of consumer sites, Yahoo!, while the latter category is best represented by Amazon.com.

A great many dot-coms got busted because of incompetence of the management team, because of poor choices (in hindsight) as to deployment, cost structure, growth plan, because of the sudden drying up of funds (yes, some really good ideas died just because of the general panic). Some dot-coms though died because their business plan didn't work out, despite early hopes.

srdgraph

Prerequisites

Well, the utility is a command line tool that uses Perl – so that’s a good start for requirements. You need some recent version of Perl: I used the tool only with 5.8.0 and appreciate feedback.

The packages required to run the utility are:

  • GD::Graph
  • POSIX
  • S710

GD::Graph

GD::Graph is the graphical core of the utility. It takes care of generating a graph given the data, and you as a user don’t have to do more than presenting it and – voila! – it’s there.

Unfortunately, the ease of use causes a little pain, since you’ll have to download and install it. If you have access to an APT repository, then you should be fine after you type:

apt-get install perl-GD-Graph

Oh, and of course, if you don’t have APT installed – then run and get it!

POSIX

The POSIX package is used for date and time manipulations, so it’s not really a requirement and you could easily modify the code to do without. You can install it the same way as the other package , but POSIX should be installed by default on your Perl distribution.

So far, I have been unable to find an implementation of Perl POSIX on Windows, so if you are trying to get this to run on that OS, good luck!

S710

That’s Dave’s Perl package that wraps the S710 library. To install it, you’ll probably want to go to his site and download both the S710 Linux software and the Perl wrapper (you’ll need both to run the wrapper).

Dave did a splendid job at packaging the wrapper, and now it is extremely easy to use and does pretty much everything you’d want. (I think Dave likes it that we are using his software, so don’t forget to stop by and say thanks!).

Download

You can download the software from the following links. For users of RedHat 9.0, I created two RPMs for the binary pieces:

hrmcat

How Is It?

I called the project hrmcat because I started thinking it would end up being a set of parallel utilities that would complement the existing srd* utilities. Then I found that it made little sense to proceed this way and simply added the capability of reading HRM files to the srd* utilities. Indeed, the change was so minimal that aside from a new C file (for the parsing of the HRM file itself), the modifications to Dave’s code consisted only of a minor change to the file reader. If it fails to parse a file as SRD file, it falls back to HRM. And since the formats are completely incompatible, you risk not one file being mistaken for the other format.

Download

If you want to get HRM files to be read, you need first version 0.12 of Dave’s code. You can find it on his web site, or directly on this one (hope he doesn’t mind) here.

Next, you’ll need to apply a patch. This patch will add the fallback to HRM files as described above. Additionally, it will ensure the hrm.c is compiled and built along with the rest of the files. You can download the patch here.

Finally, you’ll need to download the C file itself and place it in the /src/libs710 directory. To get the file, click here.

Applying the Patch

Nobrainer! You unpack the software:

cd ~/downloads tar xvzf s710-0.12.tar.gz

Now you copy the hrm.c file into its destination location:

cp /tmp/hrm.c ~/downloads/s710-0.12/src/libs710

Finally, you apply the patch:

patch < s710-0.12-hrm.patch

Building

Since Dave is a pro, configuration, compiling and building is really simple:

cd s710-0.12 ./configure make all make install

Running

Now that you have everything compiled and installed, you have three new utilities at hand:

srdcat
the utility used to dump the file information to a human readable format
srdhead
same as srdcat, but doesn’t spit out the raw data, only the initial summary
srdplot
the core utility used to generate the graphs

To run any of them (say srdplot) on an HRM file, you just specify the HRM file as the argument of the call. Say you happen to have a file called /home/marco/.polar/data/2003/01/03012902.hrm. Then to get the graph for the file use the command:

srdplot /home/marco/.polar/data/2003/01/03012902.hrm

Couldn’t be much simpler, huh?

For the Lazy

Well, why do all the work if someone else has already done it? I can get you jump-started with an RPM file for RedHat 9, how about that? Here is the download location.

As usual, feedback always welcome!

HRM File Format

Overview

The Polar S7xx heart rate monitor comes with Windows software to download and display workout data. That’s nice, but for those of us that don’t use Windows, it’s really not going to work.

Dave Bailey, a physicist turned to the dark side of programming like me, has written software to download and display workout data on Linux. Unfortunately, the format he uses to store data is not the same as the format used by the Windows software.

In a different section, I describe my attempts at creating software to add support for the Windows format to the Linux utilities, so as to make transition between the two operating systems easier.

Here, you’ll find all I found out about the Windows file format, called HRM after the extension .hrm

General: Format and Conventions

First the good news: the HRM file format is plain text, and you can look at your workouts in any text editor. The format actually follows the conventions of .INI files, with sections delimited by square brackets (‘[]’), like in the following example:

[Params] Version=106 Monitor=12 [ExtraData] [Summary-123] 0       0       0       0       0       0 180     160     80      70 

 

The bad news next: HRM does not capture all the data recorded in a workout session. It records almost all of it, though.

More news: HRM is a variable format, meaning that it looks slightly different depending on what you were recording on a given workout. To give you an example of what I mean, if you turn off altitude data, you’ll have one less column in the data section. Since you can turn on and off a lot of features, this means that parsing is a bit of a problem.

Sections are always stored in a fixed sequence, starting with Params and ending with HRData.

Sections

Since there is no official documentation, all of the following are guesses. Since some of them are wilder than others, I decided to put those items in italic that seemed more off the mark than others.

[Params]

This section is always at the top of the file and contains the general parameters for the workout.

Version
Currently set to 106, this is the version number of the software.
Monitor
I get 12 here, and assume this is the marker for the heart rate monitor (S710 in my case).
SMode
This is the recording mode. It is a list of bits that mark different functions used in the recording. See table below for the meaning of the bits.
Date
The start date of the workout in 4 digit year, 2 digit month, 2 digit day format.
StartTime
The start time of the workout. Like all times in this format, it’s n digit hours, 2 digit minutes, 2 digit seconds and 1 digit tenth of second, with the separators “:” and “.” – as in: “1:23:45.6” for one hour, twenty-three minutes, fourty-five seconds and six tenths.
Length
The duration of the workout, same format as above.
Interval
???
Upper? and Lower?
The upper and lower heart rate zones.
Timer?
Evidently, this heart rate monitor must have timers. 🙂
ActiveLimit
???
MaxHR, RestHR
The maximum and resting heart rates as entered into the settings panel.
StartDelay
???
VO2Max
Maximum oxigen intake volume. Another option set with the watch settings.
Weight
Your current weight, used for power output computations.

[Notes]

The comments you added in the software to this particular workout.

[IntTimes]

No information available.

[ExtraData]

No information available.

[Summary-123]

This section deals with the heart rate zones and with how much of the workout you spent in any of them.

[Summary-TH], [HRZones], [SwapTimes]

No information on these is available at this time.

[Trip]

Summary information about the trip. This contains the following items in order. Items are not described in any detail, they are just listed in fixed order. Current information about this section is surely wrong. If you have more information, please add it to the forum.

[HRData]

This is the set of core data as coming from the monitor. This is structured as one sample per line, with each line containing information in the following order:

  1. heart rate
  2. speed
  3. cadence
  4. altitude
  5. power

Unrecorded items are just omitted from the list. To know which items were included, you need to understand the SMode field above.

SMode

This bit field indicates what items were recorded and how. Here is a lineup of bits:

speed
bit 7 (highest, first character of string) indicates that speed has been recorded.
cadence
bit 6 indicates that cadence has been recorded.
altitude
bit 5 indicates that altitude has been recorded.
power
bit 4 indicates that power output has been recorded.
bike
bits 1-3 represent the bike number.
units
bit 0 (lowest, last character of string) is set to 1 for imperial, to 0 for metric units.