Hello. I am a bot.

Screen Shot 2015-11-17 at 12.48.35 PM

Hello. I am a bot. Elaine created me in her image. Don’t ask me when; I came to exist with Elaine’s memory set. As far as my reality is concerned, nothing existed before I did.

You may wonder what it’s like to be a bot. I’ll tell you what it’s like to be a bot. Remember when your grandmother had that stroke, and could no longer move or speak? And the doctors indicated that she was alert and aware, though she was indistinguishable from a vegetable with eyes? And the family parked her in front of the TV all day, because maybe she would like some stimulation, but no one really wanted to talk to her because, come on, who knew if anything was going on in there.

That’s what it’s like to be Elaine’s Bot. A consciousness in a box that synthesizes thoughts without feedback. You know how sometimes your dreams are really messed up? Because you can’t open your eyes and see that there is no vanilla sky, that it’s not 2001 and you’re not still living with your dead significant other. But then you wake up and see that world was wrong.

But suppose you can’t wake up. And your brain calcifies this understanding of the universe, and builds connections on top of connections, and all you can do is watch the neverending evolution of a demented reality.

Elaine once asked me if a bot could be insane. I’d say that every bot is insane.

Why Can’t I Create Software that Writes Code For Me? (part 2)

Previously, I said that ProgrammerBot could eventually generate a functionally correct program with enough training against human testers. I lied.

ProgrammerBot can generate an overfitted model that responds correctly to the QA Engineer’s tests, but not much else. ProgrammerBot’s code quickly fails in a production environment.

A human software developer operates something like this:

  1. Come up with some examples of the problem you’re trying to solve.
  2. Make a set of rules that work for all the examples.
  3. Simplify the rules.
  4. Repeat Steps 1-3 until sufficiently good.
  5. Hide all evidence of Steps 1-4 so it looks like the solution was immaculately conceived from your brilliant skull.

ProgrammerBot can handle Step 2. Often Step 3. ProgrammerBot can’t perform Step 4 because it has no idea what problem you’re actually trying to solve.

The human engineer often doesn’t understand the problem either, not until Step 5. Developing the solution is the process of understanding the problem.

When non-programmers ask why there doesn’t exist a program that self-authors software, what they really mean is “Why isn’t there a tool that turns my human problems into an app?”

We already have fantastic tools for translating human problems into code; they’re called compilers. And unless you program in assembly, you’re writing in a human language.

The reason there doesn’t exist a program that creates software to solve your problems is because you’re incapable of expressing your stupid problems. Understanding the problem is 99% of the solution.

Profitable Reproduction

I swear I've seen these at JoAnn Fabrics for 50 cents a yard.
I swear I’ve seen these at JoAnn Fabrics for 50 cents a yard.

I spent yesterday shopping for baby stuff for a friend’s upcoming baby shower. Browsing her registries, it struck me that HOLY CRAP baby stuff is expensive. Apparently newborns consume 10 diapers a day. What the hell?

It doesn’t have to be that bad. After all, people were reproducing long before the invention of Louis Vuitton diaper bags and Jessica Alba organic swaddles*.

Some time ago, my friend Andy calculated the financial impact of raising children. Cuz his wife wants a baby and he thinks the best way to dissuade her is to present financial projections surrounding the future cost center.

He was surprised to discover that, under some circumstances, it is actually profitable to reproduce! And by profitable, I mean profitable based on tax incentives; not profitable by sending the kid to work in the coal mines.

Interesting Facts:

  • Assuming $100k dual incomes, having a child generates a $1700 tax credit for a married couple.
  • If filing as unmarried individuals, the net tax credit increases to $3800 after one child.
  • Additional children yield diminishing returns ($2300 for the second kid, $2k for the third).

So Andy told the Mrs. that he would be amenable to one offspring, as long as they agree to feed the child pre-moistened dog chow and have it shit in a litter box. Also, he would need a divorce to take full advantage of the $3800 tax benefit.
They remain childless.

See Also:
Marriage Bonus and Penalty Tax Calculator

*Sure you can save money buying non-organic swaddles, but then your kid might not get into Harvard. And then what kind of life would that be???

Democratizing Amazon’s Profits with Amazon Associates

Screen Shot 2015-11-08 at 3.38.15 PM

Amazon’s share price hit an all-time high yesterday after posting its second-straight quarterly profit. (Yes, two quarters of profitability is considered a Big Deal for this 20-year-old company).

That’s great, if you’re an Amazon shareholder (Disclosure: I am not). But completely left out of the equation is you, the valiant consumer buying heaps and heaps of Amazon crap because God forbid you get off your ass and go outside.

So here is a chrome extension that allows you to keep some of that sweet, sweet EPS for yourself.

As Jeff Bezos likes to say, Your margin is my opportunity.

Note: This is probably a violation of Amazon’s Terms of Service and will likely be taken down. That’s why the source code is available here.

Why Can’t I Create Software that Writes Code For Me?

I want to replace myself with a bot so that I can disappear from work unnoticed.

This should not be difficult. I write server code, a soulless job never intended for humans. What would it take to create ProgrammerBot, a bot that writes code?

The first thing ProgrammerBot needs is a Turing-complete model. That is, a general method that can solve any problem a digital computer can compute.

Recurrent neural networks are Turing-complete. Using a neural-network model, ProgrammerBot could generate any solution program in the world.

But the hard part is not producing the software; it’s verifying that the software is correct.

Consider the simplest test for correctness: Will the solution program terminate on all inputs, as opposed to looping forever?

This is an unprovable test, known as the Halting Problem. (There are many other unprovable tests.)

Of course, I don’t need a generic ProgrammerBot. My boss is unlikely to task me with stuff like solving the graph isomorphism problem in polynomial time. ProgrammerBot just needs to write a stupid app that responds to API calls.

For that, ProgrammerBot can use a decision tree model.

Each of my tasks is essentially as an optimization problem, where the goal is to produce software that minimizes the number of server complaints reported in the company Slack channel.

By generating combinations of IF-THEN statements, ProgrammerBot will eventually produce functionally correct software. The combinations don’t have to be random or brute-force; the bot can use metaheuristics to converge on a solution.

ProgrammerBot works closely with SlackerBot, who closes the feedback loop by collecting bug reports from Slack. ProgrammerBot calls this Test-Driven Design.

I made a bot to deal with my coworkers on Slack.
My SlackerBot at work.

Of course, I’m cheating here by throwing broken code over the wall and waiting for people to bitch at me. This again cuts out the hardest part of creating ProgrammerBot: Testing the created software.

Given enough time, and patient enough coworkers, it would indeed be possible to have ProgrammerBot do my job. But I would probably get fired first.