Skip to: site navigation/presentation
Skip to: Thoughts From Eric

Archive: 'Questions' Category

Questions and Answers

“Dad, where is the core of the house?” the youngest asked me this morning, as I made his lunch for school.

I might’ve answered differently if he’d asked me what, but this was specifically where.  Still, I wanted to be sure what he meant, so I asked what he meant by “the core.”  It turned out that, as I thought, he wanted to know the location of the center of the house, like the core of an apple.

I didn’t ask why he wanted to know.  I try not to, in cases like this, although sometimes I say something like, “Why do you ask?  It’s okay that you want to know, I’m just curious about what led to that question.”  But I try to reserve that for questions that seem like they could lead to dangerous activity—e.g., “What would happen if I jumped off a roof?”  (Which, to be clear, I don’t think he’s ever asked, but if he did, I’d answer his question seriously and then ask why he wanted to know.)

This time, I just said, “It’s a good question!  Let’s figure it out.”

First I had him determine which was wider, the living room or the dining room.  He counted off steps and determined the living room was wider.  Then he counted the steps across the front hall (such as it is), and then added up the steps from the three spaces.  They had been big steps, so it was 18 steps across the house.

More steps were taken to measure the house front to back, at which point we figured out that the center was somewhere in the  main stairwell.  (Also the only stairwell.)  But then I threw the curveball: we’d measured the house side to side and front to back.  What else had to be measured?

He thought hard a moment, and then he got it.  The slow-blooming grin on his face was priceless.  Then he laughed.  “How am I supposed to count steps from the basement to the attic?!?  I can’t walk in the air, of course!!”

So we counted the floors and their heights in our heads, and considered that the roof’s peak was a bit higher than the attic ceiling, but that the attic and basement had lower ceilings than the first and second floors.  In the end, we decided the core of the house was probably the step just below the first landing of the stairwell, about two-thirds of the way across it.  He sat in that spot, looking pleased and maybe a little smug.  Then he slid down the stairs, telling me his head felt weird when he thought about how he was sitting in the exact center of the house.

A few minutes later, he’d hauled out the deluxe snap circuit set his uncle had gotten him for Christmas, and was building a circuit of his own making.  Once it was completed, we talked about current flows and why the fan went slower and the light came on when he opened the switch, and the light went off and the fan sped up when it was closed.

And then it was off to kindergarten.  As we walked up the street, he asked why a leaf had moved closer to the door when he slammed it shut instead of being blown further away, so we talked about fluid displacement.  The conversation lasted until he spotted a friend getting out of a car, at which point he ran off to compare outfits.  (Today was Pajama Day at the school.)

I love talking with him about the world and how it works, because it lets me see the world through new eyes.  I felt the same way when I had the same kinds of conversations with his sisters.  It’s a cliché that a small child constantly asking “Why?” is annoying and exasperating, but not to me.  I never, ever want them to stop asking why.  I will always answer their questions, or tell them I don’t know and we’ll find out together.  The internet makes that last part much, much easier than in the past, admittedly.

I have another reason to always give an answer, though.

If I always answer my childrens’ questions, I teach them that questions are okay, that questioning is a good thing.  And more importantly to me, I teach them that they can come to me with anything, and be taken seriously.  Kat feels and acts the same, thankfully.

This has been a real advantage with our eldest, as she moves through middle school and into her teenage years.  She knows she can be honest with us.  More than once, she’s come to us with serious situations in her peer group, and known that we will listen, take her concerns seriously, and will act as needed.  She’s… well, I don’t know if she’s exactly comfortable discussing the biological ramifications of growing up, but she’s able to do so without hesitation or shame.  Because she knows I’ll take her seriously, and listen to her, and not tell her she’s wrong or inappropriate.  A lifetime of answering her questions about ice and airplanes and the Moon and the color of the sky taught her that.

Always listen.  Always give an answer, even if it’s “I don’t know.”  Always take them seriously.

Because one day, that open door may give them a place to go for help and shelter, right when they most need it.

Proper Filter Installation

I ran into an interesting conceptual dilemma yesterday while I was building a test page for the filter property.  In a way, it reminded me a bit of Dan Cederholm’s classic SimpleQuizzes, even though it’s not about HTML.

First, a bit of background.  When I set up test suites, directories of example files, or even browser-based figures for a book, I tend to follow a pattern of having all the HTML (or, rarely, XML) files in a single directory.  Inside that directory, I’ll have subdirectories containing the style sheets, images, fonts, and so on.  I tend to call these c/, i/, and f/, but imagine they’re called css/, images/, and fonts/ if that helps.  The names aren’t particularly important—it’s the organizational structure that matters here.

So, with that groundwork in place, here’s what happened: I wrote some SVG filters, and put them into an SVG file for referencing via the url(filters.svg#fragment) filter function pattern.  So I had this SVG file that didn’t actually visually render anything; it was just a collection of filters to be applied via CSS.

I clicked-and-held the mouse button, preparing to drag the file into a subdirectory…and suddenly stopped.  Where should I put it?  css/, or images/?  It clearly wasn’t CSS.  Even if I were to rename css/ to styles/, are filter definitions really styles?  I’m not sure they are.  But then, what is an image that has no visual output?

(Insert “one hand clapping” reference here.)

Sure, I could set up an svg/ subdirectory, but then I’d just end up with SVG images (as in, SVGs that actually have visual output) mingled in with the filter-file… and furthermore, segregated from all the other images, the PNGs and JPGs still hanging out in images/.  That seems weird.

I could establish a filters/ subdirectory, but that seems like overkill when I only planned to have a single file containing all the filters; and besides, I’m not in the habit of creating subdirectories that relate to only a single HTML file.

I could dodge the whole question by establishing a generic assets/ subdirectory, although I’ve long been of the opinion assets/, when it isn’t used to toss in all of your assets classes in their own subdirectories, is just a fancy alias for misc/.  And I dislike tossing stuff into misc/, the messy kitchen junk drawer of any project.

I came to a decision in the end, but I’m not going to tell you what it was, because I’m curious: what would you do in that situation?


This is a thing I’ve been trying to figure out in my spare time, mostly noodling about in my head with various ideas when I have some down time, and now I want to know if there’s a formal answer of some sort.  It goes like this: in a lot of situations, ranging from airplane autopilots to self-driving cars (I think) to videogames, there are times when you want a moving object to get itself as precisely as possible with a known path.  For example, having the autopilot line up with the approach path for a runway.

So how is that done?  What’s the general approach to programming a moving thing to find, with decent efficiency, its way onto a given path in 3D space?  Or in 2D space, if that’s easier to understand?  I can think of a few naïve approaches, but none of them seem anywhere near robust enough to be trusted.

Transiently Damaged PDF Attachments

I have this very odd problem that seems to be some combination of PDF, Acrobat, Outlook, Thunderbird, and maybe even IMAP and GMail.  I know, right?

The problem is that certain PDFs sent to me by a single individual won’t open at first.  I’ll get one as an email attachment.  I drag the attachment to a folder in my (Snow Leopard) Finder and double-click it to open.  The error dialog I immediately get from Acrobat Professional is:

There was an error opening this document. The file is damaged and could not be repaired.

Preview, on the other hand, tells me:

The file “[redacted]” could not be opened.  It may be damaged or use a file format that Preview doesn’t recognize.

When this happens, I tell the person who sent me the file that The Problem has happened again.  She sends me the exact same file as an attachment.  Literally, she just takes the same file she sent before and drags it onto the new message to send to me again.

And this re-sent file opens without incident.  Every time.  Furthermore, extra re-sends open without incident.  I recently had her send me the same initially damaged file five times, some attached to replies and others to brand-new messages.  All of them opened flawlessly.  The initially damaged file remained damaged.

Furthermore, if I go through the GMail web interface, I can view the initial attached PDF (the one my OS X applications say is damaged) through the GMail UI without trouble.  If I download that attachment to my hard drive, it similarly opens in Acrobat (and Preview) without trouble.

A major indication of damage: that first download is a different size than all the others.  In the most recent instance, the damaged file is 680,302 bytes.  The undamaged files are all 689,188 bytes.  If only I knew why it’s damaged the first time, and not all the others!

So far, I’ve yet to see this happen with PDFs from anyone else, but then I receive very few attached PDFs from people other than this one (our events manager at An Event Apart, who sends and receives PDFs and Office documents like they’re conversational speech—an occupational hazard of her line of work), and it only seems to happen with PDFs of image scans that she’s created.  Other types of PDFs, whether she generated them or not, seem to come through fine; ditto for other file types, like Word documents.  I’d be tempted to blame the scanning software, but again: the exact same file is damaged the first time, and fine on every subsequent re-attachment.

I’ve done some Googling, and found scattered advice on ways clear up corrupted-PDF-attachment problems in Thunderbird.  I’ve followed these pieces of advice, and nothing has helped.  In summary, I have so far:

  1. Set mail.server.default.fetch_by_chunks to false.
  2. Set mail.imap.mime_parts_on_demand to false.
  3. Set mail.server.default.mime_parts_on_demand to false.
  4. Tried the Thunderbird extension OPENATTACHMENTBYEXTENSION.  That failed, and so I immediately uninstalled it because handling files by extension alone is just asking to be pwned, regardless of your operating system or personal level of datanoia.  (I wouldn’t have left it installed had it worked; I just wanted to see if it did work as a data point.)

Here’s what I know about the various systems in play here:

  • I’m using Thunderbird 11.0.1 on OS X 10.6.8.
  • The attachments are always sent via Outlook 2010 on Windows 7.
  • The software used for the scanning is the HP scanning software that was installed with the scanner.  Scans are saved to the hard drive, renamed, and then manually attached to the email.  On resend, the same file is manually attached to the email.
  • My email account is a GMail IMAP account.

So.  Any ideas?

Degree of Influence

A brief followup to “A Question of Degree“:  I received the following message from the person who first asked the question:

I just spent the last hour or so reading through the comments and, let me tell you, I can’t express how much they helped me! It is now clearly obvious to me that finishing my CS degree is the way to go. A CS degree can make me a better web developer by teaching me about algorithm design and analysis, performance issues, and just how to think like an engineer. Also, since the web changes constantly, a degree will help me embrace those changes. It will always be there for me to fall back on if the web industry doesn’t work out for me.

Thank you to everyone who contributed to the discussion, either in the comments here or elsewhere on the net.  You made a positive difference in this world.  Take pride in that, for it is the most important thing any of us can do.

A Question of Degree

I recently found myself asked for advice, which feels odd even at the best of times, and this was (it seemed to me) of a particularly serious nature.  I’m curious to know what you think is the proper answer.

A few days back, I got e-mail with the following questions:

…in your opinion, how useful is a computer science degree for a career in web development? I’m a second year CS major, and considering dropping out because I don’t see the value in it anymore. It’s just taking away my time from learning and doing what I love most–developing web apps. Will dropping out hurt me later on?

I chewed on it for a day or so and then ended up writing the following in response:

I wish I could give you a definitive answer, but the honest truth is that I’m conflicted.  I’m not the only one, either: a recent survey of 26,000+ web professionals indicated that just over half felt their education had some relevance to what they do (

To use myself as an example, I got my degree (in History, as it happens), but that was before there was such a thing as a career in web development.  The same is true for a lot of the people I think of as contemporary to me; that is, people about my age.  Almost none of them have CS degrees, and many don’t have degrees at all.  I got my job as webmaster of a respected research school because I worked there already and nobody else had ever heard of the web.  I doubt very much that, were I just now exiting school and entering the market, I could do anything like that.

On the other hand, I will say that in the computer field in general, and web in particular, very few people seem to care what degree you do or don’t have.  But here’s the rub: these days, it might be that having a CS degree is what gets you that first job or two.

On the other other hand, if you build some killer web apps, nobody will care about your schooling.  They’ll care about your portfolio.  I don’t know if that lies in front of you, of course.  Maybe it does.  Or maybe it’s a good idea to finish schooling so that you’ll be paper qualified for jobs that say “Requires CS degree or equivalent” if you need to seek them out.

So, to get back to your original question, “It is unless it isn’t” is about the best I can do.  As someone who values education very highly and knows a degree can be an asset in job-seeking, my instinct is to tell you to finish your degree.  As someone who has a lot of contact with successful people who didn’t do that, my intellect requires me to say it’s not critical.

A day past when I sent it, I still don’t feel any less torn.  (And in re-reading what I wrote, I can see my indecision in the writing: scattered, whipping from one side to the other.  Man, did that one ever need an editor!)  I don’t really need to know what people think of what I said, but I’m really curious to know what you would advise this young person.  Leave your thoughts in the comments, if you please, and I’ll make sure word of your input gets passed along to the student who wrote me.  Thanks!

Addendum 12 Nov 10: please see “Degree of Influence” to see how things turned out.

Digging in the Mud

There’s something about the Diggbroglio that has left me scratching my head:  how is it that so many people are up in arms about the DiggBar when they’ve had nothing to say about the framing bars of StumbleUpon, FaceBook, etc. etc.?

Now, please note that I’m not saying the DiggBar, or any other framing bar, is cool and we should all love it.  I’m not.  I absolutely, completely, totally get all the reasons why framing bars are bad for breaking bookmarking and navigating and search engines and copyright and hijacking content and so on.  But that’s precisely why I’m so confused, because we’ve known for years now that framing bars are bad mojo—and yet StumbleUpon, for example, is based on bars.  There is a browser extension/plugin StumbleUpon thingy you can install, but there’s also a web-based framing bar thing (see this link, for example) that they offer, and I bet people use.  You don’t have to be a member to use it: I hit that link in a browser that allows cross-site frame loading and I get the bar and the page it’s framing, and I’ve never been a StumbleUpon member.  The source shows it’s using iframes to make it happen.  So far as I can tell, it’s not really different from the DiggBar.

So why do we have people writing JavaScript and PHP and Ged-knows-what-else that specifically busts out of the DiggBar framing, instead of busting out of all framing?  After all, site framing is universally agreed to be objectionable; even yet-to-be-discovered life forms orbiting distant stars think it’s a bad idea.  So why is one instance of it being targeted while the rest are tolerated?  Why are we all not just using if (top != self) {top.location.replace(self.location.href);} and other-language equivalents?  Yes, I know, some of you do just that, but why isn’t everyone?

Perhaps because I have yet to eradicate a stubborn streak of faith in the rationality of my peers, I assume that there’s some technical difference here that I’m missing and that, once understood, would let me understand the source of the outcry.  So can someone please explain to me, or point at an explanation that states, the technical ways in which the DiggBar is worse enough than already-extant framing bars that it’s triggered this outrage?  Again, nobody has to enumerate the complete list of the DiggBar’s sins; I understand.  A list of any different and more egregious sins would be just fine, though.

Also, if anyone comes up with a way to bust out of the frames while still preserving the bar—that is, correcting the problems framing bars cause while preserving their functionality for the people who want to use them—that would be extra-cool.  After all, people who use those services like the bars.  If we could let them browse the web the way they prefer while fixing bookmark/SEO/etc. problems framing bars can cause, that would be a win all the way around.

Update 14 Apr 09: looks like Porter‘s trying to keep the bar without the framing.

Update 16 Apr 09: in his post about Digg changing the way the DiggBar will work, John Gruber lists (by way of quoting Digg VP John Quinn’s post about it) the two things that made the DiggBar extra-objectionable (at least in his eyes).  Thanks, John!

Time and Motion

I was reading an article on cosmology, as I am sometimes wont to do, and it brought back to me one of those questions that I’ve had for a while now, concerning the redshifting of light from distant galaxies as it relates to the history and expansion of the universe.

For those of you not familiar with this topic, the general idea here is that when we look at galaxies outside our own, the light they give off is shifted toward the redder end of the electromagnetic spectrum, which means the wavelengths are getting longer.  According to our present understanding of physics, the simplest explanation for this observation that the further away a galaxy is, the faster it is receding from us—thus redshifting the light it gives off, thanks to the Doppler effect.  It turns out that the amount of redshifting is directly and linearly proportional to the distance of the galaxy, a ratio named the Hubble constant in honor of Edwin Hubble, the man who first made this observation.  (He’s also the namesake of the Hubble Space Telescope, of course.)

It seems to me that this explanation  either overlooks or glosses over one kind of important point: we don’t see those galaxies as they are right now.  In fact, we’re seeing them as they were in the past, and the further out we look, the further back in time we’re looking.  If a galaxy is a five million light-years distant, then we see it as it was five million years ago.  Double the distance, and double the amount of time involved, which would seem to mean that greater redshifts are as much a product of how far back in time we’re looking as they are distance.

So why is it that distance is regarded as the primary factor here?  Why don’t we assume that the universe’s expansion is actually slowing down, given that the closer things are (and therefore the more recent they are), the less quickly they’re receding, whereas the really distant (and therefore much, much older) galaxies were receding more quickly back then?

I’ve no doubt this has been explained one way or another by people way smarter than me, but some Googling yielded no decent results—just about everything I came up with challenged the Hubble constant on various and sundry grounds, not all of them sensical (at least to me).  Nothing I found addressed this specifically.  Though I figure the explanation is straightforward enough, I don’t seem to be using the right search terms to find it.  Anyone got any help for me here?

March 2017