Posts in the Projects Category

Comment Turbulence

Published 19 years, 3 months past

Some of you may have tried to comment recently and been hit with a “comments are closed for the time being” error.  That was Gatekeeper, actually, and it was being tripped even by valid responses to the Gatekeeper challenge.  The weird thing is that some people were able to comment, whereas others were not.  I have no idea why this was happening.

The point of this being to say that I’ve updated Gatekeeper to return a more helpful error message, and also believe some changes I made should make gatekeeper less random.  If I’m wrong and you get an error, please use the e-mail link in the error message to send the error to me.  If I’m right and you get no error, then no worries.

If I get a lot of error reports, I’ll hobble or disable Gatekeeper, but I hope it doesn’t come to that.  We’ll see.  In the meantime, my sincere apologies to anyone who got bitten by this bug, and I hope things will be better from here on out.


HYDEsim Update

Published 19 years, 3 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.


Mapping Doomsday

Published 19 years, 4 months past

This past Friday night, in conversation with a couple of our friends, the subject of high school fears of annihilation came up.  Ferrett said he’d done a class project showing how, if New York City got hit with a nuclear warhead, his home town of Norwalk, CT would be destroyed as well.

“Wait a minute, that can’t be right,” I said.  “How far is it from Manhattan to Norwalk?”

He didn’t know for sure, so we went to Google Maps for a rough estimate.  49.2 miles, it said, although of course that’s a driving distance, not a straight-line measure.

Still, I felt confident in asserting that no way would Norwalk be destroyed.  Not even with a 20-megaton warhead, which was what he remembered using in his example.  A few windows might get shattered, and of course if the wind were from the southwest they’d be getting a whole lot of fallout.  But flattened?  No.  I was pretty sure not.

“Hold on,” I said, “I’ll be right back.”

I ran up to the library and went straight to the “military and arms control” shelf, where I pulled out my copy of “The Effects of Nuclear Weapons”, 3rd Edition (1977).  In the back, it has this handy “Nuclear Bomb Effects Computer”, a circular slide-rule type of affair.  You can fiddle with an online version of the calculator from the 2nd Edition (1962) of the same book, and the complete text of the 3rd Edition is also available online.  I went back downstairs and pulled out the calculator.

Humming to myself, I slipped and swished the dials until I came up with the answer a bit more severe than expected, but not terribly far off.  At a range of 45 miles, the maximum overpressure for an optimum-altitude air burst with a 20MT yield would be somewhere around 0.8psi.  The calculator actually doesn’t show overpressure figures below 1psi for optimum-altitude bursts, though it goes down to 0.1psi for ground bursts.  It also doesn’t go any higher than a 20MT yield.  A 0.8psi overpressure would shatter most windows, particularly those facing the shock wave, and might cause light damage to some residential homes.  The direct thermal radiation, even assuming line-of-sight to the fireball, would be less than 1 cal/cm2, which isn’t enough to cause any damage.  Otherwise, there would be a brief pulse of 30-mile-per-hour wind as the shock wave passed, and of course there would be EMP effects.  And, you know, fallout.

So it’s not like things would be all peaches and cream for the folks in Norwalk, but the town would still be standing.

At this point, I wondered if there were perhaps a tool online that would show this sort of information more visually.  I Googled a bit more, and came up with the Nuclear Weapon Effects Calculator, which lets you pick from a short list of cities, dial up the yield of your explosion, and click on the image to change the detonation point.  Guess where they got their data for the thermal ring, as well as the 5psi and 2psi thresholds?  Yep: “The Effects of Nuclear Weapons”, 3rd Edition.

That’s when my inner geek kicked into overdrive.  I’d been meaning to dig into the Google Maps API anyway, so I signed up for a key and developed my own version.  I call it HYDESim, which stands for “High-Yield Detonation Effects Simulator”.  You can pick from a list of cities or input any latitude/longitude coordinates Google Maps covers, set the yield you find most interesting, and see what the effects might be.  Each successive ring marks a successive overpressure threshold: 15psi, 5psi, 2psi, 1psi.  I included 0.25psi in the list because it’s the point at which even windows wouldn’t be damaged, but left it off the map because it was too huge.  (I thought about adding a way to switch psi rings on and off, and in the end didn’t feel like doing the necessary hackery.)  15psi is the point at which reinforced-concrete structures might be able to survive with severe damage; 5psi is where homes might start to survive with severe damage; and 2psi is where home damage drops to light.  Roughly speaking.

I didn’t include rings for thermal effects or electromagnetic pulses: this is strictly about blast wave damage.  It’s also “idealized”, which means that there’s no effort made to account for terrain changes, urban density, ground type, and so on.  The script just uses the formulae and information in the book to calculate maximum-overpressure distances for arbitrary yields, and plops down circles as appropriate.  So the “Simulator” part of the name is probably exceedingly grandiose.  Then again, you never know what a future spate of hacking might bring.

Also: apologies to New Yorkers that your city is the default target, but its destruction and the follow-on physical effects in Norwalk are what got me started on this… and, let’s face it, in any wide-scale nuclear conflict, you’d have been the top city on the target list.

Doing this was an interesting exercise in both Google Maps programming and lightweight AJAX, which I’d also been meaning to investigate; the city list is built from an XML file that sits outside the XHTML document and its scripts.  I’ll have some observations about the Google Maps API in another post— specifically, what I found to be major limitations given what I was trying to do— but for now, here’s your chance to get a slightly more concrete idea of what had us all so scared during the Cold War.  As the simulator demonstrates, even a 1MT (1000KT) device could do a whole lot of damage.


Technorati Redesigns

Published 19 years, 5 months past

It’s the time for redesigns, I guess—CNN did it over the weekend, and now Technorati has taken its beta design final.  I’m proud to say I had a part in making Technorati’s new look possible.  The graphic design was done by Derek Powazek, and from his graphic comp files I produced the XHTML and CSS.  Then I had to run the Tantek gauntlet; the job wasn’t done until he approved of the code I’d produced.

If you dig under the hood of the new design, you’ll probably find things you’d have done differently.  I’m not going to go into a detailed post-mortem here, but suffice to say that every choice was made within the project’s defined constraints.  So when you see, for example, a bunch of b elements used to create the corners, that approach was the best choice for the project: it best satisfied the concerns and demands of the various people involved.

This is not to say that my choices were the best for other projects with similar design demands but different technical demands.  They aren’t.  At a certain level, there are no canonically right answers.  There may be a whole spectrum of related solutions, where one variation is better for this project and another for that one.  And people like me, despite all their experience and knowledge, don’t always hit the right answer on the first try.  My initial approach to the corners is not what you see in the final markup.

That said, I am pleased with how I combined positioning and sprite-like styling to get the corners to work.  I know each technique has been done before, but I’m not aware of previous combinations of the two.  So that’s definitely a point of pride.  I hope to find time to document the details of this particular corner solution, along with variant approaches.

I’d like to thank Derek and the rest of the Technorati team for letting me be a part of the redesign project, and for giving me a chance to flex my creative and technical muscles.


XFN

Published 20 years, 11 months past

Put a human face on your linking: XFN.  Originally designed for blogrolls, but useful in any situation where you link to a personal Web site, XFN is a grass-roots social networking tool that anyone can use at any time on any site.  I’m using it on my blogroll right now, in fact.

The goal of XFN is, quite simply, to make it possible for links to carry information about the human relationships behind the linking.  It lets you designate which links are to the sites of people you’ve met, which are to those who are your friends, which ones represent your sweethearts, and quite a bit more.  Best of all, it does all this with just a few simple values that can be added to any link.  The great thing, from my point of view, is that it adds a lot of interesting semantic value without being overly complex or difficult to understand.  Check it out!

(Update: you might also like to see what Tantek and Matt, who were really the driving forces behind XFN, have to say about it.)

  • XFN was published on .
  • It was assigned to the Projects and XFN categories.
  • There have been no replies.

Browse the Archive

Later Entries