Some thoughts on machine learning: context-based approaches

A nontrivial problem with machine learning is organization of new information and recollection of appropriate information in a given circumstance. Simple storing of information (cats are furry, balls bounce, water is wet) is relatively straightforward, and one common approach to doing this is simply to define the individual pieces of knowledge as objects which contain things (water, cats, balls) and descriptors (water is wet, water flows, water is necessary for life; cats are furry, cats meow, cats are egocentric little psychopaths).

This presents a problem with information storage and retrieval. Some information systems that have a specific function, such as expert systems that diagnose illness or identify animals, solve this problem by representing the information hierarchically as a tree, with the individual units of information at the tree’s branches and a series of questions representing paths through the tree. For instance, if an expert system identifies an animal, it might start with the question “is this animal a mammal?” A “yes” starts down one side of the tree, and a “no” starts down the other. At each node in the tree, another question identifies which branch to take—”Is the animal four-legged?” “Does the animal eat meat?” “Does the animal have hooves?” Each path through the tree is a series of questions that leads ultimately to a single leaf.

This is one of the earliest approaches to expert systems, and it’s quite successful for representing hierarchical knowledge and for performing certain tasks like identifying animals. Some of these expert systems are superior to humans at the same tasks. But the domain of cognitive tasks that can be represented by this variety of expert system is limited. Organic brains do not really seem to organize knowledge this way.

Instead, we can think of the organization of information in an organic brain as a series of individual facts that are context dependent. In this view, a “context” represents a particular domain of knowledge—how to build a model, say, or change a diaper. There may be thousands, tens of thousands, or millions of contexts a person can move within, and a particular piece of information might belong to many contexts.

What is a context?

A context might be thought of as a set of pieces of information organized into a domain in which those pieces of information are relevant to each other. Contexts may be procedural (the set of pieces of information organized into necessary steps for baking a loaf of bread), taxonomic (a set of related pieces of information arranged into a hierarchy, such as knowledge of the various birds of North America), hierarchical (the set of information necessary for diagnosing an illness), or simply related to one another experientially (the set of information we associate with “visiting grandmother at the beach).

Contexts overlap and have fuzzy boundaries. In organic brains, even hierarchical or procedural contexts will have extensive overlap with experiential contexts—the context of “how to bake bread” will overlap with the smell of baking bread, our memories of the time we learned to bake bread, and so on. It’s probably very, very rare in an organic brain that any particular piece of information belongs to only one context.

In a machine, we might represent this by creating a structure of contexts CX (1,2,3,4,5,…n) where each piece of information is tagged with the contexts it belongs to. For instance, “water” might appear in many contexts: a context called “boating,” a context called “drinking,” a context called “wet,” a context called “transparent,” a context called “things that can kill me,” a context called “going to the beach,” and a context called “diving.” In each of these contexts, “water” may be assigned different attributes, whose relevance is assigned different weights based on the context. “Water might cause me to drown” has a low relevance in the context of “drinking” or “making bread,” and a high relevance in the context of “swimming.”

In a contextually based information storage system, new knowledge is gained by taking new information and assigning it correctly to relevant contexts, or creating new contexts. Contexts themselves may be arranged as expert systems or not, depending on the nature of the context. A human doctor diagnosing illness might have, for instance, a diagnostic context that behaves similarly in some ways to the way a diagnostic expert system; a doctor might ask a patient questions about his symptoms, and arrive at her conclusion by following the answers to a single possible diagnosis. This process might be informed by past contexts, though; if she has just seen a dozen patients with norovirus, her knowledge of those past diagnoses, her understanding of how contagious norovirus is, and her observation of the similarity of this new patient’s symptoms to those previous patients’ symptoms might allow her to bypass a large part of the decision tree. Indeed, it is possible that a great deal of what we call “intuition” is actually the ability to make observations and use heuristics that allow us to bypass parts of an expert system tree and arrive at a leaf very quickly.

But not all types of cognitive tasks can be represented as traditional expert systems. Tasks that require things like creativity, for example, might not be well represented by highly static decision trees.

When we navigate the world around us, we’re called on to perform large numbers of cognitive tasks seamlessly and to be able to switch between them effortlessly. A large part of this process might be thought of as context switching. A context represents a domain of knowledge and information—how to drive a car or prepare a meal—and organic brains show a remarkable flexibility in changing contexts. Even in the course of a conversation over a dinner table, we might change contexts dozens of times.

A flexible machine learning system needs to be able to switch contexts easily as well, and deal with context changes resiliently. Consider a dinner conversation that moves from art history to the destruction of Pompeii to a vacation that involved climbing mountains in Hawaii to a grandparent who lived on the beach. Each of these represents a different context, but the changes between contexts aren’t arbitrary. If we follow the normal course of conversations, there are usually trains of thought that lead from one subject to the next; and these trains of thought might be represented as information stored in multiple contexts. Art history and Pompeii are two contexts that share specific pieces of information (famous paintings) in common. Pompeii and Hawaii are contexts that share volcanoes in common. Understanding the organization of individual pieces of information into different contexts is vital to understanding the shifts in an ordinary human conversation; where we lack information—for example, if we don’t know that Pompeii was destroyed by a volcano—the conversation appears arbitrary and unconnected.

There is a danger in a system being too prone to context shifts; it meanders endlessly, unable to stay on a particular cognitive task. A system that changes contexts only with difficulty, on the other hand, appears rigid, even stubborn. We might represent focus, then, in terms of how strongly (or not) we cling to whatever context we’re in. Dustin Hoffman’s character in Rain Man possesses a cognitive system that clung very tightly to the context he was in!

Other properties of organic brains and human knowledge might also be represented in terms of information organized into contexts. Creativity is the ability to find connections between pieces of information that normally exist in different contexts, and to find commonalities of contextual overlap between them. Perception is the ability to assign new information to relevant contexts easily.

Representing contexts in a machine learning system is a nontrivial challenge. It is difficult, to begin with, to determine how many contexts might exist. As a machine entity gains new information and learns to perform new cognitive tasks, the number of contexts in which it can operate might increase indefinitely, and the system must be able to assign old information to new contexts as it encounters them. If we think of each new task we might want the machine learning system to be able to perform as a context, we need to devise mechanisms by which old information can be assigned to these new contexts.

Organic brains, of course, don’t represent information the way computers do. Organic brains represent information as neural traces—specific activation pathways among collections of neurons.

These pathways become biased toward activation when we are in situations similar to those where they were first formed, or similar to situations in which they have been previously activated. For example, when we talk about Pompeii, if we’re aware that it was destroyed by a volcano, other pathways pertaining to our experiences with or understanding of volcanoes become biased toward activation—and so, for example, our vacation climbing the volcanoes in Hawaii come to mind. When others share these same pieces of information, their pathways similarly become biased toward activation, and so they can follow the transition from talking about Pompeii to talking about Hawaii.

This method of encoding and recalling information makes organic brains very good at tasks like pattern recognition and associating new information with old information. In the process of recalling memories or performing tasks, we also rewrite those memories, so the process of assigning old information to new contexts is transparent and seamless. (A downside of this approach is information reliability; the more often we access a particular memory, the more often we rewrite it, so paradoxically, the memories we recall most often tend to be the least reliable.)

Machine learning systems need a system for tagging individual units of information with contexts. This becomes complex from an implementation perspective when we recall that simply storing a bit of information with descriptors (such as water is wet, water is necessary for life, and so on) is not sufficient; each of those descriptors has a value that changes depending on context. Representing contexts as a simple array CX (1,2,3,4,…n) and assigning individual facts to contexts (water belongs to contexts 2, 17, 43, 156, 287, and 344) is not sufficient. The properties associated with water will have different weights—different relevancies—depending on the context.

Machine learning systems also need a mechanism for recognizing contexts (it would not do for a general purpose machine learning system to respond to a fire alarm by beginning to bake bread) and for following changes in context without becoming confused. Additionally, contexts themselves are hierarchical; if a person is driving a car, that cognitive task will tend to override other cognitive tasks, like preparing notes for a lecture. Attempting to switch contexts in the middle of driving can be problematic. Some contexts, therefore, are more “sticky” than others, more resistant to switching out of.

A context-based machine learning system, then, must be able to recognize context and prioritize contexts. Context recognition is itself a nontrivial problem, based on recognition of input the system is provided with, assignment of that input to contexts, and seeking the most relevant context (which may in most situations be the context with greatest overlap with all the relevant input). Assigning some cognitive tasks, such as diagnosing an illness, to a context is easy; assigning other tasks, such as natural language recognition, processing, and generation in a conversation, to a context is more difficult to do. (We can view engaging in natural conversation as one context, with the topics of the conversation belonging to sub-contexts. This is a different approach than that taken by many machine conversational approaches, such as Markov chains, which can be viewed as memoryless state machines. Each state, which may correspond for example to a word being generated in a sentence, can be represented by S(n), and the transition from S(n) to S(n+1) is completely independent of S(n-1); previous parts of the conversation are not relevant to future parts. This creates limitations, as human conversations do not progress this way; previous parts of a conversation may influence future parts.)

Context seems to be an important part of flexibility in cognitive tasks, and thinking of information in terms not just of object/descriptor or decision trees but also in terms of context may be an important part of the next generation of machine learning systems.

Sex tech: Update on the dildo you can feel

A few months back, I wrote a blog post about a brain hack that might create a dildo the wearer can actually feel. The idea came to me in the shower. I’d been thinking about the brain’s plasticity, and about how it might be possible to trick the brain into internalizing a somatosensory perception that a strap-on dildo is a real part of the body, by using sensors along the dildo connected to tiny electrical stimulation pads worn inside the vagina.

It’s an interesting idea, I think. So I blogged about it. I didn’t expect the response I got.

I’ve received a bunch of emails about it, and had a bunch of people tell me “OMG this is the most amazing thing ever! Make it happen!”

So I have, between work on getting the book More Than Two out the door and preparing for the book tour, been chugging away at this idea. Here’s an update:

1. I’ve filed for a patent on the idea. I’ve received confirmation that the application has been accepted and the process is started.

2. I’ve talked to an electronics prototyping firm about developing a prototype. Based on feedback from the prototyping firm, I’ve modified the initial design extensively. The first version I’d thought about was based on the same principle as the Feeldoe; the redesign uses a separate dildo and harness, with an external computer to receive signals from the sensors in the dildo and transmit them to the vaginal insert. The new design looks, and works, something like this. (Apologies for the horrible animated GIF; art isn’t really my specialty.)

3. The prototyping firm has outlined a multi-step process to develop a workable, manufacturable device. The process would go something like:

Phase 1: Research and proof of concept. This would include researching designs for the sensors on the dildo and the electrodes on the vaginal insert. It would also include a crude proof-of-concept device that would essentially be nothing more than the vaginal insert connected to a computer programmed to simulate the rest of the device.

The intent at this stage is to see if the idea is even workable. What kind of electrodes could be used? Would the produce the right kind of stimulation? How densely arranged could they be? How small could they be? Would the brain actually be able to interpret sensations produced by the electrodes in a way that would trick the wearer into thinking the dildo was a part of the body? If so, how long would that somatosensory rewiring take?

Phase 2: Assuming the initial research showed the idea to be viable, the next step would be to figure out a sensor design, fabricate a microcontroller to connect the sensors to the electrodes, and experiment with sensor design and fabrication. Would a single sensor provide adequate range of tactile feedback, or would it be necessary to multiplex several sensors (some designed to respond to light touch, others to a heavier touch) together in order to provide a good dynamic range? What mechanical properties would the sensors need to have? How would they be built? (We talked about several potential designs, including piezoelectric, resistive polymer, and fluid-filled devices.) How would the sensors be placed along the dildo?

Phase 3: Once a working prototype is developed, the next step is detail design and engineering. This is essentially the process of taking a working prototype and producing a manufacturable product from it. This includes everything from engineering drawings for fabrication to choosing materials to developing the final version of the software.

So. That’s where the project is right now.

The up side? I think this thing could actually work. The down side? It’s going to be expensive.

I have already started investigating ways to make it happen. If we incorporate in Canada, we may be eligible for Canadian financial incentives designed to spur tech research and development.

The fabricating company seems to think the first phase would most likely cost somewhere around $5,000-10,000. Depending on what’s learned during that phase, the development of a fully functional prototype might run anywhere from $50,000 to $100,000, a lot of which hinges on design of the sensors, which will likely be the most challenging bit of engineering. They didn’t even want to speculate about the cost of going from working prototype to manufacturable product; too many unknowns.

I’m discussing the possibility of doing crowdfunding to get from phase 2 to 3, and possibly from phase 1 to 2. It’s not likely that crowdfunding is appropriate for the first phase, because I won’t have anything tangible to offer backers. Indeed, it’s possible that I might spend the initial money and discover the idea isn’t workable.

Ideally, I’d like to find people who think this idea is worth investigating who can afford to invest in the first phase. If you know anybody who might be interested in this project, let me know!

Also, one of the people at the prototyping company suggested the name “Hapdick.” I’m still not sure how I feel about that, but I do have to admit it’s clever.

Want to keep up with developments? Here’s a handy list of blog posts about it:
First post
Update 1
Update 2
Update 3
Update 4
Update 5
Update 6
Update 7
Update 8
Update 9

Some thoughts on happiness

I am a happy person. By some accident of genetics or privileged brain chemistry, my default state is incredibly happy, and it always has been. Seriously, if you could bottle up the way I feel as my normal background state and distribute it among the world, there’d never be war or strife again.

That doesn’t mean I’m euphoric 100% of the time, of course. But just as things like depression can be a matter of brain chemistry, so, I think, can general background happiness.

And yet…and yet…

Whenever I see, or hear, conversations about happiness, it seems that many people are taught to profoundly fear and distrust the state of being happy. Contemporary American society teaches us a lot of incredibly destructive myths about happiness, some of which I see over and over again. For example:

Myth #1: If you are happy, you don’t accomplish anything.

I am happy…and I have just released my first book. I own two businesses. I am getting set to start a tour across Canada and the US with my coauthor, Eve Rickert, where we will be lecturing and giving workshops on relationships, polyamory, and ethics. I have traveled Eastern and Western Europe. My life is rich and filled with accomplishment. In fact, I have the kind of life some folks pay money to see on the Internet.

Myth #2: Generally happy people don’t experience the full range of human emotions.

I hear this one all the time. “I don’t want to be happy because it would dull me to pain and suffering, and I couldn’t experience the full range of life.” “If I were happy all the time, I would be blind to the sadness in the world.” “I wouldn’t want to be happy, because if I were happy, I couldn’t experience pain and suffering.”

Emotions are complex, and it is possible to feel more than one at the same time. I am a happy person, but that doesn’t mean there are never times when I feel sad, fearful, angry, or other things. It just means those emotions don’t stick. (One of my girlfriends says things like anger, frustration, and sadness bounce off me; when I feel them, they are transitory, and don’t weigh me down.) My baseline of happiness makes me emotionally resilient.

Myth #3: Happiness and euphoria are the same thing.

There are pills that make people feel euphoric, or intoxicated, but being euphoric isn’t the same thing as being happy. Happiness is more a generalized feeling of positive, pleasant satisfaction than it is a rush or a thrill; it’s the feeling of being able to live one’s life on one’s terms and feel that you’re flourishing, that every day brings new awe and wonder, that the universe you live in is an amazing place to be and the more you experience of it the more amazing it becomes.

Yet all the time, I hear folks say things like “If I were happy, I’d never get things done.” “If I were happy, I would just want to sit on the couch all day.” (No, dude, that’s not happiness, it’s a heroin fix you’re thinking of.)

Myth #4: Happiness is the enemy of productivity.

This isn’t really quite the same thing as myth #1–it’s possible to be productive without accomplishment. (Doing the dishes is productive, but doesn’t directly lead to finishing a book.) But they are related, in that it’s hard to be accomplished without being productive.

For me, creating things, writing, co-creating with partners, making things that didn’t exist until I worked my will on the world and caused them to exist–these are expressions of my happiness. The more I do them, the happier I am…and the happier I am, the more I do them. In fact, depression and unhappiness are much more corrosive to productivity than happiness is…ask anyone who suffers from depression how difficult it is to do anything when you’re in its grip!

Myth #5: Happiness is meaningless to a person who is always happy. We can’t appreciate happiness without sadness, life without death, joy without sorrow, light without darkness, Albert Einstein without Deepak Chopra, Mozart without Justin Bieber, word processors without cuneiform, blah blah blah.

I realize this notion that you can’t enjoy X without its dark and sinister anti-X evil twin is deeply embedded in Western cultural consciousness, but it still makes me scratch my head every single time I hear it. Folks actually appear to believe this is true, and I just don’t get it. I appreciate the fact that I can see, yet I’ve never been blind.

In fact, happiness is exactly what lets me appreciate the awe-inspiring beauty and wonder of the natural universe. You don’t have to be sad in order to enjoy and appreciate happiness; being happy is, of and by itself, a happy experience! That’s kind of what it says on the tin.

I know this sounds like a radical notion, but I would like to propose that happiness is not something to fear, it’s something to embrace, for the simple reason that it makes our lives better. We have inherited our distrust of happiness from our Puritan forefathers, I suspect, but you know what? Fuck them. They said we should sacrifice our happiness in our worldly lives so that we would be happy in the afterlife, with nary a thought to the contradiction inherent in the notion of pursuing happiness by denying happiness.

The idea that we should fear happiness is, I would argue one of the most singular causes of the many evils bedeviling humankind. And I can not rightly understand why this fear has such great currency.

Robot sex machines? Yes please!

Of all the deadly sins, my favorite by far is Lust. In fact, I’m actually a bit rubbish at all the other ones, so great is my fondness for Lust. I am also a huge fan of mixing sex and tech. So when I saw a crowdfunding campaign for a “robotic blowjob machine,” as you can probably imagine, I had to get on board with it. Women generally seem to benefit the most from the intersection of sex and technology, so the notion of a sex robot for men had more than passing appeal to me.

The campaign was a success, and I recently received in the mail one “Autoblow 2,” the robotic sex machine whose marketing campaign advertises “unlimited blowjobs on demand.” (Seriously.)

It’s an interesting-looking piece of kit:

Not quite as stylish, perhaps, as the new wave of vibrators from companies like Lelo and JimmyJane, but hey, I’ll take it.

This thing has two parts: the base, which contains a motor that moves a pair of spring bands covered with little rollers up and down, and a sleeve that inserts into the base. The sleeves come in several sizes, and are made of this really bizarre soft silicone material that flops about and feels kinda squishy. (Materials science is an avenue of human endeavor that has, until now, rarely been applied to the pursuit of the ultimate orgasm, more’s the pity. For hundreds of years, leather, stone, wood, and ivory represented the state of the art for Things To Make You Come, so I’m pleased to see improvements in this area.)

Still, when the time came to put my willie in this thing, I will admit I was a little apprehensive. I looked dubiously at it for a bit, until my sweetie zaiah said “oh, give me that” and took it away from me. She squirted some lube into the “insert willie here” end and stuck it over my junk.

No robotic blowjob machine would be complete without a speed control, and sure enough, there’s a little knob on the bottom that makes it go. She turned it on and it whirred to life, stroking mechanically away.

Now, I’ve had some amazing blowjobs from some exceptionally talented partners, so honesty compels me to admit this gadget does not really feel like a blowjob. It’s a fair approximation, I suppose, considering the formidable engineering challenge that a real blowjob simulator would face, but it isn’t quite up to a true blowjob experience. A double-blind face-off between this thing and genuine oral sex would, I suspect, be rather lopsided.

However, even if it doesn’t quite capture the true essence of the oral arts, this robotic sex machine does feel good. Really, really good. I was surprised, in fact. I cranked it up to maximum speed and, yeah, it did exactly what it says on the tin.

I am normally multiply orgasmic; it’s not uncommon for me to get off half a dozen times or more during sex. But this thing…well, when this thing got me off, it was intense and it got me off for good. I was done when I finally stopped screaming.

At which point I discovered a design flaw. The little control knob on the bottom? It’s little. As in, really difficult to find in a hurry when you’re gasping and panting and your body’s still shaking. I tried to yank it off my junk, but my partner grabbed me by the wrist. “No,” she said, and held it there until I found the control.

Which, naturally, brought up a really interesting idea, because I’m a kinky motherfucker and there’s no innocent pleasure I can’t find a way to corrupt with wicked thoughts.

A lot of women quite like the notion of forced orgasms, and it’s pretty easy to do, really–there are entire Web sites dedicated to the high art of the forced orgasm, but when you get down to brass tacks all it really takes is a bit of rope and a Hitachi magic wand. It’s more difficult to find ways to do the same thing to a person with an outie rather than an innie…

…at least until now.

This thing feels good on its own, no question about it, but a bit of rope, perhaps a blindfold, a gag if you don’t want to wake the neighbors, and this gadget can be so much more. Tie your guy down, set this thing going, and wait. You probably won’t have to wait to long. If my brief experience is any indication, the results should be pretty…um, dramatic.

You can find this robot blowjob machine here. (Full disclosure: I liked it enough I signed up as an affiliate.) Get one for yourself or that guy in your life you want to tie down and make scream give the gift of pleasure! You’ll be making the world a happier place and encouraging new high-tech sex toys for men, both of which I think are laudable goals.

1984: How George Orwell Got it Wrong

When I was in high school, one of the many books on our required reading list in my AP English class was George Orwell’s 1984. As a naive, inexperienced teenager, I was deeply affected by it, in much the same way many other naive, inexperienced teens are deeply affected by Atlas Shrugged. I wrote a glowing book report, which, if memory serves, got me an A+.

1984 was a crude attempt at dystopian fiction, partly because it was more a hysterical anti-Communist screed than a serious effort at literature. Indeed, had it not been written at exactly the point in history it was written, near the dawn of the Cold War and just prior to the rise of McCarthyist anti-communist hysteria, it probably would not have become nearly the cultural touchstone it is now.

From the vantage point of 2014, parts of it seem prescient, particularly the overwhelming government surveillance of every aspect of the citizen’s lives. 1984 describes a society in which everyone is watched, all the time; there’s a minor plot hole (who’s watching all these video feeds?), but it escaped my notice back then.

But something happened on the way to dystopia–something Orwell didn’t predict. We tend to see surveillance as a tool of oppressive government; in a sense, we have all been trained to see it that way. But it is just as powerful a tool in the hands of the citizens, when they use it to watch the government.


As I write this, the town of Ferguson, Missouri has been wracked for over a week now because of the killing of an unarmed black teenager at the hands of an aggressive and overzealous police officer. When the people of Ferguson protested, the police escalated, and escalated, and escalated, responding with tear gas, arrests, and curfews.

Being a middle-aged white dude gives me certain advantages. I don’t smoke pot, but if I did and a police officer found me with a bag of weed in my pocket, the odds I’d ever go to prison are very, very small. Indeed, the odds I’d even be arrested are small. If I were to jaywalk in front of a police officer, or be seen by a police officer walking at night along a suburban sidewalk, the odds of a violent confrontation are vanishingly tiny. So it’s impossible for me, or real;y for most white dudes, to appreciate or even understand what it’s like to be black in the United States.

This is nothing new. The hand of government weighs most heavily on those who are least enfranchised, and it has always been so. All social structures, official and unofficial, slant toward the benefit of those on top, and in the United States, that means the male and pale.

And there’s long been a strong connection between casual, systemic racism and the kind of anti-Commie agitprop that made Orwell famous.

It is ironic, though not unexpected, that the Invisible Empire of the Knights of the Ku Klux Klan is raising a “reward” for the police officer who “did his job against the negro criminal”.

So far, so normal. This is as it has been since before the founding of this country. But now, something is different…and not in the way Orwell predicted. Surveillance changes things.


What Orwell didn’t see, and couldn’t have seen, is a time in which nearly every citizen carries a tiny movie camera everywhere. The rise of cell phones has made citizen surveillance nearly universal, with results that empower citizens against abuses of government, rather than the other way around.

Today, it’s becoming difficult for police to stop, question, arrest, beat, or shoot someone without cell phone footage ending up on YouTube within hours. And that is, I think, as it should be. Over and over again, police have attempted to prevent peopel from recording them in public places…and over and over again, the courts have ruled that citizens have the right to record the police.

It’s telling that in Ferguson, the protestors, who’ve been labeled “looters” and “thugs” by police, have been the ones who want video and journalism there…and it’s been the police who are trying to keep video recording away. That neatly sums up everything you need to know about the politics of Ferguson, seems to me.

Cell phone technology puts the shoe on the other foot. And, unsurprisingly, when the institutions of authority–the ones who say “if you have nothing to hide, you have nothing to fear from surveillance”–find themselves on the receiving end rather than the recording end of surveillance, they become very uncomfortable. In the past, abuses of power were almost impossible to prosecute; they happened in dark places, away from the disinfecting eye of public scrutiny. But now, that’s changing. Now, it’s harder and harder to find those dark places where abuse thrives.

In fact, the ACLU has released a smartphone app called Police Tape, which you can start running as soon as you find yourself confronted by police. It silently (and invisibly) records everything that happens, and uploads the file to a remote server.

If those in power truly had nothing to hide, they would welcome surveillance. New measures are being proposed in many jurisdictions that would require police officers to wear cameras wherever they go. The video from these cameras could corroborate officers’ accounts of their actions whenever misconduct was alleged, if–and this is the critical part–the officers tell the truth. When I hear people object to such cameras, then, the only conclusion I can draw is they don’t want a record of their activities, and I wonder why.

William Gibson, in the dystopian book Neuromancer (published, as fate would have it, in 1984) proposed that the greatest threats to personal liberty come, not from a government, but from corporations that assume de facto control over government. His vision seems more like 1984 than 1984. He was less jaundiced than Orwell, though. In the short story Burning Chrome, Gibson wrote, “The street finds its own uses for things.” The explosion of citizen surveillance proves how remarkably apt that sentiment is.

The famous first TV commercial for the Apple Macintosh includes the line “why 1984 won’t be like 1984.” The success of the iPhone and other camera-equipped smartphones, shows how technology can turn the tables on authority.

The police commissioners and state governors and others in the halls of political power haven’t quite figured out the implications yet. Technology moves fast, and the machinery of authority moves slowly. But the times, they are a-changin’. Orwell got it exactly wrong; it is the government, not the citizens, who have the most to fear from a surveillance society.

And that is a good thing.

Cloudflare: The New Face of Bulletproof Spam Hosting

…or, why do I get all this spam, and who’s serving it?

Spammers have long had to face a problem. Legitimate Web hosting companies don’t host spam sites. Almost all Web hosts have policies against spam, so spammers have to figure out how to get their sites hosted. After all, if you can’t go to the spammer’s website to buy something, the spammer can’t make money, right?

In the past, spammers have used overseas Web hosting companies, in countries like China or Romania, that are willing to turn a blind eye to spam in exchange for money. A lot of spammers still do this, but it’s becoming less common, as even these countries have become increasingly reluctant to host spam sites.

For a while, many spammers were turning to hacked websites. Someone would set up a WordPress blog or a Joomla site but wouldn’t keep on top of security patches. The spammers would use automated tools capable of scanning hundreds of thousands of sites looking for vulnerabilities and hacking them automatically, then they’d place the spam pages on the hacked site. And a lot of spammers still do this.

But increasingly, spammers are turning to the new big thing in bulletproof spam serving: content delivery networks like Cloudflare.


What is a content delivery network?

Basically, a content delivery network is a bunch of servers that sit between a traditional Web server and you, the Web user.

A ‘normal’ Web server arrangement looks something like this:

When you browse the Web, you connect directly to a Web server over the Internet. The Web server takes the information stored on it and sends it to your computer.

With a content delivery network, it looks more like this:

The CDN, like Cloudflare, has a large number of servers, often spread all over the country (or the globe). These servers make a copy of the information on the Web server. When you visit a website served by a CDN, you do not connect to the Web server. You connect to one of the content delivery network servers, which sends you the copy of the information it made from the Web server.

There are several advantages to doing this:

1. The Web server can handle more traffic. With a conventional Web server, if too many people visit the Web site at the same time, the Web server can’t handle the traffic, and it goes down.

2. The site is protected from hacking and denial-of-service attacks. If someone tries to hack the site or knock it offline, at most they can affect one of the CDN servers. The others keep going.

3. It’s faster. If you are in Los Angeles and the Web server is in New York, the information has to travel many “hops” through the Internet to reach you. If you’re in Los Angeles and the content delivery network has a server in Los Angeles, you’ll connect to it. There are fewer hops for the information to pass through, so it’s delivered more quickly.


Cloudflare and spam

Spammers love Cloudflare for two reasons. First, when a Web server is behind Cloudflare’s network, it is in many ways hidden from view. You can’t tell who’s hosting it just by looking at its IP address, the way you can with a conventional Web server, because the IP address you see is for Cloudflare, not the host.

Second, Cloudflare is fine with spam. They’re happy to provide content delivery services for spam, malware, “phish” sites like phony bank or PayPal sites–basically, whatever you want.

Cloudflare’s Web page says, a little defensively, “CloudFlare is a pass-through network provider that automatically caches content for a limited period in order to improve network performance. CloudFlare is not a hosting provider and does not provide hosting services for any website. We do not have the capability to remove content from the web.” And, technically speaking, that’s true.

Cloudflare doesn’t own the Web server. They don’t control what’s on it and they can’t take it offline. So, from a literal, technical perspective, they’re right when they say they can’t remove content from the web.

They can, however, refuse to provide services for spammers. They can do that, but they don’t.


History

CloudFlare was founded by Matthew Prince, Lee Holloway, and Michelle Zatlyn, three people who had previously worked on Project Honey Pot, which was–ironically–an anti-spam, anti-malware project.

Project Honey Pot allows website owners to track spam and hack attacks against their websites and block malicious traffic. In an interview with Forbes magazine, Michelle Zatlyn said:

“I didn’t know a lot about website security, but Matthew told me about Project Honey Pot and said that 80,000 websites had signed up around the world. And I thought ‘That’s a lot of people.’ They had no budget. You sign up and you get nothing. You just track the bad guys. You don’t get protection from them. And I just didn’t understand why so many people had signed up.”

It was then that Prince suggested creating a service to protect websites and stop spammers. “That’s something I could be proud of,’” Zatlyn says. “And so that’s how it started.”

So Cloudflare, which was founded with the goal of stopping spammers by three anti-spam activists, is now a one-stop, bulletproof supplier for spam and malware services.


The problem

Cloudflare, either intentionally or deliberately, has a broken internal process for dealing with spam and abuse complaints. Spamcop–a large anti-spam website that processes spam emails, tracks the responsible mail and Web hosts and notifies them of the spam–will no longer communicate with Cloudflare, because Cloudflare does not pay attention to email reports of abuse even though it has a dedicated abuse email address (that’s often unworkakble, as Cloudflare has in the past enabled spam filtering on that address, meaning spam complaints get deleted as spam).

Large numbers of organized spam gangs sign up for Cloudflare services. I track all the spam that comes into my mailbox, and I see so much spam that’s served by Cloudflare I keep a special mailbox for it.

Right now, about 15% of all the spam I receive is protected by Cloudflare. Repeated complaints to their abuse team, either to their abuse email addres or on their abuse Web form, generally have no effect. As I’ve documented here, Cloudflare will continue to provide services for spam, malware, and phish sites even long after the Web host that’s responsible for them has taken them down; they kept providing services for the malware domain rolledwil.biz, being used as part of a large-scale malware attack against Android devices, for months after being notified.

One of the spam emails in my Cloudflare inbox dates back to November of 2013. The Spamvertised domain, is.ss47.shsend.com, is still active, nearly a year after Cloudflare was notified of the spam. A PayPal phish I reported to CloudFlare in March of 2014 was finally removed from their content delivery network three months later…after some snarky Twitter messages from Cloudflare’s security team.

(They never did put up the interstitial warning, and continued to serve the PayPal phish page for another month or more.)

Cloudflare also continues to provide services for sites like masszip.com, the Web site that advertises pirated eBooks but actually serves up malware.

In fact, I’ve been corresponding with a US copyright attorney about the masszip.com piracy, and he tells me that Cloudflare claims immunity from US copyright law. They claim that people using the Cloudflare CDN aren’t really their concern; they’re not hosting the illegal content, they’re just making a copy of it and then distributing it, you see. Or, err, something.

I am not sure what happened within Cloudflare to make them so reluctant to terminate their users even in cases of egregious abuse, such as penis-pill spam, piracy, and malware distribution. From everything I can find, it was started by people genuinely dedicated to protecting the Internet from spam and malware, but somehow, somewhere along the way, they dropped the ball.

I wonder if Michelle Zatlyn is still proud.

Polyamory: How to handle a broken agreement without drama

Everyone’s favorite source of poly wisdom, BadAss McProblemsolver, is back to take on a complicated question: “How do I handle a broken relationship agreement without Drama?”

The answer, as it turns out, can be found in Star Wars. Don’t do what Luke Skywalker did in The Empire Strikes Back.

Movie Review: Snowpiercer

Last week, zaiah and I decided to spend an evening sitting in a dark room with a bunch of strangers staring passively at a flickering screen. We were in the mood for B science fiction, so we decided to go watch a low-budget sci-fi allegory about classism and economic repression whose characters are faced with losing body parts and whose plot heavily involves ice.

No, I don’t mean Ice Pirates. I mean the one that’s set on a train. I mean this one:

I must admit, it’s a worthy heir to the Ice Pirates crown. Without question, Snowpiercer is the best low-budget sci-fi allegory about classism and economic repression whose characters are faced with losing body parts and whose plot heavily involves ice that’s ever been set on a train.

The movie goes something like this:

Well-intentioned but incompetent scientists: Global warming is a thing. To fight global warming, we will spread a magic chemical in the air that will reduce global temperatures because magic, and also chemtrails. We will not model the results first, nor pay attention to the effects, because in this world modeling and verification are not things.

The WELL-INTENTIONED BUT INCOMPETENT SCIENTISTS spread MAGIC CHEMICALS in the AIR because MAGIC and also CHEMTRAILS. Global temperatures PLUMMET OVERNIGHT because THERMAL INERTIA ALSO ISN’T A THING.

Well-intentioned but incompetent scientists: Wow, we didn’t see that coming! The entire earth is now a frozen snowball and all life is extinct. Oops, our bad.

Jamie Bell: It sure does suck being one of the last human beings alive and being stuck in the back of this train. We should rebel and go to the front of the train. Chris Evans, you should lead us!
Chris Evans: Waitaminnit. If the world suddenly started freezing, why are the only survivors on a train? Why wouldn’t people make domed cities? Or dig shelters underground? For that matter, how come this train is even moving? Where does it get its fuel from?
Jamie Bell: It has a perpetual motion engine, of course! Duh.
Chris Evans: Oh, boy. It’s going to be one of those movies. And I thought my role in Captain America: The Winter Soldier was implausible. Man, I have got to talk to my agent about these winter-themed movies I keep getting cast in.

Click here for more (here be spoilers galore!):

Conversations with a kitty

This is our cat Beryl. He’s a blue solid Tonkinese, a cat breed that’s made of one part kitty, three parts fearlessness, and sixteen parts love. Tonks are absolutely amazing kitties, with all of the cute adorableness of your standard-issue cat without any of the surly sociopathy.

A couple days ago, I received a package in the mail. On the same day, I went out to buy new printer ink cartridges and came home with a new black and white laser printer, which was cheaper than a set of replacement ink cartridges because capitalism and market efficiencies and invisible guiding hand and Adam Smith LOL.

Anyway, Beryl and I had a conversation that went something like this:

Me: Hey, kitty! Look! I brought you a present! It’s an empty box!

Beryl: OMG you are the BEST. A box! This is amazing! Thank you! Thank you so much! From here I can hide and pounce on Liam all unawares and stuff.

Me: And check this out! I got a new printer, so here’s another empty box.

Beryl: TWO empty boxes? Truly, my cup runneth over. I don’t think I’ve been this happy since…since…since ever! Now I can hop from one box to another. The cunning box-ambush strategies I can devise with TWO boxes will make me the undisputed champion of my domain. You are the greatest. Truly, I mean that. And it’s not just the boxes, it’s also the food preparation. I will remember you in the long years of my reign.

Me: Okay, I need some more space to set up this printer. Here, let me just put this box inside the other box…

Beryl:

Beryl: The hell?

Beryl: You…you just…

Beryl: There is an empty box inside another empty box!

Beryl: You…I…it…

Beryl: How is this even possible? I can hop into a box, and when I get there, there is..another box! Another box, that I can ALSO hop into!

Beryl: I can be inside TWO BOXES AT THE SAME TIME.

Beryl: How did you make this happen?

Beryl: You are like a god. Like. A. God. A god of boxes. You…I never even…it’s just so beautiful!

Beryl: Never in all my life have I imagined such a thing. You have opened my eyes to the Possible, and truly is it more amazing than I had ever dared to hope.

Beryl: Two boxes. TWO boxes. One box inside…inside the other…I’m having a moment.

Me: I’m glad I could make you happy, little buddy.

Beryl: Happy? Happy? Happy is getting the squishy food. Happy is having ONE box to play with. Happy is sitting on your shoulder while you do that thing where you sit in front of that glowing thing and you pretend like you’re a mage and you press buttons and throw frostbolts around and you swear at the goddamn hunter who always pulls aggro and is never where he’s supposed to be and…

Me: You mean play World of Warcraft?

Beryl: Yes, that. Happy is sitting on your shoulder while you do that. But this…this is…

Beryl: If Voluptas, the goddess of bliss born of the union between Cupid and Psyche, had been capable of feeling what I’m feeling right now, the entire story of the world would be rewritten. Temples in her name would stand still as the greatest of all human accomplishments. If you could package what I’m feeling and distribute it, wars would end, ancient rivalries would be forgotten, petty jealousy would be as extinct as the Stegosaurus.

Me: I’m just glad you like your boxes.

Me: Wait, how the hell do you know about Roman mythology? You’re a cat!

Beryl: Can’t talk. Busy playing. In boxes.

Nome, Alaska: There’s gold on that ther beach!

Nome, Alaska was incorporated as a town in 1901, because of a gold rush. In the late 1800s, gold was discovered in the mountains around Nome; in the early 1900s, more gold was discovered in the sand on the edge of the Bering Sea.

There’s still lots of gold in Nome. While there’s no longer a full-on gold rush, there’s still considerable gold mining around Nome, and some of its beaches are designated for “recreational mining.”

For three months out of the year, Nome’s beaches are home to the strangest temporary communities you will find outside Burning Man. But these are not well-off techie hipsters who take drugs and dance around a giant fire. They’re folks from Canada and the United States who head up to Nome, where they set up tents and build makeshift houses from reclaimed materials (shipping pallets, old signs, and whatever else they can find) to spend the summer months sifting the beach sand for gold.

There are all kinds of rules on recreational gold mining. Each “claim” is at most 75 feet wide; claims are temporary and evaporate at the end of the season or when you move off the beach; there’s a limit of 40 ounces of gold per person or group per year, which is about $52,000 worth at current market prices. There are limits on the equipment that can be used.

The people who do this are a really interesting bunch. We talked to several folks on the beach, most of whom come up year after year to look for gold. The people we met were friendly and outgoing, willing to show us their equipment and talk about their favorite techniques. Most were cagey about the amount of gold they find every year, but my impression was they generally tend to get about the 40-ounce limit.

Or at least that’s what they declare at the end of the season.

There’s industrial-scale mining as well, but to me, the hobbyist mining is absolutely fascinating.

Summer in Nome is strange: the sun barely ever sets (it’s a little freaky to go outside at midnight and see the sun still high in the sky), so the beach miners tend to work whenever they are awake and sleep whenever they’re tired–there seems to be little in the way of set schedules. The temperature was pleasant while we were there, though apparently near-constant light rain and occasional storms are normal during parts of the summer. It is still Alaska, which means the environment is still hostile enough to produce the occasional odd survival event without warning; as a result, the community tends to be close-knit, with everyone watching out for everyone else…interesting to see in folks who are prone to say they enjoy doing this every year at least partly to get away from other people.

The sand on the beach looks like this. The red color apparently indicates rich gold-bearing sand.

I’m actually considering going up there next year and spending the summer living on the beach panning for gold. Not because I expect to find any or to strike it rich, mind, but simply for the experience of it. It would make one hell of a “how I spent my summer vacation” story! (There are rumors the state will not be permitting hobbyist mining on the beach next year, though these rumors seem to have been circulating for years–one person we talked to said he heard the same thing several years back when he did it for the first time.)

Back when the 1940s and 1950s, it was common to mine for gold using enormous dredging machines like this one, now in ruins and slowly crumbling into the tundra:

These gigantic hulks are dotted all over the landscape around Nome. They were expensive to build and ship, and woefully inefficient–at best, they might recover 40% of the gold from the sand. In fact, the tailings left behind by these old machines are being mined again with more efficient techniques, and the amount of gold left in them is quite high.

I’m not sure I want to be doing this, but I am very sure I want to have done it. The book that would come out of this experience would be amazing.