Wednesday, December 24, 2008 is a remarkable organization in at least a couple ways - they employ micro-finance principles to aid entrepreneurs in developing countries, and they make excellent use of online technology to do so. We highlighted them in my International Aid and Development class in college.

I really like that they're using the Long Tail on both the lending side and the receiving side of micro-finance. I also like some of their cool web features - the portable badge above, and their use of Facebook Connect to syndicate their activity to Facebook.

One of our good friends gave us a $25 gift certificate to Kiva and I think it's one of the best gifts we've ever received. I've admired Kiva for a while but have never spent the time or effort to get involved with it; this small amount is really inspiring me to do more.

UPDATE: Wow. When I picked my loan recipient, Margaret, she had 0% of her requested loan. In the 1-2 hours it took to get this blog post up, she received 100% of it. Go Kiva! Go Margaret!

Monday, December 15, 2008

ZF Rest classes

Holy crap. I forgot that way back after Tulsa Tech Fest I promised to upload some Zend_Controller classes I wrote to enable RESTful behavior. I think the presentation did a decent job conveying their purpose and operation, so here, finally, are the classes themselves.

If anyone does go look at them, feel free to comment/question here on this post about them.

Tuesday, December 09, 2008

PHP Brasil '08

I have posted a trip report about PHP Brasil '08 over at the Community Hub. There's also a video of my talk, a link to Chris Jones's thorough trip report, and links to my presentation slides.

Friday, November 14, 2008

Laughably Ridiculous

Okay, although I'm an open-source devotee, I've actually intellectually bantered in favor of copyright law. I know, I'm sorry; but I can understand the philosophical underpinning of *a* copyright scheme ... even if I don't agree with its effectiveness.

But this is just getting absurd.

Interestingly, SPFF is also going after Sourceforge, the open source development website, because it hosts the P2P application Shareaza.

So let me state this matter-of-factly:

In suing SourceForge, SPFF is not suing an entity who distributes copyrighted material. They're not even suing someone who develops software that might be used to distribute copyrighted material. SPFF is suing someone (i.e., SourceForge) who develops software (i.e., that might be used to develop or distribute software (i.e., Shareaza) that might be used to distributed copyrighted material.

Monday, November 03, 2008

Oklahoma State Question 743

Here is, verbatim, text I received from the local homebrew shop about Oklahoma State Question 743. I think it's important for people to be informed when they vote, so I'm passing this along ... obviously it's biased pro-wine-makers...

Fellow Oklahoma winemakers and homebrewers,
Tomorrow's election will have a state question that has a huge impact on the Oklahoma winemaking industry. In 2001, voters in Oklahoma voted over 70% in favor of allowing Oklahoma wineries to sell directly to liquor stores and restaurants without going through a distributor. That change allowed the wine industry to go from a few wineries to over 50 in just a few short years. Small wineries were able to sell to the local liquor stores and restaurants without being at the mercy of a wholesaler that had little interest in distributing for every little winery that opened here in Oklahoma.

Last year this law was challenged by the distributors as unconstitutional and was overturned by the state supreme court. The reasoning was that it created an unfair advantage for Oklahoma wineries over out of state wineries who were still required to go through a distributor. It was a huge blow. Out of state wineries that distribute in Oklahoma would more than likely use a distributor regardless.

In order to make the law "fair", a new question will be on tomorrows ballet. It rewrites the law to include any winery that produces under 10,000 gallons a year. Oklahoma wineries are dying on the vine right now. With out this change many will not succeed. Please pass this on to friends so that we can ensure that this law passes.

The following is the actual question appearing on the ballot:
State Question 743 - In Short: Wineries from Oklahoma and outside the state of Oklahoma will be able to sell their wine directly to retail stores and restaurants if SQ 743 is approved. Currently, they can only do so through a wholesaler or at fairs/festivals.

Actual Ballot Text:

This measure amends Section 3 of Article 28 of the Constitution. It requires a customer to be twenty-one and physically present to purchase wine at a winery, festival or trade show. The measure changes the law to allow certain winemakers to sell directly to retail package stores and restaurants in Oklahoma. The change applies to winemakers who produce up to ten thousand gallons of wine a year. It applies to winemakers in state and out of state. Those winemakers may not also use a licensed wholesale distributor. They must sell their wine to every retail package store and restaurant in Oklahoma that wants to buy the wine. The sales must be on the same price basis. The sales must be without discrimination. Those winemakers must use their own leased or owned vehicles to distribute their wine. They may not use common or private carriers. If any part of this measure is found to be unconstitutional, no winemaker could sell wine directly to retail package stores or restaurants in Oklahoma.

Thursday, October 30, 2008

Designing Simplicity

Dang! I wish I had this quote when I was making my REST slides for Tulsa Tech Fest. It's perfect!

I think most people just make the mistake that it should be simple to design simple things. In reality, the effort required to design something is inversely proportional to the simplicity of the result.
-Roy Fielding

The man himself. Priceless. Goes along great with the one I did use:

A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.
-Antoine de Saint-Exupry

Thursday, October 23, 2008

Framework Performance according to Rasmus

Alright, so invoking Rasmus in the title is a bit provocative, but I stumbled on an interesting talk of his; showing performance benchmarks for a number of popular php frameworks. The first portion of the talk is exactly what he presented @ OSCON, but the second half looks to be raw performance numbers. It looks like there are a couple specific, but easy, performance tweaks that he granted to certain frameworks, and I like seeing the data so much I thought I could try my hand at distilling it into Google Docs charts.

It's interesting that some tulsaphp guys and were recently talking about Zend had to be the slowest of all the frameworks, but apparently not so! That honor goes to CakePHP?

Thursday, October 09, 2008

Tulsa Tech Fest 2008 Slides

As promised, I'm posting my slides from my Tulsa Tech Fest 2008 presentation - RESTful MVC in Zend Framework.

Tuesday, September 30, 2008

the binary canary testing pattern

I think I just invented a new testing pattern - The Binary Canary.

Basically, I was grouping my PHPUnit tests into a test suite and I realized that my TestCase super-classes were "failing" because they had no tests in them. Obviously this is intentional - only the specific sub-classes would have tests.

I guess I could have made the TestCase super-classes abstract, but instead I added this to the highest-level TestCase class:

* global test plumbing here
class Sfx_TestCase extends PHPUnit_Framework_TestCase
public function setUp()
// more global test plumbing here
public function test_Binary_Canary()
"Binary Canary says test plumbing is working.",
"Binary Canary says test plumbing is working."

My little binary canary serves two purposes:

  1. It adds an "always-pass" test to each of my TestCase classes so they don't throw up any more PHPUnit warnings.

  2. Because my TestCase classes set up context-specific test plumbing, the binary canary test inherited by each of them now alerts me if I screw up any of my test plumbing - and tells me the specific area.

For example:

class Sfx_Db_TestCase extends Sfx_TestCase
public function setUp()
// Db-specific test plumbing


class Sfx_Controller_TestCase extends Sfx_TestCase
public function setUp()
// Controller-specific test plumbing

Just like the coal-miner canaries of old, this mechanism gives me a simple yes/no signal as to whether or not my test plumbing will soon kill me, and which plumbing code is the culprit.

Friday, September 26, 2008


I usually try to avoid preachy blog postings, but I can't help it today. Blame it on "casual Friday" or something.

Like lots of people, I'm pretty angry about the government using our taxes to bail out Wall Street incompetence. But now I've gone from angry to pissed-off. Here's why ...
The Dot-com bubble crash wiped out $5 trillion in market value of technology companies from March 2000 to October 2002.[11]

Recent research suggests, however, that as many as 50% of the dot-coms survived through 2004, reflecting two facts: the destruction of public market wealth did not necessarily correspond to firm closings, and second, that most of the dot-coms were small players who were able to weather the financial markets storm.[12]


Not only do I work for a dot-com survivor, I work for one of the most bruised, battered, and beaten-up dot-com survivors. I mean, just check out our stock chart! I haven't asked around the office for official corporate history or anything, but I'm pretty sure no-one remembers getting a couple billion dollars from the government while the company lost close to 99% of its market value, but I have been told there were weekly, if not daily, downsizing announcements.

Now I'm not jealous or vindictive on the part of my company - I wasn't even around for the toughest times. I'm just making a point here that market "catastrophes" and "crises" have happened, happen, and will always happen. Sadly, people will lose their jobs, their wealth, and their houses. In the case of the dot-com fallout, $5 trillion worth on Wall Street alone plus whatever subsequent losses are tallied.

6 weeks ago, the Congressional Budget Office said taxpayers would need to spend $25 billion to bail out Fannie Mae and Freddie Mac. Now we are seeing figures up to $700 billion. The figure could very well balloon to beyond the $5 trillion lost in the dot-com burst, no-one really knows - not you, not me, not Wall Street, and not Washington.

So why are we even considering footing the bill for this when no-one even knows what the total is, how it's going to be paid, or to whom we pay it? Obviously there are some very powerful financial market players gaming the system. They are not the "small players who [are] able to weather the financial markets storm."

It would be interesting to see if the Financial/Credit/Mortgage-Lending industry follows a Long Tail distribution. Might be a case of the tall head exploiting the public to avoid their necessary chop down to obscurity ...

Wednesday, September 17, 2008

unit tests and just-got-it-working inertia

I've been reading and enjoying The Productive Programmer by Neal Ford. It has re-ignited some of my passion for Test-Driven Development.

This morning I finished a first phase of "refactoring" some code architecture and found myself extremely hesitant to dive straight into the next phase. I think it's because the extent of my "testing" was to tab over to the fully-functioning web page and refresh after each code change. That's pretty much an "all-or-nothing" scenario.

And the thing about all-or-nothing scenarios is that once you've achieved the "all" state, you're very hesitant to go back to the "nothing" state. Maybe I'm starting to understand one of the benefits of unit tests as opposed to whole-sale acceptance tests. With smaller unit tests, you can move more concretely from nothing to something, then from something to something a little more, then finally to all done.

Friday, August 29, 2008


One of the great things about working for a big-name web company is that you get big opportunities. I'll be speaking at PHP Conference Brasil '08 about how we use PHP at Needless to say, I'm very excited and planning some vacation time around the conference.

Open source is big in Brazil. And even more pertinent, Brazil is our 3rd-highest nation in terms of site traffic - after U.S.A. and Germany.

Hopefully I can try to overcome the language gap and present some informative material for everyone. One of the things that struck me when I joined was that the site code isn't super-magic - it's really quite ordinary PHP, it's just very highly used.

Sunday, August 03, 2008

Ubuntu FTW; Boot Camp FTL?

quick update on my ubuntu experience ...

webex went fine. linux client seamlessly downloaded and allowed me to join a webex conference. joined the teleconference via skype with just a small hiccup - took me a couple minutes of tweaking with various sound levels to get my mac's built-in mic going. but iSight camera was working with Skype straight away, so that was nice.

but, near the start of my first full day, I needed to investigate an IE bug, so I tried booting up into my Windows partition. epic fail. blue screen immediately upon boot. :( tried fixing my mbr via the Windows XP install CD, but no luck with that either.

I remembered that the ubuntu instructions for triple-booting suggested installing GRUB on the partition with ubuntu, and I also remembered that I had missed that step. so, I decided to reset and start all over again. I booted into Mac OS (no probs there - in all of this experimentation I never once had a problem booting into Mac OS), and used disk utility to destroy both my ubuntu and windows partitions.

this time, I tried the other (easy) approach and after installing Windows, I ran ubuntu installer. this time I remembered to install GRUB on the ubuntu partition, rather than defaulting to the mbr. however, when I booted up again, I had the same experience - Mac and Ubuntu would start up fine, but Windows failed to start again. :(

because I constantly need to test in IE every day, I sadly decided that I needed to stop with all the experimentation and just resign to using Ubuntu on my secondary computers. :(

it's too bad - I would love to have a triple-booting MacBook Pro, especially if I could fire up both my Windows and my Ubuntu systems inside a parallels or fusion vm.

Monday, July 28, 2008

Ubuntu FTW?

I picked up an Ubuntu CD at OSCON and have now installed it on my macbook pro. I have no qualms saying this version (8.04) is easily the best Linux experience I've ever had...

I had to connect to ethernet to get first batch of updates which also let me get ndiswrapper and appropriate driver for my wifi card.

once I had that, wifi connected and it was a single apt-get command to get the proper bluetooth module so my mouse would work. then I started downloading and playing with the new compiz stuff. I have to say, compiz effects blow away Mac OS X effects, though they're not quite as pragmatically integrated into everyday uses.

I fired up pidgin and got connected to our company jabber and my google talk account. similar simplicity and ease with Evolution for company email (though I also started trying Zembra Desktop since OSCON).

our setup at is kinda unique in that we have our own sandbox sites that we can access and edit via webdav, so I did a simple apt-get for davfs2, made the necessary mods to /etc/fstab and I was able to vim edit some code. but I decided to go looking for linux php editors. I tried bluefish and jedit and liked jedit much more - its performance with the webdav-mounted dir was much better.

I also exported my bookmarks and imported them over into Ubuntu firefox. and I installed GnomeDo because I'm a quicksilver junkie.

total time was probably 2 hours or so - much better than any of my other previous jaunts into Linux. large credit to the high-quality ubuntu wiki.

so I'm thinking to try out a full day of ubuntu tomorrow. my only concern is webex, though there is a native Linux client.

Sunday, July 13, 2008

interesting mix of ideas

the two reading pieces I have sitting on my desk are this Origin of Wealth and the latest Wired magazine. interesting to be reading them simultaneously ...

From Wired:

"Scientists are trained to recognize that correlation is not causation, that no conclusions should be drawn simply on the basis of correlation between X and Y (it could just be coincidence). Instead, you must understand the underlying mechanisms that connect the two. Once you have a model, you can connect the data sets with confidence. Data without a model is just noise.
But faced with massive data, this approach to science - hypothesize, model, test - is becoming obsolete.
There is now a better way. Petabytes allow us to say: 'Correlation is enough.' We can stop looking for models. We can analyze the data without hypotheses about what it might show. We can throw the numbers into the biggest computing clusters the world has ever seen and let statistical algorithms find patterns where science cannot."

From Origin of Wealth:

"... not only is there a problem with data that contradicts Traditional [Economic] theories, but many theories have simply never been properly tested. One branch of economics, called econometrics, deals with data analysis. Rather than testing theoretical models, however, much econometric work is devoted to finding statistical relationships between variables (often for public policy or other applied purposes). Unfortunately, statistical correlations don't provide a causal explanation of the phenomena. Furthermore, as many economists would point out, there is often a lack of readily available data to test theories with, and even data that is available is frequently noisy or otherwise problematic."

should be an interesting week as these seemingly conflicting ideas bounce around in my head.

Monday, June 09, 2008


okay, I'll be the first to say that the Novell-Microsoft deal was bad - way bad. and I am boycotting Novell myself. to summarize my perspective on it, I'll simply present Moglen's analysis on the subject, which I consider to be one of the top 5 extemporaneous monologues of all time:

but I also take issue with the opposite extreme that, because Microsoft has done bad things with the community, they are comprehensively unable to do any good things with the community. I know that isn't the only crier of this fallacy, but they're the ones who are recently taking pot-shots at my employer - a company that I think has always valued, and continues to value, the success of the community, or else I would not have taken a job with them.

from the inside, I can tell it plainly that Microsoft is simply a sponsor and participant in our 2008 CCA awards. technically, I also happen to know that we did nothing more than pre-load a big list of Codeplex project names into our CCA 08 database. there's no conspiracy to go thru all of our projects and attach Codeplex EULA's to them, or to use our CCA awards to scare the OSS community, as Roy Schestowitz seems to imagine.

Roy's pieces at seem to flow from his presumed indisputable inference that the motivations of not only Microsoft, but also anyone who collaborates with Microsoft, are sinister in nature. and he's repeatedly making these near-libelous statements, which is enabling, and this is the reason I'm boycotting them in addition to boycotting Novell.

as I preview this post myself, it is comical to contrast Roy's proof-by-verbosity case with Moglen's eloquent and exemplary case against a specific abuse.

Friday, May 16, 2008

Austrians want to be FREE yo

wow - I must be pretty stirred to actually write a blog post again, but here it goes.

I'd call myself an Austrian-leaning student of economics. I got a minor in ECON, but that's pretty much just enough to know that I really don't know very much at all. I hit up RSS feeds from the likes of The Mises Institute to keep myself in Austrian shape.

I've also been a big fan of The Long Tail, both the book and the blog. and Chris Anderson is on the advisory board of my employer, so I respect and subscribe to pretty much all of his ideas.

so when a friend shared a Mises article discussing Anderson's upcoming book - FREE with me, my interest was most assuredly sparked. but as I read, I was disappointed to find Fernando dismissing, whole-sale, Chris's entire analysis.

I actually agree with Fernando's closing thought - "With time rightly identified as a scarce resource, economic theory is needed to understand the interchange process." and I'd be willing to bet Chris agrees as well, since Chris's article plainly states: "There is, presumably, a limited supply of reputation and attention [i.e. - time] in the world at any point in time. These are the new scarcities — and the world of free exists mostly to acquire these valuable assets for the sake of a business model to be identified later."

so really, I don't think Chris's latest thesis is contradictory to the "laws" of economics, as Fernando apparently perceives. my conclusion would rather be that new and innovative business models will live and die by how well they apply of the laws of economics to actually-scarce goods in a new "freeconomic" culture.

I think we just have two different-but-overlapping spheres of study - economics and business. Fernando cites Buchanan's explanation of why marginal costs don't determine prices - with which I agree. having not read the cited book, I poked thru it with Google Books for "marginal cost" and came onto a few interesting blurbs:

Instead he [welfare economists] would introduce, as Knight did, the possibility that hunters, generally, may have some non-pecuniary or noneconomic arguments in their utility functions.

emphasis mine. so Buchanan points out that price-marginal cost scenarios tend to rely on non-pecuniary circumstances. does he further go on to refute that those kinds of circumstances occur? nope, not really - it seems he merely elaborates on what kind of analysis is produced by their inclusion.

In resorting to noneconomic arguments in the utility function ... the economist has shifted the whole analysis from a predictive to a nonpredictive and purely logical theory.

I don't think Chris would have any qualms about admitting his idea is a "purely logical theory" rather than a "predictive economic theory", and that's how I look at it as well.

and from the perspective of an entrepreneur hoping to enter the market, do I really care which it is? isn't it enough to observe that prices are converging to marginal cost, that indeed I am able to buy marginal units of storage and process capacity, and that technological advance and competition are driving each other in a cycle?

all this stuff is pretty new - we're not re-hashing scenarios that have been recorded in dusty economics tomes for decades. sure there have always been such things as cross-subsidies and non-pecuniary psychic revenue driving free economies; Chris's theory should at least be respected because it indicates these underlying economic forces emerging in a noticeable change of our culture.

this theory is like an elephant, and we're all a bunch of blind folks getting a feel for different parts of it. some of us might be observing only this or that piece of it and get the wrong impression of what it really is, but it's certainly something - we shouldn't touch a single piece of it and dismiss it altogether.