Jeff Duntemann's Contrapositive Diary Rotating Header Image

Daybook

Descriptions of what I did recently; what most people think of when they imagine a “diary entry.”

Open-Source Database App Builders

Some folks I know are asking me something I can’t answer: What are people using these days to build small-scale client-server GUI front ends? They have an app created with FileMaker Pro years back that they want to re-create. The catch is this: They want it to be built with something cheap (ideally open-source) and widely used, so that one person isn’t stuck supporting it forever.

The number of records in typical use is not high; from what I can tell, fewer than three hundred in the largest table. There are eight or ten tables, depending on how you slice up the database. There is a need for a certain amount of scripting in addition to table indexes and relationships. The app doesn’t have to scale. Again, 300-500 records is probably as many as the main table will ever need to hold. The database itself must reside on a server, accessible over the Internet from the front end, which will be on laptops and/or desktops.

I used to do things like that in Delphi, and have done simple apps for local tables in MS Access. Access is not cheap, nor is Delphi, and few people are learning Delphi anymore. Lazarus could work, but again, the real question is what’s out there that a lot of people use so that expertise is easy to find.

I wasn’t even aware that FileMaker was still being sold. I haven’t seen it since I had a review copy at VDM circa 2000. Did anyone ever create an open-source equivalent? A quick look around failed to spot one. Any insights?

The Lost Hobby of Microscopy

Carol found some very small insects crawling around on Dash’s neck yesterday while she was brushing him. She dropped several of them into a pill bottle followed by some alcohol. These were tiny bugs; I’m guessing the biggest one wasn’t quite two millimeters long, and most were at best a millimeter. We squinted and used the magnifying glass that I keep in my desk drawer, and the best we could say is, Yeah, that’s a bug.

I knew what I had to do next, and it took me way back. For Christmas when I was eight (the end of 1960), my father bought me a microscope. It was small and lacked a fine focus knob, but it had an iron frame and decent optics. For the next two years until I discovered electronics, looking at very small things was one of my main hobbies.

My father helped me get the hang of it. He had had a simple microscope himself in the early 1930s, and I still have it somewhere: A black crinkle-finish tube about five inches high, with an eyepiece at the top, a slot for inserting slides, and a tilting mirror in a large milled cutout toward the bottom. He bought me a book called Hunting with the Microscope, by Gaylord Johnson and Maurice Bleifield (1956) and I spent a couple of years hunting for all the microscopic things the authors had painstakingly drawn on its pages.

Many of the drawn microorganisms were said to be found in rivers and ponds, and my friends and I haunted the banks of the Chicago and Des Plaines rivers in the summer with mayonnaise jars in hand, scooping up slimy water and the even slimier mud on the riverbottom beneath it. Holding up the jars against bright light showed them to be absolutely crawling with minuscule thingies in constant motion. I had a well slide and managed to corral some of the little monsters in it, but they didn’t slow down long enough for me to identify them. None followed the corkscrew path that paramecia were said to exhibit. We saw no volvoxes nor stentors, cool as that would have been. Water bears too were AWOL. Most heartbreakingly, we never cornered an amoeba, which we longed to see eat something by engulfing it, which would be akin to watching The Blob in miniature–always a draw for ten-year-olds.

No, most of the critters that moved slowly enough to identify were microscopic worms. When my mother heard us talking about worms from the corner of the family room when my friends and I were gazing into my microscope, she made us dump the mayonnaise jars into the toilet and wash our hands. My mother was an RN, and although we didn’t learn it first-hand until we were 13 (another story entirely, though a good one) both rivers were flood relief for Chicago’s and suburban sewers. After even a modest rain, runoff would cascade from overflowing sewer mains right into the rivers, carrying raw sewage with it. So these weren’t exactly earthworms we were watching.

I’m honestly not sure what became of my little microscope. The good news is that Carol received a much better one she when was fourteen (a Tasco 951 with a fine focus knob) and earlier today, I pulled her microscope down off the high shelf and set it up on the kitchen island where the light was good. I looked at a few of the pickled-in-alcohol bugs, but they had been picked off Dash with a tweezers and were not in good shape. We cornered Dash and hunted until we spotted a live one. I carefully snipped the little tuft of hair to which the bug was clinging, and with some prodding managed to tack the bug to the sticky strip on a white Post-It. (Gaylord Johnson would have been proud.) Under the microscope, it was unmistakable: Linognathus setosus, the dog louse. The tacky Post-It strip kept it from walking around, and we were able to see how it clung to a strand of dog hair with its hooked legs.

Dash got a prompt treatment with the usual doggie bug meds, and in a day or two whatever lice remain will be gone. In the meantime, I have to wonder what happened to the microscopy hobby. Astronomy and electronics are both big business, but beyond some Web sites (like this one) I don’t see much to indicate that anybody is digging through river mud looking for water fleas anymore. The instruments are cheap compared to good test equipment or telescopes. You can get used stereo microscopes on eBay for $250 or less, and used student microscopes like Carol’s for under $50. Rivers are a whole lot cleaner than they were fifty years ago, and I’m thinking that if I sampled the Chicago River today I might score a stentor or two, and maybe even an amoeba. Granting that Google is a much better way to identify the stuff you’re looking at, I might order a copy of Hunting with the Microscope, just for fun. No, I don’t really need another hobby, but I want to be ready the next time something really small comes calling, and I need to know what it is.

My Security System

BewareBichons500Wide.jpg

Multiply your terror by four. Then divide by the square root of pi. Or something. (Sign available at Scandical.com.)

The Five Minute Electrostatic Charge Detector

ChargeDetector500Wide.jpg

I’ve been building electronic gadgets for almost fifty years, and I don’t think I’ve ever managed a working five-minute project before. If the photo above shows a slightly random assembly style (I’m typically more artful, whether or not the circuit requires it) that’s because I wanted to complete it in five minutes.

I did. And it works. When I snapped the picture, I was holding my hand about six inches from the gate lead of the MPF102. When I pulled my hand back about a foot or so, the LED went out. If I scuff around my static generator of an office, it “sees” me even two or three feet away. The sensing “antenna” is nothing more than the gate lead of the FET, left loose in mid-air. A short scrap of wire three or four inches long would have increased the range greatly.

The circuit came to me from Bill Beaty, who posted a comment with the link to my February 18, 2013 Odd Lots entry. It consists of an MPF102 JFET, a generic red LED, and a 9V battery plus its associated connector. I lashed it up on a scrap of perfboard with a total of three solder joints. Bill found me because of this post, to an old Popular Electronics electroscope project using a 6J7 tube instead of an FET. (They didn’t have MPF102s in 1961.)

Sure, it’s a stunt, but I was in a stunt mood. Remember, if you try this and it takes a little more than five minutes, that I’m good at this stuff, and had gathered all the parts to my workbench before starting the clock. And clock it I did: the stopwatch said 4:39 when I snapped in the battery, leaned toward the gate lead, and saw the light come on.

I’m still considering a tube-based device using some sort of neon light more exotic than an NE-2. I’m considering an NE-34, and would have had one by now if they didn’t cost so much. Or an Aerolux bulb, if I’m feeling Art Nouveau-ish. Those cost even more.

I can feel my resistance crumbling. Remember: It’s futile.

The Surplus Survivors

I’m trying to clean up the shop a little and free up space, and one of the places I need space the most is in my file cabinet. I’ve been accumulating catalogs for electronic parts and equipment for years untold, and each gets a folder in the top drawer, so that invoices and catalogs can live together. (I want to know what I ordered from who, when. The system works well.)

So I asked myself a week or two ago, How many of these firms are still in business? I began looking them up on the Web. An amazing number are still out there and still selling parts and odd junk like they were back in the 90s. Here is a list of the survivors so far:

There were, of course, some casualties:

  • Brigar Electronics, Binghampton NY.
  • Burghardt Amateur Center. Still there, but now a repair shop only.
  • Classic Radio, Houston.
  • DC Electronics, Scottsdale. Sold to Philmore.
  • Edlie’s Electronics, Levittown.
  • Fertik’s Electronics, Philly. Leon was a character. Appreciation here.
  • Ocean State Electronics, RI. Flood apparently did them in.
  • Two Fox Electrix, Tivoli, NY

I didn’t list firms that vanished prior to 1990. I used to order lots of stuff from Poly Paks in the 70s, but they’ve been gone a long time. Ditto Tri-Tek, with their embarrassing mascot Amp’l Annie. Nor am I counting the manufacturers’ distributors like Mouser, Digi-Key, and so on. The file drawer has folders for tool vendors, wood products dealers, and non-electronics firms of many sorts, which also had winners and losers that I won’t tally here. (Many of you may know that Small Parts, Inc. has been bought and converted to Amazon Supply.) A number of used book dealers I bought from regularly in the early 1990s are, not surprisingly, gone. One survivor in that category is Bequaert Old Books, which I knew as Rainy Day Books in the early 90s and heartily endorse, especially for old ham books and “boys'” electronics and science books. Frank survived by moving his sales fulfillment to AbeBooks, as the others did not.

The upshot is that the file drawer isn’t a great deal emptier than it was yesterday. I’m good with that, since some of these firms (like Playthings of the Past) are very nearly the sole source for certain items. What I marvel at is how long some of these companies have been around, and how well they’ve weathered our near-constant recession since 2008. The Web helps. Print catalogs and postage are expensive. The good news is that there seems to be enough people like me to float a quirky industry that looks like everybody’s picture of a hoarder’s basement. As grim as these times may be, there’s always something worth celebrating!

Pirates vs. Ebooks: A Webinar

Very quick note here: I will be giving a webinar today on ebook piracy and DRM at noon Mountain Time (11:00 Pacific Time, 1 PM Central Time) to a site called Book Street Cafe, based in Phoenix but not geographically limited except by time zones. It was founded by some of my friends from the now-folded Arizona Book Publishing Association, which I belonged to all the time I lived in Scottsdale and acted as president for two years. The webinar is scheduled for 45 minutes, with another 15 minutes for questions and discussion.

Book Street Cafe is a paid membership organization, but they’ve given me a one-time link for my webinar that I can post. If you want to participate, click here.

You’ll have to either have Java running or download the Citrix app that underlies the GoToMeeting technology. You’ll be able to do the download when you click to the site. I know that Java is in a bad odor right now, but the Citrix app is relatively small and only takes a few seconds to download and install.

The presentation is oriented toward print book publishers who are nervous about ebook piracy and are considering DRM. It is not a techie show. It draws on research and positions I’ve presented on Contra for several years.

We’d love to have you. Try to log in a little early so that you make sure you’re properly connected.

The Raspberry Pi Keyboard Stutter Problem

When I first cabled up and ran my Raspberry Pi board, it worked like a charm, first time. I was powering it with the Motorola Droid X2 charger that I had stolen from the kitchen desk upstairs. To keep peace in the valley, I went out and bought a cheap Micro-USB phone charger at Best Buy. It booted normally, but then, when I tried to log in, the keyboard began repeating characters. I’d type in “pi” and see a parade of extraneous i’s march in stately fashion across the display:

piiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

Needless to say, I couldn’t log in. Now, this didn’t happen every time, but probably half of all logins I attempted failed, with the same keyboard jitter. I tried two other USB keyboards I had on the shelf plus the known-good one attached to my GX620 USFF, and saw exactly the same behavior. It clearly wasn’t the keyboard itself. I’m using a Dell SK-8135 keyboard, which has a 2-port USB hub to which a Dell USB optical mouse is connected. This leaves one USB port on the RPi free, with any luck to use for thumb drive add-in storage. More on that once I figure it out.

Anyway. Some googling suggested a power supply shortfall. I got out my DVM and put the probes on test points 1 and 2. These are minuscule “doughnut” pads on the RPi circuit board. One is labeled TP1, the other TP2. Hunt around on the board for them; it’s not like there are a lot of square inches to search. TP1 is located next to the 220 uF filter cap at the Micro USB jack. TP2 is right next to the yellow RCA jack.

The RPi is designed to work at 5V. Anything much below that and things may start getting flaky. My reading across the test points was 4.72V. Aha! We now have a new phone charger for the kitchen desk–a cool one with a retractable cord–and I decided to dedicate the old one to the RPi. With the original Motorola Droid X2 charger in the wall, I measured 5.03V across the test points. Shazam! No more keyboard stutter.

I’m not sure it’s a question of the RPi drawing more current than the charger can provide. The Droid X2 charger that works is rated 850 ma. The no-name charger that provided only 4.72 volts is rated 2.1 A. Current sourcing ability is important, especially since different USB keyboards and mice draw different amounts of power–but accurate voltage is just as important. I’m guessing it’s sloppy voltage regulation in the cheap charger. If you’re getting keyboard weirdness, put your DVM on the test points and see what your charger is feeding the RPi.

What? You don’t have a DVM? No Pi for you!

The RPi Enthroned

I wonder how many Raspberry Pi boards will spend their entire working lives sitting cockeyed on a desk somewhere, at the center of a tangle of cables. That’s how mine was until a couple of days ago, when despite my cough I allowed myself a few minutes of quality screwdriver time to pull a proper RPi system together.workstation-500wide.jpg

It didn’t take much. Mostly what it took was a 2004-era Dell SX270 all-in-one system minus the SX270, which I now use as a bookend. The key component is a heavy stainless steel base with a VESA monitor mount and a bracket to hold the SX270 behind the monitor. The monitor itself is an unexceptional Dell 1704fp, with a native resolution of 1280 X 1024. (Those now sell for ~$50 on eBay.) That’s more than enough pixels for an RPi, although I tested it on one of my 21″ 1600 X 1200 behemoths and the little gadget did quite well overall.

BackView-500wide.jpg

I had already mounted the board on an aluminum plate, and all I had to do this time was drill two holes and bolt the plate to the SX270 mounting bracket. I may dress the wires a little to keep them from placing any torque on the connectors, but it works well as-is.

I was surprised to find out that the MagPi magazine is actually laid out on an RPi, using the open-source Scribus layout program. I installed Scribus via apt-get and poured some text into a layout. (I’ve been playing with Scribus for years.) Brisk! I guess we need to stop boggling at the capabilities of tiny little computers with all of two ICs on the mobo.

It certainly does a good job with FreePascal and Lazarus, which is why I went to all this trouble. They’ve now sold half a million of these things. At least a few of those people ought to be willing to buy a Lazarus tutorial for it. We’ll see.

Out, Out, Damned 2012!

I think we misunderstood the Mayans. (Like that’s hard?) They weren’t talking about the end of the world. They were telling us to hang in there: The end of 2012 was at hand. I’d drink to that, and tonight I probably will.

Boy. I’d like to wash this year right out of my hair–and I don’t have a whole lot of hair.

I had had high hopes of relaxing on the shores of Lake McConaughy with a kite string in my hand and one foot in the water on the day I turned 60, but no: Damfool Colorado had to catch fire. Jimi Henton fled to our house with all her dogs (and two of ours) when the smoke got too thick at her place, and while no one we knew well was injured or lost their homes, it was a near enough thing, especially having seen it on the news from 1100 miles away.

Deaths and serious illnesses continued to whittle away at my circle of friends. A lot of that simply happens as you climb into your sixties, but that doesn’t mean I have to like it. It was unnerving to check the Facebook page of a woman I knew in college, only to find that she had died over a year ago. Other good friends had open-heart surgery, cancer surgery, and lesser but nonetheless confounding failures in the meat-suit machinery. Indeed, I had a few of my own.

Then of course there was the tribal hatefest we call elections, when people I thought I knew gave themselves over completely to a species of slobbering, eyes-rolled-back-in-the-head rage against The Other that was terrifying to behold. This is the way that genocide begins, and I was under a pall until it was over. Even then, it took weeks to shake off the depression. And even now, there are a few people who simply will not let it go. It’s a psychological truth that I originally found in Colin Wilson’s writings: Once we grant ourselves permission to hate, it feels good and is devilishly hard to give up.

I know it makes me sound like a crank, but maybe it’s a cause worth cranking on: We must stop this national orgy of partisan hatred.

I guess there were some upsides to 2012. I finished my first full-sized novel since 1999, and only the second I’ve done since high school. My nephew Brian proposed to his beautiful girlfriend of many years, Ali, and we have a big-bash wedding to look forward to next September. I gave my accumulated hoard of Lego to our nieces Katie and Julie, and they’re loving it. I continued to be startled by the richness to be found in loving Carol, as I have now for 43 years. (I’m fond of saying that I fell in love with her half an hour before I even met her.) QBit still jumps into my lap whenever he can. I’ve made new friends (particularly in my Thursday night writing group) and rekindled my love of Pascal programming, now that Lazarus is ready for prime time. We threw a couple of nerd parties that people are still talking about.

2012, bleahhh. I’m going to go downstairs and watch a movie with my forever girlfriend, and toast to Lady Julian with a glass of Roscato wine and a slice of Lou Malnati pizza. Hope heals. Stomach lining regrows. Scar tissue means that you weren’t hiding behind the couch the whole time.

Cut to the chase: All manner of thing will fersure be well. But man, the bottle of Advil is empty.

Continuity Pass

I should never promise anything “tomorrow.” Most of the time, the universe conspires with itself to make a liar of me…as it did this time.

Anyway. I have just completed the second pass through Ten Gentle Opportunities. It’s what I call a “continuity pass.” The goal is to ensure that the story makes reasonable sense, taking particular care to repair “plot holes.” It’s not really a polish pass. In a very real sense it’s a tech edit, like those I used to do on magazine articles and still do on book-related material from time to time. Here are some of the things I watch for, and fix when found:

  • People, things, or ideas introduced early in the story but never mentioned again. We all know that stories grow in the telling–but they also contract, and in doing so early elements sometimes get squeezed out. This is especially important in stories (like this one) that took a long, long time to tell.
  • Things introduced later in the story that are not “foreshadowed” and thus may strike the reader as a complete surprise, or (worse) deus ex machina.
  • “Jumps” in a character’s emotional state. Growth and change are important in characterization, and have to be done out where the reader can watch them happen. If a character changes too abruptly, or off where the change can’t be seen, it sounds hokey.
  • General inconsistencies in the ways people and things are treated early on in the story vs. later in the story.
  • Finally, to make sure that all the made-up words are spelled the same way throughout. (This isn’t trivial when the story contains proper names like Ttrynngbrokklynnygyggug and Jrikkjroggmugg.) I originally coined a lot of proper names from Stypek’s universe that had no vowels in them at all, but in workshopping chapters I found that nobody thought this was amusing but me. (Maybe I was a little too impressed with the famous 90’s gag about Clinton air-dropping vowels on Bosnia.) I went back and added just enough vowels to suggest a pronunciation.

There is still polishing to be done, and here and there some stiff rewriting. I simply don’t like Chapter 57, for example. I intend to rewrite it from scratch once I get a little emotional distance from the story. As it’s only 1200 words, the rewriting won’t take long. The rest of the polishing to be done involves watching for “echoes” (words used more than once a little too close in the manuscript) and probably eliminating some adverbs, though I think the current campaign against adverbs is a deranged fetish perpetrated mostly by bad writers and people who teach writing without writing much of anything themselves. Polishing is a separate pass and my next challenge. Much of the first half of the book has already been polished (I’m a compulsive polisher) so the pass won’t take long.

I’ve sent the story to my beta testers, and now I’m waiting to get some reactions. In the meantime there’s a root canal in my future this Wednesday morning. It’s nothing I haven’t known about for some time, and I’ve been through enough of them to have a reasonable idea what I’m in for. One peculiarity of my biochemistry is that the nitrous oxide gas used as a calming agent by some oral surgeons simply doesn’t work for me. The surgeon doing the procedure has an office with an interesting gimmick: flat-panel TV sets in the ceiling, so that while he’s drilling out your molar you can lean back and watch Raiders of the Lost Ark. As for the inevitable anxiety in the runup to a root canal, I suspect that ativan steps in where nitrous fails. We’ll find out on Wednesday.