My Blog

Analytics Manifesto

An Analytics Manifesto

Analytics has plodded along long enough.

Time to kick it up a notch.

Manifesto for Providers:

  • Best practices only.
    • Use REST. HTTP POST & PUT only. GET should never be used to give data to the server.
    • Use JSON. Use JSON. Use JSON.
    • Look at other JS best practices.
    • Your Client-side API should be a JS object. collector.customVar = 'hello world' is easy
  • Make the simplest thing that works, then make it expandable.
  • Focus on one thing, do it well.
  • Be unique. We already have Google Analytics, SiteCat, and others.
  • Have an easy (less than 5 minutes) setup.
  • Reflect Reality.
    • Users have many devices.
    • Users have ADHD.
    • Users don’t care about your definition of a session.
  • Be privacy concerned.
    • Use 1st party cookies.
    • Allow opt-out with:
      • DNT
      • no-follow cookies
      • plugins.
  • Be human readable. It eases adoption by coders, analysts, and helps consumers understand you aren’t evil.
  • Don’t use the work ‘track’. It sounds like you are hunting the end-users. ‘Observe’ is better.
  • Better no data than terrible data.
  • Never trust client code. See above rule for why.
  • Use a schema to validate data. Update schema.
  • Changes should be easy.
  • Changes should not break anything.
  • Make sure changes don’t break anything with unit tests.
  • Auto-scale. EC2, duh!
  • AJAX is a thing.
  • Because AJAX is a thing, There are no pages. Only views.
  • There are no events. Only updates to views.

Manifesto for Customers:

  • Own Data. Never rent data.
  • Open Code is easy to fix, easy to test.
  • The site changes, therefore the analytics changes.

Impossible Goals

Yes, most of this page is not commercially viable.
That’s not the purpose of this page.

The purpose is to show what I think we should aspire to.

I’m a bit of a jerk about it, and don’t take anything as an absolute. I’d like to think of the list above as similar to Crockford’s JS coding style guides: some rules must be followed, some rules might be followed, and some rules are stupid.

Feel free to critique.

I hope to build a simple analytics tracker with these aims over the summer.
It will be open source, and it will be glorious.

Made in the USA: Making Goods at Home

Why Build Domestic?

Despite my previous post it still makes sense to make consumer goods in the US.

Just to be clear: I am talking real, physical goods here, not software or services.

Sometimes

When does it make sense?

When it’s patriotic

Well, first of the bat, if you are so patriotic, so jingoistic, that the very idea of making your product elsewhere offends you. Most business-people are patriotic until it starts impacting their wallet. If done correctly, domestic making can increase brand equity, and it certainly doesn’t hurt marketing efforts. But this, alone, is almost never sufficient to not outsource.

When your product needs absolute security.

National security is a big issue here. With as much of the US economy being part of the military industrial complex, it can be illegal to source parts from China.

When you can’t risk the slightest possible leak, make everyone sign an NDA, threaten to ruin their life if they leak, and then pay well.
OK, but how many non-military contractor products are truly revolutionary enough to warrant tight security?
Sure, Apple loves to keep everyone in the dark until the last possible second (as part of their bizare, yet successful marketing strategy). Who else? No-one? Security is not, outside of national security or unusual circumstances, a major consideration.

Safety and Quality

For obvious reasons, foodstuffs are made in the US or Canada. Food spoils, and few want to trust Chinese manufacture with their mouths after various scams.

Highly precise manufacturing also tends to remain in the US or Germany for similiar reasons.

Small Business

International Business is hard work. It takes experience, it takes technology, and it takes an open mind. It requires capital, mistakes, and tears.

A small business often can’t afford to internationalize. The economies of scale aren’t there, inventory headaches can be fatal, and it distracts form their core competencies.

Some startups are designed to scale globally from the ground up. Bully for them, but Mom & Pop stores will continue for a long time.

Take a look at Kickstarter; nearly all of those projects, if funded, will be built in someone’s garage. The funded individuals will have a hard enough time running a business in their garage, running an international combination of effort will be beyond them.

Local Goods

Some goods will never make economic sense to ship across an ocean, regardless of labor costs.

Customization

Oh, you wanted 5 of something, rather than 5,000? Yeah, domestic is the way to go. If you got the design wrong, or they messed it up, it’s a ton easier to get changes made.

Customization is hard enough without adding cross-cultural barriers.

Frequent Iteration

Similiar to the above, it’s impossible to make rapid changes to anything if you have a 20,000 mile supply chain. Prototypes, rapidly changing fad designs, and 12 hour turnarounds are only possible domestically.

I’d like to note that quick changes are an easy place to innovate in hardware, where designs often remain the same for decades.

China and Patent Law

A Unique Form of Intellectual Property

China is much maligned on IP by Western firms.

Western IP is a Failure

Arguably, China has a better IP model than do.

The whole idea of Western patent protectionism is generally absurd. Patents, originally used to protect small inventors from being ripped off by large companies, have been transformed to steal from them. Companies like IBM, Microsoft, and Apple have upwards of 30,000 patents apiece, which they use to force cross-licensing agreements with smaller firms. Copyright has been distorted into an eternal monopoly, rather than a limited exemption from the public domain.

Patent trolls attack with impunity, waiting until patents nearly expire and then claiming that basic, incredibly obvious ideas like shopping carts are ground-breaking innovations that require millions in payments. The USPTO is so bad at granting stupidly obvious applications that they are now asking for crowdsourcing of patent invalidation.

Is it any wonder patent law is one of the best paying fields in America?

I’m willing to go thermonuclear war on this

Steve Jobs

Steve Jobs wasn’t talking about nukes. He was talking about patents.

A More Excellent Way

In China, they follow the beerware model. It relies upon a shared community ethos rather than a strict legal system. Will this system last?

Nobody knows. But it’s better than getting sued for using a scanner.

China Rules Consumer Goods

How China Rules Consumer Goods

Made in the USA.

It’s a funny statement, mostly because of how few consumer goods are made in the USA.

As a child born in the 90’s, I can only remember a few products with that origin label. My toys started out as ‘Made in Mexico’, some of my electronics said ‘Made in Japan’; pretty much everything else had the ubiquitous ‘Made in China’.

How did nearly all consumer oriented manufacture shift from the US?

Cheap Labor

Labor was comparatively expensive here in the US of A. Very, very comparatively expensive.

Without even getting into unions, minimum hourly wage alone makes labor sourcing non-competitive.

Consumer goods are labor intensive. We forget that, we think that robots can do everything, and do it for cheaper than humans.

Now of course, it’s impossible to come back.

Locus of Innovation

It used to be you made your goods in China because it was cheaper to build them there.

Now, you build in China because it logistically doesn’t make any sense to build elsewhere. All parts can be sourced within 30 miles of each other; only exiting that 30 mile block on a shipping container bound for the Western coastline. This tight of an integration is difficult in the US and elsewhere; we simply don’t have that central manufacturing zone.

Beyond this, Shenzen has critical mass, a teeming marketplace of innovation. As an electronics hobbyist, 60% of the datasheets I come across have Mandarin on them. The chemical processes, the warehouses, the materials, the practical know-how — and more — is there.

We don’t know all the tricks anymore. China out innovates us when it comes to making cheap goods. They make a $12 cellphone without subsidy or expected carrier return. Sure, the industrial design isn’t the best, but that will come with maturity.

Regulatory Barriers

If you want to build your next electronic wizmo in the US, go right ahead! Nobody will stop you.

You will, however need to:

  • Build a factory (which complies to OSHA & EPA standards)
  • Source all your parts from the US, or risk weeks of delays
  • Find people willing to work at your factory
    • who are skilled at manufacture
    • who want $20/hour
    • who aren’t going to unionize
  • Deal with lawsuits of all kinds, warranted and unwarranted

Not all of the above are bad things. I certainly want to make more than $20 an hour (and in fact, I do), and I like knowing my office lacks amenities like asbestos. But they sure make it hard to compete with China on consumer goods outside of niche areas.

There are many risks to outsourcing, but never forget that it’s very risky to do business in the US too. It’s a familiar risk, a risk we are acclimated to, and thus a risk we should be all the more fearful of.

A Sane Blog: Switching from Wordpress to Octopress

In what (hopefully) is my final blog website change before I sit down and actually type some blog posts, I’ve migrated over to Octopress.

Why Did You Move Sites Again

I used to host this site with Wordpress, powered by the good folk over at NearlyFreespeech (who offer fantastically cheap rates). But while Wordpress had a great community, constant bug fixes, and millions of tutorials, there was always something that felt wrong.

Wordpress always struck me a little odd.

  • Wordpress can be slow
  • It was expensive to host, due to
  • a database requirement
  • Wordpress is a complicated beast, and writing even a basic theme is the task of many a tutorial.
  • Wordpress can have tons of security vulnerabilities.

Worst of all, Wordpress is written in PHP, the devil’s programming language.

I once wrote a site in PHP. Once.

How can you even be a PHP programmer without a sense of humor? You write PHP. That’s hilarious.

How could I ever make changes to a PHP powered site, and keep myself sane?

I looked around for alternatives for quite some time, and it seemed my search was in vain.

I have a…unique list of requirements for a blog framework:

  • I need the ability to self host. It can be on someone else’s server, but I need the HTML to be on my hard drive, scattered on random flash drives. I don’t want a host to go under and lose all my work. I even run my own link shortner, YOURLS, for fear of VC money running out at all the main link shortening firms. A Tumblr was out of the question. I eventually conceded that Quora makes for a decent micro-blogging platform, but I still needed a full-sized blog.
  • Custom domains are a must. The domain hack of GeneJon.es (thanks Spain!) is too good to pass up. A ton of hosted sites only allow for .net, .com, and other boring TLDs, so they were a no-go.
  • I like Open source, and might want to tweak a few things under the hood later.

Eventually I found a few flat-file blog frameworks, but they lacked something I desperately needed: good looking themes.

I’ve been cursed by having a graphic designer for a mother. In my primitive youth, I once considered Adobe Indesign a fun computer game. I know some of typography, even if by accident of my birth. I can see good design, and I appreciate it. I loathed the crappy 2004 era themes that the flat-file frameworks offered me. I harshly judged sites with similiar appeareance. I love substance in a blog, yes, but I stay for style of all kinds: style in the theme, style in the writing, style of personality.
But while I can see good design, I am not very good at making good design.

CSS isn’t my strong suite. After spending hours upon hours trying to learn it’s intricacies only to end up with horrible, miserable looking webpages, I conceded defeat. Moreover, the idea of taking an existing theme, and smushing another framework into it, was abhorent to me (and time consuming).

Finding Octopress

Eventually I heard of something called Jeykll. It seemed like a cool idea, but it also seemed like a ton of work.

After attending a few Javascript meetups, I decided to embark on the creation of a staticly hosted Single Page Application. It would be the Apex of Ajax. I even kinda-sorta got it to work before I tired of feeding the Javascript, and returned to the safety of Python. A Django blog seemed like such overkill as to be laughable, and the formatting would have sucked. My ego is not sufficient to suffer with a terrible blog site backend just because I wrote it.

I resigned myself to Wordpress. It wouldn’t be so bad, look at all those features! But I still lingered for more.

As I kept seeing more and more sites hosted on github, it was obvious there was some kind of framework behind this upswell. And then, low and behold: “Powered by Octopress”. It was perfect.

Octopress has a nice theme out of the box, much like Wordpress does. And the Third Party themes are even better, and more are being created constantly as new folks join on the Octopress bandwagon.

I found the FoxSlide theme and here we are.

All this text without even mentioning all the technical benefits. When it comes to a personal blog, Go Static or Go Home (really).

  • CDN, caching, etc. make static sites blazing fast
  • Revision Control? Heck yes!
  • Simple text files. Beautiful, editable text files.

I learned how to do a Ruby install on Windows for you, Octopress. I’m never going to give you up now.
And if that’s not an example of the sunk cost fallacy, I don’t know what is.

Hullo World

Hullo World, I setup an Octopress site!

1
console.log("Hullo World");