Thoughts From Eric Archive

S5 1.1a1

Published 20 years, 7 months past

I’m working on S5 1.1, and want to keep people involved in moving it forward.  So I’ve put up a testbed slide show file, which is simply a copy of the introductory presentation file that points to a new UI directory.  The current state of things, which I’ll call 1.1a01, adds two new features:

  1. An author can indicate whether or not the file should default to slide show or outline view.  The default is slide show.  If you want it to default to outline view, you add:

    <meta name="slideshow" content="no" />
    

    The other possible content value is, obviously, “yes”.  This should be useful to professors who want to present notes in class as a slide show, and then post the same file to the class Web site in outline view.  The toggle key and button will both still flip between outline and slide show views, so you aren’t trapped in one or the other.  You just get to choose how the file will load up.

  2. When in slide show view, the font size automatically scales based on the window size.  This means that if you’re expecting 1024×768 and get 800×600, the slides won’t become impossibly long.  Note, however, that this scales text—not images.  I’m not up to that yet, given that I have to think about how to (or even if I want to) handle them.  I’m using an onresize event handler to scale the fonts if you change the window size, as well as firing the scaling function when the slides are first loaded.  In outline view, the scaling is suppressed.

    In adding this, however, I’ve come up against the same problem that prevented font scaling from appearing in S5 1.0: Gecko-based browsers mangle the layout when the font scales.  To see what I mean, toggle the slide view off and then back on.  Text separation, and the widths of inline elements, will not be recalculated when the slide view is restored.  The same kind of thing happens if you change the window size.  Once you’ve settled on a new size or toggled back to slide view, just hit Reload and all is well.  So it seems to be a case of not consistently redrawing element boxes when font sizes change; force them to be redrawn with a reload, and things are drawn as they should be.

    I can’t figure out how to fix this short of firing a reload event in the fontScale() routine, which I’d really rather avoid.  I suppose I could suppress scaling for Gecko browsers on resize (and fire a reload after toggling back to slide view) but I’d like to find a more elegant way to fix the problem.  For that matter, if anyone wants to make my scaling logic more elegant, go for it.  The frustration of cross-browser incompatibilities in manipulating styles came to the fore when I wrote that routine.

There are several ideas and suggestions from the 1.0 release that have yet to be implemented: be patient!  We’re on 1.1a01, remember, and S5, for all its promise, remains a “free time” project.  (My editors will no doubt be dismayed to hear that I think I even have free time.)  If I get time, I’ll write up a concrete to-do list so you can see what’s planned.  For now, if you’d like to help, please just focus on the problems I mentioned, or new problems caused by these features that I didn’t find.  Speaking of which, if any of you IE/Mac wizards can figure out what I’ve done that breaks S5 in that browser, I’d very much appreciate it.


Look Who’s Walking Now

Published 20 years, 7 months past

This past Tuesday, and by that I mean three days ago, Carolyn stood unsupported for the first time, wobbling in place for five seconds.  She stood on her own a few more times Wednesday and Thursday, gaining a little more experience and confidence each time.

This morning, she started walking.  They’re tentative, almost spastic steps, but she can get from one person to another without any support at all.  Her facial expression as she does so is a bizarre mixture of pure concentration and pure joy–almost as if she knows this is really, really hard, and yet loves to do it so much that she can barely breathe.

Remember, this is the little girl who didn’t even start crawling until about six weeks ago.  Now she’s walking, and she’s started crawling up the stairs to boot.  I can hardly believe it.  It’s almost like she was uninterested in mobility until she twigged onto the fact that she could actually move from place to place on her own… and once she figured that out, well, Katy bar the door.

And honestly, I’m not sure who’s more excited, her or us.  Yeah, I know, she’s walking now and that means our lives will never be the same, we’ll wonder why we were ever excited about this, blah blah parental scare stories blah.  You know what?  I will never wonder why I was excited about this.  As she’s moved through every stage, I’ve cherished and enjoyed where she was on each day, and how she’d changed from the past.  Kat has as well.  I think we’ll be free of the wistful regrets that so many other parents have talked about, saying things like, “Oh, I just couldn’t wait for little Joey to start talking, but now he just won’t stop with the chattering and I wonder why I ever wanted him to change!”  No matter how jovial the tone or wry the expression, there always seems to be an undercurrent of seriousness, as if they really do wish that little Joey would just shut up… or, at the least, that they’d fully appreciated the pre-talking stage.

I don’t know that we’ll ever understand that view, and I can’t say that bothers me.  Every time Carolyn makes a developmental advance, it’s a new and fascinating time.  But more immediately, every single day is exciting and wonderful, as we watch her figure out this thing or that; just share playtime with her; or take her for a walk in the yard to touch the trees’ bark, pull up tiny handfuls of the grass, and tilt back to look at the sky with storm-gray eyes full of awe.

Now she walks.  Soon, she’ll start signing to us.  A few months from now, she’ll begin to really talk; she’s already starting to assemble the rudiments of language, imitating things we say as best she can.  One day, she’ll go to kindergarten, and later to grade school.  In the farther future, she’ll become a teenager, and then a woman.  At every turning point, we’ll celebrate who she is and what she’s doing, and never regret the times that have passed into memory.

Keep walking, little one.  We’re right behind you.


Uncollapsing Margins

Published 20 years, 7 months past

At long last, I’ve published a new article at Complex Spiral: “Uncollapsing Margins“.  In it, I explore how margin collapsing can lead to weird behaviors, why these behaviors arise, and ways to work around it when you want a different result.  If you’ve ever tried to figure out why a heading’s top margin seems to disappear when it’s the first thing in a div, this article will be of interest.

Oh, and if you were having trouble reaching meyerweb in the last 24 hours, we done got Slashdotted.  They posted an article about S5, and the ensuing geek stampede crushed my bandwidth like it was an overripe grape.  An overripe grape run over by a steamroller.  Once the article fell off the Slashdot home page, things got back to normal.


UI9

Published 20 years, 7 months past
A blurry image of the display panel of another digital camera, which shows that camera is pointed at the display panel of yet another digital camera.
  • UI9 was published on .
  • It was assigned to the General category.
  • There have been eight replies.

Vote Baby Vote

Published 20 years, 8 months past

Okay, so yesterday’s post was a bit of tongue-in-cheekery, but with a very serious undertone.  As a matter of fact, today Kat, Carolyn, and I went to a doctor’s appointment, then to vote, and then out to lunch.  When we got back, there were two voice mail messages.  I laid 3:1 odds that they were both political, and yes, they were both GOP ads.  While we were retrieving those messages, another message landed in our voice mail box—this one also from the GOP.

The flood of political calls has been, not to put too fine a point on it, infuriating.  I signed up with the Do Not Call list for a reason, geniuses.  I’m doubly glad to be on it now that we have Carolyn.  I’m not especially concerned that the phone will wake her, bless her heart; once she goes to deep sleep, you could practically send a marching band through her room to play “Columbia, The Gem Of The Ocean” at full volume and she’d continue snoring.  (Such cute little snores they are, too.)  But some nights, especially when the teething is particularly bad, she never really gets to a deep sleep.  The last thing I want is for her to be woken up by a ringing phone and experience more pain because some politician or political activist thinks I really need to hear from him (or her).  I don’t.  Stop bothering me.

Now, I’ll admit that my vote for President was never in serious doubt.  It was easier to justify, though, on the grounds that Kerry and his allies had invaded my family’s privacy to a lesser extent than did his opponents.  It’s a classic “lesser of two evils” rationalization, but hey, any port in an electoral storm.  It’s also a metaphor for the Bush administration’s stance on social and privacy issues, now that I think about it.

And why was my vote never in serious doubt?  I can explain that in ten words (16 words and three letters if you count the names).

General Tendencies
Social Fiscal
Eric A. Meyer Liberal Conservative
George W. Bush Conservative Liberal
John F. Kerry Liberal Liberal

That’s it in a nutshell.  I’ve had a number problems with the Bush administration’s policies and actions, and most of them stem from the differences in philosophy that table summarizes.

There’s another reason I voted for Kerry, though: the Congress is almost certainly not going to be controlled by the Democrats.  Thus, the only things that will get through the legislative process are those with broad support.  Most observers feel that should Kerry win, he’ll have to set aside some of his grander (read: more expensive) plans for at least the first two years of his administration.  That’s just fine with me.  Since a Republican-dominated government apparently can’t show a sense of fiscal restraint, I’d be happy to have it arise as a side effect of an opposite-party government.

Well, not exactly happy, really, but hopefully you know what I mean.

It’ll certainly be interesting to watch how all this plays out.  Now, if you haven’t yet, get out there and vote!


Making A Call

Published 20 years, 8 months past

Dear President Bush,

How are things going?  I hear you’ve been very busy, doing a lot of traveling, that sort of thing.  In a way, it’s too bad you don’t fly on commercial airlines, because you would have a whole pile of frequent flyer miles.  You could probably earn three or four round-the-world trips.  Though now that I think about it, you probably don’t really need that kind help getting around, do you?

I’ve long been an undecided voter, thanks in no small part to the choice of candidates this time around.  I’m sure you’re a very honorable man, at least to the extent your office will permit.  Nonetheless, about half your policies have been deeply dismaying to me.  On the other hand, about half your opponent’s positions are no more appealing to me.  On the whole, as I’ve complained from time to time, I’ve had a very difficult time making up my mind how to vote.  It’s true that I’m traditionally a liberal type, but that’s mostly in the social arena.  That, incidentally, should provide a good indication of which half of your policies have dismayed me.

As a resident of a “battleground” state, or “swing” state, or whatever it is we’re calling them these days, I’ve been getting a lot of phone calls these days.  I imagine you know a thing or two about that; after all, your mother and your wife both called.  So did Arnold Schwarzenegger.  Also Gwyneth Paltrow and Sarah Jessica Parker, although they of course weren’t calling on your behalf.  In addition, I’ve heard from a number of dire-voiced men warning me about the terrible dangers inherent in electing you, or your opponent, to the White House.  Over the past month, I’d estimate that I’ve received at least fifty calls from campaigns, political parties, 527 groups, and so forth.  In one recent night, three such calls came in the space of twenty minutes.  I’d most certainly have gotten more calls, but I was out of town for a week.

Anyway, I thought I’d let you know that from what I can tell, the organization of your campaign, and of those efforts aligned with you, has been more effective at reaching voters in my area.  At a rough estimate, calls from your campaign, the Republican Party, and various 527 groups close to your side of the ideological spectrum have outnumbered those from the other side of the spectrum by about a third.

Accordingly, I’ll be casting my vote for John Kerry.


More Tools

Published 20 years, 8 months past

For those who are interested, I’ve added some new stuff to the Tools page, in addition to reordering it just a little.  The first addition is a URL decoder/encoder, something I’ve needed from time to time when trying to unravel encoded-JavaScript bookmarklets.  I’m sure every other developer in the world has created his own version of this tool at some point; well, here’s mine.  The second new toolbox entry is for users of NetNewsWire 2: a small collection of themes.  There are three as of this posting, each with a very, very different aim—one artistic, one historical, and one technological.

Hopefully I’ll have more to add to the S5 portion of the toolbox in the near future.

  • More Tools was published on .
  • It was assigned to the Tools category.
  • There have been no replies.

Regular Expression Help

Published 20 years, 8 months past

Some time ago, Simon Willison pointed out a very cool bookmarklet that helps solve the “I have one password for all my public sites” problem.  This is where someone picks a password they can remember, and then uses that as the password for their accounts on Amazon, eBay, Hotmail, Netflix, et cetera.  This is one of those things that security experts tell you never to do, and yet just about everyone does, because given the plethora of accounts most of us maintain, there’s no way we could keep track of which password goes with which account unless it was all written down somewhere… and that’s something the security experts insist that you never, ever do.

So the bookmarklet takes your ‘master password’, crosses it with the domain of the site, and generates an MD5-based result.  So let’s assume meyerweb had accounts.  You would fire off the bookmarklet, which would ask you type in your master password.  So let’s say your master password is ‘passwd’; this is combined with www.meyerweb.com and the resulting password is 68573552.  On the other hand, if you just use meyerweb.com, the result is 92938a6e

Now, while those aren’t the most secure possible passwords, they’re a lot more secure than ‘passwd’.  So I’d like to make use of this bookmarklet.  Fine, great.  The problem is what you just saw: the generated password changes if the full host and domain name bit changes.  This could be a problem if, say, amazon.com suddenly starts routing all logins to a server named login.amazon.com… or vice versa.  So I’d like to adapt the bookmarklet so it grabs just the domain and TLD (I probably got those terms wrong; I usually do) of a URL.  Problem is, I can’t write regular expressions for squat.  I don’t even understand how the regexp in the existing bookmarklet works.

So, a little help, please?  Given the form http://www.domain.tld/blah/foo/wow.xyz, I want the regexp to return just domain.tld.  Just leave a solution in the comments, and you’ll earn the respect and adulation of your peers.  At least those of them who read the comments.


Browse the Archive

Earlier Entries

Later Entries