antipaucity

fighting the lack of good ideas

subaru isn’t groveling

Subaru released a new vehicle in the Japanese market recently called the Levorg (I saw it on Samurai Wheels on NHK World). It stands for LEgacy reVOlution touRinG.

It also spells “grovel” backwards.

From the review Samurai Wheels gave it, it certainly doesn’t grovel.

But it also purports to do something relatively difficult. Subaru has introduced EyeSight in this vehicle which uses cameras to offer assistive driving (automatic braking, automatic following, etc).

The interesting thing about this (and they are cameras), is that video processing is difficult. It is far easier to use something like FLIR, LIDAR, or ultrasonic sonar or another technique than it is to use object tracking in a video stream.

Which makes me wonder if Subaru is doing pure video object tracking, or if it’s combined with something else to make it work as well as it seemed to in the review I watched recently.

show only most recent facebook news feed

(Note: I did this in Chrome – it’ll be a little different in other browsers)

I have several complaints about the book of the face – not least of which is that it likes to reset your News Feed from “Most Recent” (aka most useful) to “Top Stories” (aka whatever Facebook wants you to see).

I also like to avoid the fluff off the other columns (ads, games, groups, pages, chat, etc) when all I want is the most recent stream. So, after some searching, fiddling, and tweaking, I now have my news feed (and only my news feed) appear on the side of my screen in chronological order.

How to do what I did:

  • install the Auto Refresh extension for Chrome (only if you want the news feed to automatically update)
  • go to https://m.facebook.com/home.php?sk=h_chr (this is the mobile Facebook view sorted by chronological order) in a new window (not new tab)
  • right-click on the tab holding the mobile Facebook feed, and select Pin Tab
  • click the Auto Refresh extension button and select how often you want your feed to refresh, and click Start
  • resize the window to a comfortable reading width (mine is about 15% of my screen, or about 3″)
  • slide it all the way to one side of your screen or another
  • enjoy

There are some other ways to accomplish more-or-less the same thing:

  • bookmark the mobile news feed URL
  • set the mobile news feed URL as your home page
  • sign-in to your Facebook account in more than one browser (instead of having two windows in one browser), and load the mobile edition therein

Hope this helps you like it’s helped me.

steam by andrea sutcliffe

Andrea Sutcliffe’s book Steam: The Untold Story of American’s First Great Invention was a pure joy to read. Being the second review I’m writing with my “new” system, I hope you find this book as interesting as I have.

In 1784, James Rumsey designed a boat that could, by purely mechanical means, move its way upstream. What he devised was truly brilliant: imagine a catamaran or pontoon boat with a platform across the two hulls. Anchored to the platform is a waterwheel. The waterwheel dips into the river, and is connected via a linkage to poles that push the boat against the current like a Venetian Gondola.

Why did he develop such a device? Because at the time, shipping by barge etc was incredibly simple downstream – you load-up the barge, give it a small crew, and float downriver. But because there was no way of mechanically returning the vessel upstream (without using sail power, which can be fickle to use, and uses a lot of otherwise-usable cargo area). So barges and shipping vessels tended to be crudely made so they would only ever go downstream – at their destination they’d be turned into building materials. And the crews would have to return on foot. To put this in perspective, it took about 4 weeks to float a barge from Pittsburg down the Ohio to the Mississippi to New Orleans. And it took about 6 months to get home.

Enter the need for reliable mechanical ship propulsion.

Beginning in his teens as a surveyor for the 6th Lord Fairfax, George Washington became enamored with the idea of inland navigation – that is, using streams, canals, rivers, and lakes to transport people and goods instead of the ocean. During his tenure as a surveyor, then an engineer, then a general, he never lost sight of what he viewed as the budding nation’s biggest hurdle to westward expansion – the overwhelmingly high cost of transporting goods from east to west, and vice versa. Along the coast, transport was simple and cheap. But to go far inland made prices exorbitantly high for both consumers and shippers – which made markets hard to tap.

The initial days of the steam wars are proof that ideas are worthless. Stationary steam engines, like those made by Boulton & Watt were too heavy and inefficient to possibly consider putting on a boat – at any scale. So while the idea of steam-powered travel had been running around folks’ minds for 20+ years by the time Rumsey built his simple mechanical boat, there was no way to practically use it.

What was needed were major improvements on steam engine design and implementation before wider applications for their power could be found. This is where the steamboat wars start to become exciting. Independently, Rumsey and a man named John Fitch (with his business partner) developed the pipe boiler which reduced the amount of water needed for operating an engine for the same power output, increased fuel efficiency, cut heating time, and lightened the engine itself. Traditional steam engines used a pot boiler – effectively a massive tank of water that would be heated in gestalt. As anyone who has ever timed how long it takes to start boiling water in a tea kettle vs a stock pot knows, water is very difficult to heat, and lots of energy is needed to move it even a couple degrees.

The fact is, that one new idea leads to another, that to a third, and so on through a course of time until someone, with whom none of these ideas was original, combines all together, and produces what is justly called a new invention. –Thomas Jefferson

Fascinatingly, Thomas Jefferson was against the idea of patents and copyright law, and likely would have campaigned heavily against it in the Constitutional process had he not been Minister to France. From a letter he wrote years after serving on the first Patent Commission Board:

He who receives an idea from me, receives instruction himself without lessening mine; as he who lights his taper at mine, receives light without darkening me. That ideas should freely spread from one to another over the globe for the moral and mutual instruction of man, and improvement of his condition, seems to have been peculiarly and benevolently designed by nature… Inventions then cannot, in nature, be a subject of property. Society may give an exclusive right to the profits arising form them, as an encouragement to men to pursue ideas which may produce utility, but this may or may not be done, according to the will and convenience of the society.

Contrast this to the efforts of both Fitch and Rumsey who lobbied for patent boards of some kind (at both the state and federal levels) between the end of the Revolutionary War and the ratification of the Unites States Constitution.

Sutcliffe’s account of the first “steamboat wars” shows that intellectual property litigation is an expensive, time-consuming, and distracting effort – whose end may or may not have any value.

Progress is an illusion, it happens, but it is slow and invariably disappointing. –George Orwell

Thornton’s condenser is undoubtedly one of the best calculated to condense without a jet of water, but I conceive the difficulty of getting rid of the air insurmountable .. when [the air] is drove back again by the steam to the cold condenser, it becomes nearly equal to common air in density, and skulks into the bottom of the condenser for security. –John Fitch (describing a new condenser design in 1790)

Based upon the extensive research Ms Sutcliffe has done into the early history and designs of steam engines and their associated mechanical conveyances, an old idea of mine has newly gained plausible validity: that of a steam-powered tank. Back in high school I postulated that both the power-to-weight and power-to-size ratio of steam engines had advanced sufficiently by the late 1850s that, in conjunction with a primitive form of caterpillar track design (which Fitch would have called an “endless chain of feet” (vs an early idea of his to use an “endless chain of paddles”)), that the first fully-mechanized war machines could have been built and sent into battle not in WWI, as the first tanks actually were, but instead during the Civil War – 50 years sooner. Leonardo Da Vinci has designed a human-powered armored car in the late 15th century. Replacing man power with steam power could have been a logical thing to have done – but no one ever did.

In the availability of men willing to persevere with a possibly “ridiculous” idea, America had an advantage. –Frank D Pager on the early successes of the Industrial Revolution in America.

Fitch and Rumsey took their war to the people in a series of “pamphlets” published over the course of many months. From Sutcliffe’s description of a “pamphlet” in this context, it seems they were the late 18th century version of a sourced blog or op-ed. Ranging from 20 to 50 (or more) pages in length, with affidavits, letters, and histories presented, the pamphlet was the common man’s research or position paper. I suppose they may have been used by others, too – but the context given in Steam shows them used as marketing and propaganda pieces.

He that studies and writes on the improvements of the arts and sciences labours to benefit generations unborn, for it is impossible that his contemporaries will pay any attention to him. –Oliver Evans

It’s the same each time with progress. First they ignore you, then they say you’re mad, then dangerous, then there’s a pause and then you can’t find anyone who disagrees with you. –Tony Benn (British Labour politician)

Seems that’s where Ghandi may have gotten the inspiration for this famous quotation:

First they ignore you, then they laugh at you, then they fight you, then you win.

Or perhaps it was Benn who was inspired by Ghandi. Or maybe they just realized the same thing independently.

merging centos iso images

Thanks to @Anon on Unix.SE for the pointer on how to do this. And to @Andy‘s comment on @mmckinst‘s answer for the warning about additional packages you may need.

As my three readers know, I run a CentOS mirror. One of the idiosyncrasies of CentOS, like its upstream RHEL, is that DVD ISOs aren’t always just one image – for example, the 6.6 x64 image comes on two ISOs. I suppose this has something to do with the “normal” or “simple” capacity of a DVD disc, but it’s annoying.

Enter the mkdvdiso.sh script (original found here) from Chris Kloiber & Phil Schaffner.

The process I used to combine these two ISOs into one is as follows:
yum install isomd5sum createrepo mkisofs
mkdvdiso.sh /full/path/to/original/isos /full/path/to/destination.iso

For posterity, and in case the CentOS wiki dies, below is the mkdvdiso.sh script:

#!/bin/bash

# by Chris Kloiber 
# Mods under CentOS by Phil Schaffner 

# A quick hack that will create a bootable DVD iso of a Red Hat Linux
# Distribution. Feed it either a directory containing the downloaded
# iso files of a distribution, or point it at a directory containing
# the "RedHat", "isolinux", and "images" directories.

# This version only works with "isolinux" based Red Hat Linux versions.

# Lots of disk space required to work, 3X the distribution size at least.

# GPL version 2 applies. No warranties, yadda, yadda. Have fun.

# Modified to add sanity checks and fix CentOS4 syntax errors

# TODO:
#   Add checks for available disk space on devices holding output and
#       temp files.
#   Add optional 3rd parameter to specify location of temp directory.
#   Create .discinfo if not present.

OS_VER=\
$((test -e /etc/fedora-release && rpm -qf /etc/fedora-release --qf "FC%{VERSION}") \
|| (test -e /etc/redhat-release && rpm -qf /etc/redhat-release --qf "EL%{VERSION}") \
|| echo OS_unknown)

case "$OS_VER" in
  EL[45]*|FC?)
        IMPLANT=/usr/lib/anaconda-runtime/implantisomd5
        if [ ! -f $IMPLANT ]; then
            echo "Error: $IMPLANT Not Found!"
            echo "Please install anaconda-runtime and try again."
            exit 1
        fi
        ;;
  EL6*|FC1?)
        IMPLANT=/usr/bin/implantisomd5
        if [ ! -f $IMPLANT ]; then
            echo "Error: $IMPLANT Not Found!"
            echo "Please install isomd5sum and try again."
            exit 1
        fi
        ;;
  OS_unknown)
        echo "Unknown OS."
        exit 1
        ;;
  *)
        echo "Fix this script for $OS_VER"
        exit 1
esac

if [ $# -lt 2 ]; then
        echo "Usage: `basename $0` source /destination/DVD.iso"
        echo ""
        echo "        The 'source' can be either a directory containing a single"
        echo "        set of isos, or an exploded tree like an ftp site."
        exit 1
fi

DVD_DIR=`dirname $2`
DVD_FILE=`basename $2`

echo "DVD directory is $DVD_DIR"
echo "ISO file is $DVD_FILE"

if [ "$DVD_DIR" = "." ]; then
    echo "Destinaton Directory $DVD_DIR does not exist"
    exit 1
else
    if [ ! -d "/$DVD_DIR" ]; then
        echo "Destinaton Directory $DVD_DIR must be an absolute path"
        exit 1
    else
        if [ "$DVD_FILE" = "" ] || [ -d "$DVD_DIR/$DVD_FILE" ]; then
            echo "Null ISO file name."
            exit 1
        fi
    fi
fi

which mkisofs >&/dev/null
if [ "$?" != 0 ]; then
    echo "mkisofs Not Found"
    echo "yum install mkisofs"
fi

which createrepo >&/dev/null
if [ "$?" != 0 ]; then
    echo "createrepo Not Found"
    echo "yum install createrepo"
fi

if [ -f $2 ]; then
    echo "DVD ISO destination $2 already exists. Remove first to recreate."
    exit 1
fi

# Make sure there is enough free space to hold the DVD image on the filesystem
# where the home directory resides, otherwise change ~/mkrhdvd to point to
# a filesystem with sufficient free space.

cleanup() {
    [ ${LOOP:=/tmp/loop} = "/" ] && echo "LOOP mount point = \/, dying!" && exit
    [ -d $LOOP ] && rm -rf $LOOP 
    [ ${DVD:=~/mkrhdvd} = "/" ] && echo "DVD data location is \/, dying!" && exit
    [ -d $DVD ] && rm -rf $DVD 
}

cleanup
mkdir -p $LOOP
mkdir -p $DVD

ls $1/*.iso &>/dev/null
if [ "$?" = 0 ]; then

    echo "Found ISO CD images..."

    CDS=`expr 0`
    DISKS="1"

    [ -w / ] || {   # Very portable, but perhaps not perfect, test for superuser.
        echo "Only 'root' may use this script for loopback mounts" 1>&2
        exit 1
    }

    for f in `ls $1/*.iso`; do
        mount -o loop $f $LOOP
        cp -av $LOOP/* $DVD
        if [ -f $LOOP/.discinfo ]; then
            cp -av $LOOP/.discinfo $DVD
            CDS=`expr $CDS + 1`
            if [ $CDS != 1 ] ; then
                DISKS=`echo ${DISKS},${CDS}`
            fi
        fi
        umount $LOOP
    done
else
    if [ -f $1/isolinux/isolinux.bin ]; then

        echo "Found FTP-like tree..."

        if [ -e $1/.discinfo ]; then
            cp -av $1/.discinfo $DVD
        else
# How does one construct a legal .discinfo file if none is found?
            echo "Error: No .discinfo file found in $1"
            cleanup
            exit 1
        fi
        cp -av $1/* $DVD
    else
        echo "Error: No CD images nor FTP-like tree found in $1"
        cleanup
        exit 1
    fi
fi

if [ -e $DVD/.discinfo ]; then
    awk '{ if ( NR == 4 ) { print disks } else { print ; } }' disks="ALL" $DVD/.discinfo > $DVD/.discinfo.new
    mv $DVD/.discinfo.new $DVD/.discinfo
else
    echo  "Error: No .discinfo file found in $DVD"
    cleanup
    exit 1
fi

rm -rf $DVD/isolinux/boot.cat
find $DVD -name TRANS.TBL | xargs rm -f

cd $DVD
createrepo -g repodata/comps.xml ./
mkisofs -J -R -v -T -o $2 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 8 -boot-info-table $DVD
if [ "$?" = 0 ]; then

    echo ""
    echo "Image complete, create md5sum..."

#  $IMPLANT --force $2
# Don't like forced mediacheck? Try this instead.
    $IMPLANT --supported-iso --force $2

    echo "Start cleanup..."

    cleanup

    echo ""
    echo "Process Complete!"
    echo "Wrote DVD ISO image to $DVD_DIR/$DVD_FILE"
    echo ""
else
    echo "ERROR: Image creation failed, start cleanup..."

    cleanup

    echo ""
    echo "Failed to create ISO image $DVD_DIR/$DVD_FILE"
    echo ""
fi

programming your home by mike riley

Mike Riley’s entry in The Pragmatic Programmers series, Programming Your Home – automating with Arduino, Android, and your computer – was a lot of fun.

While I am not really in a position to do many of the mini projects given in the book (wrong type of house plus we rent), reading some of the project ideas did give me some inspiration for other activities. One of those is a Buffer-like tool I’m now writing to queue tweets over-and-above what the free level of Buffer will allow (and on a different schedule from my Buffer-fed queue). In conjunction with python-twitter, cron, and simple email messages, I’ve got a system started to which I can email things I would like to be posted, and they will go out when the cron job runs.

The Arduino is an impressive embedded platform – one that has also rekindled another long-time interest I’ve had in robotics. Years back, I recall seeing Sally Struthers advertising for one of those learn-at-home groups, and one of the options was robotics. (By “years back”, I mean 20+ years ago – probably more like 25 years ago, at this point.) I used to own a copy of Robot Builder’s Bonanza – and read it cover-to-cover a couple times. I loved watching Battlebots on TV. I’ve always wanted to buy/use LEGO Mindstorms.

Using robots to automate daily activities (and, of course, for fun) has been a fascination since I first saw Lost In Space and myriad other scifi shows and movies.

Riley does a great job of not demanding you be an expert programmer (or even a programmer at all) with the fully-implemented code examples in the book. He also does a good job of indicating what you’ll likely have to tweak on your own – and what you can probably just leave alone in the examples. Add to this the “extra credit challenges”, and I highly recommend it to anyone interested in home automation, embedded development, robotics, or just general programming/scripting.

There are some other interesting Python snippets throughout the book – that don’t have to be used in the context of an Arduino (like using Google’s SMTP server (via authentication)).

the seven stages of expertise

I recently found The Seven Stages of Expertise in Software Engineering.

  • Stage 1: Innocent
    • barely knowledgeable if at all
  • Stage 2: Exposed
    • seeking knowledge
  • Stage 3: Apprentice
    • has read case studies and tries to apply those techniques
  • Stage 4: Practitioner
    • can actually apply concepts learned in one context to a not-identical context
  • Stage 5: Journeyman
    • professional understanding and application of the field; can mentor
  • Stage 6: Master
    • moved from “whats” and “hows” to “whys”; can mentor very effectively
  • Stage 7: Researcher
    • the teacher, presenter, mentor, speaker, evangelist, writer, authority

Presented firstly in the humorous guise of The Seven Stages of Expertise in Bear Hunting, Meilir Page-Jones makes a highly-compelling case for progressive advancement in [nearly] any field.

Some of the ideas seem similar to what Malcolm Gladwell brings in Outliers (review) or Robert Greene does in Mastery (review). Which seems to only lend more credence to those other works, given that this article is © 1998.

reviewing

I was contacted by Packt a few months ago to be a possible author of an eBook on the Raspberry Pi. As fun as that sounds like it would’ve been, I am in no way qualified to write on the topic, as I’ve both never used one, and don’t really have the time to play with one.

Fast forward to last month, and now instead of writing the book, they’d like me to be a “reviewer”. That sounds kinda fun – you get your name in the credits, and get to help maybe sell a couple copies by giving feedback on the content, structure, flow, etc.

The problem with this has been, so far, that the author(s) have such a poor command of English that the book sounds more-or-less like it’s been written by a grade schooler. So, instead of “reviewing”, I’ve put on my editor’s hat, and am trying to help the fella that wrote it bring it up to a level folks can understand 🙂