Smart Guns in the LA Times

I did a condensed version of the TechCrunch piece linked earlier for the LA Times Sunday Edition.

The gun control movement’s latest hobby horse is the smart gun. President Obama included federal support for smart gun research in his recent executive orders, delighting activists who insist that a locking mechanism capable of preventing criminals from firing stolen weapons would surely be popular with gun buyers — if only the gun industry would drop its opposition.

The bad news for anyone looking to the smart gun as a technological quick fix for gun violence is that, absent a government mandate requiring all guns to be “smart,” a robust market is unlikely to materialize. And even if new laws were to require that all new firearms include smart gun tech, many proposed smart systems would actually make us less safe.

Given the word counts I’m used to on the web, the 850-word limit felt like writing for Twitter. But it was a fun exercise, and maybe I’ll do the op-ed thing again at some point.

My Contribution to the “Tech Bubble 2.0” Literature

I’m linking this piece here a bit late, but when I wrote it there wasn’t a consensus that any sort of bubble had formed. Literally a week later there was, and then the next week it started cooling off as start-up valuations began to descend from the stratosphere.

WhatsApp’s unseen hordes of engineers and the massive, global compute infrastructure that those engineers are constantly growing and maintaining, are all rented in very small time slices by the full-time members of the WhatsApp engineering team. It’s the combination of on-demand engineers, the on-demand compute resources that those engineers are packaged with, and the proliferation of cheap, capable client devices at the network’s edge (i.e. smartphones and tablets) that makes up the real force multiplier—the lever, if you will—for WhatsApp’s core team, and not any particular technology.

When you think about the fact that this very same force multiplier can be rented by anyone with a credit card, a laptop, and an internet connection, then you realize that the breathtaking scale and speed of WhatsApp’s success isn’t any more of a “tech” story than, say, the similar success of BuzzFeed. Rather, it’s a story about the sudden, outsized rewards that can accrue to a relatively small amount of properly timed effort applied from just the right spot to a globe-spanning networked computing platform.

Because WhatsApp is renting a really long, world-moving lever that anyone can rent to move anywhere from a few dozen users to a few billion, then the difference between the 50 engineers at WhatsApp and any other group of talented engineers with access to the same really long lever of networked compute resources, is that someone at WhatsApp has pointed those engineers to a fulcrum that’s sitting in exactly the right place — in this case at the nexus of free SMS and no ads, no games, no gimmicks — so that when they grab that lever the world moves.

Thus the secret to success in the present moment — if we define “success” as “I have a billion users” — seems to lie in grabbing the big public lever and being the first to iterate into one of the primo fulcrum spots that’s characterized by minimal in-house engineering hours and rapid user growth.

Lots more at the link.

I, Mr. Robot

While I’m on a kick of updating my site, I should include a link to a Medium essay that I wrote a while back on software, the past, the future, and a particular TV show.

When I watch Mr. Robot, it’s like I’m watching dystopian sci-fi, except holy crap I actually live in that world on the screen. As I sit there on the couch I think back to 2005, before the iPhone and Facebook and Twitter and YouTube and Tinder and Instagram, before we all jumped feet first into “the stream”, and I watch the show through my pre-stream eyes. This practice triggers for me the novel sensation of having suddenly woken up in the future, and that sensation is part of the reason I enjoy the show. It’s like the inverse of virtual reality’s “presence” effect — I know that the world on the screen is real and that I’m actually in it, but I somehow don’t quite believe it.

This is what makes Mr. Robot so utterly compelling: it’s dystopian sci-fi about the right now, and it works because so much of “right now” is so new that it still has the potential to blow our minds when we grind it up and snort it in little 43-minute lines.

For those of you who watch the show or plan on watching it, I want you to borrow my 2005 glasses for at least one episode. To help orient you and jog your memory, here are some things that were true about the world in 2005…

My 3,000-word Smart Gun Smackdown

I know TechCrunch Editor Jonathan Shieber from when we both went to the same summer nerd camp in middle school. We reconnected on Facebook a while back, and we recently got into a long conversation about smart guns, which Jonathan encouraged me to turn into a TC post. So I turned it into 3K words worth of “if you ask me about this again I’ll just send you this link”. I’ll give away the ending right here, but please do read the whole thing:

To sum up, smart guns aren’t gonna happen because electronic locks will never be reliable enough that the shooting public will embrace them. It’s possible that cops might eventually warm up to smart guns, because cops open carry and are at constant risk of having their own guns used against them. But for every law abiding citizen who’s not carrying openly and/or wearing a uniform that screams “guy with a gun right here!”, smart guns are just not going to be attractive for the reasons outlined above.

Even if the public warms up to smart guns, this won’t stop criminals from firing stolen weapons, because there’s no way to lock down a firearm or any other gadget in such a way that it can’t be “jailbroken”. Criminals will just remove the locks, or, even worse, they’ll learn to remotely disable the guns of victims and police. And for law-abiding concealed carriers who leave the electronic locks in place, any scheme that relies on wireless technology will effectively make such people open carriers for anyone who can eavesdrop on the signal.

If smart gun proponents are really serious about saving lives, they’ll quit wasting time on a doomed quest for a quick technological fix to a nasty set of social problems, and instead focus their efforts on changes that could actually save lives. How about ending the war on drugs, demilitarizing the police, advocating for prison reform, investing in street-level intervention programs, or stopping the drone strikes and the endless military interventions that kill countless civilians and radicalize the survivors. Even a small victory in any one of those areas would save more lives than the most advanced smart gun imaginable.

But all of that stuff that I just suggested is hard, and it involves politics, and our politics seem more hopelessly broken with every day that passes. So I certainly get the appeal of going around the system and throwing some Silicon Valley “disruption” at the problem of gun violence. And as the father of three beautiful little girls I wish to God that there were a killer app that could stop or even measurably reduce the killing. But there isn’t, and until someone invents a technology that can address the deeper, systemic problems that drive Americans from all walks of life to arm themselves, there never will be.

I’d have never agreed to have a TC byline back when Arrington was the EiC because… well, because Arrington. But now that he’s a distant memory, and I have friends there, I’m over my long-standing issues with it.

HOWTO: Uploadcare and Rails

Over on the Collective Idea blog I posted a little how-to for integrating Uploadcare and Rails.

Uploadcare is a really handy service that provides a combination of a CDN and a convenient, configurable JavaScript upload dialog that lets your app’s users easily put images onto your CDN. Each Uploadcare image has a unique UUID, which means that if your Rails app is also using UUIDs as database identifiers, then Uploadcare will fit right in.

This post will show you how to easily integrate Uploadcare into an existing Rails app, in a way that gives your users the ability to create, read, and delete the images that they’ve uploaded to your account on the CDN. In this app, we’ll look specifically at the case of a user with a profile photo, but you can easily generalize this to any type of model with a user-uploaded image, or even an array of user-uploaded images.

Go check it out if you’ve been looking for a good way to do this.

The AR-15: It’s a Gadget

In cleaning up and updating this site this afternoon, I realized that I’ve never linked my big piece for Wired on the AR-15. I had a ton of fun writing that, and since then I’ve gotten into the AR platform myself.

In the wake of the massacre at Sandy Hook Elementary School in Newtown, Connecticut, the AR-15 has gone from the most popular rifle in America to the most scrutinized and, in some quarters, vilified. Also known in its fully automatic, military incarnation as the M16, the rifle was racking up record sales in the years before Sandy Hook, but now, in the midst of a renewed effort to ban this weapon and others like it from civilian hands, the AR-15 market has gone nuclear, with some gun outlets rumored to have done three years’ worth of sales in the three weeks after Newtown.

Now that the post-Newtown nation has suddenly woken up to the breakout popularity of the AR-15, a host of questions are being asked, especially about who is buying these rifles, and why. Why would normal, law-abiding Americans want to own a deadly weapon that was clearly designed for military use? Why are existing AR-15 owners buying as many of these rifles as they can get their hands on? Are these people Doomsday preppers? Militia types, arming for a second American Civil War? Or are they young military fantasists whose minds have been warped by way too much Call of Duty?

Preppers, militia types, and SEAL Team 6 wannabes are certainly represented in the AR-15′s customer base. But fringe groups don’t adequately explain the roughly 5 million “black rifles” (as fans of the gun tend to call it) that are now in the hands of the public. No, the real secret to the AR-15′s incredible success is that this rifle is the “personal computer” of the gun world.

You can keep up with more of my AR-related work on AllOutdoor.com.

The BLM as the new BATF

I don’t think it’s a coincidence that recent clashes between militia groups and the feds all involve the BLM, and not the ATF. I think a lot of people are probably scratching their heads and thinking, “back in the 90’s and earlier, it was all about anti-ATF outrage, so why the miltia hatred for the BLM?” But the only reason there’s confusion is because the vast majority of the country is so well insulated from the serious water issues facing us. Of course, we’re all starting to read the headlines now about Vegas and CA and TX, but it’s still abstract — even here in Austin, all it really means for me is that I can’t water my lawn very often. But rural people in drought-afflicted areas are, right now, living through a catastrophe that is as dramatic as Katrina. They’re losing everything — whole communities and farms that have been in families for generations are being wiped out.

One year ago this month, when I drove from San Francisco to Austin by way of LA (or a little north of that, actually), I recall seeing the homemade road signs everywhere in California’s central valley and being shocked. I wasn’t really aware of the water crisis, but driving through these areas it was clear there was this entire swath of the state that was absolutely enraged about water, and their only way of venting was making these homemade signs about the drought — how it was a political creation and the government’s fault and so on.

So yeah, my theory is that this anti-BLM stuff is the new anti-ATF stuff. And as the drought drags on and continues wiping out entire rural communities, look for it to get a lot worse. Sure, Obama’s ascension has no doubt helped militia recruiting, but I’d bet that the drought, which again none of us really see and the real human impact of because it’s just not a story that the media is interested in telling every single night on the news, is a larger factor.

Monkey patching poltergeist for web scraping with jruby

For some time now I’ve been crawling the web and doing scraping at scale for a stealth project of mine, but I’ve not really been using a headless browser solution because it’s overkill for about 70% of the sites I scrape. However, I do need to scrape the other 30%, so I recently added the capability to scrape AJAX pages using phantomjs and poltergeist.

The big problem I’ve run into is that poltergeist leaks file descriptors, and if you just let it go, you’ll get a “Too many open files” error after a few hours. I won’t get into the details (mainly because I don’t recall them… I fixed this problem a few weeks ago), but this is a jruby-specific problem.

At any rate, I monkey patched poltergeist so that it doesn’t try redirect phantomjs’s console output to either STDOUT or a user-provided IO object. That STDOUT redirection was the root of a lot of pain on jruby, and since I don’t need the console output I just ripped out the offending code.

I’ve posted a gist with the very simple monkey patch, which you can include in /config/initializers/poltergeist.rb. This has been working in production without a problem for a few weeks under jruby 1.7.11 + rails 4.02. I crawl about 230 sites simultaneously right now with this setup, though only about 30 of them are using phantomjs.

On a related note, a general word of caution to anyone who wants to do what I’m doing, i.e. web crawling at scale with jruby + sidekiq + rails on ec2: you absolutely must call driver.quit on your Capybara::Session object every time you’re completely finished with it, or else you will end up with zombie processes and you’ll run out of memory.

What I do is initialize a new session object at the start of every scraper worker, and then when that worker is done as part of its shutdown I make sure to close all http connections (including quitting the session object) as part of the cleanup. Put this cleanup code in an ensure block in your sidekiq worker’s perform method, to make sure that it will get called even when the worker crashes.

Fallkniven’s Northern Lights Idun

I used to write about microprocessors, but now I write about knives (and sometimes guns). I actually like knives better than CPUs. Here’s a recent one of mine on a really nice Fallkniven offering. Look for a writeup soon on a much larger knife from the same line.

I recently got a big shipment of Fallkniven knives in for testing, but before I get into the cutting and chopping, I’d like to post some pictures and first impressions of the blades. In this post, I’ll be taking a look at Fallkniven’s Idun (NL5) model and comparing it to the venerable and widely loved Fallkniven F1.

Why compare the NL5 to the F1? A lot of people either have the F1, know someone who has the F1, or are considering the F1. It’s an extremely popular, premium bushcraft and survival blade, up there with the Bark River Bravo 1, Spyderco Bushcrafter, and ESEE-5 in terms of popularity in the $130 to $200 price range. I’ll be comparing my two F1s with the NL5, which is in their same size and weight category.

While the F1 is itself a bit of a premium production fixed blade, at $130 street price in its standard configuration, the Northern Lights series is Fallkniven’s attempt to elevate the fit and finish of their line to near-custom levels. Most of the knives in the NL series have a counterpart in Fallkniven’s regular blade lineup that function as a bit of an upgrade, if that’s what you’re looking for.

The Idun reviewed here lists for $460 and change, but you can find it around $300 if you look hard enough online. This price puts it into custom territory, so let’s see if the fit and finish warrant the premium.

Next up is the Falkniven Thor, which is so large it’s basically a short sword. Stay tuned.

SuperQueue.new

I’ve been doing some coding on AWS for a side project, and I ended up developing something that’s more generally useful so I’ve released it as open-source. Behold, SuperQueue!

SuperQueue is a thread-safe, SQS- and S3-backed queue structure for ruby that works just like a normal queue, except it’s essentially infinite because it uses SQS (and S3 optionally) on the back end.

To install, just “gem install super_queue”.

To create a new SuperQueue, pass it an options hash. Some options are required, and some are optional. When you’re done with it, you should ideally call “shutdown” on it to shut it down gracefully and preserve any data. Or, if you want to delete the SQS queue and any lingering data, call “destroy.”

I’m using this code in production, and it actually works. I’m actually about to increase my reliance on it by putting it in an even more sensitive role in my app, so we’ll see what happens.