BitWorking

This is Joe Gregorio's writings (archives), projects and status updates.

Piccolo in Go

Piccolo has been ported to Go. The original Python script is still in place, but will no longer be updated. This entry is the first one published with the new picc.go.

Here's a speed comparison between the Python and the Go code for a full republish, i.e. every HTML file needs to be rewritten. First for the old Python code:


$ ./bin/piccolo
real  0m57.491s
user  0m46.415s
sys 0m1.312s

And now the Go code:


$ ./bin/picc
real  0m4.460s
user  0m1.588s
sys 0m1.096s

And incremental publishing is under a second:


$ ./bin/picc
real  0m0.476s
user  0m0.404s
sys 0m0.068s

Note that incremental isn't a very good description since the program is still parsing close to 1,000 XML files in that last run. I obviously have some performance improvements I can make.

2013-05-20

Back on Twitter

I'm giving Twitter another shot, this time at http://twitter.com/bitworking.

2011-05-31

APIs Discovery

The APIs Discovery Service launched today. This has been in the works for a while, but probably not a secret if you've been following checkins to the google-api-python-client library. The announcement went out on the Google Code blog, and has been covered in other venues.

Two things to add that haven't been covered so far, the first is that if someone besides Google were to build an API that could be described by the Discovery format, then potentially some of these libraries would work with that API. Secondly, check out that patent license. While the obvious questions will be raised, instead let's fill the comments with your theories of why we didn't use WADL.

2011-05-10

Not everything is a URI

I'm going to propose a new URN namespace for acronyms, so as to avoid any conflicts in the future.

urn:ietf:lol:omg:wtf:bbq

2011-04-22

Peak Stuff

You've heard of Peak Oil, right? Well this weekend my wife and I realized that we just passed Peak Stuff.

2011-03-14

Spammers

Posted without comment.

Delivered-To: joe.gregorio@gmail.com
Received: by 10.42.154.72 with SMTP id p8cs148414icw;
        Tue, 15 Feb 2011 14:03:20 -0800 (PST)
Delivered-To: joe.gregorio@gmail.com
Received: by 10.42.154.72 with SMTP id p8cs148414icw;
        Tue, 15 Feb 2011 14:03:20 -0800 (PST)
Received: by 10.90.91.16 with SMTP id o16mr28811agb.173.1297807400151;
        Tue, 15 Feb 2011 14:03:20 -0800 (PST)
Return-Path: <bewertung@beewo.de>
Received: from mx10.webfaction.com (mail10.webfaction.com [174.121.221.166])
        by mx.google.com with ESMTP id 8si8472588anr.133.2011.02.15.14.03.19;
        Tue, 15 Feb 2011 14:03:20 -0800 (PST)
Received-SPF: neutral (google.com: 174.121.221.166 is neither permitted nor denied by best guess record for domain of bewertung@beewo.de) client-ip=174.121.221.166;
Authentication-Results: mx.google.com; spf=neutral (google.com: 174.121.221.166 is neither permitted nor denied by best guess record for domain of bewertung@beewo.de) smtp.mail=bewertung@beewo.de
Received: from localhost (localhost.localdomain [127.0.0.1])
  by mx10.webfaction.com (Postfix) with ESMTP id B821D8CDB5
  for <joe@bitworking.org>; Tue, 15 Feb 2011 16:03:19 -0600 (CST)
X-Spam-Flag: NO
X-Spam-Score: 1.757
X-Spam-Level: *
X-Spam-Status: No, score=1.757 required=5 tests=[BAYES_00=-2.599,
  DEAR_SOMETHING=1.605, DOS_OE_TO_MX=2.75, STOX_REPLY_TYPE=0.001]
Received: from mx10.webfaction.com ([127.0.0.1])
  by localhost (mail10.webfaction.com [127.0.0.1]) (amavisd-new, port 10024)
  with ESMTP id evCDGqgNYHC8 for <joe@bitworking.org>;
  Tue, 15 Feb 2011 16:03:19 -0600 (CST)
Received: from Wfppx (zulu252.server4you.de [188.138.90.88])
  by mx10.webfaction.com (Postfix) with SMTP id ECDF38CDC9
  for <joe@bitworking.org>; Tue, 15 Feb 2011 16:03:18 -0600 (CST)
Message-ID: <0FCC0996E3936F8776396C1205A3C996@Wfppx>
From: <bewertung@beewo.de>
To: <joe@bitworking.org>
Subject: Subject for default customers
Date: Tue, 15 Feb 2011 23:03:14 +0100
MIME-Version: 1.0
Content-Type: text/plain;
  format=flowed;
  charset="iso-8859-1";
  reply-type=original
Content-Transfer-Encoding: 8bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579

Dear Sir or Madam,

this is a default template that gets sent out automatically in the licensed version.
This is written in English and will be send out to all people if not some other template might match (e.g. the *@*.de one).

As you may see here, you can use different tags like word2 to generate a different email each time.

You can also use the following things here:

  joe@bitworking.org - gets replaced with the email of the person you are emailing to
  http://wellformedweb.org/story/9 - the url where this email was found
  wellformedweb.org - the domain of the url where the email was found
  N/A - if extra data was collected it will be inserted here


With best Regards
Email Spider
---
Attention! Please never use our software to spam other people.
    

2011-02-15

No Distributed Extensibility Needed

What I said last year, now the W3C apparently agrees.

In short the case that was presented for distributed extensibility was weak.

2011-02-08

Safe Harbor for Negative Externalities

Negative externalities are the bane of a market economy. Those wider costs to products and services that aren’t included in the actual cost of a item can wreak major havoc on society and almost always result in years of litigation, lawmaking, and acrimony between businesses and government. So what exactly is an negative externality? Let’s start with the definition of externality from Wikipedia:

In economics, an externality (or transaction spillover) is a cost or benefit, not transmitted through prices[1], incurred by a party who did not agree to the action causing the cost or benefit. A benefit in this case is called a positive externality or external benefit, while a cost is called a negative externality or external cost.

The examples of negative externalities are legion: smoking causing cancer, asbestos causing cancer, CO2 causing global warming, lead in gas or paint leading to lead poisoning, ozone depleting CFCs, acid rain inducing sulfur emissions, etc. In each of the cases the discovery of the negative externality was followed by years of costly litigation, acrimony, industry FUD, astroturfing, lobbying, lawmaking, and more litigation. In each of the cases there was an industry supplying a product that produced the products with the negative externalities that fought the imposition of legislation governing the externality with all their might, including litigation, lobbying, and astroturfing. In all cases the goal was not to protect their customers, or that they really believed that the negative externalities didn’t exist, but to protect their business from taxation, or litigation by those affected by the negative externality. Cigarette companies knew that smoking caused cancer and did their level best to hide that finding, or to discredit those that brought the information forward. Their attack on the science around smoking and cancer was about protecting their business, not about protecting their customers from cancer. There’s an obvious cost, both economic and societal, when the incentives are for a company to hide, deny, attack, or otherwise ignore negative externalities of their products. Wouldn’t it be nice to reverse the direction of that incentive?

To reverse the incentive what we need is way to change the playing field so that it is in companies best interest to publicly acknowledge negative externalities, and the best way I can think to do that is a Safe Harbor law.

A safe harbor is a provision of a statute or a regulation that reduces or eliminates a party's liability under the law, on the condition that the party performed its actions in good faith. Legislators include safe-harbor provisions to protect legitimate or excusable violations. An example of safe harbor is performance of a Phase I Environmental Site Assessment by a property purchaser: thus effecting due diligence and a "safe harbor" outcome if future contamination is found caused by a prior owner.

For example, the DMCA contains a safe harbor provision for Internet Service Providers; as long as they respond to take-down notices in a timely manner according to the law then they can not be held liable for their user’s actions. A similar law should be put in place for negative externalities for products. As long as a company publicly acknowledges the negative externality then they can not be held liable for the negative effect. In the case of smoking, once a tobacco company acknowledged that smoking caused cancer then they could not be held liable by their customers for the cancer causing effects of smoking.

Such a law would completely change the dynamics of companies in an industry that had discovered a negative externality. Think of it from a game theory perspective, where each of the companies involved faces a prisoner’s dilemma for disclosing the negative externality. Without a safe harbor provision the cost of defection (acknowledgement) is very high, while the cost of cooperation (keeping the negative externality a secret) is low. With the safe harbor law in place, the benefit of defection would swamp the cost of cooperation. It would be in a companies best interest financially to find and expose negative effects as soon as possible, to make sure they would qualify for the safe harbor provision.

Now this is easier said than done, as the law would have to carefully crafted. For example, what class of products does this apply to? What does it mean to “acknowledge” a negative externality? How long can a company wait after their competitors have acknowledged a negative externality to also acknowledge it and still gain the benefits of the liability shield. Even with such a law in place the corporations involved would still lobby for their industry, as the tobacco lobby now does against the FDA regulating nicotine, and the coal and oil industries lobby against the EPA regulating CO2 emissions. Still, it is usually years if not decades between the discovery of a negative externality and the time legislation begins in earnest, and a safe harbor law could slash that time to a fraction of that, and in the process save the economy a lot of wasted money.

2011-02-06

Google Chapel Hill Now Hiring

Would you like to work for Google from the Triangle area of North Carolina? Now is your chance, we are hiring Software Engineers. You can apply through the site or shoot me a resume.

Update: To clarify, since the job description is a bit general, these are positions to work on Chrome.

2011-01-28

Between The Lines

Christopher's first iPhone game is now available, Between The Lines.

It's been a busy year for him, as he also launched a Facebook application Agitated Ferret, and all the Flash based games he's developed for it, and finally he's joined a FIRST robotics team.

2011-01-16