Amazon’s White Power toothbrush, or why word order is important…

Well, I was going to post a review of a new CD today, but when something jam-packed with failure (and subsequently, humour) arrives in my inbox, I simply can’t let it go to waste. This morning during my typical routine, I checked my email, and had to see what Amazon’s Deal of the Day would be today. At first, I didn’t think anything of it being a battery-powered toothbrush (and really I have no desire to own one), but Amazon’s title for the product was a bit… errrmmm… unusual:

Philips Sonicare Healthy White Power Toothbrush - Amazon Deal of the Day
Click to enlarge

The White Power toothbrush?! I’ll bet that that product doesn’t go over well in certain markets, and with particular demographics. I will also bet that Philips didn’t approve of the new description of their product, which they refer to as the HealthyWhite Rechargeable Sonic Toothbrush.

Apparently, Amazon realised their poor wording, and quickly changed the title of the product to the Philips Sonicare HealthyWhite Toothbrush:

Amazon Deal of the Day - Philips Sonicare HealthyWhite Toothbrush - corrected
Click to enlarge

but it was far too late, as many people commented on the Deal of the Day discussion today (which by the way, is Friday the 13th). My personal favourite comment is the one from DigitalBug, which can be found here. I have also excerpted it below, just in case it disappears at some point:

Posted on Jul 13, 2012 12:39:01 AM PDT
Last edited by the author 9 hours ago
DigitalBug says:

I wonder if this is a big seller in Harlem?

The “White Power” toothbrush has to be one of the all-time worst product names in history.

EDIT:
The title of the product when I wrote this was “Sonicare Healthy White Power Toothbrush”.

This seems to be an Amazon mistake. The official name of the toothbrush is the “Sonicare’s HealthyWhite Rechargeable Sonic Toothbrush”. Amazon is trying to be descriptive in calling it a power toothbrush, which is a term Sonicare does not use for this, or any other model they make. Also, Amazon added a space to “HealthyWhite” further compounding the problem and allowing the title to read “White Power”.

Hopefully it is corrected before you even read my post, but it would make an interesting poster that Bill Maher’s dentist might hang in his/her office: White Power — Good for Teeth, Bad for Society!

What have we learned today? Repeat after me, “word order is important for conveying the intended meaning.” 🙂

Cheers,
Zach

Apache access logs, error logs, and Cronolog

Apache has two main logs at the vhost level, and those are the access_log and error_log. These two logs keep track of just what you might think–visitor information for each vhost, and any errors encountered, respectively. Though Apache has a lot of built-in customisation abilities regarding these logs (including the format of each, the log location, et cetera), it does not have much in the way of organising them. Before delving into the solution to that problem, let’s look at some of the customisation that can be done for each of these logs within Apache itself. For the access_log, one can choose what level of information is logged by setting up a LogFormat directive such as the one below:


LogFormat "%h %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" combined

What does this directive actually do? The first portion–LogFormat–is the Apache directive itself, and as such, instructs Apache that all of the options thereafter will be related to your desired formatting of its logs. Each element within the quotation marks instructs Apache to log certain elements, and here’s what each element listed above is:

  • %h – The host of the remote connection (the IP address of the visitor)
  • %u – The user that is trying to connect to a resource protected by HTTP Authentication (like Apache BasicAuth)
  • %t – The timestamp of the activity (in the default format of DD/MMM/YYYY:HH:MM:SS GMT+/- offset)
  • %r – The request line, which contains the method (i.e. GET / POST), the resource requested, and the protocol used
  • %>s – The HTTP status code that the user received for that resource (200 OK, 404 Not Found, et cetera)
  • %b – The size (in bytes) of the requested resource
  • %{Referer}i – The site from which the user came to request this resource
  • %{User-agent}i – Information about the user’s browser (e.g. Firefox, Chromium) and their OS (e.g. Windows 7, Linux, Android)

The last portion of the LogFormat directive is the nickname, which in this case is “combined.” That nickname can be referenced in conjunction with the CustomLog directive in each vhost in order to call the particular format. For instance, if I had a particular vhost for which I wanted this LogFormat, I would reference it with a line like:


CustomLog /var/www/domains/somedomain.com/host/logs/access_log combined

Where the first field (CustomLog) is the directive itself, the second field is the location of the log, and the third field is the nickname of the LogFormat that we previously defined.

One thing that Apache doesn’t have built in regarding logging, though, is organisation of the logs based on a time frame or similar. There is a programme that, even though it hasn’t been updated for some time now, works really well in achieving this goal. That programme is Cronolog. Many distributions might not have it in their repositories, and in those cases, one needs to compile it from source. However, Gentoo does offer it via Portage. Once you have it installed (either from your distribution’s package manager or compiled from source), configuring Cronolog is quite simple and straightforward. All that needs to be done is a slight change of syntax in the CustomLog directive from above. Here’s an example:


CustomLog "|/usr/sbin/cronolog /var/www/domains/somedomain.com/host/logs/%Y/%m/access_log" combined

Let’s break down that syntactical change piece by piece. The first field remains the same, as it is the Apache directive of CustomLog itself. The second field is now encased in quotation marks, and features the pipe to start. The pipe is essentially taking the logged information that Apache is gathering and passes it to the programme mentioned thereafter; namely, Cronolog (which is, by default, located at /usr/sbin/cronolog). Thereafter, the same log location is called, except for one key difference: the %Y and %m folders are now in the path. As you may have guessed, Cronolog creates a folder for the year (%Y), and subfolders for each month (%m) within it. When either of those stamps change (in this case, each month), new folders / subfolders are created, and Cronolog instructs Apache to log to the access_log file within the appropriate subfolder.

Pretty neat, and easy to set up eh? I hope that you feel empowered to use Cronolog within your Apache environment.

Cheers,
Zach

Interval running

As of late, I have started to enjoy my distance runs less and less. I’ve never really considering running to be one of my favourite exercises anyway (especially when compared to cycling and swimming), but now I’ve started to dread the idea of going for a run five or six days per week. Until today, I’ve always tried to gradually increase either my distance or my speed. For instance, over the course of the past 18 months, I progressed from barely being able to run 2km at 6 km/h to my current of between 13-16km at 13 km/h. My method of increasing speed and/or distance was continuous, meaning that I would run at the same pace for the duration of the run.

Over the past couple weeks, however, I’ve been doing a lot of reading and research regarding interval running. It is a training method where one runs at incredibly high intensity for a short burst, and then slows to a speed under his or her normal pace for the rest of the interval. There have been many studies attempting to provide empirical evidence (as well as many success stories providing anecdotal evidence) supporting the notion that interval running burns fat more quickly than does continuous running. Though one may burner fewer calories by interval training, the calories from fat may be utilised before calories from another source. Thus my rationale for trying this new method–I want to lower my body fat percentage. I believe that my weight (~68-70kg [~150-155 lbs] at any given time) is healthy for my height (177cm [~5’10”]), but that my body fat percentage (currently around 16.5%) is a little high. I’ve never been able to successfully keep my body fat percentage under 15.5% for any substantial length of time, and thought that maybe this type of training would help.

To better understand the concept of interval training, here’s how I went about my run today:

Time Pace Duration
0 – 5′ 7.5 km/h (~4.5 mph) 5′ warm-up
5′ – 6’30” 16 km/h (~10 mph) 1’30”
6’30” – 10′ 10.5 km/h (~6.5 mph) 3’30”
10′ – 11’30” 16 km/h (~10 mph) 1’30”
11’30” – 15′ 10.5 km/h (~6.5 mph) 3’30”
15′ – 16’30” 16 km/h (~10 mph) 1’30”
16’30” – 20′ 10.5 km/h (~6.5 mph) 3’30”
20′ – 21’30” 16 km/h (~10 mph) 1’30”
21’30” – 25′ 10.5 km/h (~6.5 mph) 3’30”
25′ – 26’30” 16 km/h (~10 mph) 1’30”
26’30” – 30′ 10.5 km/h (~6.5 mph) 3’30”
30′ – 31’30” 16 km/h (~10 mph) 1’30”
31’30” – 35′ 10.5 km/h (~6.5 mph) 3’30”
35′ – 36’30” 16 km/h (~10 mph) 1’30”
36’30” – 40′ 10.5 km/h (~6.5 mph) 3’30”
40′ – 41’30” 16 km/h (~10 mph) 1’30”
41’30” – 45′ 10.5 km/h (~6.5 mph) 3’30”
45′ – 46’30” 16 km/h (~10 mph) 1’30”
46’30” – 50′ 10.5 km/h (~6.5 mph) 3’30”
50′ – 51’30” 16 km/h (~10 mph) 1’30”
51’30” – 55′ 10.5 km/h (~6.5 mph) 3’30”
55′ – 56’30” 16 km/h (~10 mph) 1’30”
56’30” – 60′ 10.5 km/h (~6.5 mph) 3’30”
60′ – 65′ 4 km/h (~2.5 mph) 5′ cool-down

As you can see, my intervals were 5 minutes apiece with 90-second high-intensity bursts followed by 3.5 minute “rest” periods (which were not exactly restful, but were slower than my typical continuous training pace). I did a total of eleven intervals, which equates to 16’30” @ 16 km/h (~6.5 mph) and 38’30” @ 10.5 km/h (~6.5 mph). Combined with my 5-minute warm-up and 5-minute cool-down, that was 65 minutes of training. I’m interested in seeing how this type of training affects my body fat percentage over the upcoming weeks. Instead of doing interval training each day, I’m going to do 2 or 3 days of interval, and the remainder of days (totalling 5 per week) of continuous pace. I’ll certainly post my findings in a few weeks.

Cheers,
Zach