Archive for February, 2009

In the future of 1957, all things will be made of plastic

Saturday, February 28th, 2009

Sarah Lacy points to the house of plastic, or rather, the house of the future, circa 1957:

  • Step up to the Monsanto House of the Future, with its four equal wings “floating” above the beautifully landscaped grounds and waterfalls.
  • Enter the dining and family room, a comfortable place where the family of the future will play, rest, and dine on stylish plastic furniture.
  • Look into the “Atoms for Living Kitchen” with its revolutionary microwave oven.
  • Pass the two kid’s bedrooms—one for the boy of the future and one for the girl of the future—and the shared kids’ bathroom.
  • Next, see the master bedroom and the main bathroom.
  • Conclude your tour in the sleek living room, with its giant, non-operational, wall-mounted television screen.

Most forms of plastic are roughly 20 times more expensive than the cheapest kinds of steel. Plastic is expensive stuff. It is, however, cheap to mold, so if you are making something small – like a stereo or a laptop computer, the low cost of molding plastic will beat the high cost of the raw material. Steel is very expensive to mold – you have to heat it to 2000 degrees.  Wood, as a raw material, is cheaper than both steel and plastic. 

I have trouble putting myself back in the mindset that might have taken this house seriously. Health concerns about plastic were not yet on the radar. Environmental concerns were not yet on the radar. The finite, limited nature of petroleum was not yet on the radar. On the radar was the rapid rise in wages that the America people were enjoying at that time. There was the sense that in the future, the American people would be able to afford endless amounts of whatever was considered expensive and good in 1957.

It is a world as foreign to me as one in which sherrifs turn the police dogs loose on African-Americans simply because those African-Americans want their kids to go to good schools.  

An easy shell script that allows recursively adding files to Subversion

Saturday, February 28th, 2009

My normal workflow goes like this:

1.) I edit files on my local machine

2.) I commit the files to Subversion, which means Springloops, for us.

3.) On every commit, Springloops automatically deploys the files to our development server.

4.) I refresh my browser to see how the changes I’ve made look on the server.

This gets a little complicated when working with Symfony. Lots of files are auto-generated on the server, then I need to scp them to my local machine.

How can I get hundreds of new files, scattered among dozens of new directories, into Subversion? The “svn add” command will work recursively the first time you add a directory to your repository, but if you then add several dozen new directories to that top level directory, and if you then try to run “svn add” again, Subversion tells you that the directory is already under version control.

What’s needed is a reliable way to recursively add things to Subversion. (This isn’t a problem on Windows, because the TortoiseSVN client is good about recursively adding files. But it is a problem on Linux.)

So I am very glad that I found this script:

#!/bin/bash
echo ""
echo "Here's what we're going to do:"
echo " "
echo "Add the following files"
echo "-----------------------"
svn status | awk '/^?/ {print $2}'
echo " "
echo "Remove the following files"
echo "--------------------------"
svn status | awk '/^!/ {print $2}'
echo " "
echo "Check in the following modified files"
echo "-------------------------------------"
svn status | awk '/^M/ {print $2}'
echo " "
echo "Proceed with commit? [yn]"
read answer
if [ "$answer" = "y" ]
then
    echo " "
    echo "Adding the following files"
    svn status | awk '/^?/ {print $2}' | xargs svn add
    echo " "
    echo "Removing the following files"
    svn status | awk '/^!/ {print $2}' | xargs svn remove
    echo " "
    echo "Committing changes to repository"
    svn commit
else
    echo " "
    echo "Commit cancelled"
fi

echo " "
echo "Want to check for updates? [yn]"
read answer
if [ "$answer" = "y" ]
then
    svn update
else
    echo " "
    echo "Update cancelled"
fi

Just save this into a file at the root level of your project, and then call it from the command line when you want to commit stuff recursively.

I was pointed to this script from the Symfony forums.

Jacques Distler: “One really annoying feature of Git is that it ignores empty directories in commits”

Thursday, February 26th, 2009

I haven’t yet used git. I’m still making up my mind about whether I feel any need to move beyond Subversion. I am collecting quotes about git, both for and against. To this end, I found Jacques Distler’s offhand remark interesting:

One really annoying feature of Git is that it ignores empty directories in commits. Why do people put up with that? There are a bunch of such directories in Instiki (and, indeed, in most Rails apps), so Git seems particularly ill-suited as a source repository for such projects.

Is FireFox now more popular than Internet Explorer?

Thursday, February 26th, 2009

I find this hard to believe, but W3 Schools statistics suggest that, as of January 2009, FireFox is in wider user than all versions of Internet Explorer. For the month of January, they show Internet Explorer as now having only 44.8% market share, whereas FireFox is now up to 45.5%, a gain of 1.1 percentage points over the previous month.

If these statistics are true, or even within 5% of being true, then we are back to a world last seen in 1996, when no one web browser dominated the scene.

I am confused why Microsoft is allowing this to happen. They still have the old advantages – dominance of the desktop and therefore an easy way of distributing their web browser. Why are they not doing more to push IE?

Steve Jobs on dropping out of college

Thursday, February 26th, 2009

It is somewhat amusing to listen to Steve Jobs, addressing a graduating class at Stanford, as he describes his own path: “Dropping out of college was the best move for me.”

For hosted Subversion, we love Springloops, though we are curious about Beanstalk

Saturday, February 21st, 2009

We rely on Subversion to keep track of every change we make to our projects. Rather than host Subversion ourselves, we rely on Springloops.

We love Springloops. They have a great, easy to use interface, and they have a great deploy option that we’ve come to rely upon.

In fact, at this point, there are only two outside services that have proven worthwhile enough that we pay good money to use them each month.

One is Springloops.

The other is Basecamp.

Springloops helps us manage our code (HTML, CSS, images, PDFs, etc). Basecamp helps us manage our projects.

We do have one minor annoyance with Springloops – apparently because it is based in Poland, it doesn’t take credit cards, only PayPal payments. And they have consistently messed up the auto-billing of our PayPal account, so that we had to go in and pay manually, so as not to end up with an unpaid bill.

So, that leaves us somewhat curious about the competition: Beanstalk. Has anyone had much experience with them? If so, what do you think?

By the way, we used Unfuddle for one project. Not our favorite. It is ambitious, and tries to offer a bit of everything – ticket tracking, milestones, hosted Subversion, etc. Like a lot of projects that try to do everything, it comes up a bit short. For Subversion, we prefer the simplicity of Springloops. For project management, we prefer Basecamp.

Using outside libraries in the Symfony framework

Saturday, February 21st, 2009

What are the risks of using outside frameworks in the Symfony framework? Apparently, outside libraries can slow the Symfony command tools to a crawl:

I had sym-linked the ezComponents and Zend libraries into my project’s lib/vendor folder because I needed to use several components from eachframework.  They are not being loaded automatically in ProjectConfiguration.class.php though, so I’m not sure why they are affecting the execution time of commands.

Before adding them to lib/vendor, the “symfony cache:clear” command took under 0.5 seconds to run:

$ time symfony cache:clear
real    0m0.426s
user    0m0.360s
sys     0m0.044s

If I add Zend to lib/vendor, it jumps to 4.5 seconds:

$ time symfony cache:clear
real    0m4.430s
user    0m4.328s
sys     0m0.096s

When I add ezcomponents, it goes to 26 seconds:

$ time symfony cache:clear
real    0m26.687s
user    0m26.218s
sys     0m0.460s

If I remove the symlinks, the command runs in 0.5 seconds again.

It’s not just cache:clear – all other tasks take much longer than they used to also.

The source of the problem was the Symfony auto-loading mechanism:

i think its because of autoloading mechanism that each framework use. Zend framework has plenty of libraries and because of each framework use its separate autoloading mechanism it takes plenty of time.

The solution is to drop out of the Symfony framework and use a trick from normal PHP:

I decided to add Zend and ezComponents to PHP’s include_path. Now the symfony commands run much faster. Unfortunately, this will make it difficult to use different versions of a framework on the server, but I guess it’s a tradeoff.

I’m finding that there are a number of places where one has to drop out of Symfony and use normal PHP. For instance, Symfony 1.1 did not have an easy tool for assigning an entry to one of many possibilities (for instance, you are creating a new post for your weblog, and the weblog entry can belong to one of several categories – how to you get the existing categories into a SELECT box?). Symfony 1.2 fixed that particular problem, but, like any framework, Symfony can’t do everything.

So I find myself constantly having to remind myself – when facing a limit, just drop back to plain PHP coding.

Advice to someone just starting as a freelance web designer

Thursday, February 19th, 2009

A friend writes to us:

In the near future i may consider a career change & i am doing all my research now.  The biggest thing i need right now is web designer/developer contacts to bounce ideas off of.

I think i have a solid foundation.  I do have an AA in Arts, and a solid 10+ years of freelance/career design under my belt.  I am familiar with all the major software, and have just now discovered CMS & open source applications.  I still have that pit of fear that if i got a full time in-house position i would be “faking” it.  It seems like you can never keep up with all the skills out there, even when i find a niche!

As far as online & work, i have been trying to do like you said & build a portfolio.  I have been paying attention to SEO & rankings to help business.

How do you charge?   Right now i am in the middle of quoting  a price for a site & i am lost.  Also, do you work with a contract for new clients?  My biggest fear in freelance is the lack of paycheck every 2 weeks.  That being said, i am not prepared for interviews.

If i sit down for an interview, do i not need a resume?  Or do i refer them to my site.  I am sure at that point they would have seen it, but i still think i need paper.  I want to make sure i do this right.  If we move back to VB, there are not a lot of design firms so i have to nail it the first time!

Also, i currently subscribe to HOW & just started ID.  any recommendations for similar resources?

I am trying to upgrade skills.  In the world of web design/development, besides tableless site layout, what are some essential i MUST learn?

I reply:

I don’t know. I hand-code. I know HTML and CSS and knowledgeable of my programmer’s  choice languages enough to work around, and in most cases not break, his software.I recommend affiliation. It sounds like you want to be a one man band:

It is a far too diverse industry to waltz in alone.

You can get your education just by reading through Craigslist wanted ads:
http://phoenix.craigslist.org/cph/cpg/1022623341.html

But really, know your choice platform and work with it. You will know where your weaknesses are and when to ask for help. But ask for help. If a project is too big for you, it is more professional to outsource and build alliances with folks who have complementary strengths.

Your approach is as valid as any. I am more than happy to be a point of contact for you as you get started. Do know that my approach was the opposite. I threw myself into it, bluffed and learned software on jobs. Warranted I did have a degree in Photography (aka Design) and several years of exposure to the Adobe platform (namely Photoshop, but the platform gives you a huge advantage in learning like software). So my bluff wasn’t entirely unwarranted and mostly I think folks were well aware of my limited experience and I was offered opportunities at learning wages. That all changed after a few huge jobs. I’d say pick up a few gigs before you lose your solid income. That is smart.

Better than a resume at this stage in the game, is a portfolio. You’ve already got one… your website. And your site looks good. Add a resume link, called “experience” or “clients” or “jobs”   if you want. I don’t do that. My site is actually one of the most basic sites I’ve designed, since that is where I lost my training wheels. The best thing you can do is pursue gigs and provide links to your work. And… from the looks of it, you’re doing that.

So… what are your questions?

It’s a tough field, but nothing beats the flexibility and portability. It’s even worth the occasional dry spell between clients. I don’t know how I can help, but here’s one of my personal heroes:

http://www.darrenhoyt.com/

And you should check this out:

http://www.csszengarden.com/

A few things: you will need to be prepared for failure, rejection and bad clients. It’s not that people are bad, it’s just that there are no industry standards and it is up to the individual entrepreneur to define the business in their own terms. Sadly, there are also dishonest opportunists out there giving the field a bad rep. Not to mention a slew of college students who are very good and very willing to work for cheap or free. It’s a tough market and there is no such thing as “nailing it the first time”.

You’ve certainly got great experience and interest/passion. Those are a must. You’ve also got to be willing to throw yourself into it. The easy way is definitely to park your butt in a cubicle for a company. There’s nothing wrong with that. There’s security in that.

But if you think you want to live on the edge and freelance, it’s more than a romantic notion. It’s hard work. I have no doubt there are ways to be smart about it and precautions you can take and from the sounds of it, you’ve done your research. I simply mean this as a note of warning, do not think that hard work and determination alone will create a business for you. This field requires a little mojo… aka happenstance, timing, luck, connections. Again, you already know this. But knowing it and hesitating are nothing quite like taking the plunge.

One major thing to note, when you work for yourself… you are not “going to interviews”. Your site should speak for itself. If you feel more confident plugging all of your most recent and most impressive work, do so… on your website. There is absolutely no need for paper resumes with potential clients. You may instead want to bring educational materials specific to the job. The “interview” should be more of a consultation. You assume the client wants to work with you and you are educating them about how you will manage that relationship.

Does that make sense? It’s a shift in perspective.
And it’s a little hard to bluff. Mostly this level of confidence will only come with years of experience… aka bad burns. It is not untypical for a job to go unpaid for 90 days. It’s a far cry from biweekly paychecks. You’ve got to plan ahead for all types of scenarios. I’ve had regular 3 month dry spells nearly each year. I look at it as time to travel, boost my portfolio and enjoy my life. But if you haven’t prepared for it, then you panic.

The only time you will need paper resumes are to interview for the desk jobs. And for those… I am not the person to ask. I am, however, quite apt at reviewing resumes should you want an objective opinion. Otherwise, you will simply need to hear a client’s need, and explain to them how you will help them. Nobody hiring you for a 1-2 day gig really cares about your degree and years of freelance odd jobs. They just want to see your best work and know how much that cost.

You ask how we charge. You should read our post “How much do websites cost”:

http://www.teamlalala.com/blog/2008/11/12/how-much-do-websites-cost/

If you’d like to run job estimates by me, I’m happy to review anything you send. If it’s one I can’t handle, I’ll forward it to my business partner for a third opinion. We don’t do Flash and I’ve already filed you away for future work needed in that category.

And no… you can’t master all the software. You just have to pick the tools that work the best for you and be willing to learn new software as needs arise. You must like a challenge.

I don’t know HOW or ID. I read Inc and since I am also a freelance photographer I participate in ASMP.

What else…ah, contracts. sure. We don’t but it’s a good idea. We have an LLC instead. A one-way precaution, the rest is up to our good sense.

Laura Denyes

Websites we have helped create

Thursday, February 19th, 2009

For awhile, we’ve been meaning to list some of the projects we’ve worked on during the last 9 years. We have handled either the design work or the programming (sometimes both) on several dozen websites. Here are a few:

The Second Road – currently our largest ongoing client. Design on this project included the development of a complex user interface, graphics development, marketing and programming of the online social network layer.

Bethel Hospital – design work.

Peidmont Housing Alliance – design work.

Dave Zulinke – design work.

Dream Spiral Art – design work, plus a custom backend content management system, to allow the upload and organization of art.

iHanuman – programming for ihanuman. The most interesting part of this site was the video store we developed. Written mostly in PHP, which feeds data through to the video player, which is written in Flash (the Flash programming was by the talented Starrie Williamson).

Monkeyclaus – for the same client who owns iHanuman. We took the code from iHanuman and added an online social network layer, so users can recommend their favorite music to each other. Then we added an affiliate program, so that each user of the site can set up a “store”, full of their own favorites, and they get to keep 1% of what is sold from the store where they recommend the work.

Bluewall – programming, especially of the RSS feed aggregators, which actually just feed off of Yahoo Pipes, but which then offer custom HTML for a designer to design as they wish. Also, Laura created some Flash animations for the site.

RawStory – we did some backend cleanup for RawStory in the summer of 2007. Tragically, they would not take our advice (clean up the look, have less ads) and their traffic has been in decline for almost 2 years now.

Ralph Krubner – design work, plus a Javascript powered slide show.

American Shakespeare – some programming work, such as the calendar (this was when one of us worked at Category4.com).

Accumulist – we handled all of the programming for this site. Sadly, the website was never finished. The project was abandoned despite a long list of known bugs. The site was made public in 2005 and was meant to compete with Digg and del.icio.us.

Martha Ambrose – a site devoted to the work of the late artist Martha Ambrose. Full design of the site, plus a custom content management system to allow the owner of the site add additional photos as he sees fit.

So Very Virginia, some programming, to give members of the site an ability to edit their own info (this was when one of us was working at Category4.com).

Architextiles – some design work, some photography, some photo clean up, some programming.

Brenda Rawls – programming of custom content management system to enable staff to control the site.

Wintergreen Performing Arts – programming for a custom content management system that gives WPA staff full control over the site.

AudioLunchbox – system administration, database recovery and programming for new payment options.

My Blue Pie Music -  created a backend to automate the intake of new material (images, songs, albums) to the database. Backend used the Symfony framework. Client was the Australian firm Blue Pie.


Tasks, ports, threads, messages development on Mach

Wednesday, February 18th, 2009

Interesting to read some of the background research on Mach which eventually, in part, got incorporated into the MacOS.

The critical abstraction in UNIX was the pipe. What was needed was a pipe-like concept that worked at a much more general level, allowing a broad variety of information be passed between programs. Such a system did exist using inter-process communication (IPC): A pipe-like system that would move any information between two programs, as opposed to file-like information. While many systems, including most Unices, had added various IPC implementations over the years, these were special-purpose libraries only really useful for one-off tasks.

Mach started largely as an effort to produce a cleanly-defined, UNIX-based, highly portable Accent. The result was a short list of generic concepts:

  • a “task” is a set of resources that enable “threads” to run
  • a “thread” is a single unit of code running on a processor
  • a “port” defines a secure pipe for IPC between tasks
  • “messages” are passed between tasks on ports

America more firmly at the center of the world economy than ever

Tuesday, February 17th, 2009

Back in 2006 and 2007, some economists (for instance, Brad Delong) were worried that America’s time as an economic super-power was coming to an end. They worried that the central government was running up too much debt, and that the nation’s trade deficit was leaving the nation hopelessly in the grip of foreigners.They worried that other countries would lose faith in the American dollar, causing a catastrophic disruption of America’s supply chains.

It’s become increasingly clear that the current crisis is not the one they were worried about. Surprisingly, almost every nation on earth is going to suffer more than America will, for a financial disaster that was started in America.

Consider:

Europe Is in Bigger Trouble than the U.S.

This is a theme that Simon in particularly has been sounding. Now, according to the Telegraph, a confidential European Commission memo confirms this.

To review, the basic problems, relative to the U.S., are:

  • Disproportionately large banking sectors (the Iceland problem) in some countries, such as the U.K.
  • High exposure to U.S.-originated toxic assets (up to 50% of those assets, I have heard estimated).
  • Major exposure to emerging markets, primarily Eastern Europe and secondarily Latin America, which have been harder hit by this crisis than anyone else.
  • Higher pre-crisis national debt levels (for many but not all countries).
  • For countries that use the euro, no control over monetary policy.

In a crisis, the world looks to America for leadership:

The real issue is that no one is yet ready to take on the deeper underlying problem – the political power structure of modern finance. While this structure is a particular problem – and particularly obvious right now – in the US, all industrialized countries today share some version of the same problem. We supersized our banking systems, allowed them to load up on risk that could threaten the macroeconomy, and gave them a mindboggling put option – in other words, the taxpayer is on the hook for a vast amount of downside. Across the industrialized (and coming soon to the industrializing world), the message from bankers is the same: give us the bailout money, or your economy will suffer.

Coming to terms with this reality and doing something about it will take leadership – the skills, popularity, and vision needed to really take on bankers (and preferably, win). That leadership is unlikely to come from Europe, Japan, or Canada. It’s also unlikely to come from the G20 (which is basically the G7 plus large emerging markets), whose next heads of government meeting is on April 2nd.

Everyone and everything, in some sense, waits for the US and for President Obama. How long will it be before he is able to fully and personally take charge of sorting out banking at home – and help those trying to do the same abroad?

The British pound used to be the international reserve currency. But the British pound lost its authority after World War 1, and the US dollar emerged as the only currency that people would trust in a crisis. Some economists (back in 2006 and 2007) were worried that the nations of the world would lose faith in the dollar, just as they once lost faith in the British pound. Clearly, this is not the crisis that they were worried about – instead, the dollar has rallied against other currencies.

For those who worry about the historical comparison with the pound, it is worth remembering this – the last new technology in which Britain lead was the railroad investment craze of the 1840s. The pound lost its status 70 years later. Britain missed out on every new technology of the late 1800s – electricity, light bulbs, refrigeration, telephones, automobiles, steel, etc.

By contrast, America lead the Internet boom of the 90s, which ended just 9 years ago. No nation can lose its position that fast, even when the nation has been poorly managed.

There is the potential that America will eventually lose its first-rank status. But that crisis is still two or three decades away.

Base form classes and child model classes in auto-generated Symfony code

Sunday, February 15th, 2009

Took me a moment to figure this out, so I will put this here, in case I need to remember this later.

I was debugging some form code tonight, because my forms are not getting populated with data when the user wants to edit old entries. These are the forms that were auto-generated by Symfony, so they should work perfectly.

The module name is “Alumni” and its code is for working with the database table called “alumni”. In the actions.class.php file for the “alumni” module I have this:

public function executeEdit($request)  {
$this->form = new AlumniForm(AlumniPeer::retrieveByPk($request->getParameter('id')));
}

This is auto-generated code.

The job of AlumniPeer is obvious enough – given an id (which it expects to find in the URL) it finds a row in the database, gets the data, and turns that into an “Alumni” model object. Note that the class called “Alumni” is a class for dealing with the database – this tripped me up for a moment. The class called “Alumni” has nothing to do with the forms. But the forms classes will eventually need this info.

I looked to see what AlumniForm looked like.

class AlumniForm extends BaseAlumniForm
{
public function configure()
{
}
}

It is an empty form class that inherits from its base class.

BaseAlumniForm has just two methods:

setup()

getModelName()

The setup() method just initiates an array of validators, for handling the forum input, and an array of form widgets, so it knows how to create the forms.

The getModelName() method really just returns the name of the model:

public function getModelName() {
return ‘Alumni’;
}

Since there is no constructor, I became curious where setup() was called from. BaseAlumniForm inherits from BaseFormPropel which inherits from sfFormPropel. I took a look at its constructor:

public function __construct(BaseObject $object = null, $options = array(), $CSRFSecret = null)
{
$class = $this->getModelName();
if (is_null($object))
{
$this->object = new $class();
}
else
{
if (!$object instanceof $class)
{
throw new sfException(sprintf('The "%s" form only accepts a "%s" object.', get_class($this), $class));
}

$this->object = $object;
$this->isNew = false;
}

parent::__construct(array(), $options, $CSRFSecret);
$this->updateDefaultsFromObject();
}

There is something quite elegant about the way this auto-generated Symfony code fits together. The first thing that happens is that the constructor calls the getModelName() method in the BaseAlumniForm child class (actually the grand-child class). This, as you can see above, returns “Alumni”, so sfFormPropel now knows which class is suppose to be handling the database data (or rather, which class is suppose to return a model to call a row of data in the database). If for some reason the constructor has not been handed an instance of Alumni, then it creates a new instance. But above we saw that in actions.class.php, the form class is given an instance of the correct model:

$this->form = new AlumniForm(AlumniPeer::retrieveByPk($request->getParameter('id')));

So, at least in the auto-generated code, the constructor to sfFormPropel is always being given an instance of the correct model. If it was handed an object of the wrong class, then it would throw an appropriate exception.

The constructor ends by calling the constructor in its parent, which is sfForm:

public function __construct($defaults = array(), $options = array(), $CSRFSecret = null)
{
$this->setDefaults($defaults);
$this->options = $options;

$this->validatorSchema = new sfValidatorSchema();
$this->widgetSchema = new sfWidgetFormSchema();
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

$this->setup();
$this->configure();

$this->addCSRFProtection($CSRFSecret);
$this->resetFormFields();
}

This is where setup() gets called.

This is also where configure() gets called. Mind you, configure() starts off as an empty method in the class AlumniForm:

public function configure()
{
}

This is where you do all your customization. They offer this example in the Symfony Cookbook, in the article How To Implement A Choice In Forms:

// lib/form/DemoArticleForm.class.php
class DemoArticleForm extends BaseDemoArticleForm
{
public function configure()
{
$this->widgetSchema['status'] = new sfWidgetFormChoice(array(
'choices' => DemoArticlePeer::getStatusChoices()
));

$this->validatorSchema['status'] = new sfValidatorChoice(array(
'choices' => array_keys(DemoArticlePeer::getStatusChoices())
));
}
}

In this example, they are making a change to the widgetSchema and validatorSchema arrays, which would have been set in the setup() method of the BaseDemoArticleForm class.

I am planning on building a new scaffolding system for Syfmony. One of the many great things about the vibrant community that surrounds Ruby On Rails is that for every default in RoR, there are competing alternatives – for instance, you can replace the default scaffolding with ActiveScaffold. Similarly, I’d like to build an alternative scaffolding system for Symfony. Understanding how the forms are currently built is the first step.

If we cared about kids, we’d focus resources proportionally to the threats they face

Saturday, February 14th, 2009

danah boyd (her name is legally spelled in lower-case letters) points out that most abused children are abused in their own homes, and often by their parents or relatives. So she wonders why various Attorney General’s focus so much time and attention on sex offenders online:

The Attorneys General – mostly angry at me and other researchers – have spent considerable time trying to publicly reject the ISTTF report that was published last month. This week, I watched as they blasted the airwaves with an announcement that 90,000 sex offenders have been removed from MySpace. This PR campaign is intended to provoke fears in the American psyche, to serve as “proof” that we were wrong. The underlying message is, “See, social network sites are dangerous!” Fear mongering by public officials is quite effective, but, once again, I’m frustrated to see the framing miss the reality of the data. For this reason, I want to challenge the message of the current PR fear campaign.

…Why are we so obsessed with the registered sex offender side of the puzzle when the troubled kids are right in front of us? Why are we so obsessed with the Internet side of the puzzle when so many more kids are abused in their own homes? I feel like this whole conversation has turned into a distraction. Money and time is being spent focusing on the things that people fear rather than the very real and known risks that kids face. This breaks my heart.

Why do various Attorney General’s focus so much time and attention on sex offenders online? I assume part of the answer has to do with political convenience – it is easy to go after sex offenders online.

Success comes from a unique adaptation to your ecological niche

Saturday, February 14th, 2009

This is awesome. In fact, I wish I’d written this:

This guy has gone to the zoo and interviewed all the animals. The tiger says that the secret to success is to live alone, be well disguised, have sharp claws and know how to stalk. The snail says that the secret is to live inside a solid shell, stay small, hide under dead trees and move slowly around at night. The parrot says that success lies in eating fruit, being alert, packing light, moving fast by air when necessary, and always sticking by your friends.His conclusion: These animals are giving contradictory advice! And that’s because they’re all “outliers”.

But both of these points are subtly misleading. Yes, the advice is contradictory, but that’s only a problem if you imagine that the animal kingdom is like a giant arena in which all the world’s animals battle for the Animal Best Practices championship [1], after which all the losing animals will go extinct and the entire world will adopt the winning ways of the One True Best Animal. But, in fact, there are a hell of a lot of different ways to be a successful animal, and they coexist nicely. Indeed, they form an ecosystem in which all animals require other, much different animals to exist.

We can learn a lot by studying Apple and Google and 37 Signals, but in the end, we have to come up with something unique.

When can we use transparency in PNG files? How about rounded corners via CSS 3?

Saturday, February 14th, 2009

This project is tracking all the new upcoming web technologies, like CSS 3, which will allow us to have rounded corners without having to use images. Also, elements such as Canvas. Also, other technologies, such as transparency in PNG images.

Right now, none of these technologies are usable because at least one major browser doesn’t support them. But clearly, over the next year, most of these technologies will become usable in all major, newer browsers. Then the question becomes, at what point do these features have enough market share that you’d want to use them on a commercial site?

The reality that a new version of HTML will soon come out makes me aware of how stagnant things have been for the last 6 or 7 years. Compared to the incredible speed with which things evolved during 1994 to 1999, the last few years have been one of consolidation:

I’ve younger friends who’ve become web designers in the last 4 years and who’ve never seen an evolution of the technology. They learned CSS 2 and HTML 4, and that is what they are still using now.

Universities now offer classes in something called “web design”.

There is now a profession called “web design”.

This profession is now in control of the standards around which the profession does its work.

The usual  balance-of-power conflicts between for-profit corporations and the professions, have become normal for the field.

Consolidation has been the rule. Perhaps it was necessary.

The web is in desperate need of new element options. My friend Chris Clarke likes to joke that HTML 5 will bring web forms up to the level of interaction offered by Visual Basic 1.0. I am hopeful that this next year will rekindle the forward momentum of innovation.

If your business model doesn’t bring in enough money, maybe you should change it?

Friday, February 13th, 2009

Here is an odd article by Daniel Lyons, in which he stubbornly attempts to make money off of blogging. He maintained his blog, The Secret Diary of Steve Jobs, for two years and at one point he got 1.5 million visitors in one month. He made $1,039. Apparently he put a great deal of energy into writing for the site – sometimes he wrote 6 times a day.

Lyons seems to be a good journalist, but he doesn’t seem to be a very good entrepreneur. What to make of someone who refuses to change their business model, for 2 entire years, despite an abundance of evidence that what they are doing is not going to bring in enough money?

He writes:

For two years I was obsessed with trying to turn a blog into a business. I posted 10 or 20 items a day to my site, The Secret Diary of Steve Jobs, rarely taking a break. I blogged from cabs, using my BlackBerry. I blogged in the middle of the night, having awakened with an idea. I rationalized this insane behavior by telling myself that at the end of this rainbow I would find a huge pot of gold. But reality kept interfering with this fantasy. My first epiphany occurred in August 2007, when The New York Times ran a story revealing my identity, which until then I’d kept secret. On that day more than 500,000 people hit my site—by far the biggest day I’d ever had—and through Google’s AdSense program I earned about a hundred bucks. Over the course of that entire month, in which my site was visited by 1.5 million people, I earned a whopping total of $1,039.81. Soon after this I struck an advertising deal that paid better wages. But I never made enough to quit my day job.

I give him credit for avoiding one trap that too many of my clients fall into – that of changing their business model too often.  I’ve had clients who were deeply insecure about being liked, and having their site be liked, and the reality that some weeks see falling traffic would induce panic in them. And if a business changes its business model every week, then it essentially has no business model, because it is never given enough time to test a given strategy.

But two years?

I can think of a lot of things that probably could have been done to boost income from Lyon’s site. Generally, I think if a content site is going to make money, it needs to be focused on a niche that has some associated product or service that could sensibly be sold alongside that content. In the case of Lyon’s blog, the focus on Apple computers should have provided a wealth of opportunities. That Lyon’s didn’t pursue them says more about him than it says about blogging.

China felt betrayed when the American government allowed Lehman and Washington Mutual to fail

Wednesday, February 11th, 2009

Apparently, for the last several years, China has been assuming that the American government would stand behind the major corporations of the American financial sector. Those Chinese officials who were handling China’s foreign investment portfolio were shocked that the American government would allow companies such as Lehman Brothers and Washington Mutual to fail. Apparently these officials are now suffering political consequences for having lost so much money. This is from Brad Sester’s blog:

It seems like China’s top leaders knew less about China’s portfolio that American reserve watchers; it is not inconceivable (gulp) that I was the source for those published report about China’s Agency holdings. My own work with Arpana Pandey, incidentally, suggests that China’s holdings of Agencies were closer to $600 billion at their peak – though it is possible that China never held more than $400 billion of Fannie and Freddie debt, as there are other kinds of Agency bonds.

The Journal’s story also confirms that there has been a huge swing in the management of China’s reserves. The TIC data, which has shown a huge increase in China’s Treasury holdings, wasn’t off.

It turns out that one of China’s main criticism of US policy is simple: the government didn’t stand by institutions that China expected the US to support. Lehman. Wamu. And the Reserve Primary Fund. Dean, Areddy and Ng:

“Leaders in China, the world’s third-largest economy, have been surprised and upset over how much the problems of the U.S. financial sector have hurt China’s holdings. In response, Beijing is re-examining its U.S. investments, say people familiar with the government’s thinking. …

Chinese leaders have felt burned by a series of bad experiences with U.S. investments they had believed were safe, say people familiar with their thinking, including holdings in Morgan Stanley, the collapsed Reserve Primary Fund and mortgage giants Fannie Mae and Freddie Mac.”

And yet, despite all this, China still feels they can not sell their American assets. The American dollar’s exchange rate remains strong. China knows that it will lose a lot more money on its American investments, yet they seem helpless to do anything about it.

From the American point of view, the ideal outcome would be that China sells some of its American assets, which causes the American dollar to come down a bit, which makes American manufacturing more competitive overseas, which would allow a boom in American exports, which would pull America out of its depression. And yet, this is the outcome that China fears most, so apparently it is willing to stoically lose more money in America, rather than allow the American dollar to weaken.

One example of the worst aspects of financial journalism

Tuesday, February 10th, 2009

What if two men, in the year 2006, said “Hey, America’s financial system is running up a dangerous amount of risk. Loose credit is creating a bubble in the housing sector. This bubble is certainly going to burst, and it will drag America’s economy into a deep recession.”

You might think that these two men were very smart. You might think that they deserve a great deal of respect for their foresight.

The two men in question are  Nouriel Roubini and Nassim Taleb. They were just on CNBC –  I found this clip quite surprising. The 5 journalists who interview them greet them with a fair amount of hostility.

Roubini and Taleb are both fairly negative. They have a dark view of where the economy will be over the next 3 or 4 years. Their negativity seems to get in under the skin of the journalists. The journalists run a financial show, what they seem to want most is good news, a reason why their viewers should start investing in the stock market again. Neither Roubini  nor Taleb give them what they want.

Roubini  says the depression might be a deep U-shaped depression. One journalist responds “So? That’s not the end of world, is it?”

Taleb says credit card defaults will peak at almost 4%, and one of the journalists says “It’s still under 5%!”

One of the female journalists says to another journalist “Doesn’t it seem like the peak of hysteria that these men received standing-room only crowds at Davos?”

Towards the end, one of the journalists starts asking, over and over again, “How is this actionable? Give us something actionable!” The journalists all want investment advice. Towards the end they repeatedly ask Roubini  and Taleb what they are personally invested in.

The journalists may have occassionally had some valid point to make, but the overall impression I was left with was one of emotional resistance and denial of all bad news. The journalists attacked the men because the men  had bad news to share. Sadly, I can’t recall many times when I’ve seen a corporate CEO challenged this vigorously on any finance show.

Method name collisions become a big problem when you rely too much on modules

Thursday, February 5th, 2009

Jamis at 37 Signals has up a strange post in which he is critical of modules. I say “strange” because his tone is defensive and he interrupts his post to repeatedly to insist that modules are really great:

The code remains really clean, overall, because we’ve continued to follow the pattern of moving related methods into modules, and just including those modules in the base model.

Got that? Refactoring code out of your main classes and into modules is  a great way to keep your code clean. He emphasizes:

Don’t misunderstand me, though. Modules are awesome. We use them a bunch, and love them.

and then:

Modules are very handy, and as I said before, we still use them extensively.

He seems worried that someone is going to criticize him because of his criticism of modules. Yet his criticism is almost the same as Michele Simionato wrote in last month’s explicitly anti-module post.

Jamis writes:

However, there are two issues with this approach. First, when a class includes lots of modules (as some of ours do), it becomes hard to keep track of where different methods are defined, and even which methods are defined. This can lead to confusion when trying to find the definition of a method, and (worst case) can allow two or more methods with the same name, which is bad. There is no warning if you have methods with the same name in multiple modules, so it isn’t hard to wind up with bugs where you’ve clobbered a method with another. You wind up double-namespacing your methods (e.g., method names in the Avatar module being prefixed with avatar_), to avoid collisions.

…There are more issues with the module approach. What if you have different kinds of avatars (e.g., person versus group, or company)? You can’t subclass modules in Ruby, so you wind up finding other ways to solve it (like including modules in modules, etc.). Also, you can’t reference the avatar as a separate entity; instead, controllers that deal with avatars need to deal with the entity to which the avatar is attached.

And what solution does he offer for these problems? I was thinking he was going to say something really original, because it sounded like he was really wedded to the idea of using modules. But in the end, his solution is to simply not use modules:

Can the avatar code be split out further, somehow? Yes, it can. We’ll do this by making avatars a model of their own and using aggregation (rather than module inclusion, or inheritance) to pull it into Person.

So the solution is simple: don’t use modules, use independent classes and then build your objects through composition. This is probably very good advice, though I was a little surprised by his conclusions, given that he started off sounding like a big fan of modules.

15 of the top 20 websites use tables for layout

Thursday, February 5th, 2009

A very interesting post by I Am El Gringo:

For the time-constrained, I submit to you the results of my highly scientific research:

  • Yahoo: Minimal Use of tables. I found a picture of Hugh Downs horizontally aligned with it’s caption in a table
  • Google Home Page: Not only does Google use tables for it’s iconic home page, it embeds styling in the <td> tags. The horror.
  • YouTube: Uses tables for of layout of videos
  • Windows Live: Uses tables for footer layout
  • MSN: There is one table, but it’s only for stockquotes which is tabular data
  • MySpace Semantically pure. MySpace. Whoda thunk it
  • Facebook: Does form layout with tables
  • Blogger: No tables anywhere on the front page
  • Orkut All tables all the time
  • Rapidshare: A table with a single <td> for header placement. And again a single <td> table for the central “browse” section. Tsk tsk
  • Microsoft: Navigation bar is a table. What did you expect? Unicorns and rainbows?
  • Google India: It’s the same Google layout. I wonder if they used copy and paste for the template?
  • Ebay: Tables, tables every where
  • Hi5: Tables for every thing, pretty much. BTW, I didn’t even know this site existed until last week. Alexa rank 14!?
  • Photobucket: Tables for photo gallery layout
  • AOL: AOL’s layout is semantically pure! Friggin AOL?
  • Google UK: Same GOOG layout. I’m now sure the copied an pasted their html
  • Amazon: Now that’s just silly
  • IMDB: They used tables for their 3 column layout. What! No CSS framework?
  • Imageshack: Semantically pure as the driven snow.
  • Finally, even though it’s not on Alexa’s top 20, log in to your Gmail account and look at
    the use of tables

My Hypothesis: Pure CSS design == overcompensation

So, the five companies that use CSS are the web powerhouses–MSN, MySpace, Blogger, AOL and Imageshack. MSN, MySpace and AOL have been maligned for years throughout the web savvy community. My hypothesis is that these companies are overcompensating for the crap that they’ve taken thoughtout the years by designing their site in pure CSS.

Other companies that have more web street-cred like Google and Facebook don’t really have to worry about how the web design community sees them. This leads to things like Google making extensive use of inline styling on their homepage instead of putting it in their stylesheet. I’ve never heard anyone claim that the Google folks are slouches at the web design/development thing. Why is that?

Content sites need to be highly focused, if they are to make a profit off of advertising

Thursday, February 5th, 2009

In the comments to this post, Krista Neher writes:

Look at CNN – they sell t-shirts with headlines, other news sites are selling photos, books and more…. For both the content creators and publishers there seem to be better paths to monetization than advertising.

I wouldn’t know how to make money off of a property like CNN, because it is so broad in scope. But it came into existence before the web, and it still draws most of its profits from its offline business. Content sites that have no offline divisions tend to be much more niche oriented. I think advertising still offers the possibility of excellent profits for online properties, but the editorial strategy needs to be quite different from anything like CNN.

Lately, when I’ve been asked for advice about how to make a content site profitable, I’ve been emphasizing the need for extreme focus. Over the last 9 years, I think I’ve seen close to $2 million wasted on startups that simply were not focused enough. Most people who consider startups are somewhat aware of the need to be focused, but I think the need is especially intense for content sites that will supported by advertising.

I think it’s best if the entrepreneur starting a startup knows, before the site is created, which industry the site will get its advertising from. Then they need to create the content that will bring the customers who are interested in that industry. For instance, if an entrepreneur were creating a content site focused on fishing, they would (I hope) decide ahead of time whether the focus would be on deep sea fishing or freshwater fishing. After they make that decision they would know, roughly, which companies they could expect as advertisers. Then (hopefully) they would create the content that would bring in the ideal customers for those advertisers. They might, for instance, hire some bloggers who are already writing about fishing. For any large community (such as fishermen), it is possible to find at least a few bloggers who are in that community and who have distinguished themselves as excellent writers.

There is, of course, room on the web for authentic voices that speak about personal experiences or insights. Most of us have blogs where we write with no expectation of turning a profit (at least not in any direct, obvious way). But if the goal is a content site that lives 100% on the web and is meant to turn a profit, I think there needs to be a very high level of focus. And then, I think, the profits can be quite good.

There is a widespread retreat from user generated content

Thursday, February 5th, 2009

Sarah Lacy feels that many sites are pulling away from user generated content and switching, instead, to professional work:

As the wet blanket of recession has settled around the Valley and startups have come under pressure to monetize what they’ve built, I’ve wondered when we’d see the same flight to subscriptions and fees. Instead we’re starting to see something similar but with a Web 2.0 twist: The rejection of user generated content in favor of professional content that’s more consistent, reliable and palatable to advertisers.

This is bold shift, as the whole Web 2.0 movement was predicated on user generated content and the engineer-centric idea that you could build an easy to use platform, everyday people would create content for free, and other everyday people would navigate it, consume it and push the very best up to the top. It was rooted in the conviction that you didn’t need the kind of doomed content partnerships of the past between New York, Los Angeles and Silicon Valley, because Web 2.0 was democratizing media and entertainment and ultimately that platform was the future, not the content gatekeepers.

I’ve been telling my clients something similar for a little over a year, so it is nice to get some validation. Of course, my clients don’t have the budgets to do deals with the major media conglomerates, but I advised them to hire either professional writers or the semi-pro bloggers who’d already proven themselves with their own successful blogs. This kind of writing is more reliable, and generates more traffic, than user generated content.

It is worth noting that all of my serious clients (clients with budgets in excess of $50,000) for the last year have been mostly focused on the idea of building a site around video. So I will certainly send this post to them, and I will emphasize this portion of it:

This was clearly the most pronounced on YouTube, where the viral sensations like the Evolution of the Dance and the Grape Lady (ow! ow! owwwwww!) became the lexicon of an entire generation and the myth sprung up that everyday stars of viral videos would become household names with their own movies and HBO shows. (They never did.)

Nevertheless, this is the dream that motivates nearly all of the potential clients who’ve come to talk to me during the last year: the celebrities of tomorrow are building their careers, right now, on video sites like YouTube.

I am skeptical of video on the web. Video is very expensive, compared to text. A site like Blogger is relatively cheap to set up. A site that did the same thing for video has to deal with very high bandwidth costs, right from the start. And the cost of producing video is much higher than the cost of writing text.

Over the last 7 years, I have worked on a number of music sites, such as AudioLunchbox and monkeyclaus. I actually lived at the monkeyclaus music studios for awhile, and I met every band that came through there. Having spent so much time around the entrepreneurs that want to be in the music industry, I’ve learned that the music industry attracts an irrational level of investment. The reason for this is simple: the music industry is glamorous, and the musicians are attractive (I don’t mean “attractive” in the simple, physical sense, though that is sometimes also the case. I mean “attractive” in a broader sense – people engaged in an activity that is glamorous, or who seem to be close to fame, are endowed with attractiveness due to all kinds of complicated cultural factors.)

I can not believe that a rational investor would wake up one morning in early 2009 and say to themselves “I think what the world needs is another music web site.” There are already millions of music web sites, some quite innovative. Only the glamor of the field can explain the interest the industry continues to get from investors.

Investment on video sites now seems to be following the pattern I’ve seen for music sites. My clients seem to want to get into this industry for reasons other than what a rational investor might be able to articulate. The glamor, the possibility of fame, is drawing irrational levels of investment.

I wrote “How much do websites cost?” as a sort of warning to potential clients. I was serious when I wrote that some potential clients have described their business plan in these terms: “We’re going to be an agency that puts ads into videos and we’re also going to be funding new video artists with our ad money, because we believe in the possibilities of nurturing these new talents, and we’re going to be an aggregator that accumulates the best new talent in video and our software will offer unique technology to advertisers, such as the ability to keep track of exactly how long each viewer watches each ad.”

The problem is that most of my clients seem to think that their ideas are entirely unique, when, in fact, they are each talking to me about business plans that are nearly carbon copies of each other. (Perhaps the most important part of my work lately has been to help clients come up with a business plan that is really unique.)

I do think, eventually, some real celebrities will emerge from the online world. I do think eventually you’ll have video properties that make huge profits just from their online exposure. But I think that day is still many years off. Back in 1995, people wondered if the web represented a threat to newspapers, and it turned out the day of reckoning was 13 years in the future.

(A bit off-topic: I only discovered Sarah Lacy’s blog a month ago, but I find her stuff especially relevant to my clients, even more than the articles at TechCrunch. In fact, during the last month, I think I’ve pointed my clients to 3 of her posts, whereas I’ve only shared two TechCrunch pieces with clients.)

China surpases America in car sales

Wednesday, February 4th, 2009

This is a rather stunning example of the rise of China and the decline of America. At least for one month, China was a larger market for automobiles than America.

Unit sales for the month were the fewest since December 1981, while the annualized sales rate was the lowest since June 1982, according to Woodcliff Lake, New Jersey-based Autodata. The last full year of fewer than 10 million sales was 1970, according to trade publication Automotive News.

GM said it was the first time that the sales rate and volume in the U.S. were less than in China, which had a rate of about 10.7 million vehicles and unit volume of about 790,000.

Darren Hoyt releases version 3.0 of the Mimbo theme

Sunday, February 1st, 2009

Darren Hoyt releases version 3.0 of the Mimbo theme.

I keep waiting for the right project to use this theme. It is a fantastic magazine format theme for WordPress.

For startups, careful study is better than a unique, creative idea

Sunday, February 1st, 2009

I’m collecting notes for the next time I go to talk to a new client. Here are some articles I just stumbled across, that I like.

Here,  Amar BhidÉ criticizes the importance given to unique, creative ideas:

Inc.: Well, then, let’s start with the notion of no proprietary idea, no novel product or service to offer, which will come as a surprise to many people. How do these promising businesses get started?

BhidÉ: Most are started by someone who is working for another business, who sees a small niche opportunity — one in which the company he or she is working for is already taking advantage of, or one in which a supplier or customer is involved. And the person jumps in with very little preparation and analysis but with direct firsthand knowledge of the profitability of that opportunity — and pretty much does what somebody else is already doing, but does it better and faster. These entrepreneurs don’t have anything that differentiates their business from other businesses in terms of technology or in terms of a concept. They just work harder, hustle for customers, and know that the opportunity may not last for more than six or eight months. But they expect to make a reasonable return on those six to eight months. And along the way they’ll figure out something else that will keep the business going.

Inc.: The idea that you build a company around novelty — around a unique proprietary idea — is very ingrained in our culture.

BhidÉ: You’re right. All my students, when they think of how they’re going to start a business, want to start with a clever idea. I have very few students who come to me and say, “I want to start a business — I see X do this, and he’s incredibly profitable. I want to do the same thing.” That’s not the way people seem to think. Yet that’s the way most successful entrepreneurs start up. They make a small modification in what somebody else is doing.

And Adam Hanft celebrates strategic thinking and clinical logic:

While we’re desperately looking for the totally radical, unique, one-of-a-kind solution, the vast majority of marketing — or even business — problems can be solved by the lapidary application of disciplined strategic thinking, scenario-building, and clinical logic. Take the creation of 2004’s most successful consumer product, the lifestyle-reshaping iPod. As revolutionary as it was, every building block — product design, music provisioning, marketing — was an incremental step versus a barrier-busting leap: the application of a memory-storage capability; the cool, sleek, white and chrome aesthetic; the user-friendly selection wheel; the decision to sell 99 cent songs as opposed to the subscription model; getting U2 to lend their name to a specific model.

None-of-these decisions, by themselves, was astoundingly provocative. The integration and synthesis of all of them, however, was just that. That was the difficult, practical hard part. Which is a good reminder that it’s often easier to think out of the box, than in it. But only a real grown-up knows that.

Using language that I’m not entirely comfortable with, Adam Hanft emphasizes the need to describe yourself in unique terms:

Very few companies — large or small — have a powerful voice, or think about the need to find and sustain one. Most companies, the vast majority, in fact, describe themselves in automated, commodity language that’s fully interchangeable. And critically, the way you describe yourself is the way you think about yourself. And that influences behavior.

I spent some time checking out the websites of the Inc. 500 companies, and the language they use is generic mush, the worst kind of corporate writing, as flaccid and ignorable as the blenderized boredom manufactured by the hotel lobby pianist. There’s a void of voicelessness out there.

I’m not saying they’re not temporarily successful. Clearly, they are. But I would submit that if they articulated the reasons for this success with a unique corporate voice, their market position would be far stronger and more durable.

The part I like most is “And critically, the way you describe yourself is the way you think about yourself. And that influences behavior.” And I agree that most companies use the worst kind of generic language when describing themselves. I recall when we were working at Bluewall, I was inspired by Clay Shirky’s essay Ontology is Overrated, and created a website that allowed people to post links and tag them. We then tried to come up with a name. The owner and I thought of names like “Tag cloud” and “Tag list” and “Tag castle”. Darren Hoyt made the point that a generic name suggested generic thinking.  He himself suggested “Accumulist” which was quite an improvement.