13 August 2015

A note about C++ std::accumulate

For any C++ programmers...

When using std::accumulate, the return type is inferred based on the third parameter. So be sure that the third argument is the same type you expect it to return. See this example.

(For some reason codepad’s C++ compiler complained about using 0ULL, so I used static_cast<uint64_t>(0) instead.)

29 May 2015

Dear Fender...about the amp section of your site

I couldn’t find a way to submit website feedback on the Fender site, so I’m posting it here.

On 29 May 2015, I got a marketing e-mail from Fender entitled: The Ideal Amp For Your Sound. Here’s a brief outline of the contents:

  • The ultimate amp for creativity
    Mustang™ I (V.2)
    ...easy to record, edit, store and share your music.
  • Affordable onstage versatility
    Champion™ 40
    ...an ideal choice as your first stage amp.
  • Beautiful acoustic amplification
    Acoustasonic™ 90
    ...perfect for the acoustic guitarist...
  • The standard for gigging guitarists
    Blues Junior™ III
    ...ideal for the go-anywhere guitarist who needs to hit the stage or studio at a moment’s notice.
  • Clear, deep and powerful
    ’68 Custom Twin Reverb®

This is great! (And the full e-mail was even better without being too wordy.) It’s a real shame that—as a marketing e-mail—so few of your potential customers will receive this. And even for most of them, it will likely end up in their spam folder.

This is exactly what I should—but never have—found when I go to your web site and click on amplifiers. The site is great for someone who already knows your products. It does nothing, however, to help the customer who is trying to figure out what Fender amp is right for them.

I usually spend a while digging around trying to figure out why I might want one of your amps over another...but I end up frustrated and none the wiser for my time investment.

Make this e-mail the starting point for the guitar amp section of your site.† I’m sure you could make it even better. (If nothing else, the Twin Reverb® section doesn’t say what sort of guitarist it is good for like the other sections do.) Then back up each of those selections with another page that explains what other Fender amps that kind of guitarist might also consider and why.

(†Don’t lose the navigation that allows those who know what they want to go directly to it, of course. That’s a strength that you want to keep.)

13 May 2015

The information age

I was about thirteen when Mandelbrot’s The Fractal Geometry of Nature was published, and I wanted to read it. I checked the school libraries. I checked the public library. I asked bookstores to order it. I had my dad check the University of Houston library. All to no avail.


Today, I was reminded of it, did a quick search, and bought the e-book version.


I will not be surprised if it contains nothing that is, today, available freely on the web.

22 March 2015

Rust monster

The rust monster is one of those D&D monsters that is interesting because it requires different tactics than usual.

Well, it has the potential for that to make it interesting. When the PCs encountered one in my Skylands campaign, standard tactics worked just fine, and the PCs never saw its special ability in action. The character with the highest AC—who might have been reluctant to attack if he’d known what a rust monster was—took it on essentially by himself. The rust monster never scored a hit.

The rust monster presents two dangers: One to metal armor and one to metal weapons. Let’s look at weapons first.

I was using the Rules Cyclopedia description, which says...

A successful attack roll indicates that the rust monster’s body is hit, which does not harm the weapon.

I see now, however, that Moldvay wrote...

If a character hits a rust monster, or if a rust monster hits a character with its antenna, it will cause any metal armor or weapons touching it to immediately rust

If I had used the Moldvay description, the players would have discovered the danger to weapons.

We could do a middle-ground approach. Only the antenna cause rust, but give each attack against the rust monster some chance of hitting the antenna instead of the body. And allow anyone who is specifically avoiding the antenna to do so with at a penalty.

But that’s more complication than I want. So I’ll run rust monsters the Moldvay way in the future.

Aside: So often when I find a difference between another edition (or a retro-clone) and Moldvay/Cook/Marsh D&D, I prefer the latter. It’s the organization, though, that has me using the RC and the Creature Catalog at the table.

To me, the rust monster’s danger to armor, however, is the more interesting aspect. Once the danger is realized, it is easy enough for the PCs to change weapons. It is harder to change armor. But that danger is never realized if the rust monster can never land a hit.

I’m not a big fan of “touch AC” as a generalized rule. I want characters to have a single armor class as much as possible.

Using “touch AC” as a special rule for a specific monster, however, I think fits in the classic D&D style. So I’m liking the idea that a rust monster’s attacks ignore armor.

(Thanks to everyone one G+ who participated in the discussion about this back in December.)

21 March 2015

Size-based combat modifiers in D&D

(Here’s a post I started a long time ago. My group has started up another 3e campaign, though, so time to finish it up and publish it.)

In 3e D&D, a “small” creature gets a +1 to attack rolls (which makes it easier for them to hurt others in combat) and a +1 to Armor Class (which makes them harder to be hurt in combat). Conversely, a “large” creature gets a -1 to attack rolls (which makes it harder for them to hurt others in combat) and a -1 to Armor Class (which makes them easier to be hurt in combat). Bigger and smaller creatures have larger and smaller modifiers in the same vein.

Here is the relevant section from the d20 SRD

The problem here is that 3e often falls for a fundamental mistake about how the underlying combat system works. The attack roll was formerly called a “to hit” roll, but if you analyze the entire system, you see that thinking of this roll as actually determining whether an attack made contact doesn’t really make sense. Attack rolls, armor class, damage rolls, and hit points really have to be treated together as an abstract system.

If you say that because larger creatures are easy to hit than smaller creatures and thus give the larger creature a penalty to Armor Class, you haven’t really represented that larger creatures are easier to hit. What you’ve done is made the larger creature less effective in combat. The D&D combat system doesn’t answer the question of whether an attack hits. It answers the question of how effective each combatant is.

You can say that adjustments to constitution scores, hit dice, and hit points make up the difference. In truth, however, they really don’t.

It might work, however, to reverse the modifiers. Giving small creatures a penalty to attack rolls and AC would make them less effective in combat, which is what I would expect the general rule to be. Giving large creatures a bonus to attack rolls and AC would make them more effective in combat, which—again—is what I would expect the general rule to be.

20 March 2015

How not to sell car insurance

The Internet is for ranting about things you find offensive, right? And this blog is about “thinking out loud”...

A car insurance commercial that implies that today “men are superior drivers” is an idea that would be entertained as anything but pure stupidity offends me.

Also, trying to use a logical fallacy to dispute stupidity. (i.e. If group A really were superior drivers, group B could still contain good drivers.)

Also, a commercial that tries to refute a sexist sentiment by changing a woman’s voice into a man’s voice.

The thing more surprising than this thing actually being aired is that it is still being shown.

19 March 2015

Gold Apple watches (revisited)

A gold Apple watch will not be useless in two years. It will likely be able to perform the same function that other gold watches do—show the time—as long as the battery can still be recharged. It may not last as long as a comparably priced mechanical watch, but neither will it be worthless as soon as a cell phone. (And just because many people buy a new phone every year or two, that doesn’t mean that lots of people aren’t happy to use them longer.)

It seems that the amount of gold in a gold Apple watch is likely a very small fraction of the price. I think, however, that the point that Apple products tend to hold their value well stands. They probably won’t hold their value as much as a Rolex, but I expect them to hold their value at least as well as an iPhone.