The Signs of Science

One of the best parts of the March for Science Sarah and I attended on April 22, 2017, in Washington, D.C., was the nearly endless creativity the marchers put into their signs. Not too many were repeated, and few would have been considered offensive. The preview image here is my sign, cribbed from “Stand back! I’m going to try science!” of XKCD origin.

All the signs we photographed:

Signs of Science
Hemorrhoids treatment then: Burning hot irons. Now: We have a cream. Support medical research so your life doesn't suck.
Hemorrhoids treatment then: Burning hot irons. Now: We have a cream. Support medical research so your life doesn't suck.
Hemorrhoids treatment then: Burning hot irons. Now: We have a cream. Support medical research so your life doesn't suck.
« 1 of 107 »

 

TramBot (Originally published in 1998 or 1999)

The TramBot—When my nephew Dave Matheson (a veterinary grad student at Prince Edward Island) stopped in for a day-long visit, we constructed a TramBot that ran on a string stretched across an upstairs room with a light-activated set of “grabs”—perfect for bombing runs. This was inspired by the “Bomber Fly” seen in assorted Lego media.

Yes, I Always Over-Design

If you’ve seen the Bomber Fly in the Lego publications, then you will immediately notice that my creation is much bigger, and probably heavier. I developed a fear of minimalism after my very first RIS creation quite literally shook itself to pieces in under 10 seconds.

Features and Innovation Details

  • The forward-reverse pulleys are driven by a belt drive, although a geared drive would have been fine in this case.
  • There are bumpers connected to touch sensors on each end that reverse the drive pulley motor when triggered. Because the string is at about a 45º angle to the wall, we added the tires to keep the bumper rods from slipping. (Before this was done, the bumpers would sometimes just glance off the wall without triggering the touch sensors, as the robot tried to keep moving.)
  • We solved the problem of timing on the “grabs” (the name alludes to Gerry Anderson’s Supermarionation Thunderbirds program—see http://www.gis.net/~fm/) by using a belt drive, and setting the motor run time to one second longer than the absolute maximum necessary. This allowed the grabs to automatically re-synchronize, be movable by hand, and grip objects of various sizes.
  • The grabs are light-triggered. We used the Lego light sensor, and programmed it so that a flashlight beamed on it would trigger the grabs’ open or close sequence. This allowed for precise payload delivery.

 


My sons Isaac and John, my Nephew Dave, and I perform some final adjustments and testing.

To Boldly Go …

3-Year-Old Builds Lego MindStorms Robot

Isaac’s First Robot—The “Punching Robot”

(Original date, approximately 1998.)

Hey, He Was Only 3

At three years old, my son Isaac might have been the youngest person ever to construct a Lego MindStorms project. Although he calls it a robot, it is more of a contraption than a real robot … but I cannot help but be impressed.

Isaac built this entirely without help—he even connected the RCX to the motor properly on his own. The design is entirely his; I never built anything similar.

Isaac grins as he contemplates his world conquest.

This contraption, which he calls a “punching robot,” uses an assortment of Lego axles that rest within a 40t gear, that is directly mounted on the motor. Attached to several of the outer axles are the shock absorber pieces. These shock absorber pieces extend outward from the central gear when the motor is activated, and will repeatedly punch whatever the robot is placed near.

A close-up of the punching mechanism.

Crazy to Get to Space

Remember Scotty’s remark about his nephew in Star Trek II: The Wrath of Khan? (No, of course you don’t.) Scotty explains to Kirk, after an inappropriately emotional response by Midshipman Preston: “My sister’s youngest, Admiral. Crazy to get to space.”

going-to-space
“Come on, R2, we’re going.”

Although I never pursued a career as an astronaut, I certainly remain, “Crazy to get to space,” and the description from Khan still resonates with me. I may yet get there, in my lifetime, especially with companies like SpaceX competing to make the cost of getting to orbit as low as possible.

For now, I’m going to have to settle for a proxy. Eliszabeth* MacDougal, one of the human family members I inherited when I married Sarah Latimer, has a friend, Cian Branco, who offered her the chance to send something small up on the Terrior Improved Orion rocket as part of the RockSat-C program. Eliszabeth realized this would be thrilling to me, and passed along her opportunity.

I ordered a new Lego R2-D2 minifigure, and a few parts to complete another mini-me as an astronaut, and shipped them off to Eliszabeth. They will be going up on Thursday, June 23, 2016, somewhere between 6:00 and 10:00 am, from the NASA facility at Wallops Island, Virginia. (My son, David, and I stood on our roof in the cold in October, 2014, to watch a night launch from Wallops.)

Geeking out!

Thank you, Eliszabeth!

New: I have just learned that my minifigs will have company on this voyage: Benny, from The Lego Movie will also be on this flight.

———————–

*Yes, this is the correct spelling.

————————

Update: (June 23, 2016)

:: sigh :: Postponed until tomorrow.

postponed

————————

Update: (June 24, 2016) I got up early to watch the launch today! In my mind, I was thinking, Saturn V. Long, slow acceleration. This is, uh, quite a bit smaller, and it zoomed upward so quickly I missed the rocket itself in the launch video screen capture. (The video will be posted soon by NASA/Wallops, anyway.) The crew was worried about missing the launch window due to weather, and debated skipping the camera alignment step. In addition to the pad camera, there was a UAV (drone) flying around, as some of the pictures below show.

The rocket got to its apogee of 119.08 km (74.0 miles) almost immediately. The payload detached successfully, and hit splashdown in the Atlantic, where it would be recovered, only 8 or 9 minutes later.

Very exciting! I reiterate my gratitude.

Here’s the official NASA post: NASA Successfully Launches Suborbital Rocket from Wallops.

kdiff3 6242016 60716 AMs

kdiff3 6242016 60327 AMs

kdiff3 6242016 60614 AMs

kdiff3 6242016 60617 AMs

————————

Update: (June 24, 2016, 16:05) Just got the official word from Cian: “Hey Doug, will send pics a bit later, currently wrecked. Your minis all went up and returned fine. I have pics of reintegration. Cheers!”

————————

Here's the recovered payload module, showing where my guys were attached in their Crew Module.
Here’s the recovered payload module, showing where my guys were attached in their “Crew Module.”
The Crew Module was carefully sealed with electrical tape.
The Crew Module was carefully sealed with electrical tape.
 Another view of the Crew Module.
Another view of the Crew Module.
Here's how the minifigures actually traveled.
Here’s how the minifigures actually traveled.
 And here they are, reassembled, along with Benny, who was glued into another part of the payload module
And here they are, reassembled, along with Benny, who was glued into another part of the payload module.

Video of the Launch:

Video from an observer to whom I am grateful.

Here is the launch from the NASA/Wallops feed!

Dear QuickBooks:

Dear Intuit/QuickBooks:

When importing an IIF (Intuit Interchange Format) file, you might report “The NAME field in this file is too long” as something other than “Error on line X – You can’t change the type of a name or a add a duplicate name.” (You may recall, this is the same problem that remains unfixed from QuickBooks ’99.)

—A Customer

P.S.: Thank you for removing my online banking support, unless I choose to upgrade for several hundred dollars.

ux_fail

Pagination Control While Printing in Flex: Unwrap mx.printing.FlexPrintJob’s Private flash.printing.PrintJob Variable

I’ve worked with Adobe’s Flex platform now for several years, beginning with my Star Trek transporter simulator, a project I wrote for a Boston University course.

Now, my job at Transparent Language involves mostly FFA (Flash/Flex/AIR) development, and I enjoy the challenges of working in this fairly cutting-edge environment. This week, though, I was shocked by an apparent limitation in the mx.printing.FlexPrintJob class: It doesn’t return the operating system’s print dialog information to the Flex application. So, if I want to print, say, the first five pages of a document, it cannot normally be done. It’s all or nothing, regardless of what I specify in the OS print dialog.

Windows XP operating system print dialog.

The FlexPrintJob class wraps an older class, PrintJob. The primary difference is that PrintJob, designed for Flash, takes a Sprite as passed parameter to its addPage() function, whereas FlexPrintJob’s equivalent addObject() takes a UIObject. Fair enough.

But, what’s weird, is that the FlexPrintJob class contains a private PrintJob object, but it doesn’t expose any of the useful properties of that PrintJob object, except pageHeight and pageWidth. Want the printer name? The first and last pages in the page range the user has entered? The paper size? The orientation? Forget it! None of them are accessible.

Granted, most of these properties are AIR-only, but I’m working on an AIR project, and it would be darned useful for my users to be able to control their output, which can often run to many tens of pages, so I really need access to the properties of the “hidden” PrintJob object.

Thankfully, there’s a relatively easy solution. I can du plicate the FlexPrintJob class, and add accessors (getters) that will allow me to read the variables I need. Normally, I’d extend the class, but because the object and properties I need are private, I can’t even do that. I have to essentially clone the class, and add what I need to it. Thankfully, FlexPrintJob is part of Adobe’s code that has been open-sourced, so I can do this with impunity, and even distribute it.

So, I open the FlexPrintJob code, copy it to an empty class, rename it to FlexPrintJobExtended, and remove the reference to import Version.as, and add the following:

//--------------------------------------------------------------------------
//
//  Additional accessors for PrintJob object
//
//--------------------------------------------------------------------------

public function get copies():int {
    return printJob.copies;
}

public function get firstPage():int {
    return printJob.firstPage;
}

public function get isColor():Boolean {
    return printJob.isColor;
}

public function get jobName():String {
    return printJob.jobName;
}

public function get lastPage():int {
    return printJob.lastPage;
}

public function get maxPixelsPerInch():Number {
    return printJob.maxPixelsPerInch;
}

public function get orientation():String {
    return printJob.orientation;
}

public function get paperArea():Rectangle {
    return printJob.paperArea;
}

public function get paperHeight():int {
    return printJob.paperHeight;
}

public function get paperWidth():int {
    return printJob.paperWidth;
}

public function get printableArea():Rectangle {
    return printJob.printableArea;
}

public function get printer():String {
    return printJob.printer;
}

Then, wherever I needed the FlexPrintJob class, I can then use my FlexPrintJobExtended class instead, and get access to all the glorious properties on the now-much-friendlier printJob object. Note that I’ve kept the properties read-only, by only writing getters. I did not envision any need to change the values: I only wanted to know what the user told the operating system.

The next obstacle is in the sample code provided for printing multipage documents. Begin by consulting the published examples for Printing with multipage PrintDataGrid controls. I’m not going to elaborate too much on this, merely illustrate how to get to the next step, printing multiple pages using the pages the user specified.

Looking at the section of the sample code marked with // The function to print the output, there are only a few things we need to change.

First, we need to change the FlexPrintJob instance created to use our new class:

// Create a FlexPrintJobExtended instance.
var printJob:FlexPrintJobExtended = new FlexPrintJobExtended();

The user might not have chosen to start on page one, so we need to advance to the first page the user has chosen.

// Jump to the first specified page, not necessarily page 1.
while (errorPrintView.pageNumber < printJob.firstPage && errorPrintView.printGrid.validNextPage) {
	thePrintView.printGrid.nextPage();
	thePrintView.pageNumber++;
}

Then we modify the

while(true)

so that it won't go further than the number of pages the user has specified.

// Loop through the following code until all pages are queued.
// If the user has chosen to print all pages, printJob.lastPage will be zero.
while(printJob.lastPage == 0 || thePrintView.pageNumber <= printJob.lastPage)

Voila!

Feel free to download the code cited in this post: FlexPrintJobCode.zip.

If you find this to be useful, or find a better way to do it, let me know, by e-mailing "doug" at this domain. Cheers!

What to Do When Comcast’s Norton Security Suite Breaks Your Shared Resources

Comcast has recently switched its provided-for-free antivirus vendor from McAfee to Norton Security Suite, from Symantec. The subscriptions to McAfee Security Suite are due to expire in May. (Norton is named after Peter Norton, a true god of early personal computing utilities back when DOS was king and before all the cool things Peter wrote got licensed by Microsoft for use within their operating systems.

Overall, this is probably a good move, as Symantec’s 2010 offering seems to have recovered its lagging performance, and surged ahead of McAfee in the ratings.

A month ago, I installed Norton on our mostly-gaming-and-homework computer to see how it would run. I hadn’t had any real problem with Norton, and it does seem to be less intrusive than McAfee was, doing most of its scanning during idle times. I also switched our church’s media computer over to use it, and had only one minor problem that a reboot fixed.

(I should interject that “the cloud” has allowed me to radically de-task my specific-machine-focused life, so that, for most of the things that were so critical before, it now doesn’t matter which computer I use. Our wilcoxfamily.net e-mail and calendar are hooked to Google Apps; my notes are in Evernote, frequently accessed files are in DropBox, and even remote access tasks can be handled through LogMeIn.)

Last night I decided to switch from McAfee to Norton on the computer that gets the most use at home. This is the one that hosts our shared printer. I ran the installer from Comcast for Norton, which automatically uninstalls McAfee, lets you reboot, and installs Norton. There didn’t appear to be any problems … until Isaac tried to print from the other machine, and got an error.

I checked the cables, successfully printed from the host machine, but nothing I did would fix the printing. I also discovered that trying to get to my host machine’s C drive from the network wouldn’t work (usually we do \{machinename}c$ to open it as a network share), although the D drive would open. I tried disabling the Norton firewall and anitvirus temporarily, but the network resources still wouldn’t connect.

I fired up a chat session with a Symantec representative named Srini, and he checked my spooler settings. Ultimately Srini wasn’t able to help. While this fairly slow support was going on, I hit the Web, searching for one of the error messages I received while trying to open the C drive, “Not enough server storage is available to process this command.” Among other results indicating the same problem, I found a KnowledgeBase article at Microsoft that describes the symptoms and a possible fix. I also discovered a number of posts suggesting that this was a relatively common problem with Symantec products, although other products or networking configurations can produce the same symptoms.

So, having nothing to lose, I took a stab at fixing the IRPStackSize property in my registry. In my case, the key didn’t exist, so I added it by using RegEdit to navigate to the HKEY_LOCAL_MACHINESystemCurrentControlSetServicesLanmanServerParameters key, and then added a new DWORD named IRPStackSize (the capitalization is important). I right-clicked on the new key, and edited the decimal value to 18 (hexadecimal 12). Then I restarted the computer, which is necessary for the change to work.

Setting the IRPStackSize parameter in the registry editor.
Yep, there's your problem right here: Setting the IRPStackSize parameter in the registry editor.

Upon restart, my network resources were accessible again, and printing to the shared printer worked perfectly. Tonight I’ll try to contact the Symantec representative again and let him know how this was fixed.