Abstract URLs with Apache .htaccess files

I moved my web pages to a new server, but neglected to copy my Apache .htaccess files. For WordPress, no problem, since the WordPress software itself reminds you of what .htaccess content you need. But for generic abstract URLs, such as letting users request www.example.com/foo and serve them www.example.com/foo.html, what do you do?

After several attempts, I found, as usual, the answer at Stackoverflow:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule (.*) $1.html [L]

The Polar Vortex Has Departed

After two weeks, the polar vortex has departed the area, leaving us with seasonably-comfortable temperatures in the upper twenties and low thirties. Samantha the border collie and I took a long walk around a nearby park.

Planning Sound Panels

I have had two boxes of Roxul Rockboard sitting in the garage for two years, in preparation for making sound panels. Now I am wishing I had just bought sound panels, instead of material for making sound panels. The cost difference isn’t that much, but it would be a lot easier.

But there they are, the two boxes of Rockboard. So use them I shall!

Linksys AC750 WiFi Extender

IMG_5019Over the recent holidays, I set up a couple of Ring devices: a doorbell, and a camera overlooking our hard-to-see-from-inside-the-house driveway. Both devices worked generally well, but it often took several tries to connect to a live view of the camera video feed. Both devices showed fairly low WiFi RSSI signal strength numbers, which was not that surprising given that they are outside above ground level, and the wireless router (hooked up to the Internet connection) is in the basement.

So I installed a Linksys AC750 WiFi Extender in the garage. Contrary to some of the Amazon reviews for the AC750, I found the setup process clear and easy to do… for a software engineer! The instructions probably could have more clearly explained some steps for general readers, but nevertheless I have it up and running.

It only boosted the RSSI numbers a little bit (about 5-10), but it was apparently enough to give much better response time on connecting to the camera live views. A solid addition to the home doorbell/camera system! Perhaps Ring should offer their own especially-easy-to-set-up WiFi extender?

The Return of Something for Cat

I had recently heard a well-respected multimedia composer state that one of my personal favorite genres of music, what you might describe as 1960’s easy listening light big band jazz, a la Henry Mancini or Neil Hefti, was really no longer commercially desirable.

But just this month, I heard on two separate commercials, Mancini’s track *Something for Cat* from the *Breakfast at Tiffany’s* soundtrack. Perhaps this style is making a bit of a comeback?

Even if not, style aside, *Something for Cat* is a fine example of one of the main features of much commercial / library music today: very minimal melody, with an arrangement that builds, adding a new component, every few measures. Let’s take a listen:

Today’s most typical commercial guidance is to add a new musical element every four measures; here, depending on how you are counting the time, Mancini is adding a new element every eight measures:

  • Eight measures of percussion and low horns
  • Eight measures of adding a low sax riff
  • Eight measures of adding a high muted trumpet riff
  • Eight measures almost the same as the previous, but building the intensity of the drums/percussion

None of this is especially melodic, and thus none of it would especially interfere with on-screen dialogue or narration. In other words, great background underscore music.

After those opening 32 measures, Mancini then goes into a short “B” section of the song, a little bit more melodic, but still reasonably containable in the background.

Past that, the piece goes into various jazz solos, and becomes less generally desirable as multi-purpose commercial library music. It may well work in a particular setting, but such virtuosic lead lines are prone to conflicting with dialogue. When producing modern commercial library music, there is nothing wrong with including such passages, but you would probably want to also provide variations without the soloing.

Even so, the core essence of the track bears much structural resemblance to the commercial music today. And whether if we are seeing a big return to 1960s jazz stylings or not, it’s nice to hear this track getting some fresh air time!

Commercial Electric Ceiling Lights

Having completed the drywall and painting in a newly-finished room in the basement, I started looking at light fixture options. Other rooms in the house had been outfitted by the original builder with basic Patriot Stella fixtures, part of the Menard’s store line of light fixtures, so I bought a package of those to match.

After three hours of trying to install one of these Patriot Stella fixtures, I gave up. The included wire nuts were on the small side, and it was unusually arduous to join the wires. In trying to get the questionably-spaced screws on the mounting plate to line up with the base of the light fixture, the mounting plate was getting bent. I presume there is some trick to getting these light fixtures installed easily, but I wasn’t sure how I was going to finish the first fixture, much less get the next two up.

Eschewing Menard’s for any further light fixtures, I browsed Home Depot’s website for well-rated ceiling lights. One reviewer of the Commercial Electric LED Flush Mount fixture claimed a successful installation in eight minutes. Sounded promising, so I trundled over to Home Depot and bought one.

Back in the basement, the installation process went much better. The wire nuts easily accommodated the needful wires, and it was trivially easy to line up the screws with the fixture base. All in all, I had the fixture installed and working in about thirteen minutes.

Being an integrated LED fixture, I believe you typically replace the entire fixture when the long-lasting LED element eventually wears out, but that could be years. And with a fixture as easy to install as this one, I would not at all mind replacing it every few years.

Thank you Commercial Electric!

Are Books Worth It?

There was an interesting discussion thread on Hacker News today, on the subject of the value of reading books.

The proposed premise was that, essentially all information must be freely available on the world wide web, right? Is it still worth it to read books? Or can you just scour blogs and tweets to find anything you want to know?

My own personal book-reading time has waxed and waned over the years; I would readily and heartily agree that I get more enjoyment and satisfaction out of reading a book than I do out of most web browsing, but web browsing is easier, and it at least superficially feels like I am reading and learning.

The Hacker News thread includes many insightful comments. One that I found especially valuable is from user ivan_ah:

The way I see it, non-fiction books are all about distillation of information. Yes most of the information from books is freely available online in some other form, but you’ll have to dig for it in many places, and learn from many narrators.

The benefit of the book-length information product is that a single author went through all the possible sources and used their expertise to give a coherent story on a subject. You can think of the book as someone who read 100 blog posts for you and extracted the useful info from them.

As a learner, I have found this to be true. Last year, for example, I was learning to use the VueJS Javascript framework. There is a great wealth of information in blog posts. Now, as an experienced VueJS user, I can read an individual blog post and get an answer to a specific question. But when learning the framework initially, I found it beneficial to read a book, to have that “coherent story” rather than a bunch of discrete chunks of information.

This should also be an encouraging thought as a writer. It can be easy to talk yourself out of writing a book on a subject because everything that you know about it, you learned from someone else! That whole sum of knowledge is already out there on the web! But you can nevertheless distill your own coherent story into book form, and produce a beneficial educational experience.

The Food that Built America

Seamlessly blending historian interviews with dramatized re-enactments, The History Channel’s three-part series on The Food that Built America offers a surprisingly riveting look at what might sound like some mundane topics.

A few things I learned:

  • Tomato ketchup, historically known as tomato catsup, is a tomato-based variety of “catsup sauce”, other varieties of which include fish-based sauce and walnut-based sauce. The original purpose of all of these “catsups”, tomato catsup included, was to mask the unpleasant flavor of rotting meat, as most meat at the time was not kept very well, but people felt compelled to eat it anyway, rather than let their expensive food go to waste.
  • The Heinz Company, purveyor of quality tomato catsup, successfully lobbied the United States government to establish and enforce food preparation regulations, in order to push out of business low-budget competitors who were making inferior tomato catsup on the cheap.(Perhaps had Heinz done this first, meat would not have been served rotten, and we never would have needed tomato catsup in the first place!)
  • The Kellogg brothers developed breakfast cereal initially as a quasi-medicinal product, to help people suffering from poor digestion and other stomach ailments. (Maybe from eating too much rotten meat?) One of their patients was C. W. Post, who “borrowed” the idea and launched breakfast cereal to the general public. William Kellogg eventually followed suit as a competitor, though his doctor brother was at best reluctant to market their “medicinal” breakfast food as a commercial product.
  • Milton Hershey launched his chocolate business before he had even figured out how to make chocolate, including building housing for employees and hiring an executive salesman to market something that did not yet exist. He was confident that he could develop a usable recipe, and that, once that part was compete, milk chocolate would be a runaway success.
  • In the midst of the Great Depression, when many people lacked the resources to buy much food, Hershey halved the price of his allegedly protein-rich, peanut-filled Mr. Goodbar chocolate, touting it as a meal substitute with the same nutritional benefit as a pound of meat.

The series was enjoyable to watch, well-acted, well-produced, and left me both wanting to learn more about the origins of these everyday products, and maybe wanting to eat some more of them.

American Airlines: This Page Has Taken Flight

I was recently trying to book a flight on American Airlines using accumulated miles/points. Every time I got to the end of the booking process, I reached a page that said “This Page Has Taken Flight”, and I lost all of the booking information I had entered thus far.

Eventually I found the solution on a web forum posting. Apparently, despite having flown on American Airlines many times, my account had gotten into a state such that my home address was not on file. Entering my home address into my account details enabled me to complete the flight booking.

This error message was very mysterious, and nothing about it even remotely suggested what the problem was. Sharing this tidbit here in case it helps anyone else!

The Forgotten Founding Father

I just finished reading The Forgotten Founding Father, Joshua Kendall’s biography of Noah Webster.

Preceding President Trump’s “America First” campaign by some 230 years, Webster was an adamant supporter of breaking from European influence and promoting development of resources within the United States:

At dinner, [George] Washington happened to mention that he was looking to hire a young man to tutor his two step-grandchildren—Nelly and Wash Custis, then living at Mount Vernon. He told Webster that he had asked a colleague in Scotland to offer recommendations. A stunned Webster shot back, “What would European nations think of this country if, after the exhibition of great talents and achievements in the war for independence, we should send to Europe for men to teach the first rudiments of learning?” Immediately grasping Webster’s point, a humbled Washington asked, “What shall I do?” But even before he had finished his question, the General himself knew the answer. Out of respect for the emerging new nation, he would restrict his job search to Americans.

If we are ever tempted to look at the current state of United States politics and pine for the good old days of the 1830s, we might remember that Webster was pretty distraught back then too:

He detested President Andrew Jackson as the second coming of Jefferson. In the 1832 election, he supported the third-party candidate William Wirt, as he no longer wanted anything to do with either of the major political parties. By 1836 … he also looked down on his fellow Americans: “I would, if necessary, become a troglodyte, and live in a cave in winter rather than be under the tyranny of our degenerate rulers. But I have not long to witness the evils of the unchecked democracy, the worst of the tyrannies. . . . We deserve all our public evils. We are a degenerate and wicked people.”

The impact of humans on the environment was also a popular topic in Webster’s time:

Ever since the Revolution, numerous writers had taken the position that American winters were becoming milder. These advocates for the eighteenth-century version of “global warming” included Thomas Jefferson, who had addressed the question in his Notes on Virginia; Benjamin Rush; and Samuel Williams, a Harvard historian. The man-made cause was allegedly the rapid deforestation of states such as Vermont. Webster challenged his predecessors on the basis of their lack of evidence. Noting Jefferson’s reliance on personal testimony rather than hard data, Webster wrote disparagingly, “Mr. Jefferson seems to have no authority for his opinions but the observations of elderly and middle-aged people.” Though Williams, in contrast, did engage in some statistical analysis, Webster convincingly argued that he had misconstrued the facts at hand. While Webster acknowledged that winter conditions had become more variable, he maintained the America’s climate had essentially remained stable….

The work of compiling his American English dictionary apparently demanded intense concentration. In one house, “to make sure that he wouldn’t be disturbed by the children, he packed the walls of his second-floor study with sand.” In another house, the construction of which he personally oversaw, “Webster had double walls installed in his second-floor study.” Adding mass to the wall and constructing two layers of walls both remain recommended tactics for sound isolation today.

The story of Webster’s life itself was fascinating to learn about, but perhaps just as interesting are the various side remarks about the people and places he encountered. In this book we learn bits of history about New England states; the founders of familiar cities and organizations; and details about Revolutionary-era battles, pamphleteering, and government development from a more personal perspective than usual.

What about the implication of the book’s title? Was Noah Webster a founding father of the United States? Others certainly appear more instrumental in initiating and developing the foundations of the country, but Webster clearly played a major role in supporting the new republic through a prolific number of articles and numerous speeches. Webster’s role may have been more supportive than creative, but that does not diminish his importance.

As usual, I read a paperback edition, but as the cover became worn from being stuffed into the back of the seat in front of me on several airplane trips, I thought a digital edition might have been nice too, at least for reading as a travel passenger.