Nathaniel Ward

Friday Links: How Well Are You Marketing?


How Government Regulation Artificially Limits Urban Density

Like many urban problems, the decline of walkable, livable urban centers can be traced to government intervention. In *Triumph of the City, *Ed Glaeser argues that restrictive zoning regulations served only to distort markets, artificially limit density and make dense areas unaffordable.

In a new article for Cato Ubound, Donald Shoup argues that minimum parking requirements—which require developers to build a certain number of off-street parking spaces—have promoted auto-oriented urban design over denser, more walkable forms:

First, parking requirements prevent infill redevelopment on small lots, where fitting both a new building and the required parking is difficult and expensive. Second, parking requirements prevent new uses for many older buildings that lack the parking spaces required for the new uses…

Removing a parking requirement is not the same, however, as restricting parking or putting the city on a parking diet. Rather, parking requirements force-feed the city with parking spaces, and removing a parking requirement simply stops the force-feeding. Ceasing to require off-street parking gives businesses the freedom to provide as much or as little parking as they like. Cities can remove minimum requirements without imposing maximum limits, and opposition to parking limits should not be confused with support for minimum requirements. Minimum parking requirements may be our most disastrous experiment ever in social engineering, and ceasing to require off-street parking is not social engineering.

Over at Market Urbanism, Stephen Smith points to a study on how parking minimums distort builders’ decisions. The study, Smith says, finds “that at least half of all non-commercial properties have more parking than they would otherwise choose, and that the excess can oftentimes be quite large.”


Tuesday Links: Paul Ryan’s Budget


Monday Links: Artificial Scarcity


Creating Clean Amazon Affiliate Links in WordPress

One way bloggers can earn incremental income is through affiliate marketing programs, among which Amazon’s is perhaps the most popular. Bloggers simply link to Amazon products, adding a special referral code, and they are given credit for the sales they generate.

Generating these tracking codes can be something of a pain. Amazon’s own utility is clumsy and offers up a long, clunky URL. Ragaskar’s WordPress plugin aims to fill the void by automatically appending tracking codes to Amazon links in posts, but this can still generate clunky links.

Based on Ragaskar’s plugin, I whipped up the following code:


    add_filter('the_content','filter_amazon_associate_filter');

    add_filter('comment_text','filter_amazon_associate_filter');

    

    function filter_amazon_associate_filter($content) {

        $affiliate_code="YOURCODEHERE";

    

        $content=preg_replace(

            '/http:\/\/[^>]*?amazon.([^\/]*)\/([^>]*?ASIN|gp\/product|exec\/obidos\/tg\/detail\/-|[^>]*?dp)\/([0-9a-zA-Z]{10})[a-zA-Z0-9#\/\*\-\?\&\%\=\,\._;]*/i',

            'http://www.amazon.$1/exec/obidos/ASIN/$3/'.$affiliate_code,

            $content

        );

        return $content;

    }

Very simply, this code scans through your posts and comments and replaces ugly Amazon links with somthing like http://www.amazon.com/exec/obidos/ASIN/B0048EJXCK/nathward-20.

To add this to your site, simply place the above code in your WordPress template’s functions.php file and replace YOURCODEHERE with your Amazon affiliate code.