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

The Scale of the Solar System (or, the Solar System to Scale)

“Space,” [The Hitchhiker’s Guide to the Galaxy] says, “is big. Really big. You just won’t believe how vastly, hugely, mindbogglingly big it is. I mean, you may think it’s a long way down the road to the chemist’s, but that’s just peanuts to space, listen …

Inspired by this NASA Web page, and Miss Sarah’s work-related interest in space science (too bad she spent all those years not reading science fiction), we decided to lay out our solar system in a manageable scale, complete with to-scale outlines of each planet.

Naomi plants herself just outside the orbit of Mars.
(Naomi plants herself just outside the orbit of Mars.)

Here are the scale sizes and distances, along with the real distances.

Body Diameter (mm) Avg. Distance
(yards)
Distance (in) Avg. Distance
in AUs
km miles
Sun 17.00 0.0 0.0 0.0 0 0
Mercury 0.06 0.8 28.8 0.4 58,000,000 35,000,000
Venus 0.15 1.4 50.4 0.7 108,000,000 67,000,000
Earth 0.16 2.0 72.0 1.0 150,000,000 93,000,000
Mars 0.08 3.0 108.0 1.5 228,000,000 142,000,000
(Asteroids) 0.00 4.0 to 8.0 144.0 to 288.0 2.0 to 4.0 450,000,000 279,000,000
Jupiter 1.75 10.5 378.0 5.2 778,000,000 484,000,000
Saturn 1.47 19.0 684.0 9.5 1,427,000,000 887,000,000
Uranus 0.62 38.0 1,368.0 19.0 2,871,000,000 1,784,000,000
Neptune 0.60 60.0 2,160.0 30.0 4,498,000,000 2,795,000,000
Pluto (avg) 0.03 79.0 2,844.0 39.5 5,906,000,000 3,670,000,000
Voyager 1* See http://voyager.jpl.nasa.gov/where/ 138.4 20,707,634,708 12,867,127,667
Voyager 2* for current locations of Voyager 1 and Voyager 2. 114.2 17,089,103,421 10,618,676,567

*Distances of Voyager 1 and 2 are as of May 2, 2017.

Isaac and Naomi lay out the inner planets.
Isaac and Naomi lay out the inner planets.

I’ve made a Google Sheets spreadsheet with this data publicly available, here.

You can also grab and print this Acrobat/PDF file which has the sun and planets to the same scale as the planetary distances: planets_to_scale.pdf. At this scale, the sun is only 17 mm in diameter, Jupiter is tiny, and the inner planets are nearly invisible.

tiny_planets

DSCN3009
(“It’s cold outside, there’s no kind of atmosphere, I’m all alone, more or less …”)

Now, are you ready to have your mind blown?

Our nearest neighboring star is a binary star, Alpha Centauri. It would be, if we could see it from the northern hemisphere. It’s about 4.3 light years (271,930.8 AUs; 25,277,549,200,000 miles; 40,680,272,100,000 km) away.

At the scales we’re dealing with, how far away do you think Alpha Centauri would be?

Think carefully. When you’re sure, follow this link for the answer.

Space … is … big.

Building a Future with LEGO: My Nephew Andrew Roberts

(Excerpt from the Community Advocate Newspaper, Friday, February 3, 2012, article by Sue Wambolt, Contributing Writer.)

Marlborough – Prior to November 2011, Andrew Roberts worked for County House Research performing in-court background checks. By the end of November, though, he retired to pursue his lifelong passion, building Army tanks with LEGOs.

Lego tank and APC, designed and built by Andrew Roberts.
A sample of the many tanks that can be built with Andrew Robert’s LEGO kits.

Roberts’ love for LEGOs began at age 5 when he was given a big bucket of the brightly colored building blocks as a gift, and he has been playing with them ever since. About two years ago, Roberts heard about a man who was building World War II tanks out of LEGOs. Intrigued, he decided to build his own LEGO tank which he then put on eBay – and it sold. He made another and it sold as well, snowballing into something bigger than Roberts could have anticipated.

… Read the full article at the Community Advocate Newspaper site.

Andrew Roberts poses with a Lego M1 tank he designed and built.
Andrew Roberts has made building with LEGOs a full-time business.

To see or purchase any of Andrew’s sets or instructions, visit his eBay store: http://stores.ebay.com/Battle-Brick.

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!

Nope, Nothing Familiar Here

On the left is Psycho, with his nanosuit in strength mode, from the Crysis game. On the right is a movie poster from Green Lantern. See any similarities?

Of course, this isn’t the first time the Crysis Nanosuit has been copied in film. [cough]GI Joe: The Rise of Cobra[/cough].

Minecraft

We became involved with Minecraft early in its beta development cycle. Frankly, it’s been amazing and fascinating. We operate our own server at home, modded with Runecraft so we could make teleporters (generally it’s up from early evening until the morning), and have started to add more users to the system. There are still some open slots, if you’re interested in joining us.

The new addition of powered rail boosters has gotten us rail-and-rollercoaster-crazy.

My Little April Fool

When I got home yesterday, I discovered that NaNi had put her snow day time to very good use.

R2 looks a little different. But he does have a huge smile.
"Dad, please lifted up the helmit."
Under the helmet ...
NaNi did some redecorating.
"Hay, you. Kiss me, please."
"No. Well, just one. I love this!!! Happy April Fool's Day. I love you, Dad. "Thank you for the kiss, you kind Jedi."
I love the details. Lipstick attached to the phaser.
... and matching shoes.