Beutelevision

by Thomas Beutel

Is it a bus or a streetcar?

I have to admit that I get slightly annoyed when I hear someone say they’re taking the bus when they are talking about taking a streetcar. Don’t they know the difference between rubber tires and steel wheels? Yes, I know that when someone takes the bus, for them it is not really about the type of transportation, it’s about the mode.

Of course, this is not about them, this is about me. Being the rail nerd that I am, I’m very particular about all things that run on rails. The N-Judah is a streetcar. Okay, okay, I know I’m on thin ice here. Technically it is a light rail vehicle. It’s also the metro. But I’ve been taking the streetcar since I was a toddler, and I took it daily as a middle-schooler. No yellow school buses for me! And so yes, it’s still streetcar for me.

Nerds of any type, me included, see our particular nerd-hood differently. Did you know for instance that among the previous class of Boeing light rail vehicles, two came equipped with trolley poles for testing purposes? Or that one of the original PCC streetcars was fitted with a pantograph for testing in the new subway? For us, every little quirk is a gold nugget that gleams from our stream of streetcar trivia.

So I won’t get upset if you say “I’m taking the bus” when you go downtown on the N-Judah. But if you say “I’m taking the streetcar”, you will definitely spark a bit of joy in this old rail nut’s heart.

Yes, I am modeling the Embarcadero Freeway

The Embarcadero Freeway was truly a depressing structure and made the Embarcadero near the ferry building seem dark and foreboding. And although the 1989 earthquake was a terrible experience, one of the few good things that came out of that was the condemnation and eventual removal of the freeway. Now walking along the Embarcadero is really a delight. Who would have thought in the 1960s that the Embarcadero would be transformed into a palm lined street bustling every day and night with people?

On my HO-scale Redwoods and Pacific Railroad, I’ve been planning for a long time to have a ferry building and a short section of Market street, along with a trolley loop. But guess what? I’ve decided to build the freeway.

Why? Perhaps there is something to the grittiness of those scenes in the 1960s when the Embarcadero was still mostly industrial. I like the way those State Belt RR trains would disappear under the concrete. I’m not striving to be prototypical per se… the streetcar and State Belt tracks will be combined and the total area for the city is barely large enough for a tight loop.

Mostly I’m doing it because I’ve always wanted to add a racetrack. An early design had the racetrack on the lower level so that I could use the road and rail crossing. But separating the two makes things a lot easier. The upper deck will be made from Tyco US1 trucking sections and the track will form an elongated figure-8 as it loops through the city.

What will it look like? Am I making a big mistake? We’ll see. I’m hoping that it will all look as gritty and industrial as those old black-and-white photos. I’ll post some pics once I have something to show.

I’m really liking Vue.js, especially for existing projects

Vue.js promotes itself as a progressive framework, meaning that you can start small and use as little or as much as you need. I’ve been working on Vue.js projects at both ends, some full fledged projects using vuex, components, and vue-cli, and some projects which are just a single component in an existing web page. It is the latter that I’m really jazzed about.

The fact that I can use vue.js standalone on an existing page is amazing. It allows me to introduce reactivity and easily pull in APIs while leaving the rest of the page alone. For small projects like this, all of the component code can be kept in one javascript file, making maintenance easier. Vue.js is especially useful for websites that use a CMS and are a bit clumsy to work with. Most CMSes also have a JSON API either natively or with a plugin that you can leverage by adding axios.js.

I recently needed to add a small bit of third party data to an Expression Engine page. Vue.js made it easy to add. All I needed to do was to load a minified version of vue.js and axios, plus the code for the component. Three files, with the component code all in one place for easy maintenance.

Vue.js is a great platform for larger multicomponent projects managed via webpack, but it is also so nice to use for small single page enhancements.

Dear Facebook, please don’t make your AI too smart

Facebook greeted me today with one of those auto-generated videos. “You’ve been friends with Joyce on FB for 9 years!” Which struck me kind of funny because Joyce and I married almost 3 decades ago and we met a decade before that. Normally I just move past these videos. I just think friendship span on FB is not particularly relevant.

But I guess curiosity got ahold of me so I watched it. The cover photo was well selected… a photo of the two of us with our daughter a few years ago at her high school graduation. I’m thinking, well selected! FB knows our relationships and it selected a photo our family. Neat. The next ones were then and now photos, and that’s where I lost it. The “then” photo was a picture of a dead rat, and the “now” photo was of the chrysalis rack at Cal Academy where they grow butterflies. I was howling in laughter.

So of course I published it. When I showed Joyce, she burst out laughing too. We really do share the same funny bone. We laughed so much that the following pictures were just a blur.

I don’t know what algorithm Facebook uses to select photos, but for whatever reason, it selected a photo of a dead rat. Sure we had posted it (don’t ask why), and sure we probably commented on it in some way that was interesting to the algorithm. Who knows.

But I can imagine a future where Facebook’s algorithm for selecting photos is a lot smarter and might think, hmm, maybe not the dead rat. I hope that doesn’t come to pass, because if it does, our lives will become so much more boring.

Or at least, give us the option to turn on “dead rat” mode. Please.

Where are the halibut and stripers at Crissy?

I went fishing yesterday at Crissy Field. I had one bite on my swimbait that felt like a surf perch. This year is nothing like it was two years ago. There seem to be plenty of halibut being caught in the south bay where it is clearer.

But so far this year, no stripers and no halibut have revealed themselves to me at Crissy beach. Certainly the rainy winter has had something to do with it. But mostly I think it is about bait fish. In March and April I did see small baitfish jumping. I even found a 2 inch anchovy on the beach at the beginning of April. But now the baitfish are gone. Obviously if the dinner table has no food, the guests will not hang around.

I’m not sure what drives the baitfish. Is it the plankton or lack thereof in the water? Is it fresh water in the system? Is it warmth? And what about the warm and cold spells we are having right now.

Here is what I’m guessing. The previous years were drought years. The whole bay was saltier and warmer. With the flood waters coming down from the Sacramento and Feather, the north bay is colder and less saline. The baitfish that did not move out the gate went to the south bay.

When will it change? Probably not until June or July, depending on how much warm weather we get. I’ll be interested to see if my prediction is correct.

vue.js – ERROR in bundle.js from UglifyJs – SyntaxError: Unexpected token punc «(», expected punc «:»

I started playing with vue.js and used vue-cli to scaffold a new project. It all worked well until I tried npm run build. Then I got the following error:

ERROR in build.js from UglifyJs
SyntaxError: Unexpected token punc «(», expected punc «:» [build.js:8643,6]

It took me a while to find the answer, but I found it on Stackoverflow here:
http://stackoverflow.com/questions/41254538/error-in-bundle-js-from-uglifyjs

Basically I needed to create a .babelrc file as follows:

{
 "presets": [
  ["es2015", {"modules": false}]
 ]
}

That solved the problem for me, and the build is now successful.

WordPress Visual Composer, EventsPlus plugin and a.poplight[href^=#] syntax err

Today I came across a weird bug on a client’s wordpress site that broke Visual Composer. The Javascript console was reporting a a.poplight[href^=#] syntax err which seemed to indicate that popups were not working. Indeed, there was a section of the page with tabs that showed no content under the tabs.

After a bit of googling, I found this: https://wordpress.org/support/topic/since-wp-upgrade-with-event-reg-60202-apoplighthref-syntax-err

I found the offending code in wp-content/plugins/eventsplus/evrplus_public_script.js and replaced a.poplight[href^=#] with a.poplight[href*=\\#]

I did not check yet to see if EventsPlus has been updated as I was in a bit of a hurry, but everything is now working.

My guess is that jQuery got updated and it no longer recognizes the href^=# syntax.

Leap Second on 6/30/2015 Caused mysqld Process To Consume CPU

This morning I got a notification that mysqld was consuming on average 35% of the CPU on one my servers. This was strange because this particular server doesn’t even use MySQL regularly. It’s there only to serve a rarely used legacy table. A quick look with “show processlist” confirmed that there were no queries running. After a bit of search, I found the solution here:

https://blog.mozilla.org/it/2012/06/30/mysql-and-the-leap-second-high-cpu-and-the-fix/

The solution is to run a short script that sets the correct time. Basically, the cause was the leapsecond that was added at midnight UTC. Here is a screenshot showing when mysqld starting consuming CPU – exactly at midnight UTC.

Screen Shot 2015-07-01 at 8.11.15 AM

McArthur-Burney Falls on the Redwoods and Pacific Railroad

My latest project on my model railroad is this waterfall. I’ve patterned it after McArthur-Burney falls in Northern California. It’s still a work in progress, but I’m liking how it is turning out.

IMG_0900

Island Mountain Bridge on the Redwoods and Pacific Railroad

A passenger local crosses the Island Mountain Bridge on the Redwoods and Pacific Railroad. The bridge is kitbashed from two Vollmer 2546 Kastenbrücke kits. The passenger cars are by Roundhouse and Model Power and the locomotive is a Sunset brass engine.

IMG_9745