The Silence

[2.0 stars] [IMDb Link]

[Amazon Link]
(paid link)

A German movie that wowed the critics. 88% on the Tomatometer, and it won "Best Picture" from the German Film Critics Association. So you might like it; I didn't care for it.

It's a dark movie, starting out in 1986 with Peer and Timo, two perverts, watching some 8mm child pornography; they then set out to (successfully) hunt down a victim, an 11-year-old girl named Pia, who Peer rapes and murders.

Jump to 2009, and it's apparent that Peer and Timo were not caught. Pia's mom is still wracked with despair. The cop assigned to the case is retiring, but he's filled with rage and resentment.

And then another young girl disappears, 23 years to the day after Pia's murder. What happened? Whodunnit? Another angst-ridden, half-crazy cop is assigned the case. The outcome will probably neither shock nor surprise you. (I thought they might have been setting up a clever plot twist, but no.)

The movie is arty, with cinematography that is occasionally stunning, but much more often showy and boring. There's way too many scenes with actors staring off into the void, or wandering around. I fell asleep a lot on first viewing, never a good sign, but I felt a duty to watch it. (Since I paid for it.) VLC Media Player on my laptop allowed me to go through it at 2x, and that helped a bit.


Last Modified 2024-01-27 5:46 AM EDT

SOTU 2014: Barackrobatic Boogaloo

[http://farm4.staticflickr.com/3691/11832002815_9b4e08f6f6_n.jpg] Awhile back, I got on the Obama campaign mailing list. It seemed like a good idea at the time: they were running a contest to meet the Man Himself, and wouldn't it be cool to give him a piece of my mind instead of the adulation he expected?

When the campaign organization was transformed into the group "Organizing for Action" (OFA) the mailing list went right along with it. And even though there's no campaign to fund, they're still begging for money. The latest gimmick arrived in my spam folder yesterday:

Paul --

Before President Obama delivers the State of the Union tomorrow night -- let OFA know what you're most interested in hearing him talk about.

Take the survey:

http://my.barackobama.com/State-of-the-Union-Survey

So I did:

obama survey

[Too harsh? Nah. See, for example, Victor Davis Hanson.]

One is then whisked to a form where you can send in money. I declined.

And then I got followup mail:

Thanks for answering OFA's State of the Union poll -- there's a lot to look forward to this year, and this is a moment you'll want to share.

As President Obama prepares to take the floor to lay out our national agenda, make sure your friends and family have the opportunity to share what they're excited to hear about.

Share this super quick, one-question poll with three friends today:

http://my.barackobama.com/State-of-the-Union-Survey

Thanks -- and be sure to tune in for the State of the Union on Tuesday, +January 28th, at 9:00 p.m. Eastern Time.

So, there you go, friends. If you'd like to share your opinion.

I suppose OFA is used to this sort of evil (and probably, in their minds, racist) behavior. But it made me feel better.

Although it appears the SOTU will preempt one of my usual shows (The Goldbergs -- funny!), I have plenty of stuff on the TiVo, and there's a new episode of Justified on the Obama-free FX at 10pm. So I'm good.


Last Modified 2014-03-04 3:40 PM EDT

We're the Millers

[3.5 stars] [IMDb Link]

[Amazon Link]
(paid link)

This movie was built around Standard Movie Script Template #3, but the likeability of the cast and the outrageousness of their particular situation make things work OK.

Jason Sudekis plays David, a scruffy low-level Denver marijuana dealer. (Note: given recent news, this movie is totally out of date.) He is content with a modest existence with no familial strings or commitments. He's a decent guy, though; unfortunately, that decency leads him into an altercation with some malicious thugs, who steal his weed and cash reserves. Which puts him in hot water with his supplier, "Brad Gurdlinger" (Ed Helms).

Fortunately, Brad offers David an out: just go on this little trip to Mexico and bring back a shipment. David's wary, because he looks like the kind of guy who would be smuggling pot back into the US. So he comes up with a scheme: gather up some co-conspirators who could plausibly act as his family members. There's Rose, a weary stripper with a heart of gold (Jennifer Anniston); Kenny, a neglected lad whose mother won't notice or care if he takes off for a few days (Will Poulter); and Casey, a hard-as-nails street urchin (Emma Roberts). Their relationships are wary and fractious. But they clean up well enough to outwardly resemble a respectable middle-class family.

And of course, it's one disaster after another from there. But do David and Rose eventually fall in love? Of course; this is an essential part of Standard Movie Script Template #3.

And, assuming you're OK with standard 2013 R-rated language and humor tropes, things are pretty amusing. (If you've ever wanted to hear Jennifer Aniston drop the f-bomb a large number of times, though, this is your go-to.)

My sister-in-law says they showed this movie on her flight up from North Carolina. Did it even make sense?


Last Modified 2024-01-27 5:46 AM EDT

MLK@UNH: 2014

[http://farm6.staticflickr.com/5049/5360731135_fc0fb91acf_n.jpg] It has become something of a Pun Salad tradition to check out how the University Near Here is celebrating the birthday of Martin Luther King, Jr. And what better day to do that than the Official Federal Holiday marking the Birthday of Martin Luther King, Jr.?

Not that today is the birthday: that inconveniently fell last Wednesday, January 15. But who wants a day off in the middle of the week?

And, not that UNH is celebrating MLK Day today, or even back on the 15th. We were between semesters last week, and even the U isn't silly enough to schedule serious events on a holiday. Instead, MLK-related events will be held between February 5 and 12.

As always: the announced schedule is full of the usual thoughtless gasbaggery. This year's theme: "Complex Roots: Intertwining Identities".

I thought this might involve math. The quadratic equation x2 - 10x + 34 = 0 has "complex roots". (Specifically: x = 5 ± 3i.) And "intertwining identities" might involve pretty representations of different well-known formulas like cos2θ + sin2θ = 1 and e = -1 weaving about one another.

But no, it's just the usual meaningless word salad.

For another example, the "Spiritual Celebration", held at the Durham Community Church, has the following description:

The University of New Hampshire's inter-faith spiritual celebration affirms supports and highlights the spiritual foundation that Dr. Martin Luther King, Jr. brought to his work and life. This interactive celebration pays homage to persons from diverse religions and identities who believe in the power vested in humankind to challenge physical, spiritual and psychological bondage, and free us from our figurative and literal prisons in ways that are hopeful, healing and restorative. This is a spirited gathering presenting powerful messages through song, spoken word, music, poetry and reflection, with special musical guests. All are welcome!

Coulda used a comma there between "affirms" and "supports", but the author was too busy stuffing this paragraph with words to bother with such grammatical trivia.

And, invariably, the words are carelessly chosen. Look at that first sentence again, and what the word "supports" is doing. What's being supported? A foundation!

Even a decent middle-school English instructor would have pointed out the bass-akwardness of this metaphor: foundations are not supported; foundations support things.

Worse: the "foundation" metaphor is pretty tired, but the author doesn't even bother to apply it with the modest attention it deserves. The author weakly claims MLK "brought" the foundation to his "work and life". Please. One builds things on a foundation. Engaging with this trivial insight might have breathed a little life into this prose.

Another symptom of blather (by the way) is all the "ands". Worried about people in actual bondage? Well sure. But let's also free those in "spiritual" bondage. And, in case that doesn't cover everyone, let's stick in "psychological" bondage too. And let's not just free them (from their figurative and literal prisons), but do so in "hopeful" ways. Oh, and "healing" ways as well. And just to make sure: "restorative" ways, because that might be different than "healing" ways.

Eesh. If MLK had spoken or written like this, his audiences would have fallen asleep long before the punchlines.

Having said that, there's some good news. The invited speakers are not dreadful this year. (Neither one is named "Thomas Sowell", but you can't have everything.) There's Natasha Trethewey, and she is the current United States Poet Laureate. She's also won a Pulitzer for her poetry. Here's a small sample of her work. UNH could do worse (and has).

Lee Daniels is coming to speak too. And it's somewhat more likely that you've heard of him: he's an Oscar-nominated filmmaker (for Precious back in 2009). A more recent film is Lee Daniels' The Butler; yes, his name is in the title. He's black and gay (which for the UNH makes him a twofer).

While researching Mr. Daniels, I couldn't help but notice this headline:

Lee Daniels says he came out as gay man 'because I loathed my dad so much'

And this one:

‘Precious’ Director Lee Daniels Says His Dad Tried Beating The Gay Out Of Him And He Loves Him For It!

Maybe his talk will straighten this out.


Last Modified 2014-03-04 3:42 PM EDT

Freedom™

[Amazon Link]
(paid link)

Have I mentioned that I feel compelled to finish reading a book once I've started? Some sort of psychological mini-disorder? That applies here.

It's by Daniel Suarez, and is a sequel to the novel Daemon which I read back in 2012. I liked that one just fine! And it ended with a cliffhanger, and so reading this was an obvious choice. But also a poor choice.

Background: in the previous book, the gifted (but homicidal) Matthew Sobol created the Daemon, an AI-powered malware that infected all kinds of computers and hence was able to carry out all sorts of mischief nationwide. The good guys were always one step behind at defusing the Daemonic threat, and at the close of the book had just suffered a ringing defeat.

But in this book, the roles are essentially reversed. The Daemon is revealed (mostly) as a liberator, getting the citizenry out from under the rule of Big Corporations. And the folks seriously fighting the Daemon are revealed to be (mostly) corrupt, perverted plutocrats, willing to sacrifice any number of innocent lives in order to maintain their lofty perches. The conflict continues through the book, but it never gets interesting. Things erupt into ultraviolence every so often, but once you've read about ten people decapitated by a Daemon-controlled motorcycle, having that same thing happen over and over loses its sparkle.

I griped a little about Suarez's prose in Daemon, saying it was "clanky in spots." Here the clankiness is pervasive and deafening. The characters, good and bad, are cardboard, uttering clichés and drivel. (Think of a book written by a left-wing embodiment of the worst literary habits of Ayn Rand; that's Freedom™.)


Last Modified 2024-01-27 5:46 AM EDT

Despicable Me 2

[4.0 stars] [IMDb Link]

[Amazon Link]
(paid link)

What can I say? It's silly and aimed at the kiddos, but I really had a good time watching it.

At the end of Despicable Me, the "villain" Gru, transformed by the sweet little trio of girls he had recruited to advance his evil schemes, resolved to go straight. And he has. In fact, he's bringing out a line of designer jams and jellies! The little yellow "minion" creatures he commands seem OK with it, but his scientist sidekick, Dr. Nefario, would prefer something more on the, well, nefarious side.

But other wrongdoers are still up to no good. In fact, one has just managed to abscond with an entire secret Arctic laboratory. (Big magnet.) Gru is recruited by Lucy, of the Anti-Villain League, into investigating the matter.

Lots of sight gags and (as the MPAA puts it) "rude humor". For example, in an early interaction with Silas Ramsbottom, head of the Anti-Villain League:

Gru Oh, attitude. That's right. So thanks but no thanks. And here's a tip: Instead of tasing people and kidnapping them, maybe you should give them a call! Good day, Mr. Sheepsbutt.

Silas: Ramsbottom.

Gru: [chuckles sarcastically] Yeah, like that's any better.

I know you're supposed to outgrow this stuff, but I never have.


Last Modified 2024-01-27 5:46 AM EDT

URLs du Jour — 2014-01-09

Oxy

  • A disgustingly cheerful article in my local paper, Foster's Daily Democrat, late last week:

    DOVER — An international trip gave City Planner Chris Parker a chance to learn how to implement urban agricultural strategies closer to home.

    In November, Parker was one of 400 people — eight from the Granite State — to attend a conference in Cuba and learn more about the practice of urban agriculture. Parker was among several city planners nationwide to participate. Overall, representatives from 39 countries took part.

    No word on how much Dover taxpayers kicked in for Parker's trip to the Caribbean Gulag. (And if they didn't pay, who did?) Foster's doesn't ask inconvenient questions.

    Just a reminder from Freedom House about Cuba:

    Cuba is ranked Not Free in Freedom in the World 2013 and is also on Freedom House’s list of the world’s worst human rights abusers. Any form of political opposition is consistently suppressed, as dissidents face harassment, beatings, exile, acts of repudiation, and unlawful detentions. Cuba’s subservient judiciary is used to ensure the Communist Party’s supremacy. Freedoms of expression, association, and assembly are limited or denied entirely. The government closely regulates all media outlets and restricts access to outside information. Journalists and bloggers are often arbitrarily detained. Cuba has consistently played a negative role on the [UN Human Rights Council], voting against resolutions on Iran and Syria while supporting resolutions that open the door to abuses.

    But, hey, the gardens are nice.

  • Kevin Williamson had a fine article on Appalachia in a recent National Review, and it's finally available online. I'd give it a Pulitzer right now, but that's me.

    Two interesting things among many: first, your tax dollars at work:

    It works like this: Once a month, the debit-card accounts of those receiving what we still call food stamps are credited with a few hundred dollars — about $500 for a family of four, on average — which are immediately converted into a unit of exchange, in this case cases of soda. On the day when accounts are credited, local establishments accepting EBT cards — and all across the Big White Ghetto, “We Accept Food Stamps” is the new E pluribus unum – are swamped with locals using their public benefits to buy cases and cases — reports put the number at 30 to 40 cases for some buyers — of soda. Those cases of soda then either go on to another retailer, who buys them at 50 cents on the dollar, in effect laundering those $500 in monthly benefits into $250 in cash — a considerably worse rate than your typical organized-crime money launderer offers — or else they go into the local black-market economy, where they can be used as currency in such ventures as the dealing of unauthorized prescription painkillers — by “pillbillies,” as they are known at the sympathetic establishments in Florida that do so much business with Kentucky and West Virginia that the relevant interstate bus service is nicknamed the “OxyContin Express.” A woman who is intimately familiar with the local drug economy suggests that the exchange rate between sexual favors and cases of pop — some dealers will accept either — is about 1:1, meaning that the value of a woman in the local prescription-drug economy is about $12.99 at Walmart prices.

    And since I am a huge fan of Justified, I assumed the area was as violence-ridden as your average episode. Not so:

    There’s a great deal of drug use, welfare fraud, and the like, but the overall crime rate throughout Appalachia is about two-thirds the national average, and the rate of violent crime is half the national average, according to the National Criminal Justice Reference Service.

    But do read the whole thing.

  • I was prepared to be unimpressed by "Awesome Life Hacks" but there are 89 of them, and they are imaginative. My guess is you'll find something useful. You'll never throw away another bread clip.

    (I wonder if they should rename “Hints From Heloise” to “Awesome Life Hacks”.)

  • Three selections from Frank J.'s random thoughts. One geeky:

    Hey, Linux, why don’t you just assume sudo in front of everything because when I ask you to do things, I really do want you to do it.

    One pop-culturish:

    It helps to not know anything about history when watching Downton Abbey so you don’t get spoilers.

    And one political:

    You think the problem is income inequality. I think the problem is not enough whiners getting punched in the junk. We’re at an impasse.

    Sure, it looks easy. But if it were, more people would be as funny as Frank, and that's clearly not the case.


Last Modified 2014-01-10 5:34 AM EDT

The Conjuring

[3.5 stars] [IMDb Link]

[Amazon Link]
(paid link)

Well, now we know what happened to Peter from Office Space: he changed his name to "Roger", got married, had five lovely daughters, got an honest job driving a truck, moved to a big old isolated house which just happened to be haunted by one of the nastiest spirits you'll see.

Just kidding. Ron Livingston, according to the IMDB, has had a flourishing acting career since Office Space. Just not much in anything I'd seen.

Anyway, Peter Roger and wife Carolyn (Lili Palmer) bought this house at auction. Everybody likes it OK except Sadie, the sensible dog, who won't come in. Unfortunately, her perception is not heeded, let alone rewarded. Eventually, even Roger and Carolyn start to heed the dire signs of malevolent supernaturalism, and seek out help from Lorraine and Ed (Vera Farmiga and Patrick Wilson), who are actual Ghostbusters.

Well, actually that's a little frivolous. They're quite religious, and see their spiritual-cleanup efforts as part of their calling. And (somewhat to its credit) the movie plays this part absolutely straight, without condescension or skepticism. Things escalate to a pulse-quickening climax.

One problem: there is no way to keep five young daughters straight. There's the cute one, the other cute one, the somewhat older cute one, the very young cute one, and one more cute one. Which one will the evil spirit target? I forget, and you probably will too.


Last Modified 2024-01-27 5:46 AM EDT

The Wolverine

[4.0 stars] [IMDb Link]

[Amazon Link]
(paid link)

There's a special place in my heart for actors who take on superhero roles. They have to (often) wear silly getups, deal with ludicrously dire situations, utter silly dialogue and make it believable. It takes a special talent to deliver a recognizably human performance on top of all that. Hugh Jackman is one of the people who can pull that off, so good for him.

Mr. Jackman returns to his role as Logan, aka The Wolverine. In the opening scene he's in the wrong place (Nagasaki POW camp) at the wrong time (August 9, 1945). His powers allow him to survive and save a camp guard, Yashida, who's very grateful.

Cut to the present-day, in the X-Men alternate universe. Logan is leading a bitter hermit's existence in the Yukon, having renounced any superheroic aspirations. However, he's tracked down by a red-haired Japanese girl, Yukio, with psychic skills. Yashida, it turns out, went on to become a high-tech gazillionaire mogul; now he's dying, and wants to summon Logan to his deathbed.

Alas, if it were that simple, it would have been a relatively uneventful movie. Yashida's dying wish is for Logan to watch over lovely granddaughter Mariko. Who is in deadly peril from nearly everyone. Oh, and also for Logan to transfer his healing powers to his failing body. Pretty soon the claws are out.

Besides Hugh Jackman, every other major role in this movie is Japanese. You'd perhaps think it was mostly filmed in Japan, but according to IMDB, most scenes were shot in Australia. I assume complex financing schemes, tax dodges, and international market appeal lie behind these decisions.

Consumer note: It really helps to have seen the X-Men movies plus Wolverine's "Origin" movie first. Also: there's a short next-movie appetite-whetter hidden in the credits, you don't want to miss that.


Last Modified 2024-01-27 5:46 AM EDT

At Any Price

[1.0 stars] [IMDb Link]

[Amazon Link]
(paid link)

Mrs. Salad loooves Dennis Quaid. Ever since Breaking Away. So this was a must-get-for-my-sweetie at Netflix.

I'm not jealous or anything. And I'm pretty sure I would dislike this movie anyway.

Dennis (I call him Dennis) plays Henry Whipple, Iowa farmer. (Although, according to IMDB, "Iowa" is mostly played in the movie by "Dekalb, Illinois".) Henry is an aspiring agricultural mogul, even to the extent of attending a fellow farmer's funeral in order to make a pitch to buy the deceased's acreage. He also sells seeds for "Liberty Seed" an eeevil corporation (standing in for Monsanto, I think), and he's guilty of some bad behavior there too.

One of Henry's two sons, Dean (played by Zac Efron), is still at home. Henry would like him to take over the dynasty, but Dean would prefer to become a NASCAR driver. Who wouldn't? He's moody and self-centered, and treats his girlfriend like shit.

I might have liked this movie better if any of the main characters were more likeable or interesting, or if they overcame their character flaws to redeem themselves. But (as the movie develops) they only reveal more flaws, succumb to them, and are not called to account.

Your mileage may vary. Roger Ebert, before he was promoted to doing movie reviews for God, gave it 4/4 stars. And this guy found Dennis "at his most vulnerable and entertaining in a long time." I thought he—sorry—read his wooden dialog perfunctorarily, as if he realized what a sucky movie he'd been roped into.


Last Modified 2024-01-27 5:46 AM EDT

Reading Schedule Generator

[http://farm1.staticflickr.com/119/281194868_23e0c0e390_n.jpg]

May 2023 Update: Fixed a bug with setting the default for the "Start date" field. A bug I should have noticed years ago.

October 2020 Update: Added "Pages/day" option to form and appropriately checked CGI code to handle it.

November 2019 Update: Moved sources to GitHub, links below.

June 2018 Update: Whoa. Embarassing bugfix, caused due to my minimal understanding of Javascript. I keep expecting it to work like Perl.

February 2018 Update: Stylesheet/template changes, described at end of article. Appropriate changes made to article body.

January 2018 Update: Some major form changes, described at end of article. Appropriate changes made to article body.

December 2017 Update: More changes, described at end of article.

October 2017 Update: I regret that I let this article get badly out of whack with reality. Notably, most of the links to my code, which were on the old UNH "pubpages" server, went stale when I retired. In addition, I've cleaned up the code some and fixed a nasty Daylight Savings Time-related bug. I hope. Further notes at the bottom of the article.

Note: this post is out of whack with normal Pun Salad content. Only recommended for:

  1. computer geeks who (like me) tend to approach everyday issues by asking: how could I write code to make this easier?; or
  2. psychologists who might be interested in whatever mental aberration causes the behavior exhibited in (a).

A few years back I noticed I was doing a miserable job of reading the magazines to which I was subscribed; the new issue would show up and I would have just read few if any articles in the previous one.

A similar problem with books: I would check them out of the library and return them unread. And my to-be-read pile of owned books just was getting bigger.

What worked for me was to set up a reading schedule for each "new" book or magazine. Simply read through a reasonable, fixed number of pages each day, until done. Lather, rinse, repeat.

I'm currently implementing this scheme by generating a calendar-format schedule for each item in HTML. Example for a book I read back in 2014, Freedom™ by Daniel Suarez:

[Sample Reading
Schedule]

I (1) print the schedule from my web browser, (2) cut it out, (3) attach to a card, and (4) use the result as a bookmark for the item. And each day, I try to meet the page goal for each item.

(Not that it matters, but for magazines I staple the schedule to one of the subscription cards that invariably accompany each issue. For books, I tape it to one of the plastic advertising cards the Yankee Candle company sends us, which are significantly more substantial.)

Now I'm not psycho about this: it's OK to get ahead of the goals if the material is compelling and I have the time. It's also OK to fall behind if there's just too much other stuff going on. (However, in my experience, just knowing that I've "fallen behind" is just enough self-nudging motivation to carve out some extra time to catch up later.)

Enough for the mechanics, on to the code. For a long time I ran a Perl script from a Linux command line to generate a schedule. But I realized that it would be (slightly) more flexible to set up an HTML form to get the schedule parameters, calling a CGI backend to display the result.

The form I'm using is here. (Do I have to mention that you can use your browser's source-viewing capabilities to view the HTML source? Nah, probably not.) But it looks like this [as of October 2020]:

[Blank
Reading Schedule Generator form]

[December 2017: removed paragraph about the jQuery datepicker, no longer used.]

So you fill out the form, for example:

[Reading
Schedule Generator Form]

[Note: I urge you to try it yourself.]

… hit the submit button and the resulting page should produce the appropriate schedule. (I'm pretty sure it would work for you if you want to try it.)

The real work is performed by the Perl CGI script, which relies heavily on the smarts contained in the CGI.pm, HTML::Template, and Date::Manip Time::Piece modules.

If you'd like to look at things (feel free to steal adapt to your own preferences if you are so inclined), the GitHub directory contains:

  • reading_sched_gen.html — the initial web form (also available here). Install in a web-accessible location.

  • reading_sched.cgi — the CGI script kicked off by the form's Submit button. Install whereever you put CGI scripts, and update the appropriate line in the form.

  • cal_bookmark.tmpl — HTML::Template file used by the CGI script to generate the bookmark. Install in a web-accessible location and update the line setting $template_file in the CGI script.

  • reading_sched.css — the CSS style file used by the bookmark. Install in a web-accessible location and update the appropriate line in the template.

Additional notes (October 2017).

  • As previously mentioned, the original version of the CGI script lived on the UNH "pubpages" webserver, where I enjoyed root access. It's now on the Pun Salad server, where I don't. This is problematic when you need to install some random CPAN perl module.

    Solution (or, at least, what I'm doing): use cpanm to install necessary modules "unprivileged" and put use local::lib; in scripts to find them. (This seems to work for CGIs, surprisingly.)

  • The most recent bug squashed was one I've struggled with for years: if your timezone does DST, not all days are 24 hours: the "spring forward" day has only 23; the "fall back" day has 25. This resulted in strange behavior when a reading schedule traversed one of those days.

    The fix turned out to be relatively easy: tell the script to pretend it's in the UTC timezone. Duh. That's accomplished by (for example) the line

    $startdate->config( 'setdate', 'now,UTC' );

    [Update November 2019: This bugfix seems to no longer be necessary, removed.]

December 2017 Update: Some minor surgery on this tool to report.

  • After years, I noticed that, in many cases, I wanted to spend a specific number of days reading a book or magazine. This involved me looking at a calendar, and finger-counting to figure out what end-date to specify in the form.

    Duh. That's an unforgivable user interface sin, is it not?

    So the input form now requests either (a) the end-date for the reading schedule, or (b) the number of days the schedule should run from the start date.

    If you enter both, the end date will be ignored, but why would you do that?

  • The form has been otherwise (ahem) brought into the 21st century. Title, start date, start page, and end page input fields now sport the HTML attribute required. The type attribute is used specify that the title should be text, the start/end pages should be number, and the start/end dates should be date.

    That means the web browser's native date-picker UI will be used for date entry instead of the previous jQuery datepicker. (Some old browsers don't support this, but since I'm not being paid to support old browsers, I can say "gee, that's too bad", without guilt.)

  • Some Javascript is still used for client-side verification: the start page has to be less than the end page, either the number-of-days or the end-date input has to be there, and if the end-date is specified, it has to be after the start date.

  • Web Security 101 saith: your CGI must still check the validity of its inputs. So all that code is still in the CGI. But…

  • I also modified the CGI script to use the Perl Time::Piece module for calendar arithmetic instead of Date::Manip. This greatly simplified the code, and (somewhat surprisingly) Time::Piece seems to do the right thing when the reading schedule overlaps a Daylight Saving time warp.

    I still think Date::Manip is vital for heavy-lifting Date/Time calculations. But it's overkill here.

January 2018 Update: Some minor surgery on the form. Did I say above that I had brought it into the 21st century? Not quite. My web design skills have always been weak, since that was never my job; I was pretty much a "get the content up" guy, and I only learned enough CSS to make things look the way I wanted at the time. That's the case here too. Summary:

  • Rearranged the form elements so they had a more intuitive ordering.

  • Switched to using an embeded stylesheet.

  • Used some advanced (non-table) styles for form layout.

I think it looks prettier now.

February 2018 Update: See above about my web design skills being weak. I can't say that the most recent changes make the design "good", but I think I can claim "better".

  • Changed to a standalone style sheet for the generated calendar bookmark.

  • The bookmark used tables for layout. I hear that's been frowned upon for, oh, the last 20 years or so. Layout now accomplished by CSS.

  • I changed the outer boundary of the bookmark from a dotted line to dashes. I think that looks better.

October 2020 Update: Occasionally, mostly for magazines, I really want to read a fixed number of pages per day. That forced me to do some math in my head. ("This month's issue has 88 pages, I want to read four pages per day, so that's … um … 22 days.")

Not particularly challenging, but why do I have a computer, if not to offload such tasks upon?

So: you can either specify (1) a number of days; (2) an end date; or (3) pages/day. The form should check to make sure you've specified one of those, no more, no less.

If you specify a N pages/day parameter, the final day on the schedule may be between 1 and N. That's math. A feature, not a bug.

May 2023 Update: I still haven't come close to learning JavaScript, it turns out. The code I snipped from somewhere that sets the default value for the "Start date" field to today's date seemed simple and reasonable…

document.getElementById("startdate").valueAsDate = new Date();

The problem is that sometimes it filled in the field with tomorrow's date.

Specifically, if I accessed the form after 7pm EST.

Or after 6pm EDT.

Yes, it was filling in the current date in the GMT (UTC) timezone. Which for five or six hours every day is tomorrow. That's for me in New Hampshire. That bad-default window gets larger the further west you go. And the opposite problem occurs for browsers going east from Greenwich: they will occasionally see a default start date of yesterday.

In my defense: have I mentioned that I haven't learned Javascript? But (mea culpa) I had no clue that it would have been a good idea to test in different timezones.

The Google brought up long-ago debates on whether this was a feature or a bug in JavaScript. Doesn't matter: it's the way it works, and it must be worked around. This Stack Overflow post provided a fix I could easily patch in, a two-liner replacing the one-liner above:

var today = new Date();
document.getElementById("startdate").valueAsDate = 
    new Date(today.getFullYear(), today.getMonth(), today.getDate(), 10);

One final bit of coding trivia: the Stack Overflow post used "12" instead of "10" in that final line. At first I thought that was obviously correct: at noon UTC the entire planet is on the same calendar page, right?

Hah. No. The entire planet is never on the same calendar page. See Peter Moore's answer to Is there ever a time when the entire planet is experiencing the same date? The best you can do is the hour of 10am UTC. Then the code above will give the wrong default for only the users in Kiribati (aka Christmas Island), where it will be yesterday; and folks on a handful of different Pacific islands, where it will be tomorrow.

Or maybe it's the other way around. In any case, sorry folks.

(I will be happy to test this further and verify the assertions above if anyone wants to pay for my plane fare. A 24-hour stop in each time zone shoud suffice. There are a lot of them.)


Last Modified 2023-05-24 7:10 AM EDT