Steve Krause : Blog

TypePad Sitemap Template with More Than 100 Entries

Sitemaps are a way to help search engines find pages on a Web site. This blog has its own Sitemap, which I noticed was limited to displaying the last 100 blog entries. That's bad, because I have more than 100 entries, and Google was losing track of some of the early ones.

A Sitemap can have up to 50,000 URLs, so I emailed the support desk of TypePad (the service that hosts this blog), asking what the problem was. The answer was, TypePad's suggested template for Sitemaps uses a template tag called MTEntries, which is limited to showing 100 entries. That's confusing because the relevant part of the suggested template says, as of March 6, 2010, <MTEntries lastn="1000">. Oh well. The person who answered my support question said TypePad was evaluating raising the limit.

It should be raised, or TypePad should provide some other means for directly communicating the presence of more than 100 blog entries. But in the meantime, I'll share a quick workaround I devised. It's ugly, but it works for this blog's 250-odd posts.

In the suggested Sitemap template, I duplicated the block of XML responsible for generating the list of blog-entry URLs. I set the first block's "lastn" parameter to 100. For the duplicate, I also set "lastn" to 100 but I added an "offset" parameter of 100. That means the first block gets the 100 most recent entries, and the second block gets the 100 next most-recent entries. Then I created another duplicate block, "lastn" of 100, "offset" of 200.

That's all I needed (for now). The resulting Sitemap had all 250 postings. I don't know how far this hack scales up, but I figured I'd share the idea. May it be useful for the hopefully short time between when this was written and when TypePad better supports Sitemaps.

FYI, this is the relevant block in the suggested Sitemap template (as of March 6, 2010):

<MTEntries lastn="1000">
<url>
<loc><$MTEntryPermalink encode_xml="1"$></loc>
<lastmod><$MTEntryDate format="%Y-%m-%d"$></lastmod>
<priority>0.8</priority>
</url>
</MTEntries>

Replace that block with the following three blocks:

<MTEntries lastn="100">
<url>
<loc><$MTEntryPermalink encode_xml="1"$></loc>
<lastmod><$MTEntryDate format="%Y-%m-%d"$></lastmod>
<priority>0.8</priority>
</url>
</MTEntries>

<MTEntries lastn="100" offset="100">
<url>
<loc><$MTEntryPermalink encode_xml="1"$></loc>
<lastmod><$MTEntryDate format="%Y-%m-%d"$></lastmod>
<priority>0.8</priority>
</url>
</MTEntries>

<MTEntries lastn="100" offset="200">
<url>
<loc><$MTEntryPermalink encode_xml="1"$></loc>
<lastmod><$MTEntryDate format="%Y-%m-%d"$></lastmod>
<priority>0.8</priority>
</url>
</MTEntries>

If you want to try more blocks, the pattern for doing so should be evident. The only thing you need to change is the "offset" in the first line of each additional block. Just increment it by 100.

One final note: The generated sitemap.xml document did not change after I saved the changes to my Sitemap template. This was apparently due to caching, which a template-save should have immediately overridden but did not. I confirmed this by copying the text of my changed template to a new template, sitemap2.xml, which generated the correct XML file. The next day, when I checked my sitemap.xml again, it had updated to the correct XML, so the cache apparently needs time to detect changed templates.

March 06, 2010 in Pseudorandom | Permalink | Comments (0)

When Reporters Don't Want to Hear It

From an interview with robotics expert Noel Sharkey:

Isaac Asimov said that when he started writing about robots, the idea that robots were going to take over the world was the only story in town. Nobody wants to hear otherwise. I used to find when newspaper reporters called me and I said I didn't believe AI or robots would take over the world, they would say thank you very much, hang up and never report my comments.

This brought back a memory from my SRI days, when I was regularly interviewed by reporters. I remember a reporter called me on the day of some big news (I forget what it was), wanting my take.

The normal routine would be for me to provide a pithy quote, which the reporter would use as the voice of an independent expert. However, half-way through my commentary, his keyboard stopped clickety-clacking. "That doesn't get me where I need to go," he sulked, more to himself than me.

Reporters usually like contrarian views, but apparently the expert slot in this story was already tailored for a concurring opinion. He was on deadline, as most reporters are when they call. It was easier to find another expert than redo the story.

I'm not naming the reporter because this run-in was the exception, not the norm, with him. He was a quality reporter who later became the technology bureau chief for one of the biggest U.S. papers—which makes the point stronger: Even quality reporters can succumb to finding only the facts and opinions for the story they want to tell.

The good news is, in my experience with a wide range of reporters, this situation was rare. But then again, I wasn't daring to question whether robots would take over the world.

February 15, 2010 in Pseudorandom | Permalink | Comments (0)

A Building to Behold: Yale's Beinecke Library

I was visiting Yale University last weekend when I came across a building that blew me away. From the outside, it's a formidably modern structure...

Yale-beinecke-library

...that contrasts with the (literally) old-school architecture of a university founded in 1701.

Beinecke-and-law-buildings

Lest we judge a book by its cover, let's look inside. In the middle of the interior is a six-story glass tower. It contains 180,000 rare books.

Beinecke_Library_interior_2

To protect the books from direct sunlight, the exterior panels are translucent white marble. During the day, subdued light filters through the veined marble.

Beinecke_Library_interior

The platform around the glass tower is an exhibit space that includes an original Gutenberg Bible from 1454.

Beinecke-gutenburg-bible

If you are ever at Yale, visit this building. It is called the Beinecke Rare Book and Manuscript Library. In form and function, it is an impressive monument to the preservation of human knowledge.

[The images are from Wikipedia's Beinecke Library page. Clicking an image takes you to the original, full-size version from Wikimedia Commons.]

November 23, 2009 in Pseudorandom | Permalink | Comments (0)

Negative-Space Pumpkin

We were visiting Newport, RI, this weekend and stumbled on the 7th Annual Ballard Park Pumpkin Tour. Imagine a winding, wooded trail with jack-o-lanterns perched in trees, on stumps, along the ground, in clusters, everywhere. In total more than a thousand pumpkins loomed amid the gawking parade of people.

For creative design, my favorite was this negative-space pumpkin:

Hwalk1

Below are a few more examples of the variety and quality on display. What a great job by the event's organizers and the Newport community!

Hwalk2
Hwalk3
Hwalk4
Hwalk5

More pictures are on this page, where the main image changes every few seconds.

October 18, 2009 in Pseudorandom | Permalink | Comments (0)

1919 Penny

1919_penny

I noticed the coin in a handful of change. It was a penny, a wheatback, its features fading with age. When tilted just so, the coin revealed its date: 1919.

In 1919:

  • The Treaty of Versailles was signed, officially ending World War I.
  • AT&T introduced the first dial telephone.
  • The U.S. Congress approved the 19th Amendment to the Constitution, allowing women to vote.
  • The 18th Amendment took effect, authorizing the prohibition of alcohol.
  • British aviators John Alcock and Arthur Whitten Brown made the first nonstop transatlantic flight, from Newfoundland to Ireland. Total time: 16.5 hours. Average speed: 115 miles per hour.
  • Congress reduced the price of a first-class postage stamp from 3 cents to 2 cents.

I'll be sure to spend the coin so someone else might happen upon this connection to a faraway time.

August 29, 2009 in Pseudorandom | Permalink | Comments (0)

Too Many Italian Restaurants?

I like Italian food, but most cities seem to have an oversupply of Italian restaurants compared to other types of ethnic food (as defined relative to the U.S. food market).

To test this perception, I analyzed OpenTable's categorized listings of restaurants for Atlanta, Los Angeles, New York, and San Francisco. Italian was the top ethnic category by far, comprising nearly 18% of listed restaurants. A distant second was French at 6.6%. Next was Japanese at 3%. Mexican, Indian, and Thai were each farther down the list, below 2%.

Which begs the question: Does the populace really want three or six or ten Italian restaurants for every French, Japanese, or Indian restaurant, respectively?

Some caveats about the data:

  • I ignored the American categories due to their home-team advantage in the United States.
  • The categories are not cleanly separated. For example, Japanese and Sushi are distinct categories, but apparently a restaurant can only be in one category. So we might safely say that the 3% figure for Japanese is actually 4.4% when we add the Sushi restaurants. Similarly, French could pick up an incremental 1.1% if combined with Contemporary French.
  • OpenTable is a service for restaurant reservations, so it lists higher-end restaurants. That explains the low numbers for a category like Chinese, which has a lot of casual and take-out restaurants.

These and other factors undoubtedly messed with the numbers. But unless the data was totally whacked, the magnitude of the differences between Italian and the other categories seems large enough to point to something real.

For those that like details, dig in...

Category Atlanta Los Angeles New York San Francisco Grand Total
Italian 12.2% 15.7% 20.9% 16.8% 17.8%
American 19.4% 13.4% 17.5% 12.9% 15.5%
Contemporary American 11.1% 9.4% 10.3% 6.4% 9.1%
French 3.6% 3.9% 7.9% 7.9% 6.6%
Californian 0.0% 12.1% 0.2% 13.4% 6.5%
Seafood 6.5% 5.8% 4.9% 6.4% 5.7%
Steakhouse 3.6% 5.4% 4.5% 2.7% 4.1%
Steak 6.8% 3.0% 3.4% 2.3% 3.3%
Japanese 0.7% 5.1% 2.8% 2.2% 3.0%
Mediterranean 1.8% 2.6% 1.8% 3.9% 2.5%
Mexican / Southwestern 0.7% 2.2% 1.8% 1.8% 1.8%
Asian 1.8% 1.9% 1.5% 2.0% 1.7%
Indian 0.4% 1.3% 2.1% 1.9% 1.7%
Fusion / Eclectic 1.8% 2.0% 1.4% 1.2% 1.5%
Sushi 1.4% 1.6% 1.0% 1.9% 1.4%
Contemporary French 1.1% 0.7% 1.2% 1.3% 1.1%
Tapas / Small Plates 2.2% 0.4% 0.9% 1.4% 1.0%
Mexican 0.0% 1.6% 0.7% 1.3% 1.0%
Greek 1.1% 0.5% 1.5% 0.1% 0.8%
Continental 1.1% 1.6% 0.8% 0.1% 0.8%
Thai 2.2% 0.7% 0.5% 1.1% 0.8%
International 1.1% 0.8% 0.8% 0.4% 0.7%
Chinese 0.0% 0.3% 0.8% 1.1% 0.7%
Southern 5.7% 0.0% 0.1% 0.4% 0.6%
Fondue 1.4% 0.8% 0.5% 0.4% 0.6%
Cuban 0.4% 0.5% 0.9% 0.1% 0.6%
Spanish 0.0% 0.5% 0.8% 0.2% 0.5%
Vietnamese 0.4% 0.1% 0.3% 1.3% 0.5%
Global, International 1.4% 0.4% 0.5% 0.4% 0.5%
European 2.2% 0.1% 0.5% 0.2% 0.5%
Pan-Asian 1.1% 0.9% 0.1% 0.5% 0.5%
Latin American 0.7% 0.5% 0.4% 0.1% 0.4%
Barbecue 0.4% 0.1% 0.7% 0.1% 0.4%
Comfort Food 1.1% 0.4% 0.4% 0.1% 0.4%
Latin / Spanish 0.0% 0.5% 0.4% 0.2% 0.3%
Southeast Asian 0.4% 0.0% 0.4% 0.5% 0.3%
Turkish 0.0% 0.0% 0.5% 0.4% 0.3%
Gastro Pub 0.4% 0.4% 0.1% 0.5% 0.3%
Brazilian Steakhouse 0.7% 0.3% 0.2% 0.4% 0.3%
Moroccan 0.0% 0.3% 0.2% 0.5% 0.3%
Organic 0.4% 0.3% 0.1% 0.4% 0.2%
Provencal 0.0% 0.0% 0.3% 0.4% 0.2%
Argentinean 0.4% 0.1% 0.2% 0.1% 0.2%
Vegetarian 0.0% 0.1% 0.2% 0.2% 0.2%
Scandinavian 0.0% 0.0% 0.5% 0.0% 0.2%
Southwest 0.0% 0.0% 0.4% 0.0% 0.2%
Middle Eastern 0.4% 0.1% 0.2% 0.1% 0.2%
Brazilian 0.4% 0.1% 0.2% 0.0% 0.2%
Peruvian 0.0% 0.0% 0.1% 0.5% 0.2%
Lebanese 0.0% 0.0% 0.2% 0.1% 0.1%
Creole / Cajun / Southern 0.7% 0.0% 0.1% 0.1% 0.1%
Cajun 0.4% 0.0% 0.1% 0.2% 0.1%
Korean 0.0% 0.4% 0.0% 0.0% 0.1%
German 0.4% 0.0% 0.0% 0.2% 0.1%
Caribbean 0.4% 0.0% 0.0% 0.2% 0.1%
South American 0.0% 0.1% 0.1% 0.1% 0.1%
Belgian 0.0% 0.0% 0.2% 0.0% 0.1%
Austrian 0.0% 0.0% 0.2% 0.0% 0.1%
Portuguese 0.0% 0.0% 0.2% 0.0% 0.1%
African 0.0% 0.0% 0.2% 0.0% 0.1%
Kosher 0.0% 0.0% 0.1% 0.1% 0.1%
Creole 0.0% 0.0% 0.0% 0.2% 0.1%
Modern European 0.0% 0.0% 0.1% 0.1% 0.1%
Irish 0.0% 0.1% 0.1% 0.0% 0.1%
Persian 0.0% 0.1% 0.0% 0.1% 0.1%
Indonesian / Malaysian 0.0% 0.0% 0.2% 0.0% 0.1%
Contemporary Indian 0.0% 0.0% 0.1% 0.0% 0.0%
Bottle Service 0.0% 0.0% 0.1% 0.0% 0.0%
Brewery 0.0% 0.0% 0.1% 0.0% 0.0%
South Indian 0.0% 0.0% 0.0% 0.1% 0.0%
Sicilian 0.0% 0.0% 0.1% 0.0% 0.0%
Dessert 0.4% 0.0% 0.0% 0.0% 0.0%
Prime Rib 0.0% 0.1% 0.0% 0.0% 0.0%
Dim Sum 0.0% 0.0% 0.1% 0.0% 0.0%
Russian 0.0% 0.0% 0.1% 0.0% 0.0%
Egyptian 0.0% 0.0% 0.1% 0.0% 0.0%
Basque 0.0% 0.0% 0.0% 0.1% 0.0%
Hawaiian 0.0% 0.1% 0.0% 0.0% 0.0%
Australian 0.0% 0.0% 0.0% 0.1% 0.0%
Eurasian 0.0% 0.1% 0.0% 0.0% 0.0%

Source: OpenTable listings by city, 6/20/2009

July 11, 2009 in Pseudorandom | Permalink | Comments (3)

New York City's High Line

In 1980, the trains stopped running along the High Line, a mile-and-a-half of elevated railway in New York City's Meatpacking district. By 2000, the abandoned rail line's topside had become a scruffy greenbelt, unseen by those on the city streets below. Photographer Joel Sternfeld documented the High Line then with photos like this.

Sternfeld_highline_2000

Around that time, some citizens had an idea: Let's save the structure from demolition and make it a park. Such things are easier said than done, but they did it. The first phase of High Line park opened to the public on June 9, 2009.

I happened to be in New York this weekend, so I walked the High Line. Although it is now a public space, the High Line still evokes its former self. At many points, stretches of track remain, plants pushing up between the railroad ties.

Below is a photo from Ed Yourdon that gives the feel. Keep in mind, what you're seeing is three stories above street level.

Yourden_highline_2009

Congratulations to all those involved with the project. It adds a new dimension to the term urban renewal.

[For further perspective on the High Line's architecture and landscape design, including a slideshow and video, see Nicolai Ouroussoff's review in The New York Times.]

June 14, 2009 in Pseudorandom | Permalink | Comments (0)

"Stop Talking and Let the Students Learn to Learn"

Recently, I noted an initiative at MIT to use computers and other high-tech equipment to make introductory physics classes less like lectures and more like hands-on experiences. Since then, I came across an additional, more fundamental perspective about technology-assisted learning. A 1986 essay by Robert T. Morrison of New York University, The Lecture System in Teaching Science argues that most teachers have yet to effectively use a 500-year-old technology: the printing press.

Morrison starts by describing the typical college chemistry class, where a professor lectures the entire time, continuously scribbling equations on the chalkboard as the students fill their notebook pages with whatever the professor writes and says.

Just as the bell rings, the lecturer, if he's a really smooth operator, comes to the end of a sentence, a paragraph, a nice neat unit. He lays down his last piece of chalk — he knows exactly how many pieces the lecture will take — picks up his precious lecture notes, and goes out. The students, tired but happy, rise up and follow after him. Their heads are empty, but their notebooks are full.

Although a caricature, Morrison's version of science class should be familiar enough. But how did things get this way?

What I've heard, and I imagine that this is correct, is that it started a very long time ago, when books were rare and very expensive, and the only way to transmit information was for the teacher, who knew, to tell the students, who did not yet know. And they would write it all down and take it away with them, like a bunch of scribes. Remember, scribes were very big in the Middle Ages.

Morrison goes on to advocate the "Gutenberg Method," a teaching system that relieves students of scribing so they can focus on learning. 

What does the Gutenberg Method involve? Simply this. You assign the students portions of the textbook to study before they come to class. When they come into the classroom, they are already acquainted with the material. You don't waste your time, and theirs, outlining the course. You don't waste time telling them that butyric acid smells like rancid butter, and that valeric acid smells like old socks, and other difficult intellectual concepts. The textbook has taken all that drudgery off your hands. You don't waste your time doing what Frank Lambert calls "presenting a boardful of elegantly organized material with beautiful answers to questions that the students have not asked."

The students have read the material, they have thought about it, and they have questions to ask about it. You answer these questions, or, better still, try to get them to answer their own questions, or get other students to give the answers. You ask questions. You have a discussion. If they're slow to come alive, you take up points that you know give students trouble. You lead them through difficult problems. The entire class hour becomes like those few golden moments at the end of an old-fashioned lecture when a few students manage to rise above the system and gather around your desk....

What the Gutenberg Method offers, then, is two things, either of which alone would make it worthwhile. First, you have a better mechanism for the initial transmittal of information, one that is more efficient and more effective. Second, the big bonus and the reason for the Gutenberg Method in the first place is that you gain all that lovely class time for doing what you hardly get to do under the lecture system, and that is teach.
In other words, teaching—by a human rather than a book—is interactive. With interactive discussion, the teacher can probe what students do and don't understand. The teaching is thus targeted to the gaps that remain after "book learning," including helping students learn to learn: You learned it once from the book, now let's make it stick.

This kind of teaching is good for students, but Morrison is writing for fellow teachers when he adds:

I think all of us, to a greater or lesser extent, indulge in wishful thinking. We lecture to students with the belief, the wish that they are learning. But we put off the moment of truth — the moment when we find out whether or not we're really getting through to them — until the next examination: a week, a month, maybe longer. And even then, we are cushioned against any shocks we might get, such as finding out that a lot of them are not learning. It's a written examination and, while we may grade the examination, it's still a matter of marks on pieces of paper, just names and grades. But when you take the plunge into a discussion, you've moved from a theater to a swimming pool and you're sometimes shocked by the cold water of reality. You find out, not next week or next month, but today, eyeball-to-eyeball, that some students have only the fuzziest idea of what you've been trying to put across.

If I'm choosing a teacher, I'll take the one who wants this kind of immediate feedback and accountability, and who'd rather talk with students about a subject than lecture to them.

[The title of this post is the apt title of a paper mentioned in Morrison's essay, George Adkinson's "Stop Talking and Let the Students Learn to Learn."]

March 15, 2009 in Pseudorandom | Permalink | Comments (0)

On Colophons

After the end of a book—beyond the bibliography, index, and other afterwordage—you might find a note about the book's production. It will probably tell you the name of the typeface used in the book; it may even go on to extol the typeface's qualities and pedigree.

For example, from the hardcover version of Thomas Hine's Populuxe, "A Note on the Type" informs us that the book's choice of typeface, Primer, "makes general reference to Century—long a serviceable type, totally lacking in manner or frills of any kind—but brilliantly corrects its characterless quality."

Or, from the paperback of Joseph Ellis' Founding Brothers, we not only learn that its typeface is Adobe Garamond but also that the typeface's namesake, Claude Garamond, "gave to his letters a certain elegance and feeling of movement that won their creator an immediate reputation and the patronage of Francis I of France."

Once you're up to speed on a book's typeface, there may be more to know: "The paper, which is Glatfelter Laid, from the Spring Grove Mill, is of archival quality and acid-free." (Robert Bringhurst's The Elements of Typographic Style, version 2.5, paperback)

Most books, especially paperbacks, do not have such notes. However, in the technology field, books from the publisher O'Reilly often have an extended "colophon." For example, the colophon in Sal Mangano's XSLT Cookbook details the software and fonts used to produce different parts of the book, profiles the red mullet fish that adorn the cover, and credits the person who wrote the colophon!

Another O'Reilly book, Scott Berkun's The Myths of Innovation, has a colophon with the final word on colophons:

Page numbers were hand-carved, based on a Dutch interpretation of a sketch of reproductions of a famous 13th-century Chinese monograph series....[The ink is] stored in the finest French hardwood kegs, which are wrapped in a layer of Egyptian velvet and left to age for centuries while a secret tribe of the world's finest chorally trained children bless them with chants of salvation for all those who read words in colophons written in this ink....

Before you go, know that I, anonymous colophon writer, have spared the human race from certain extinction dozens of times through use of my varied colophonic powers. Out of respect you should always read colophons—you never know what you might find.

January 24, 2009 in Pseudorandom | Permalink | Comments (0)

Turbulence Ball

Today I found an interesting item at a local toy store. Here is 50 seconds of "show and tell":

I believe it is a Play Visions Mondo Hi-Bounce Pearl Water Ball. Although a toy for kids, it could be repackaged in unbreakable glass with a nice stand, then sold as an executive desk tchotchke. I've got to think it would outsell the likes of Newton's Cradle (the contraption with hanging metal balls, knocking each other back and forth). After all, chaotic turbulence is so 21st century.

January 10, 2009 in Pseudorandom | Permalink | Comments (1)

Next »
My Photo

Bio

VP Analytic Products, CNET Content Solutions (current); CEO and co-founder, ExactChoice; CTO and co-founder, Personify; researcher and co-founder, iVALS and Media Futures Program (both at SRI International); based in West Hartford, Connecticut, and San Francisco, California.

This is my personal blog. It speaks for me, not my employer.

Contact

email

Site Search

Feed

feed iconleft arrow What is this?

Twitter

    follow me on Twitter

    Recent Posts

    • Job Opportunity in CNET's Intelligent Cross-Sell Group
    • Copy and Paste Provenance
    • TypePad Sitemap Template with More Than 100 Entries
    • Microattention for Secondary Screens
    • Cloud and Jaffe's "The Fourth Star"
    • When Reporters Don't Want to Hear It
    • Review: "A History of the World in 6 Glasses" by Tom Standage
    • The Power of the Portfolio: VCs and Entrepreneurs
    • Coding for an Audience
    • "Coders at Work" by Peter Seibel
    • Recovering Energy from Shock Absorbers (Levant Power)
    • Book Review: Invictus by John Carlin
    • Klosterman's "Fargo Rock City"
    • "The Bloomberg of Wind" (Wind Pole Ventures)
    • Full-Circle Guitar
    • A Building to Behold: Yale's Beinecke Library
    • Blind Man's Bluff by Sontag and Drew

    Categories

    Analytics/Numeracy: 52
    Books: 28
    Business: 43
    Current Affairs: 2
    Design: 15
    Food and Drink: 1
    Music: 4
    Personal: 13
    Pseudorandom: 46
    Science: 3
    Web/Tech: 22
    Weblogs: 1
    Powered by TypePad