Saturday, October 22, 2016

Republican Meiosis

The Republican party is headed for a split, probably shortly after the 2020 presidential election.

Why? It's trying to be two opposing political parties at the same time. I will call these the Nationalist party and the Conservative Globalist party (Globalists, for short).

The Nationalists are the primary, vocal backers of Donald Trump. They are in favor of protectionist, anti-immigration policies, believing that Americans would be better off if we went it alone, without the rest of the world.

Two of the primary beliefs of the Nationalists are that American citizens are superior to non-citizens, and that the more generations of American citizens and Europeans you have in your ancestry, the more superior you are.

Globalists, on the other hand, believe that a citizen is a citizen. They may be in favor of some protectionist policies, but it is not a primary party position. Instead, they are focused on the more traditional Republican ideals of small government, man-woman-children-and-guns nuclear family structure, and global trade and immigration as good things in strict moderation.

But that is not an explanation of why I think the party is going to split after the 2020 election. Let me describe how I see the next few years, in the context of the Republican party:

After Donald Trump loses the 2016 presidential election to Hillary Clinton, the GOP is going to do some soul-searching, much as they did after Mitt Romney's 2012 loss to Barack Obama. "Why did we lose?" of course will be the primary question, along with "What could we have done better?"

Globalists will blame Donald Trump for offending voters. Nationalists will blame Republicans who refused to endorse Trump, especially those who announced their intentions to vote for Hillary. Republicans will divide into three approximately equal-sized groups:

  1. Nationalists will argue vehemently that Donald Trump was never given a fair chance, and that the Republican elite did their best to sabotage his campaign because he was a threat to them.
  2. Globalists will argue, probably less vehemently, that Donald Trump was only impossible to elect, but even if he somehow succeeded, would have been worse than Hillary.
  3. The centrists, the remaining third or so, will not take a side. Many voted for Trump because he was the Republican nominee, and that's what good Republicans are supposed to do, but they otherwise care little either way; politics are not a dominant part of their lives.

So what's special about 2020? I'm getting close, thanks for your patience so far.

After a brief period of argument following the 2016 election, the GOP will calm down and try to go back to how things were. They are, after all, conservatives, and therefore reluctant to change what has generally worked in the past.

The 2018 midterms will reinforce the widespread delusion among Republicans that everything has returned to normal. Because there is no single embodiment, no lightning rod representing either the Nationalists or the Globalists as there would be in a presidential election, Republicans will relax. If, somehow, the conversation of how to "fix" the party after 2016 is still going on, it will end after the 2018 midterms go more smoothly than expected, given the vehemence of 2016.

Unfortunately, 2020 will turn into a firestorm. There are only two possible choices for a nominee: Another Nationalist like Trump, or a Globalist. The center of the party is not vocal enough to get a nominee through the primaries successfully; look at Jeb Bush and John Kasich (Ted Cruz was a Tea Party Republican, closely related to the Nationalists).

If a Nationalist is chosen, the election will go much like the 2016 elections. The Republican elite will oppose him (and you can be certain the nominee will be a man; the Nationalists are strong traditionalists). He will offend women, immigrants, African Americans, and everybody in between, and lose, just as Trump in 2016.

If a Globalist is chosen (unlikely, as the Nationalists are so much louder than the Globalists), he or she will have a better chance simply by being inoffensive. But unless Hillary completely screws up her first term, the Globalist nominee will lose because it is extraordinarily difficult to defeat an incumbent. In recent history, it only happened in 1980 when Ronald Reagan wiped the floor with Jimmy Carter, and in 1992 when Ross Perot stole so many votes from George H. W. Bush that Bill Clinton swept the electorate. Republicans would need a prophet to unite the Nationalists and the Globalists, and the only obvious liberal spoiler is Bernie Sanders, who will be 78 and therefore older than Reagan, the oldest president, as he left office.

Either way, Nationalist or Globalist, the other side of the party will make character attacks against the nominee. Nationalists are loud and vocal character attack artists, forming online lynch mobs against anybody opposed to their beliefs. Globalists will attack anti-establishment Republicans due to lack of polish and poise, as happened with Trump. They can hardly help it; the primary Nationalist position of American superiority is offensive to Globalists, who are strongly egalitarian.

After losing their fourth presidential election in a row, the following Republican soul-searching will turn into a witch hunt. Nationalists will attack Globalists for being anti-American. Globalists will attack Nationalists for being uneducated and crude (the Nationalist core is white males without college degrees).

A new party will be born from the ashes, made up primarily of Nationalists and Tea Party Republicans. Globalists and most centrist Republicans will retain the Republican name; it is the Nationalists who are anti-establishment and will want to label themselves as such. I don't know what they will call themselves, but a few likely themes will be "America First," "Make America Great Again," and the "Great New Party."

Who will lead the new Nationalist party? My guess is someone like Ann Coulter or Steve Bannon. Probably a vocal Trump supporter in 2016, and possibly the 2020 Republican nominee, if he is a Nationalist.

The remaining Republicans will probably reorient themselves to center-right, but they may actually split further, with many members picking the upheaval as a good time to join the Libertarians.

The resulting three- or four-party system will result in presidential elections dominated by the Democrats for the foreseeable future. Congress will be held primarily by the now-moderate Republican party, with a significant number of Democrats and lesser, weaker numbers of Nationalists and possibly Libertarians. The Nationalists will become known for using the dominant minority techniques developed during the 2000s and 2010s, such as filibusters and government shutdowns, to get their way.

On the other hand, the Republican party has been around for a long time. Maybe a strong voice will emerge to unite the Nationalists and the Globalists long enough for one side to diminish and join the other. If so, he or she will have quite the task ahead.

Wednesday, September 28, 2016

Trump's First Term

What to expect during the first term of a Trumpian presidency:

  1. Every Trump resort that does not yet have a Presidential Suite will gain one, for well above market prices. President Trump will visit and stay in every single one, with the government footing the bills. And now that a sitting president has stayed there, the price is justified.
  2. Trump will not live in the White House. Instead, he will take a suite at the Trump International Hotel, just down the street. The hotel will rent rooms to the secret service to use for operations, and to other White House personnel so they can be on hand.
  3. Any time Trump visits a foreign country where he owns a hotel or resort, he will insist on meeting leaders at his property to raise its prestige.
  4. Trump will play golf on every course he owns, inviting popular politicians and businessmen to play with him.
  5. A larger number of books will be published under Trump's name than under R.L. Stine's in the 90s. I doubt Trump will write any of them himself. In them he will describe how he did everything he promised in his campaign speeches, whether or not any of it is accurate.
And a few less likely, but unfortunately plausible scenarios:
  1. The Trump Organization will begin to manage the White House as a hotel. They will rent out bedrooms for high prices, and pay only a nominal sum to the government.
  2. Air Force One will likewise be available for high-paying customers to fly on with President Trump.
Post in the comments anything else you think an unscrupulous businessman might do as POTUS.

Thursday, April 28, 2016

Star Ratings

XKCD has a few good comics on the problems with star ratings:

  • This one on how good the product is based on how many stars it has, and
  • This one on why averaging star ratings might not be the best approach.
With those in mind, I am searching Amazon for a portable air compressor to keep in the car. But what Randall Munroe missed was a mapping between the number of stars and the value of the attached review. So I came up with my own:

  • 5 stars: I just got it, and it works!
  • 1 star: I just got it, and it doesn't work.
  • 4 stars: It's not perfect, but it works.
  • 3 stars: It's okay, but don't buy it because I said so.
  • 2 stars: It broke, and here's why.
Maybe I'm cynical, but I pretty much just read the two star reviews. Those'll tell you how it broke and why.

Sunday, March 27, 2016

Hendrick's Gin

The other day I finally gave in to impulse and bought a bottle of Hendrick’s gin. I’ve only tried it a couple times, so this was my first chance to really play with it and figure out how to use it.

I didn’t like it (but keep reading, it gets better). I tried using it to make my standard slutty dry martini recipe, which is along these lines (I don’t measure):
  • 5-6 Large (or 7-8 small) olives with pimento filling
  • ½ oz Olive brine
  • ¼ oz Dry vermouth
  • 5-6 oz Frozen gin (I keep it in the freezer)
  • Dash of wormwood bitters (homemade by soaking wormwood in grain alcohol for a couple months)

It didn’t taste right. I like my martinis rather salty and dry, and despite going a bit heavy with the olive brine it wasn’t much of either. I couldn’t put my finger on why it didn’t taste right, but it was not like any of the martinis I’ve made with various London dry gins (Plymouth, Beefeater, Gordon’s, Bombay, Bombay Sapphire, and probably a few others).

The bottle came with a cute little pamphlet written in the style of the Powerthirst video. It focused on how Hendrick’s has cucumber in it, and that it works best when you play to that. Okay, let’s try something a little different:
  • ¼ oz Dry vermouth
  • ~2 oz Frozen gin (didn’t want to make too much, in case it was nasty)
  • 3-4 Dashes of cucumber bitters (from Cecil & Merl)

Ugh! The slutty martini was just sub-par, but this was actually bad. I finished it only because it’s hard to justify dumping any of a $40 bottle of liquor, but by the last few sips I was basically shooting it and hoping the taste wouldn’t linger.

Tonight I decided to try something a little different, though. Going back to the traditional dry martini, I realized the olive was probably the problem; they aren’t exactly cucumber-like. But how to emphasize the cucumber…

Ohh, what about pickle brine and cucumber vodka? So this is what I mixed:

Perfect! It’s like a pickle shot (½ oz pickle brine plus 1 oz cucumber vodka in a shot glass, very refreshing on a hot day) crossed with a martini. I had been wondering how I would get rid of the Hendrick’s; now I am wondering how long it will last.

Sunday, March 13, 2016

Bazel and Golang

As a Google software engineer, I use the internal Blaze build system every day. As far as build systems go, it’s really good. So I figured I’d give Bazel a try, since it’s basically the same thing.

Basically.

The part I guess I forgot about was that it isn’t supported and developed by teams of paid engineers all the time. That said, it’s actually not bad. It just feels incomplete after coming from Blaze.

I’m partway through setting it up to build an existing project in Go, which is just barely supported. The documentation is minimal and unclear, but I think I can help out.

Here’s how to take a $GOPATH-type workspace and make it work with Bazel without mucking up all of your project paths, and without symlinking parts of one workspace into another. Because that’s actually what the documentation tells you to do, and it feels wrong to follow it.

First, install Bazel. I’ll wait.

All done? Oh, you don’t like this writing style? Neither do I. I’ll stop now...

Next:
  1. Go to your $GOPATH (the parent of bin/ pkg/ and src/) and clone the Bazel repository:
    git clone github.com/bazelbuild/bazel
  2. Now we need to make some changes under src/:
    cd src/
    ln -s ../bazel/tools .
  3. Write a WORKSPACE file:
    cat >WORKSPACE <
    load("@bazel_tools//tools/build_rules/go:def.bzl", "go_repositories")
    go_repositories()
    EOF
  4. Write a BUILD file:
    cat >BUILD <
    load("@bazel_tools//tools/build_rules/go:def.bzl", "go_prefix")
    go_prefix("")
    EOF

I’m not sure why the tools symlink is necessary; it may be a bug in the Go rules. They can’t seem to find their automatically-added dependency without it.

And that’s it, besides for writing BUILD files for each of your packages. I do have one more tip for that part, though: Write your BUILD files in the parent directories of your packages. If you do this:
src/github.com/me/mypackage/BUILD:
load("@bazel_tools//tools/build_rules/go:def.bzl", "go_library")
go_library(
name = “mypackage”,
srcs = [“mypackage.go”],
visibility = [“//visibility:public”],
)

Then when you use that package from Go, you’ll need to double the ‘mypackage’ part:
src/github.com/me/pkguser/BUILD:
load("@bazel_tools//tools/build_rules/go:def.bzl", “go_binary”)
go_binary(
name = “pkguser”,
srcs = [“pkguser/pkguser.go”],
deps = [“//github.com/me/mypackage”],
)

src/github.com/me/pkguser/pkguser.go:
package pkguser
import (
“github.com/me/mypackage/mypackage” // Redundant, eh?
)

But if you write the BUILD file one level up, the names work out as you would expect:
src/github.com/me/BUILD:
load("@bazel_tools//tools/build_rules/go:def.bzl", "go_library", “go_binary”)
go_library(
name = “mypackage”,
srcs = [“mypackage/mypackage.go”],
)
go_binary(
name = “pkguser”,
srcs = [“pkguser/pkguser.go”],
deps = [“:mypackage”],
)

src/github.com/me/pkguser/pkguser.go:
package pkguser
import (
“github.com/me/mypackage”
)

On the other hand, your BUILD files will be longer mix together multiple unrelated packages if you do it this way, so you’ll need to decide what is best for your own project.

Sunday, February 28, 2016

Choosing a Computer Monitor

Computer monitors are difficult to choose because you need to pay attention to so many different features, and a few mis-features.


I played no part in my wife’s recent choice of a new monitor, and we both regret it. I stayed out because she didn’t ask for advice (I tend to give too much), and she didn’t ask because she didn’t know about the Rules of Monitor Selection.


Yes. There are Rules.


They are not, as I had assumed, common knowledge.


Allow me to let you in on the secret. Firstly, do not buy any monitor...
  • With an external power supply. They are hard to replace when they wear out, and they add clutter.
  • With a power input other than a standard PC power cord. Anything else is hard to replace.
  • With display or power inputs perpendicular to the screen; they should enter straight up from below. When they stick out of the back, they add depth that won’t be accounted for in the published dimensions, and they add a twisting stress to the circuits inside from gravity pulling on the cords.
  • Missing any input type you need right now, for obvious reasons.
  • Without an HDMI input (DisplayPort if you prefer Macs). Your next computer will probably have this kind of output.
  • Without a height adjustment. Your desk may not be the perfect height, but at least your monitor can be.
  • With a resolution below 1920x1080 (aka full HD or 1080p) in either dimension. This is the current minimum standard. Remember when it was 800x600? It sucked, right? Same thing here. Don’t buy below the beast.


Completely avoid anything that matches those. Don't even look at them. They will try to seduce you with pretty pictures, but they're not worth the heartache the next morning.


Now to help you choose the best from what remains. A monitor is better if, in generally descending order, it...
  • Has a DisplayPort input. This is the next most popular after HDMI. If your next computer doesn’t have HDMI, it will probably have DisplayPort.
  • Has a pitch adjustment (tilt up/down). You can use the height and pitch adjustments to get rid of a reflection and keep the screen in a comfortable position.
  • Has a swivel base (twist left/right), so when you turn the screen to let someone else see, you don't knock over your coffee.
  • Includes a built in USB hub (bonus points for USB 3).
  • Can rotate between portrait and landscape modes. This is most useful for coding or writing long documents.
  • Is color calibrated, for graphical design.
  • Does not have built-in speakers. They will be awful. This is a monitor, not a TV.


What about 4k monitors? Make sure your computer can support the higher resolution if you’re thinking about getting one of these. It needs either a DisplayPort output, or HDMI 2.0 or newer.


So what do I recommend? I have an ASUS PA249Q 24.1” 1920x1200 monitor. It has HDMI, DisplayPort, DVI, and D-SUB (aka VGA) inputs, no speakers, a standard PC power cord, all the various adjustments, a 4-port USB 3.0 hub, and multiple different color calibrations. It is easily the best monitor I have ever had, and I strongly recommend it. It can even do side-by-side and picture-in-picture.

Oh, and you should probably avoid Samsung. They tend to feel really cheap.

Note: As an Amazon associate, I may earn a commission from purchases made through links followed from this page.

Saturday, February 6, 2016

Prototypes

If you’ve ever visited a Google office and used the bathroom (great way to begin, right?), you probably saw an episode of Testing on the Toilet (or possibly Learning on the Loo) posted at eye-level. This week I saw a post about prototypes. It said there is a simple rule to determine whether your project is a prototype: Whether it will live a short about of time, and then be deleted.


But that’s not an easy way to identify a prototype. “Why not?” you ask (well, probably not, but it fits my writing style). “It sounds simple!”


No, it’s not simple, because it requires you to see into the future. You need to know that your project will only live a couple weeks, and then go away. But how could you know that?


While working on a personal project (I am implementing the Raft consensus algorithm in Go), I discovered a much simpler test for whether a project is a prototype: If you cannot use test driven development, it is a prototype. Think about it for a moment. I’ll leave a break between the paragraphs.


Really, think about it...


When can you write the tests before the actual code? When you understand the solution, which means you have a plan.


When you’re ready to write an implementation.


When can’t you write the tests first? When you are exploring the problem, trying to understand what the solution might look like.


And guess what? If you try to write tests after writing an exploratory solution, the tests are going to suck. You’ve probably done it before. They cover the easy, obvious cases, but you still worry a little about some corner cases that were just too hard to reach. Maybe you were considerate enough to put todo comments on them, but a todo is not the same as a test.

My experience implementing Raft convinced me that I am writing a prototype. I will do it again when I finish, and I may do it again after that. This is how I learn; I write something that kinda works, and then I know enough to write it better. Eventually better is enough to be production code.