dtrace for Mac

strace is pretty handy on Linux for profiling processes, including attaching to a running one and WTF-ing it.

It turns out that there’s a Mac equivalent, dtrace1. If you skip past the instructions on how to use the terminal and using top, there are some good examples of using dtrace, including a lot more than just profiling system calls.


1 Calling it a Mac app is slightly misleading; it comes from Sun. But to someone used to strace on Linux who is using a Mac, dtrace is the equivalent.

TIL of aquagenic pruritus

Aquagenic pruritus is a skin condition characterized by the development of severe, intense, prickling-like epidermal itching without observable skin lesions and evoked by contact with water.

It turns out you can be allergic to water. It appears to “only” cause itching, versus causing one to break out in hives, but it’s certainly not something I’d wish to have.

Things that just aren’t true

Human beings, myself included, have this fascinating flaw where we hear information, assume it’s true, and go around repeating it. The end result is that a lot of garbage is floating around as facts.

  • You know that crazy lady who sued McDonald’s and successfully won because her coffee was too hot? It’s surely either urban legend, or was a ridiculous, frivolous lawsuit, right? Nope! It was a real court case, Liebeck v. McDonald’s Restaurants, and the facts suggest it’s actually a very legitimate lawsuit. More here.
  • Poinsettias aren’t particularly dangerous to pets. They are mildly toxic, but [the ASPCA says] they are “generally over-rated in toxicity.” Don’t feed them to your pets, but they’re not the enormous danger the news, for some reason, makes them out to be.
  • Diet soda (specifically, aspartame) doesn’t cause cancer. The American Cancer Society calls talk of this “rumors” which “continue to circulate the Internet.” They also address talk about how aspartame, when digested, includes methanol (toxic!) as a by-product, pointing out that, for example, fruit juice produces ten times as much. They go on to debunk, in detail, the myth that diet soda / aspartame causes cancer.
  • Vaccines don’t cause autism. This myth came about in 1998, when British “former surgeon” Andrew Wakefield published a study in The Lancet arguing that the MMR vaccine was linked to autism. Trust in the vaccine plummeted. As Wakefield’s study came under fire for undisclosed conflicts of interest, The Lancet called his study—which it had published—”entirely flawed.” They went on to entirely retract the article, and ultimately deemed it a fraud, showing that Wakefield had forged data. His article spurred others to investigate his claims; subsequent, credible studies have not reached the same conclusion. Autism Speaks, Inc., an advocacy group for those affected by autism, says of subsequent studies: “These studies have not found a link between vaccines and autism,” and that they “strongly encourage” that parents vaccinate their children.
  • MSG, which everyone knows as that thing that used to be in Chinese food until it was banned for being carcinogenic or something, is actually recognized by the FDA as being safe. Knee-jerk reactions caused it to practically disappear from use, but scientists have never found any actual correlation. (Interestingly, though, it seems like there is a strong placebo effect among those who think they are allergic to MSG.) You can even buy MSG on Amazon, where it seems to have pretty good reviews.
  • High-fructose corn syrup is in a similar position. It’s pretty much vilified, and studies have found all sorts of health issues associated with it. But, here’s the thing that’s key: those health issues are the same as with normal sugar. Excessive intake of either is bad. There’s currently little in the way of evidence that substituting HFCS for sugar causes health issues.
  • MDMA (ecstasy, the illegal drug) doesn’t cause holes in your brain, and has generally had its neurotoxicity massively overstated. Using ecstasy is still a bad idea, and there are plenty of legitimate health issues with using it. However, many of the “facts” that we hear about it are egregiously wrong. For one, the holes in the brain thing is thought to have come about through a false-color CAT scan, which was actually showing very minor, temporary reduction in blood flow to regions in the brain; the regions with reduced blood flow were colored differently, and someone interpreted them as “holes”. A number of other studies about MDMA’s neurotoxicity have been similarly flawed. One was retracted when it was found out that the study administered meth to lab rats instead of ecstasy. A number of other studies have compared lifelong users of many drugs (“polydrug users”), including ecstasy, to people who have never used drugs. It is unsurprising that the former group has more neurological problems; the studies entirely fail to show that ecstasy plays a role, though.

I’m not actually advocating many of these things. All things equal, I prefer sugar over HFCS, even though there’s not strong scientific support for this. I have never tried ecstasy, and have no desire to do so; there are many legitimate health issues. I don’t drink a lot of diet soda because I don’t care for the taste. I’m not sure that anything includes MSG anymore, but I’m not buying it as a supplement and pouring it on my food. And don’t feed your dogs poinsettias. But it drives me insane when people go parroting these things as “facts,” when they range from mostly untrue to patently false.

UPS Package Pickup in Chelmsford, MA

I had a hard time finding this information for some reason.

If you hold a UPS package for pickup in their Chelmsford, MA location, the address to pick it up is at 90 Brick Kiln Road. (There’s also a UPS HR building there.)

Do not go to the truck depot across the street at 87 Brick Kiln Road. That is not where you pick up packages. (Unless you’re a UPS driver, I suppose.)

If you’re anything like me, this may save you 15 minutes of confusion.

Long Lines and bandwidth

I was reading a bit about AT&T’s former Long Lines division, which for a period was a series of microwave towers placed around the country to allow long-distance calling. For example, here’s an article from 1948 about the link between NYC and Boston. They had a series of distinctive towers, with the odd stuff on top being highly-directional microwave horns.

Eventually, demand exceeded the capacity of the microwave links, and they began to run fiber. (Interestingly, many of the old towers still stand, and have found other uses, for cell towers or regional radio traffic.)

What’s interesting to me about fiber is that the capacity is seemingly infinite. While 100Gbps Ethernet is just emerging (and presently only available, AFAICT, for links between switches), that’s grossly insufficient for, say, major Internet backbones. So places just multiplex many signals onto a single strand, known as Wavelength-division multiplexing, or WDM. Present capacity is now in the range of terabits per second on a single strand.

Makes me wonder what things will be like in another 30 years.

Love Songs, Poor

I will admit, with only a little embarrassment, to being an Alanis Morissette fan. And for whatever reason, I really like Head over Feet.

I would like to propose that, while the song is fairly good, it is possibly the worst love song ever. Here are some lines from the song that I hope are not the nicest things someone could find to say about me:

  • I had no choice but to hear you.
  • You ask how my day was.
  • Your love is thick.
  • You’re so much braver than I gave you credit for.
  • You are the bearer of unconditional things.
  • You held your breath, and the door, for me.
  • Thanks for your patience.
  • You’re the best listener that I’ve ever met.
  • I’ve never felt this healthy before.
  • I am aware now.

Okay, so I’m pretty sure Ava Adore takes the cake for worst lyrics for a love song. But Head over Feet is a close second, if you ask me.

Is Noon 12am or 12pm?

$title is something that has always confused me.

But I learned the correct answer today: it is neither.

The precise instant that is “noon” is the “M” in AM and PM (ante- and post-meridiem). So noon is properly “12M,” though the spoilsports at Wikipedia term this usage “antiquated.” (They do go on to call the modern US GPO style manual incorrect, though.) More modern usage appears to be to just say “12 noon.” But if you’re referring specifically to noon, “12am” or “12pm” are both incorrect. (In the same way that the year 2000 was neither pre-2000 nor post-2000.)

This does clear something up for me, though! My confusion has typically been about the whole hour of 12:xx. Is 12:30 (30 minutes past noon) a.m. or p.m.?

It turns out that I have been wrong. I assumed it was a.m., and that the switch happened when the 12 rolled over to 1. But the pedantic clarification of what a.m. and p.m. means makes this suddenly intuitive:

11:59:59 a.m.
12:00:00 M
12:00:01 p.m.

The equivalent for midnight is less clear, but it seems as though “12 p.m.” is generally accepted, with 12:00:01 being a.m.

Now you know.

Why gold is a terrible investment

A while back, I somehow became interested in gold. I’d seen a few references to people investing in gold—physically buying gold coins. The idea is that gold holds its value well, and has been used as currency for millennia. So it sees use as a hedge against the dollar—when people worry about the dollar losing value, they buy gold. Seems pretty reasonable!

But as I started to look into it, my doubts grew. I’m now of the opinion that gold is a terrible investment, especially for the claimed purposes. Here’s why.

First, I’ve seen it said that gold holds its value very well, and is very stable. Here is a graph, from Kitco.com, showing the price of gold from 1995 to today:

If you’d have invested around the turn of the century (I love that “turn of the century” now means 1999-2000), you’d have done very well for yourself. But would you want to invest now? It’s true that past performance doesn’t indicate future performance, but this isn’t exactly the type of graph that makes me see a huge opportunity. But my point isn’t to argue that gold has “peaked,” or anything of the sort. My point is just that if someone tells you that gold is a very stable investment, they are lying through their teeth. In a 10-year period, gold went from below $400/ounce to over $1800/ounce. And since 2011, it’s lost about $500/ounce in value. Here is how to invest 401k in gold with the help of experts and get the right returns.

Gold also seems to attract some nutty conspiracy theories and strange beliefs. A lot of place sell pre-1933 gold. I spent a while trying to figure out why. And, well, here’s why: back in 1933, the government started seizing gold coins for a brief period of history. Some worry that the government will do this again, but believe that gold coins from before 1933 are exempt. This belief is, of course, wildly inaccurate. The linked article does a good job factually debunking it. (For those less inclined to care about facts, but fond of conspiracy theories, I might argue this—if the government were to overstep its authority and confiscate privately-owned gold in the modern era, what makes you think that they would honor a misinterpreted rule from the 60s and leave your pre-1933 gold untouched?)

I should disclaim that I’m not an investment expert, and that I’m not really trying to argue that savvy investors could never see gold as a good investment. If you’re a financial wizard and want to put some money in gold, by all means give it a try. What I am saying is that, if you’re a senior citizen who saw the commercial I saw on TV about how the dollar is going to lose its value and your safest bet is to buy gold, you are being had.

But when you see ads on TV trying to sell you gold, you might consider their motives. If I believed gold was going to keep climbing in value, I’d be buying up all the gold I could get. But suppose you were sitting on a lot of gold and saw the graph I linked to above. Wouldn’t it seem really tempting to try to convince people that the dollar was going to fall and that they’d better buy all the gold you were selling right away? You’d be rid of your rapidly-depreciating gold, and left with plenty of cash in a time when the stock market is hitting record highs.

In conclusion, please do not buy gold without doing a lot of due diligence. Maybe gold is a good investment in certain situations, and maybe gold was a good investment a decade ago. But that doesn’t mean that gold is a good investment for you, today.

Why airplanes don’t fly in straight lines…

…and other information about airplane engine failures.

I’ve sometimes wondered why airplanes don’t seem to fly in straight lines. I once saw someone give a seemingly-simple explanation: the Earth is round. While that fact is true, it doesn’t really explain it. When I flew from New York to Hong Kong, “curvature of the Earth” doesn’t explain why we practically flew through the arctic circle. It was certainly not the most efficient path.

I suspect there are many components to the answer, and perhaps the earth’s curvature factors in a bit. I also suspect that weather and wind factor in. But there’s one big, glaring reason that I’ve found: a twin-engine airplane must, at all times, be able to reach an airport on a single engine within a certain period of time. Early on, the limit was 60 minutes, though that figure has gone up over time.

The idea was simple—with only two engines, if one fails, you want to be able to land pretty quickly. So the FAA set a limit of 60 minutes. This surely had all sorts of positive safety implications, but it was also inconvenient, and led to some circuitous routes, plus some areas just not being possible to reach in a twin-engine plane. Over time, apparently, evidence allowed these rules to be relaxed. For one, it turns out that a plane is capable of flying just fine on a single engine.

For example, here is a rather chilling video of an airplane (a Boeing 757) ingesting a bird into one of its engines during takeoff, causing the engine to spew flames until it is shut down:

It continues its takeoff normally, declares an emergency, and lands normally a few minutes later. If you ignore the flames during takeoff and the inspection by the fire department upon landing, it looks entirely normal. Also fascinating to me is how the pilot seems entirely calm during the whole situation, and how half of the radio traffic is just about how they’ll be able to exit the runway normally so other flights shouldn’t need to divert, and how they plan to taxi back.

While a video of an airplane engine spewing fire might not inspire a lot of confidence, what’s intriguing to me is that the plane flew just fine with only one engine operating. It didn’t begin flying sideways or have difficulty landing as I might have naively expected. Hence the initial justification of the 60-minute rule—if an engine failed mid-flight, pilots would be able to safely fly to the nearest airport with only one engine.

Over time, apparently, evidence showed that spontaneous failure of an engine mid-flight was extremely uncommon, and that the 60-minute limit was excessively conservative and made many flights impractical. Over time, allowances of up to four hours have been granted, and newer planes are being certified for times in excess of five hours. But many older planes are still limited by shorter times, hence the seemingly-odd routes they take—they need to stay within range of airports.

FUD and Proxies

I sometimes wonder how many people who use proxies / VPN service / Tor actually understand how the Internet works.

To be sure, there are lots of reasons to use them. Want to access geo-restricted content? Tunnel your traffic through a proxy in a region that works. Want to hide your identity? A proxy / Tor can help.

Want to remain secure online? A proxy / VPN / Tor is a horrible idea!

Take, for instance, the description of this product, which appears to be a Tor ‘router’ in hardware. (There is, of course, absolutely no reason you need a hardware device. You could just, you know, install Tor on your computer for free.) It says, in part: “Each time you venture out onto the web, you’re vulnerable, because each site can access your IP address, giving them the ability to find your physical location. With Safeplug, you can feel safe on the internet again, browsing anonymously and securely.”

They can “access your IP address”? That’s how the Internet works! It would be like denouncing telephones as unsafe because, when you call someone, they can see your phone number and, from your area code, deduce your location. (Although the Caller ID argument is fallacious. You can block Caller ID, but you can’t block an IP–you can only route your traffic through someone else’s computer, so that sites see that IP.)

It’s right about browsing anonymously. It’s good for that. But securely? It couldn’t be more incorrect! You’re routing your traffic through an unknown stranger’s computer to stay anonymous. That person can see everything you do. It’s not just paranoid and not-tech-savvy people that fall for this–it’s how numerous embassies had their passwords exposed and web traffic seen, by forgetting how the service works.

In defense of Uncrate, they do explain how it works, by saying that it “routes your internet traffic through a series of random locations, making it impossible to determine where you are.” If your goal is anonymity, Tor might work. (If you’re careful.) If your goal is security, though, perhaps consider that “rout[ing] your internet traffic through a series of random locations” is about the most unsafe thing you could do.

I’m not arguing that one should never use Tor or an anonymous proxy. I’m just arguing that using them for, say, online banking, or confidential communication, is quite ignorant. (Unless you’re excellent at using encryption.)