Jun 26

Our old hot tub heater kicked the bucket.  We first noticed when we went to get in and the tub was empty and dry.  The heater rusted and leaked through, perhaps because of too many salts or something.  We bought a new one, and when it arrived we discovered that it was huge.  There was no way it was going to fit in the hot tub enclosure, but that was okay because the heater isn’t supposed to be in there without adequate venting anyway.  (The person who inspected the hot tub when we bought the house laughed at how terrible the install was, and took a picture to show the guys in the office.)

So, the new heater has to be outside.  We were originally planning on putting in a concrete slab for it, but that seemed like a lot of work for something so trivial, so we opted to put in paving stones instead.

Sand and gravel base

Sand and gravel base

Dry fit of paving stones

Dry fit of paving stones

I picked up half a dozen stones, but only ended up needing five, and dry fit them to see how they would look.  I also picked up a bag of gravel base so that water would drain away from them, and a bag of sand to keep them level and fill in the gaps.  All the stuff weighed a ton, and I almost broke the shopping cart at Lowes trying to get it all home.  I should have gotten one of the big flatbed carts instead.


My boots

High-tech tampers

Shallow pit for the stones

Shallow pit for the stones

Striking the earth

Striking the earth

First thing’s first, we need a shallow pit for the stones.  Traditional jobs require a pit around six inches deep, but I am lazy.  The stones just have to hold the heater, and won’t get foot traffic and the ground is slightly sloped, so it shouldn’t get water pooling, either.  The final pit was about 2″ on the downhill side, and 4″ on the uphill side.


Remainder of the sand

Remainder of the sand

Layer of sand on gravel

Layer of sand on gravel

Bag of gravel, leveled

Bag of gravel, leveled

Add one bag of gravel, tamp and level.  Add most of one bag of sand, tamp and level.  I am not sure the tiny amount of gravel will make a difference, but it is the thought that counts, right?  If I was putting in a walkway or patio, I would be more careful.  It helps to get the sand as level as possible at this stage, and nice and smooth.  If there are lumps, the stones will rock and wobble.  I wasn’t happy with my first attempt, and had to reseat the stones to get them to lie flat.


Brushed and filled

Brushed and filled

Rest of the sand

Rest of the sand

Placed stones

Placed stones

Time to put the stones back in!  These stones fit in several different configurations, and I found it easiest to look at the picture of the dry-fit and put them back in the same orientation.  I left roughly half-inch gaps between the stones.  Once they were set, I dumped the rest of the bag of sand on top, and used a broom to push it into the cracks between stones and around the edges.  The edges were still a little empty, so I added some of the dirt back in and packed it down so the stones won’t wander off down the hill.


Purr fest

Purr fest

Needed some petting

Needed some petting

Lazy helper

Lazy helper

Time for some cleanup and relaxation.  I found my neighbor, who had come over to help, being lazy and sunbathing on the driveway.  Job well done.

Dec 10

28 Obsidian, 252

I daresay these living conditions are quite unacceptable.  I am quite deprived of an office from which to conduct my business, and my assistant manager assures me that his living conditions are quite deplorable as well.  The military has quite taken over this establishment and ordered the production of iron weaponry, but when I dropped by the forge for a routine status check, I was told that Tobul the Weaponsmith was, “On Break”, and our resident mechanic told me that he had no assignment, because he was, “too good to lug stones and dead rats around”.  First, we need to get management the tools it needs to leverage efficient operations, and then we will see some real synergy between labor, logistics and management.  I have promoted a lad named Geshud Thadsibrek to Vice President of Accounting.  I found him slaving away in the kitchen, but he has a good head for numbers, that one.

2 Felsite 252

HR has done an outstanding job.  I will be spending the week interviewing candidates and assigning interns to the various departments.  We are short on living quarters, so we will be triple bunking in the hospital until we can staff up in the mining department.

6 Felsite 252

Doc Gamillikot has locked himself in the craftsdwarf shop and refuses to come out.

On the bright side, the stockpiles are starting to make sense, and my office is almost complete.

11 Felsite 252

Doc made a pair of leggings out of zombie giant eagle bones.  He may be falling sway to a cult of demonologists.  I shall have to contact Legal and find out if we are covered in the event he starts performing unnecessary operations, and if mental health coverage is included in our benefits.

26 Felsite 252

You would think that in a company so eco-friendly, the elves would find some material beside wood.  I can see them looking askance at our logging operation, but then they show up with logs, wooden clothes, wooden armor, even wooden weapons?  No surprise that they have a kobold infestation, with weapons like that.  I sent Security out to chase them off the property.

28 Felsite 252

I was hoping the caravan would have seeds, since the All Highest saw fit to send us out with precisely one seed of each type.  I know times are tight and government subsidies are at an all time low, but really, one seed?  To make money, you have to spend money, and that means that venture capital has to take some risks.  I guess we will buy some logs, since it seems to be okay when they cut them down.  I think they are just trying to bully us into letting them corner the market.  Ushat has a pile of rickety mechanisms unfit for traps that I will trade.

1 Hematite 252

The elves seem baffled by the concept of stone parts.  Who tries to corner the market on trees, anyhow?  Do they even understand renewable resources?

25 Malachite 252

Flooded with summer interns.  Need more bunks.  I have set them to digging out more farming space and collecting rocks.  I ordered a secondary garbage chute to be dug inside the fortress, which empties close to the masons’ workshops, and then ordered the interns to dump every rock they could find into the pile.  With luck, we will be able to see some of the floors in the living area (which the mason’s are doing an excellent job of polishing, I might add.)

16 Galena 252

We have an immense stockpile of jellyfish.  The human trader is not to be trifled with.

2 Limestone 252

We have broken ground on an ambitious new project, an outer keep.  It will provide valuable defense to our front door, with overlooking archery nooks.  It will also house a new trade depot, protecting both dwarf and ally alike.

26 Sandstone 252

All hail Uzol Oddomshetbeth, creator of Nimemsibnir.  Our enemies shall quake before us!

9 Opal 252

Advance miners have discovered an extensive cavern, and preliminary reports indicate large reserves of cave spider silk.  We are erecting defenses and surveying the area to find a stable, suitable place to breach.  The bottom is muddy, but lacks standing pools of water, so we may have a self-contained, safe cavern.  A full exploration will be necessary to ensure there are no holes hidden along the cave walls, and if there are, to properly seal them.

The new farms are done, but aside from a seed depot, I have not allocated them for use.  With all these new faces, we will certainly need to expand our cafeteria services and erect a new dining hall.  We are rapidly outgrowing the small cafeteria in the hospital.

1 Granite 253

Mason Ebalthikut has cleverly trapped himself in the tower during construction.  Rescue efforts are underway.  I prioritized his rescue by suspending all efforts on the rest of the floor.  Hopefully we will be able to reach him before he dies of thirst.

The pig iron industry is blossoming, and soon, very soon, we will have steel.

Tagged with:
Dec 05

251, First Granite

We’ve arrived.

The king granted us a wagon full of food and drink, as well as a few crude tools.  Nothing too remarkable about the supplies.  The companions chosen for me are a solid group.  There’s a lot of cross-training here.

Carpenter/Medic.

Armorer/Mechanic.

Brewer/Leatherworker.

Farmer/Gemcutter.

Cook/Weaponsmith.

Mason/Architect.

We’ve stopped the wagon on the western edge of a large valley.  There is a river running through the valley, some five fathoms below and perhaps sixty fathoms east.  Likot, our cook, is already talking about turtle biscuits, and the group agrees that they sound good.  They are all excited, but I am wary.  There is ample vegetation and plenty of good land here, but…

There are undead.

They make no cry, and I don’t think the rest of the group has seen them, but I’ve already spotted an undead giant eagle in skies.  Much of the other wildlife in the area seems changed as well.  I think there will be little meat from hunting, unless we can penetrate to a cavern.  For now I think we must dig a refuge and get our supplies under good stone.  There’s no reason this site can’t be a bastion, and a profitable one, but it will always require some care.  The brewer, Besmar, has been a tireless worker throughout our journey.  I like her looks as a miner.  And I believe I’ll take up the other pick myself and see if I can’t get us safely inside soon.

251, Second Granite

With no immediately arable cavern space, Likot has been gathering nearby plants.  This morning he brought work to a halt by bringing back several whip vines to camp.  I can almost taste the battle scones we’ll make from these.  Praise Armok!

251, Eighth Granite

We’ve carved out a suitable hole (it deserves no other word) and have begun moving food supplies inside.  Fikod dismantled the wagon and made several beds from it.  Ushat’s been chopping down some nearby trees to allow Fikod to continue his work.  This team knows how to work.

Besmar and I have so far been digging only in soil layers.  It’s fast work, and speed is needed, but we must dig to bedrock soon.  Atir, our mason and architect has been stoic about taking on the hauling duties until then, but we need stone doors for our cave.

251, Sixteenth Granite

One of the dogs strayed too far from the camp and got into a fight with several of the undead mountain goats we’ve spotted.  Ushat, who was chopping wood nearby rushed to the dog’s aid, and killed the zombie goats, but the dog is badly hurt.

251, Second Slate

Besmar and I chanced an uncontrolled tap of a nearby pond to try to get our farming project moving.  It worked perfectly and Minkot has begun cultivation.

251, First Hematite

Summer has arrived and things have been going quite well.  We are all undercover, with sturdy stone doors and a few simple traps protecting our entrance.  The first crop of plump helmets is already in, and I expect to smell it brewing within a few days.  There is a problem though.  The quartermaster that supplied us apparently had some grudge against Minkot.  He filled most of our seed bags full of pebbles.  Minkot’s found a few seeds in the bags, but the only thing we have enough of is plump helmets.  All the other staples will require a long time to replenish.

Fikod has exhausted her supply of wood, so I’ve asked her to do a quick inventory while we chop down a few more trees.  I would do it myself, but there are still too many mining projects that need attention.

251, Second Malachite

We’ve been reinforced.  A group of four dwarves arrived today, including Tobul.  I’ve heard of his work.  He’s an accomplished weaponsmith, and I’m sure we’ll have need of his services.  Especially since Besmar and I have uncovered both bituminous coal and lignite in the last month.  We’ve also got a limonite strike.  No flux stone yet, but even iron would be a great boon.

251, Second Galena

One of the new migrants is a skilled warrior.  Almoshurvad claims he’s better with a mace, but all we have is an axe.  He used it to take out another one of those zombie giant eagles.  Gathering plants and wood from the surface is a risky business, but we must have the materials at this stage of our development.  I am torn between digging deeper to expose the subterranean caverns and continuing to plunder the surface resources.  With only eleven of us here, I think it’s safer to continue to brave the surface.  We are working on bringing smelting and smithing online.  I hope to give Almoshurvad an iron mace and shield soon.

251, Twelfth Galena

We’ve begun building a larger dormitory/hospital on the third level.  Beds and table are being moved in as I write this.  I’ve designated the original common room near the entrance to serve as a barracks.  Almoshurvad is there now, practicing.  Once the dorm and emergency facilities are settled, we’ll begin working on some individual rooms.  I’d prefer to have some marble or limestone for the main living area, but all we’ve found in siltstone and some orthoclase.  We’ll need to dig deeper soon.

251, Nineteenth Galena

We’ve begun forging iron arms and armors.  Praise Armok!

251, Seventeenth Limestone

Our hospital is now supplied with splints, thread and cloth.  Fikod is much happier now that the emergency supplies are in place.  We’re still lacking soap and traction benches, but we are working on it. Atir, our architect, keeps teasing me about having a sixteen bed dorm when there are only eleven dwarves in the outpost, but I know more will come.  We’re doing well in this hostile land.

We need more wood.  Time to send another expedition outside.

251, Second Sandstone

Six more migrants have arrived, bringing our group up to seventeen dwarves.  We are well situated now, and a few extra mouths are not a problem.  There’s another macedwarf in the mix.  His name is Melbil, and I’ve placed under Almoshurvad’s command.  We’ve got a spare mace already, and iron armor should be ready soon.

251, Twenty-seventh Timber

I traded one of our high-quality serrated discs for a good supply of extra meat, leather and cloth.  I also requested large supplies of some of our industry critical needs.  I asked for a lot of pretty much any wood product, including lye, partly because I don’t want to do too much lumber-jacking yet, and partly because they’re dirt cheap.  I also asked them to bring some flux stone, in case we don’t find any here.  Assorted high-quality leather, and some valuable gems to keep my workers happy rounded out the list.  With such a good weaponsmith and no lack of iron ore, I don’t see any reason not to bring a little beauty and comfort to our home.

251, Twenty-fifth Moonstone [Early Winter]

We were forced to fight another zombie giant eagle.  Our fine macedwarves make short work of them, but I remain concerned about the frequency of the attacks on our surface operations.

We’ve completed the main line of an aqueduct to bring water to the living areas of the fort.  Ushat is connecting floodgates even now.

251, Twenty-first Opal [Mid-Winter]

The gates are open and the aqueduct is flooding!  Hopefully it will fill before the brook finished freezing.

251, Thirtieth Obsidian [Late Winter]

Tomorrow will be the one-year anniversary of our arrival in this valley.  I am quite pleased with how we’ve managed so far.  We are well-established in our home (no longer merely a hole!) and our prospects are good.  We’ve accomplished much in a short span of time, but much remains to be done.  Some thoughts for the coming year:

  1. Complete the individual living quarters, which are only partially excavated now.
  2. Excavate and furnish a proper dining hall.
  3. Bring the textiles industry in to place.  Various dwarves have tried their hands at this already (including myself!), but none of us has shown real talent.
  4. Construct kennels and get our animals contributing more.
  5. Manufacture soap for the hospital.  It’s the only thing lacking, now that the well and traction benches are both working.
  6. Improve storage of masonry products.
  7. Dig deep!

It has been an honor, a privilege and a pleasure to lead these fine dwarves in the last year.  I look forward to many decades of prosperity in my new home!

Tagged with:
Dec 05

Yes.  Yes.  This is a fertile land, and we will thrive.  We will rule over all this land, and we will call it, “This Land”.

Hypatian generated a world for us to live, and it is a mass of confused islands with violent mountain ranges.  It looks like the planet was hit by a meteor and the landmasses were fractured and scattered to the winds.  At least it still has a polar cap.

Now we just need to find a nice, safe place to strike ground.

Continue reading »

Tagged with:
Aug 06

At first glance, the Intent structure is an attractive way to pass messages between components in an Android application.  However, there is one important caveat:  Android will store a clone of the Intent used to launch an Activity, and will broadcast it again under certain state changes, such as when the phone falls asleep, or when a USB cable is attached.  The second message can cause difficulty if the Activity creation has side effects.  For example, if you create an Intent to display a video and start playing it, then the rebroadcast will also start playing the video, even if the trigger was the phone falling asleep, leading to the screen being off, but the sound playing in the background.

Unfortunately, it is virtually impossible to distinguish between an Intent your application sends to itself, and the rebroadcast sent by Android.  The two Intents have the same action, categories, extras, etc.  Since the Intent broadcast to yourself is serialized and deserialized, its hash code changes, so you can’t track it that way. You can’t even be clever and add an extra to the Intent that marks it as processed; Android sends a clone of the original.

What recourse does your application have?  You can create a back-channel communication to record a unique ID for the Intent, store that value in the Intent and in the application, and only process the Intent if its ID hasn’t been consumed (any solution designed to defeat a replay attack works here.)  You can also make your Activity creation stateless, so that rebroadcast Intents are harmless.

Mar 31

I keep PuTTY on a flash drive, along with my keys, and I move it back and forth between machines.  Since PuTTY is a little annoying and stores its configurations in the registry instead of on file, it is slightly difficult to manage configuration settings.  To make it easier, I included a couple of scripts which save, load, and delete the registry settings.

Save configuration:

@ECHO OFF
regedit /ea new.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
copy new.reg putty.reg
del new.reg

Load configuration:

@ECHO OFF
regedit /s putty.reg
regedit /s puttyrnd.reg

Delete configuration:

@ECHO OFF
regedit /s puttydel.reg

puttydel.reg file:

REGEDIT4
[-HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]

Occasionally, it popped up an error message on startup saying “Windows – No Disk Error”.  A little investigation finds that the flash drive is being mapped to different drive letters on each machine, and the registry keeps a path to the putty.rnd file in HKEY_CURRENT_USER\Software\SimonTatham\PuTTY.

To fix it, you can either keep the drive letters the same, update the registry key based on the drive letter PuTTY is loaded on, or keep putty.rnd on the local machine and don’t delete that part of the registry key.

Tagged with:
Mar 28

I learned all sorts of interesting things while trying to restore a user’s web page, which was using the Gallery software to show albums.

The first is that Gallery has a very friendly upgrade interface that walks you through every step of the upgrade, giving you hints on errors when it thinks there is an out-of-band fix you need to apply, like creating a directory or changing permissions.

The second is that Gallery’s friendly upgrade interface is incapable of upgrading from 1.2.0.1 to 1.3.  (Even finding the version numbers was a bit of a challenge, since the friendly installer leaves off the leading 2.  Apparently the product is Gallery 2, version 1.2.0.1, not version 2.1.2.0.1.  Thanks, guys.)  To get it upgraded, I had to manually download and unpack several interim versions and run each upgrader in sequence.

In the process, I found a nugget of MySQL fun.  If you delete a table file from an InnoDB database, you can no longer drop the table (to remove it from the InnoDB metadata).  That means you cannot create a table with the same name, and mysql spews errors to the syslog on startup.  Of course, instead of having a command-line tool, or switch, or special command to fix the problem, the only solution is to put the .frm file back in the database directory, so that the table drop can delete it again.

“Wait!” you say, “What if I deleted the file?”  Well, then you have to create a new database, create a table with the same name, and copy the .frm file to the old database.  Then you can drop both new and old tables.  Note that the table does not need the same schema, nor does it have the same internal InnoDB table identifier.  That suggests that there isn’t any special metadata needed to drop the table, except for the name of the table itself.

I also found out that setgid does not work for PHP scripts in Linux.  From what I can gather, setgid is pretty unloved on Linux in general.  Important safety tip.

Mar 26

Due in small part to the vagaries of partition headers on RAID drives, and in large part to my own stupidity, I have the opportunity of a lifetime (I’m not doing it again) to sit and shuffle defective coasters around my desk.  (Pro tip:  One mirrored drive scouts ahead to search for traps, while the rest of the party hides outside.)  It could be worse; I haven’t bought CDs in any significant quantity in the last fifteen years.

An unexpected bonus is that I will finally have album art, so my phone won’t have the generic icon marking me as flotsam in the technological jetstream.  The drawback is that I will be giving up hope that the modern world will embrace the sheer awesomeness of ogg vorbis, and will be ripping into the bloated carcass of mp3, so I’ll only be able to fit three songs onto my phone anyway.

On the topic of antiquated singumedia and album art, the classical world needs to man up and reach consensus on how to tag media.  You know, so both me and that other guy that listens to it don’t have to type it in.  I guess peer review and consensus through shame don’t work when you don’t have peers and you feel the need to cram every detail into the title.  Next time, be a pal and just scan the entire liner notes and Base64 them into the album name.

Tagged with:
Mar 23

Server crashes are painful, but they are also an opportunity in disguise.  When you are starting with a clean slate, you might as well make some improvements and pay off some of that technical debt that you have accumulated.  One of those debts was a single Wordpress install that could support multiple blogs, each accessible by its own Apache virtual host.

Ubuntu offers a head-start, by centralizing access to the wp_config.php file in the /etc/wordpress/ directory, which then attempts to look up a site-specific configuration file based on the hostname.  It is important to name the configuration file so that it can be found (or change the wp_config.php file to match your naming convention.)  The default naming format is config-hostname.php, where hostname should be expanded (e.g., www.sirdodger.net).  If Apache is rewriting your URLs, make sure the config file matches the final product.  Make sure that your apache user has read permissions on the config files.  Also, make sure that the uploads directory specified in each site config file exists, and is accessible to the apache user.  New blog, here I come.

All blogs access the database using the same user, so make sure that user has access to any imported databases you have, or any new databases you are creating.

GRANT ALL PRIVILEGES ON wordpressdb.* to 'wordpressuser'@'localhost';  FLUSH PRIVILEGES;

In the config file, set the $table_prefix variable to match the site-specific tables you want to reference.  (All blogs’ tables go in the same database.)

$table_prefix  = 'sirdodger_';

Importing an old database for the old blog had its own issues.  First up, upgrading from MySQL 5.0 to 5.1 changed the way in which database names are encoded in the file system, so MySQL was not reading the database correctly.  Fortunately, MySQL has fairly good command line tools for repairing databases.  The second database problem was that during the move, I renamed the database prefix.  Rather than using the default prefix wp_, I changed to a more site-specific prefix of sirdodger_.  Unfortunately, that resulted in being unable to log in to WordPress with the error, “You do not have sufficient permissions to access this page”.  As it turns out, WordPress maintains permissions information in the database that uses the table names as a key.  All of those names must be updated to use the new prefix.  To update it, run the following MySQL commands (replacing old_ and new_ with your actual prefixes):

UPDATE 'new_usermeta' SET 'meta_key' = REPLACE('meta_key', 'old_', 'new_');

UPDATE 'new_options' SET 'option_name' = 'new_user_roles' WHERE 'option_name' = 'old_user_roles' AND 'blog_id' = 0;

(Thanks to neoegm for the fix!)

The final bit of fun was that the character encoding for the new WordPress did not match the imported database.  A quick fix is to edit the site config file, and add explicit charset definitions.

define('DB_CHARSET', 'utf8');
define('DB_COLLATE', '');

That was it!  One new blog and one old blog, living together in blissful harmony.

Tagged with:
preload preload preload