Archive for the ‘Doug’ Category

h1

The Lord YOUR God

November 13, 2014

But Isaac said to his son, “How is it that you have found it so quickly, my son?” He answered, “Because the LORD your God granted me success.” (Gen 27:20, ESV)

(Image: Isaac Blessing Jacob, Govert Flinck, oil on canvas, 1638, currently in the Rijksmuseum, Amsterdam.)

(Image: Isaac Blessing Jacob, Govert Flinck, oil on canvas, 1638, currently in the Rijksmuseum, Amsterdam.)

I find the specific choice of words, “the LORD your God” to be troubling, especially as a parent.

I want my children to have a personal faith of their own. I don’t want them to think of the Lord as “That God my dad worships.”

Actually, I want them to have a more real, personal faith than I had at their ages—living and tempered by both love and righteousness, by faith and reason.

It would be quite a long time before Jacob could truly call the Lord his own God, not merely that of his father.

h1

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

October 11, 2014

“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.

h1

Not a Prayer

September 18, 2013
When no prayer finds my lips,
And Your blows crush me to the earth,
And the light from above cannot illuminate 
The mire of my sorrow,

Then
   in my torment,
   in my lament,
   in the despair of my soul,

You begin to find me,
Though blackness remains.

(I was inspired to poetry during the Michael Card concert, and jotted this down. It is reminiscent of the utter blackness of what happened 3 years ago, and, thus, autobiographical, but not recent.)

h1

Imponderably Improbable

March 5, 2013

This weekend’s This American Life program was entitled, “No Coincidence, No Story,” and featured a huge selection of fascinating short stories.

Life is full of coincidences, but I’ve never experienced one that seems more improbable than this:

In 1995, I was visiting the Rondon family in the Dominican Republic, and spent some time looking through their library. A book that caught my eye was, La Ira del Tirano, a book by Miguel Guerrero, about the assassination attempt Trujillo (a truly “wonderful” dictator) made against the then-president of Venezuela, Rómulo Ernesto Betancourt Bello, who had the nerve to support democracy in Latin America.

The Rondon children explained that Guerrero was a friend of the family, and I borrowed the book to read to improve my relatively meager Spanish skills. (It would take me years to get through, but it was, eventually, helpful.)

Later that day, I was passing about a quarter hour of free time when the kids were watching television together, the only time in a full week in which the television was on. They had tuned to the Nickelodeon channel, and a filler program was running, showing on-the-spot interviews conducted with random visitors to Universal Studios, Florida.

In those few minutes of time, among the thousands of visitors to Universal Studios that day, at the only moments we were actually watching television, who was selected for an interview but the book’s author, Miguel Guerrero himself!

Imponderably improbable.

h1

God Is Born

December 24, 2012

Around Christmas, I always think about my favorite Christmas hymn: “God is Born” (“Bóg się rodzi”). I’ve only got one recording of it in English, on an old cassette entitled “An English Christmas.” It is the National Christmas Hymn in Poland, where it originated. Here’s what I’ve been able to transcribe from the English version I have:

“God is Born”

God is born and night is shaken
He the Heaven’s King lies naked.
The living Word knows brightness darkened,
He the Limitless takes limit.
Born disdained yet worship given,
Mortal, yet the Lord eternal.
Now indeed the Word made flesh
Has come on earth to dwell among us.

What hast thou, O Heaven better,
God abandoned thy perfection?
Here to share the trial and sorrow
Of His poor, beloved people.
Suffered much and suffered dearly,
For we all were guilty sinners,
Now indeed the Word made flesh
Has come on earth to dwell among us.

Born into a common stable,
He is cradled in a manager.
How then tell me what surrounds you
Hay and peace and simple shepherds.
You were ones who had the honor
Him to greet, and kings came bowing.
Now indeed the Word made flesh
Has come on earth to dwell among us.

I love the old hymns that are filled with such great doctrine. (So much of our modern popular and sacred music is vacuous—or at best superficial—by comparison.) Here the subject is the Incarnation: God the Son lowering Himself to become one of us. Wow!

Have a listen:

h1

Sympathetic Lines of a Father to a Daughter in Bed with Mumps

April 2, 2012

Periodically, I do a search for this poem we memorized in high school. Today, at last, I found a slightly flawed version of it online, and was able to use that to get a corrected version via Google Books. The poem was published in Baxter’s Explore the Book, in a lesson on Ecclesiastes, although there is no author attribution, it is, indeed, delightfully sarcastically entitled …

Sympathetic Lines of a Father to a Daughter in Bed with Mumps

Thus generations come and go,
From youth to age they wiser grow;
Yet as they pass they all relate
They learn their lessons just too late.
Our junior wisecracks dodge the truth
That dense old parents once were youth,
That present youth must older grow,
Oft haunted by, “I told you so,”
And all their youthful bombast rue
When they as parents suffer too!

When they as parents suffer too,
As with strange certainty they do,
They marvel at the self-sure ways
The next relay of youth displays.
They hear the same old arguments
Arrayed in fresh accoutrements—
The times are different, so are we,
Just let us have our way, and see.
For artful Nature oft repays
Her rebels in ironic ways.

Thus generations, as they go,
Perpetuate the tale of woe.
They will not learn from yesterday,
But choose to learn the harder way—
Experience shall be teacher, please;
And well he teaches—but what fees!
What fees he charges those he schools
Before he makes wise men of fools!
How oft his scholars have confessed,
“Ah yes, poor Dad and Mum knew best!”

Each generation soon is past,
So sure at first, so sad at last.
As ranks of youth successive rise,
Each thinks, “We are supremely wise.”
They each a lot more knowledge know,
And yet a bit less wisdom show.
O sanguine youth, God’s word revere—
Honor your parents while they’re here;
And you will find in later days
What handsome dividends it pays!

h1

Beaten by Children

February 23, 2012

Each Friday evening I take a class in Mandarin at the Chelmsford Chinese Language School. After that class, I go to chess club, while Naomi studies Chinese Folk Dance. I wrote this at the end of last year.

Carissa is quietly contemplative. She keeps her body movements still, with a level of concentration that seems incongruous with her age. She looks disarming. Yet she plays chess with such aggression that I find myself doing nothing more than react to her constant attacks the entire game, with no chance to implement a winning strategy of my own.

Jeffrey is “all boy.” Every time he makes a good move, his whole body shakes with elation. He laughs with glee every time he puts forth another reveal, or forces me to choose which of two pieces I am going to have eaten by his.

I am 42. They are both just seven years old. In addition to their age, they have one other thing in common: They absolutely destroy me at chess.

But the children weren’t the only ones who learn and improve. I go back every week, and I get better.

h1

From We to Me

December 5, 2011

An involuntary divorce is, quite frankly, a terrible event. I doubt that will surprise anyone. There are dozens of expected perils and adjustments. It is tragic, and painful beyond belief.

But that pain does, eventually, well and truly end. One adjusts. Balance returns. Life becomes fabulous again.

But occasionally, there are bits of adjustment that are just plain odd or unexpected.

The one of these, with which I struggle constantly, is whether to use the plural first person pronoun, we, to describe events in the past that were performed when there was a we. Do I say, “We always wanted a daughter, and had the name Naomi chosen for many years,” or should it be, “I always wanted …”?

As the time passes, I still find myself waffling on this one. Some weeks I strongly lean toward, “I will describe things as they were,” and other weeks I think, “No! I have to be clear that I’m single. What if some unmarried Nobel-prize-for-science-winning* supermodel missionary gal is eavesdropping on this conversation and mistakenly thinks I am married?”

Anyway, these are the kinds of post-divorce things that nobody talks about.

Cheers.

*No, the Nobel Prize for Economics does not count. (I have standards, you know.)

(And, yes, I know that I am not using parallel structure in the title. The rhyme seemed more appropriate.)

h1

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

June 10, 2011

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!

h1

Dance Macadam

March 1, 2011

Naomi had been very, very sick for almost 10 days—double ear and ear canal infections, that we finally got under control. Even though she stayed home from school, she hadn’t had a fever all day, and I let her go to ballet. (Isaac took care of her while I was at work—my first day back in the office in a while. I am very grateful that Transparent Language has such excellent work-from-home infrastructure.) So I went home, got her ready for ballet (tights need help), and off we went. Gate City Ballet is pretty much on the same street as my job, so I normally drop her off, go back to work, and pick her up at the end.
Naomi with her artwork.

On the way to ballet, we stopped at the school department offices, where one of her pieces of artwork is being displayed. Naomi was thrilled to see it.

Naomi's Art on Display at the Nashua School System Offices.

Naomi's Art on Display at the Nashua School System Offices.

We got to ballet (on time, even—everything in Nashua is close and convenient), and she exclaimed, “My ballet bag!”

I said, “No problem, you can see if they will let you start in your stockings,” and I went home to get the bag. I picked it up, and realized there were no tap shoes in it. So, I hunted around her room to find tap shoes, and put them in the bag, and delivered them to ballet.

“Dad, these are my old tap shoes. They hurt my feet if I wear them.”

I laughed. “Okay, I’ll be back in a bit.” Back to the house … play the “find the real tap shoes” game—not as easy as finding the wrong pair. Back to the ballet studio. Along with a sweater she forgot to pack.

I hold up the correct shoes and the sweaters. Naomi beams and blows me a kiss.

I am in Heaven.

It's two years old, but this is still one of my favorite ballet photos of NaNi.

It's two years old, but this is still one of my favorite ballet photos of NaNi.