Thoughts From Eric Archive

On Blinksale

Published 20 years, 10 months past

Partially because it’s been touted as a great XHTML+CSS-based application, and partially because I could use better invoice management, I signed up for a free Blinksale account.  Having spent some time fiddling around with it, I’ll be the first to say that I’m pretty impressed by what’s under the hood.  The markup is just about as clean as a Web application gets, and it generally uses the right elements in the right places.  It might be a little div-heavy, but that’s not an easy thing to avoid.  The gang at Firewheel has done solid work there.

On the other hand, the visual design of Blinksale totally hurts my eyes.  Those are some amazing shades of green, boys.  I really wish they didn’t clash in quite that way.  Also, the entire application feels rather like a copy of Basecamp, from the way it’s organized to the ability to get activity feeds to the “Remember me for 2 weeks” login option.  Those are, of course, all nice options to have in this sort of application, but they still feel like copies.

The help system, on the other hand, turned out to be an enormously deep resource once I drilled in a bit.  Just about anything you could possibly want to know about Blinksale is in there somewhere, I’d wager.  Firewheel has definitely raised the bar there, and gets an enthusiastic round of applause for it.

Beyond that, Blinksale seems like it would be great for hourly consulting, or for invoicing items that are shipped to the customer.  For my purposes, though, it isn’t really an invoicing system.  Most of my work involves traveling to clients to conduct in-person training, so in addition to the consulting fee, there are expenses to bill and receipts to submit.  In some cases, there are clients who would likely refuse to accept a web-based invoice.

So I could use it as a way to track which invoices have gone out and which have been paid, but I could do that with an Excel spreadsheet or a Filemaker Pro database, or heck, I could even whip up my own little PHP/mySQL solution.  Adding in all the extra stuff, like e-mailed invoices and reminders and thank-yous, would be time-consuming, and it would be a truly major effort to add my own PayPal integration, as Blinksale has done.  It probably wouldn’t be anywhere near as polished (although it also wouldn’t have those retina-searing color combinations).  For basic invoice tracking, though, I’d be able to do everything Blinksale offers me, and not have limitations like only being able to store a total of three clients, or being limited to three invoices per month.

Now, remember, I’m talking about what it will do for me.  I’d like to stress that my situation is somewhat unique: not many freelance consultants earn a living in training.  For a freelance designer or even a small design shop, I can totally see Blinksale as being a great application to use.  I doubt I’ll see a need to upgrade to a paid account—but your mileage, as ever, may vary.


Mail Turbulence

Published 20 years, 10 months past

Between last night and late this morning, no mail was delivered to any address (mine, Kat’s, anyone else) at meyerweb.com.  This happened because the mail server was so overloaded by the latest joy and sunshine from our bretheren in the mass-mailing industry that it basically died.  Those lovable little spammers—is there anything they can’t ruin?

I’m told that, in theory, any mail that was sent during that period should eventually make its way to us.  However, there’s always a chance that an upstream mail server would decide to drop the mail instead of retry delivery, so there’s no guarantee of its arrival.  If you’ve sent us anything critical in the last 24 hours, you might want to send it again, just to be on the safe side.  If it’s non-critical, better to wait a few days to see if there’s a successful redelivery attempt.


Help Wanted: IE/Win Script Weirdness

Published 20 years, 10 months past

Okay, JavaScript / DOM scripting gurus, I need your help.  Explorer for Windows is completely baffling me and hopefully one of you out there can determine what’s making it act so peculiar.  To see the problems, go to the debug version of HYDEsim in IE/Win and compare the the results to those in Firefox.

Problem #1 is that the rounding function I wrote doesn’t seem to be working right (though this could be an effect of VirtualPC).  Here’s the function:

function round(x,dp) {
	var rt = Math.pow(10,dp);
	return Math.round(x*rt) / rt;
}

That’s it.  All it’s supposed to do is round off a number to the given number of decimal points.  Thus, var test = round(3.1415926539,3) should return 3.142.  In IE/Win, instead of the expected 0.71, I’m getting results like 0.7100000000000001.  Huh?  Where the heck did that come from?  Is this fallout from that Intel rounding bug everyone was smirking about five years ago, or what?

Problem #2 is perhaps more obvious: the Great Big Circles on the map.  I’m creating the GIcon objects correctly, passing in the height and width of each one.  The top left corner placement is correct for each marker.  They just haven’t been resized in any way at all, and so are being drawn at their inherent 1000-by-1000 size.  Is this a breakdown in IE/Win, the Google Maps API, or something else?  I tried passing pre-rounded values and it didn’t seem to help.  Am I stuck here, or is there a solution?

Many thanks for any help you can provide.


HYDEsim Update

Published 20 years, 10 months past

I’ve updated HYDEsim to include a key explaining the various overpressure effects—it’s at the bottom of the page—as well as to use generally improved code, having discovered the joys of for (var x in y).

I’ve also been pounding my head against the Google Maps API as I try to figure out how to read and set the map type correctly, so I can include the map type in the link parameters.  What’s in the documentation seems wildly different from what I’m getting.  When I query map.getCurrentMapType(), for example, I don’t get a type, I get a whole array of stuff that looks insanely cool and useful but is all apparently undefined and therefore useless.

On an even less happy note, the tool has completely broken in IE/Win.  Given the lack of anything resembling a useful JavaScript console in Explorer, I have no idea what’s happening, or why.  Sorry about that, IE users.  It works fine in Firefox and Safari.  If someone figures out the problem, let me know in a comment.

In the meantime, here are some approximations of a few famous historical high-yield explosions:

And, just for extra fun, here are two fictional explosions.

That last one assumes I got the yield right, which I may not have, since I don’t own the book and haven’t read since it came out in hardcover.  If I remembered incorrectly, let me know what the actual yield was (not the incorrect yield that was first estimated, but the correct one that came later in the book) and I’ll correct the link.  Thanks.

Update: thanks to assistance from some helpful folks and some fun hacking around IE/Win’s flaws, the tool is back to working in IE/Win.  Yay.


Why I Blog

Published 20 years, 10 months past

Molly asks why we blog.  I don’t know why you blog, but I know why I blog.  Therefore, it’s time to blog about blogging.  (Not nearly so brilliantly as did Shelley, I admit.)

Though I still detest the word “blog”.  I’m not too keen on the chronoillogical order of posting, either, but that’s a whole other barrel of fish.

My journal here is a way of communicating, which is one of the most powerful drives humans possess.  Just about everything I’ve done professionally has had, at its core, the intent of making it easier for people to communicate.  Back at CWRU, for example, I wrote a series of HTML tutorials in order to help lower the barrier to publishing information online.  For me, meyerweb.com started life as a way to connect with readers of my then-forthcoming O’Reilly book, as well as with folks who were already familiar with my work in CSS.  Posts were mostly technical or book-related at first.  Over time, I started to mix more of myself and my personal view of the world into the site.

Like Molly, I’ve gotten negative feedback here and there.  Some people have attacked me for views I’ve expressed; others berated me for wasting their time with non-technical posts; a few even insulted and belittled me for daring to not precisely meet their expectations.  I did eventually set up separate technical and personal syndication feeds, along with a combined feed, although most of the reason I did it was so that my non-technical friends could keep up with the site, not the other way around.  I find it slightly depressing that the technical feed is one of the most popular URLs on the site.  Apparently, many of my readers are only interested in what I can teach them, and not in who I am.

In that light, it might seem foolish to continue putting time and energy into personal posts,  but I am steadfast in my conviction that suppressing the personal side of the site would be far  more foolish.  I can summarize why I believe this with a single incident.

Early this year, I posted a personal entry about communicating with Carolyn via sign language.  Soon after, I got e-mail from a reader—a name many of you would recognize, as it happens—thanking me for that post.

His son, you see, does not speak, and never has.  The son is more than old enough to be verbal, and is in all other ways mentally normal and healthy.  He has simply never started to talk.  It had never occurred to the correspondent that sign language might be an option for communication.  Learning that Kat and I had successfully taught sign language to Carolyn, a child less than half his son’s age, was a revelation for him.  It was, potentially, a truly life-changing moment for his entire family.

That is why I will never stop posting my thoughts, sharing my views, and trying to connect with readers on a personal level.  That is why the occasional complaints or flames that I’m too personal or too facile or too arrogant or too liberal or too whatever just roll off my back, as interesting and injurious to me as last month’s weather report.  And that is why I think the people who only read technical posts, here or on any site, are doing themselves a grave disservice.  They’re closing themselves off to more than they can possibly know.


Security Checks

Published 20 years, 10 months past

Wednesday morning, as I stood in line to buy a bagel from a street kiosk on the corner of 39th Street and Lexington Avenue, I observed a pair of policemen with a bomb-sniffing dog who were checking out a pair of propane tanks sitting in a box on the sidewalk.  Standing nearby were two soldiers, one carrying an assault rifle in an alert guard position, his finger laid next to the trigger.  He watched the crowds streaming past with a grim, almost dead expression.  It may have been the heat that oppressed us all was affecting him doubly, in his full camouflage dress and carrying a pack and weapon, a cap upon his head.  It may have been his awareness that if this were a real bomb, he’d be only the fifth of many to die, milliseconds after the policemen, their dog, and his comrade.  He may simply have been bored by yet another false alarm.

Thursday morning, I heard the news from London—another series of explosions, patterned much like the ones that came before, but mercifully less damaging.  I remembered how, while in London six weeks earlier, an abandoned package at the station near Picadilly Circus had triggered a security alert, shutting down the Central Line we were riding at the time and forcing us into the cloud-softened sunlight above.  I wondered how many suicide bombers England could produce.  Later in the day came the news that London police had shot to death a man on the subway.  It seems not so long ago that the stereotype of an English policeman was that his only weapon was to shout, “Stop!  Or I’ll say stop again!”

Friday afternoon, I took a cab to Penn Station and caught the train to Newark Liberty International Airport, where the security lines were surprisingly short.  As I rolled my suitcase through the concourse, the daily tabloids all screamed that random baggage searches were being conducted on New York City’s subway system.

This morning, as Carolyn climbed the stairs of her favorite slide at the local playground, I stood below and struggled to moderate my instinct to protect her from any possible harm, knowing that a few honest scrapes and bruises are a part of growing up—maybe an essential part—and that she would almost certainly get down the slide, smiling in delight, without hurting herself in any way.

But I still ask myself and will ask myself how much pain is too much, and how much protection is too much, every day of her life.


A Family Loss

Published 20 years, 10 months past

In the week leading up to the Independence Day (U.S.) holiday, my father’s side of the family gathered for its annual reunion.  This was a big year, with practically everyone there—my father and his siblings, and their assorted children and grandchildren.  There were only two people out of 33 that did not plan to be there.  Even my father’s mother, a 97-year-old widow with very limited mobility and physical reserves, made the trek to upstate New York to be a part of the festivities.

In the week before the reunion, one of my father’s sisters-in-law—aunt to me and my cousins—fell and cut her leg.  Complications, including a pulmonary clot, put her in the hospital for a few days.  So it looked as though aunt Audrey and her husband Tren, my father’s brother, would miss the reunion.

In the end, Tren did come to the reunion after all, but not as any of us would have wished:  Audrey died the morning of the second day of the reunion.

On the first day of July, with almost the entire family present, from my grandmother down to her many great-grandchildren, we held a memorial service for Audrey.  We were able, thanks to some fantastic coincidences, to secure some wonderful musicians to play a small selection of tunes.  The service was held with the family in a circle, sitting in a room facing a cliff that dropped into a glacial lake.  The sun was bright in a cloud-dotted sky as various family members shared their thoughts and memories of Audrey.

With my attention on Carolyn and some of the other little ones, I did not manage to speak up, but there is little I could have said besides this small thing, to Tren and Audrey’s son, Don: It is a terrible thing to lose a mother, but a truly wonderful thing to have had, for however brief a time all those years may seem, a mother as loving as she.

Yesterday, we gathered again in Tren and Audrey’s home town of Cincinnati to wish her farewell along with the congregation of her church.  Afterward, I gave Tren a card which I hope gave him some comfort.  It read:

When you look up tonight, don’t think of them as stars.  Think of them as porch lights welcoming your loved one home.


Working With Google Maps

Published 20 years, 10 months past

As I worked on HYDEsim, I discovered some interesting things about the Google Maps API.  Well, let’s call them what they are: limitations.

(And let me say right up front that if I missed ways to get around these limitations, then I’ll happily be corrected.  Either way, these are the impressions of someone whose first project in the API took about two days, and was in the end basically a success, which speaks volumes to the quality of the API.)

The first and most important limitation was that the Google Maps API permits the creation of two types of objects.  The first type is icons, the most obvious example of which are those little push-pin symbols in Google Maps that mark locations.  The second is polylines, which are how Google Maps draws the “get from here to there” routes on the maps.  You get both any time you ask for driving directions, like these from Norwalk, CT to New York City, NY.

Note that they’re polylines, not polygons.  You could certainly draw a polygonal shape using a polyline, but you couldn’t easily fill it with a color, let alone a translucent color.  And as for a circle… well, if you want to draw enough line segments so that you approximate the roundness of a circle, you certainly can.  It just doesn’t seem like a great idea.  Plus there’s no simple way to fill it in.

So in order to draw the overpressure rings, I created a 1000×1000 pixel 24-bit PNG of a circle.  To create a ring, I first used the Google Maps API to figure out the latitude and longitude boundaries of the map.  From that, I determined the number of miles per degree based on the latitude, and then calculated the number of miles per pixel (mpp) within the view.  From there, I determined how wide a ring needed to be to be the right size, created an icon at that size using the big PNG, and added it as an icon.

Whew.

Okay, so that solved the problem of putting the rings on the map.  What it didn’t solve was what happened if the zoom level changed, because icons (being raster images) don’t zoom with the map.  By default, you wouldn’t want them to: if the pushpin kept growing with the map as you zoomed in, eventually it would get huge and blocky and obscure half the view.

Therefore, the upshot was that every time the zoom level changed, I had to rip away the rings and rebuild them entirely, based on the new mpp value.  It was easy to trigger the process:

GEvent.addListener(map, "zoom", zoomLimit);

That’s the API at work for me.  I just tack a listener onto the zoom event, and I’m ready to go.  Cool.  Rebuilding the icons—well, not so cool, although it doesn’t seem to kill the tool’s performance.

All this zoom handling was necessary because icons, as you might expect, are given dimensions in pixels.  Polylines, on the other hand, have each point defined with longitude/latitude coordinates.  That’s why polylines do scale with change in zoom level—as, again, you’d want them to do by default.  If I could have defined my icons’ sizes using longitude/latitude measures instead of pixels, I could have avoided the whole “recalculate the ring sizes every time the zoom level changes” bit and shaved two or three hours off of my development time.  (Which was, in total, 12 hours or less.)

Of course, if the API provided polygonal primitives, I’d have avoided even more hackery.  If I could have just drawn the circles as circles, using longitudinal degrees as the unit of sizing, then there’d have been even less work and a shorter development time.  Something like this:

var base = new GShape();
base.type = circle;
base.anchor = new GPoint(-73.9971, 40.7223);  // longitude,latitude
base.radius = 0.0273548;  // degrees of latitude

…or something to that effect, with properties for the color and thickness of the outline, and also for the color and transparency of the interior.  And so on.

By doing it this way, the shapes (and there could easily be many other types) would be like filled polylines, and would scale in size along with the map.  That would have made HYDESim a whole lot easier to create.

You might say, “That’s all well and good, Eric, but how many reasons are there to draw circles on a map besides charting widespread destruction?”  I thought of a few possibilities:

  • Explicitly showing the scope of a “show me hotels within this many miles of the specified address” type of request
  • Someone looking to recreate the WIMPUR map in Google Maps
  • Plotting Iridium flare intensities

I’m sure there are countless more.  As well, allowing for actual filled polygons would add extra possibilities to applications like chicagocrime.org, which uses polylines to draw ZIP code boundaries.  With filled polygons, they could shade the ZIP code in question… or shade all other ZIP codes while leaving the current one unshaded, in order to give it some extra visual pop.

There was one other thing I encountered that’s either a limitation, or I just couldn’t figure out how to deal with it.  If you click on a detonation point in HYDESim, it pops up a “blowup” window (their term, not mine!) that shows a zoomed-in view of that point on the map.  The overpressure ring overlays are faithfully reproduced on that map, but they aren’t scaled to its zoom level.  They exactly match the overlays on the main map, and zooming in and out in that window has no scaling effects.

Ideally, I’d just remove the overlays from the zoom window while leaving them in place on the larger map.  I couldn’t find a way to do it.  Failing that, I wanted to have the overlays correctly scaled.  No dice there either.  If there is a way to do either of these and I missed it, hopefully someone will let me know.  If not, it’s something I hope the API adds in the future.

The final observation has to do with the icons and interactivity.  I wanted to set the overpressure rings to be event-transparent.  In other words, I wanted to make it so that the rings didn’t exist as far as the event model was concerned.  That way, you could click-and-drag the map even if there’s a ring underneath the mouse pointer.  This didn’t appear to be possible, although again, maybe I just couldn’t figure out how.  I did play around with the imageMap property, but it didn’t seem to have much effect.  Figuring that out would be nice, though.  I could leave the detonation point active for popping open the blowup window, and make the rest inert.

Other than that, things went as smoothly as you might expect they would for someone with limited JavaScript skills and no prior experience with the Google Maps API.  The examples provided by Google on the documentation page helped immensely, actually, especially the AJAX example.  That let me split the city list into a separate file, thus making it much easier to maintain, and get my first hands-on experience with AJAX programming.  (I’ve seen AJAX applications before—as long as three years ago, actually—but never written any code along those lines.)

Oh, and one more thing—the fact that the Google Maps API key only works for a specific directory, and not any of its subdirectories, drove me up the wall.  Instead of generating a key for meyerweb.com that would cover anything I might do on the site, I’ll have to generate a new key for every new directory.  This is why I set up the directory /eric/tools/gmap/, but that just seems so… confining.  Similarly, it was annoying that the key was completely bound to the full address.  I generated the key for meyerweb.com/eric/tools/gmap/, so if anyone types in www.meyerweb.com/eric/tools/gmap/ they’ll get a key error.  It would be nice if at some future time the keys were a little more flexible than they are now.


Browse the Archive

Earlier Entries

Later Entries