The newspapers are doomed, part CXXVIII

June 18th, 2009

Penelope Trunk offers another reason why old media is doomed:

So we don’t need stupid rules about conflict of interest for people who are putting themselves on the line. That rule is for old media, where writers were putting only the brand of the newspaper on the line. In old media most journalists were no-names, writing under big (newspaper) names. So if they wrote something moronic, so that they could increase the value of a stock they held, or, maybe, get more oral sex, they would put only the newspaper brand at risk. Not their own.

Which means that the arcane conflict of interest rules are to protect the newspaper, not the readers. And this, by the way, is why newspapers are going down: because they are more about themselves, and their hierarchies, and rules and structures, than they are about what their readers want. Readers should not care about the business dealings of the writers or their publishers. Readers just want good content.

Celebrating Bloomsday

June 17th, 2009

In my social circle, Alonzo Subverbo is the main evangelist for Joyce. I am glad to be on Subverbo’s mailist, which mostly focuses on music, but encompasses all things literary. I liked what he sent out on Bloomsday, and so, with permission, repost it here:

June 16th: Bloomsday

Another Bloomsday has come, the day that James Joyce set Ulysses, the day that Leopold Bloom and Stephen Daedalus wandered the streets of Dublin being extravagantly modernist, the day that turned into the night that Molly Bloom lay in bed, contemplating desire and desire’s memory, saying Yes, saying it again. But though I am Bloomsday’s Proselytizer-in-Chief Among People I Know, have been for many years now, I find myself distracted from my devotions by an obsessive concern for the news from Iran, which has become extraordinary. This was poor planning on the part of the Iranians, surprising in such a literature-loving people. How can anyone concentrate on a properly self-indulgent stream of consciousness with all this going on? What has the one thing to do with the other and how might one mind encompass them both?– as one mind encompassed the world of Ulysses, created it, handed it over, a world almost as irritating and beautiful and pointlessly meaningful as our own. Connections must be found — the color green, meddlesome clergymen, the grand claims of Blake and Shelley and Whitman and all the unacknowledged legislators of poetry and freedom, of the undivided imaginations of the rooftop shouter and street demonstrator and of the scribbling blind Irish prick, who thought he was a genius.

When I once again put a potato in my pocket, as Bloom did on his day, and have the usual pints of Guinness, and wander around my city once more with the spuds and the book and the brown beer — as if something might happen, something requiring just this equipment — and remember Bloomsdays past and all those I have loved and given potatos to, this time it will be a bit different, this time that potato will be a fucking Freedom Potato, and the toasts will travel halfway around the world, and the untranslatable words will understand everyone, everywhere.

Happy Bloomsday.

Rediscovering the reminder site Remember The Milk

June 16th, 2009

Last year we used Remember The Milk as our project management tool for a major project. At first we loved it, but then we hated it. It helped us get organized, but it didn’t help us get the client organized.

So we switched to Basecamp as our main project management tool. It is great at facilitating conversations with the whole team, including the client.

But Basecamp does not remove the need for email - rather, the opposite, it sends out a flood of email. It encourages “send to all” communications. That is good for most of our projects, most of the time. But Thunderbird 2.0.0.19 tends to crash a lot on my Ubuntu 8.04 machine. In fact, all versions of Thunderbird have tended to crash a lot, and that causes me to lose track of the emails that I was about to respond to.

Remember The Milk lets me send my email to it. So when I’ve got an email that I need to respond to, but I don’t have the time to respond to it right now, I can send it Remember The Milk. Remember The Milk won’t let me forget that email.

And potentially, I might start sending out tasks from Remember The Milk. It encourages a 1 to 1 style of communication, which is appropriate, on our projects, as often as Basecamp’s many-to-many conversations are.

To the extent that email is essential for getting a project organized, then getting email organized is also essential to getting a project organized. And Remember The Milk offers a much better interface (than Thunderbird or Basecamp )for converting email into assigned tasks.

Google now offers scripting on Android

June 14th, 2009

Earlier I complained that Apple had not yet ported AppleScript to the iPhone. I am very pleased to see that Google is now supporting scripting on Android:

Scripts can be run interactively in a terminal, started as a long running service, or started via Locale. Python, Lua and BeanShell are currently supported, and we’re planning to add Ruby and JavaScript support, as well.

Google is doing everything right to win the hearts of developers. Will this matter in the long run? Apple has a big head-start with the iPhone. But then, once upon a time, Apple was the only company selling a personal computer that supported a GUI interface. It’s possible cell phones will see a shake-out like what happened in the 1980s - Apple is there first, but alienates its developers, a competitor arrives late, but woos developers and in the end wins more market share.

Simple business transactions

June 13th, 2009

Jason Fried likes simple business transactions:

I called them. 10 minutes later the guy came by. He was down the street on another job. We walked out back. I told him what I needed done. He looked around for 20 seconds and said $300. I said “deal.”

That’s it. No proposal. No “I’ll get back to you tomorrow”. No “Let me see how much the materials will cost and I’ll drop an estimate in your mailbox next week.”

Just $300. Deal. When can you start? Wednesday. How long will it take? A few hours for a few guys.

He knows his business. I know what my time is worth. End of transaction. It was so damn refreshing.

I know everything can’t be done like this, but often it seems like we’ve slid down a path of formality with so many things that really don’t need it. Extensive contracts, delays, red tape, precise cost estimates based on precise amounts of materials, “let me think about it and I’ll get back to you,” etc. Essential? Sometimes yes, but most of the time probably not.

This does sound appealing, though as general business advice, I think one would have to modulate this strategy depending on the gender of one’s customers. I just got done re-reading You Just Don’t Understand: Men and Women in Conversation which mentions that one difference between the genders is the amount of social interaction they tend to think should be part of the transaction.

Cleanse a directory tree of Subversion

June 11th, 2009

This has often tripped me up: I copy a folder (which is under version control) to another location and all the”.svn” files get copied too. So this is useful: Scott Meves posts a trick for recursively clearing out the “.svn” files.

Symfony plugins need a rating system

June 11th, 2009

WordPress suffers from “plugin hell”. There are thousands of plugins for every imaginable use, most of them are buggy, most of them are unsupported, most of them have been abandoned and only work on old, out of date versions of WordPress. Every significant WordPress project involves at least a day wasted testing plugins, trying to find one that works for you.

I worry about the plugins for Symfony going down the same road. Of course, the Symfony plugin system is much better than the WordPress system, and it enforces having the correct version.

At least for now, the community of Symfony plugin developers are small. The companies that offer plugins seem reputable and ready to stand behind their plugins.

CentreSource recently released 9 new plugins:

1) csDoctrineActAsAttachablePlugin - associates various uploads with multiple models, and includes an AJAX uploading client interface.

2) csDoctrineActAsCategorizablePlugin - associates models into nestable categories and category groups.

3) csDoctrineActAsGeolocatablePlugin - integrate your model with the Google Maps API to pull in geocodes based on record fields. Supports radius and proximity searches.

4) csDoctrineActAsSortablePlugin - adds a sortable behavior to your models

5) csDoctrineSlideshowPlugin - add and configure slideshows in your project.

6) csFormTransformPlugin - give your forms a web 2.0 look within a few easy steps.

7) csGlossaryPlugin - group your models alphabetically in glossary/directory format

8) csSEOToolkitPlugin - A toolkit to improve your website’s search engine optimization.

9) sfSympalSlideshowPlugin - An advanced slideshow used for the Sympal Content Management Framework.

What I’d like to see is one blog that just focuses on the plugins, and perhaps evaluates them, to say which ones are good.

Crowd sourcing customer service

June 11th, 2009

Morgan Zuehlke suggests that a customer-to-customer question and answer site is a great way to handle customer support for certain companies, such as Apple:

Apple is unique. Their lifestyle-permeating products cultivate customers who enjoy providing answers to others with no evident reward beyond the satisfaction of shared knowledge. Not many companies are blessed with such dedicated customers. Taking the Apple.com customer-to-customer model a few steps further in the Yahoo! Answers direction, a Q/A system can involve call and response credits. This inspires users to answer each other’s questions in order to earn the ability to ask a question. This is precisely how Yahoo! Answers built up such an active body of users sharing an incredible wealth of knowledge (and lack, thereof)!

Dunder Mifflin is not the best fit. Much like creating a social network, this is not suited for every company. Here are some key questions to ask when evaluating whether or not the Yahoo! Answers model would be a good fit for your company:

1. Do my customers consider my product or service to be a part of their lifestyle?

2. Do we get a high volume of customer service inquiries?

3. If we have a message board on our company site, is it very active?

4. Do my customers have more than just one or two questions about interacting with my products throughout the course of our relationship?

5. Do my customers have things in common with each other?

If you can answer “Yes” to all of these questions, your company would likely be a good fit for a Q/A system modeled after Yahoo! Answers.

But he points out that the model fails unless the customers are passionate about the product, and unless they, for some reason, want to volunteer their time to helping other customers.

For other companies another approach is needed - offering small cash rewards to have customers help other customers. This would be similar to the community that grew up on the tech-support boards on AOL back in 1993 and 1994. Back then, AOL charged $2.95 per hour you were online, but the fee was waived if you volunteered time on the tech support boards.

What most companies need is software that allows for questions and answers, and which makes it easy to distribute small amounts of cash back to users who contribute a lot.

So frustrated with Mozilla that I’ve got a sore throat from yelling

June 8th, 2009

FireFox can crash any machine. Not “crash” in the sense of “blue screen of death” but crash as in “uses up all memory so the machine becomes unresponsive”. This is a reliable fact of using FireFox, regardless of whether you are on Ubuntu Linux, Windows XP, or Mac OS X (I can’t speak of Camino, as I don’t use it).

Sometimes I say this to other programmers and they respond “It’s not FireFox that is the problem, it is the plugins that you use - it is FireBug and Session Manager and all the others.” Of course, any programmer who reveals this attitude needs to be re-educated. If you offer a plugin system that is unable to manage the plugins, then maybe you should not offer that plugin system? It suggests a (possibly frightening?) willingness to shirk responsibility if a programmer defends a plugin system that can crash a computer.

I wonder what Brendan Eich is thinking?

One suggestion for others: if you use FireFox, every time a new version of FireFox comes out, FireFox will ask you if you want to upgrade. I used to always say “yes”. Now I realize, if your computer is more than a year old, you should say “no”. Each version of FireFox tends to be heavier and slower than the previous version. My Ubuntu machine is from 2006, and that is part of the reason why FireFox is so slow on it.

On my Windows machine, I just switched over to Google Chrome as my new default browser. I’m giving up on FireFox. On my Ubuntu machine, I am stuck with FireFox for now. I’m not aware of any other serious browsers for Linux.

For email, I would love to give up on Thunderbird, if I could find a substitute. I run Thunderbird on my main desktop machine which runs Ubuntu. Thunderbird has had a persistent bug that has survived several upgrades (of both Thunderbird and Ubuntu). The bug is with the address auto-completion. If I type an address fast, hit “Enter” to accept and start typing again fast, Thunderbird crashes. This can lose a lot of work for me (Where “work” might simply mean “Opened email and left them open because I found some that were important and so answering them will take some time.”). Apparently there is no equivalent of SessionManager for Thunderbird, no way of remembering which emails were open, waiting for a response, when Thunderbird crashes. No, instead, after Thunderbird crashes, I need to re-start it, go back 3 days, and then read through all my email again, looking for the important ones.

At work we had a deadline today, and I worked through the weekend to meet it. I kept getting feedback from various people testing the site. Some of the email I got was thoughtful, and offered intelligent suggestions about what we should do next. By this morning, I had about 20 emails open, waiting for me to have the time and focus to write a reply. Then Thunderbird crashed and they all vanished. I yelled so loud my throat was sore. Now I have to go back to Friday and read through all the email again, to find the ones that I wanted to respond to.

If I could find something better than Thunderbird, that runs on Linux, I’d switch immediately.

In economics, what does the word ‘growth’ mean?

June 6th, 2009

David Van Couvering is talking about a steady state economy.

A few reactions:

Imagine an accounting system that allows a company to treat all incoming cash as a profit. Expenses are not counted at all. If this company gets $1 million in money, and has expenses of $1.1 million, it records a $1 million profit. Sounds pretty crazy, huh? And if this company’s incoming cash increases to $2 million, while its expenses increase to $3 million, it is allowed to claim that its profits have increased by 100%.

I am exaggerating to make a point. But it is a point worth considering. The way GDP is calculated tends to count all increases as good. Many forms of losses are external to the way the GDP is calculated.

Imagine this scenario: A healthy and prosperous man is standing on a street corner. Another man approaches him, pulls out a gun, shoots the first man, takes his wallet and then flees the scene. Someone calls 911. The injured man is rushed to the hospital. Over the next 6 months he requires multiple surgeries and extensive physical therapy to recover. All of this medical care is counted toward the growth of the GDP. The emotional pain and suffering of the man and his loved one’s are not subtracted from the GDP. To the extent that the GDP is suppose to offer a rough indication of human welfare, it fails badly in situations such as this.

If the economy is at full employment (and let’s note that “full employment” is something of an abstraction) then, theoretically, there are no extra people who can replace that injured man at his job, so for the 6 months that he is recovering, his lack of labor is subtracted from the GDP. So in this scenario, the GDP would shrink somewhat, due to the man’s injuries (but let’s note that his lost ability to produce wealth is not the only loss that has been suffered). However, if the economy is not at full employment, then society has surplus labor, and so, in theory, someone could take the job that the injured man had held, and so the GDP would see no shrinkage at all (I’m leaving aside the issue of whether or not the man had a rare skill that no one else could replace). Though, from a moral and practical standpoint, the man, his loved ones, and society have all suffered a loss, the loss is never recorded in the GDP (if the economy is not at full employment).

Any exchange of money is treated as something positive. This is like the company I mention above, that gets to record all incoming cash as profit, and never has to record any expenses.

There are, at this point, some well known areas where losses are external to the way the GDP is calculated. Environmental loss is an obvious one. Property rights don’t extend to the air we breathe, so air pollution can not easily be recorded as damaging anyone’s wealth. “Tragedy of the commons” scenarios are common, especially involving areas such as deep sea fishing, where property rights are non-existent.

There are other scenarios that are less talked about. There are the emotional losses that a family might suffer when the forest they live next to is torn down and replaced with a chicken processing plant. The new plant produces wealth that is added to the GDP, but if something has been lost, it is not recorded. That sense of loss that people might feel in such scenarios is sometimes denigrated as a nostalgic and sentimental attachment to the past. Emotions show up in the GDP only when something symbolic of emotions is purchased, for instance, a wedding ring. Or, to bring up the issue of subjectivity, we could ask, what is the value of perfume? It’s practical value is difficult to assess. It’s value is determined subjectively, by each person who purchases it. It no doubt has some emotional value to the person using it, and we measure that value by its price, but other kinds of emotions, if they don’t involve a purchase of some kind, don’t get counted.

My point, in all of this, is to suggest that “growth” is a nebulous term. Or rather, when I hear the word “growth” I think of Mandelbrot’s essay “How long is the coast of Britain?” In the same way that he argued that the coast of Britain could be of any length, depending on how you wanted to measure it, so too, I think one could argue that we suffer, or enjoy, a lot of growth, a little growth, or negative growth, depending on how you might specify which inputs are valid. I can think of a thousand ways to measure to growth, and each way would give a different answer. As Joseph Schumpeter once said “The social process is really one indivisible whole,” from which economists pluck various aspects and call them “economic”. Given an endless stream of data that has as many dimensions as we wish to define, the process of deciding which dimensions shall be treated as important will always be arbitrary. Or rather, such decisions can be made to build models that work for us as useful tools (or un-useful tools). Such models don’t take us closer to any kind of reality, they simply give us feedback that we have decided that we need if we are to build whatever kind of world that we have previously decided we want to build.

Again, if you are measuring the coast of Britain, you first need to decide on what your goals are for doing the measurement. If your goals are to aid navigation by boat, you might come up with one method of measurement, useful for your goal. If your goal is to track the growth or shrinkage of the eco-system available to some ocean-loving bird, you might use a different method. All that matters is whether your method of measurement allows you to achieve your pre-determined goal. Neither method can pretend to be more accurate than the other. Accuracy is not a coherent concept, in this discussion. And likewise, the word “growth”, when applied to the GDP, has to be understood as a tool that is maybe useful, or perhaps un-useful, in achieving a particular kind of civilization. But there is no final reality behind it. We could use a different system of measurement and achieve a different result, and whatever system of measurement we used, none could be said to be more accurate than the others, they could only be judged on how well they help acheive pre-determined goals.

On a different note, right before he was assassinated, Robert Kennedy offered a similar critique, far more eloquent than mine:

We will find neither national purpose nor personal satisfaction in a mere continuation of economic progress, in an endless amassing of worldly goods. We cannot measure national spirit by the Dow-Jones average, nor national achievement by the gross national product. For the gross national product includes air pollution and advertising for cigarettes, and ambulances to clear our highways of carnage. It counts special locks for our doors, and jails for the people who break them. The gross national product includes the destruction of the redwoods, and the death of Lake Superior. It grows with the production of naplam and missles and nuclear warheads… It includes Whitman’s rifle and Speck’s knife, and the broadcasting of television programs which glorify violence to sell goods to our children.

And if the gross national product includes all this, there is much that it does not comprehend. It does not allow for the health of our families, the quality of their education or the joy of their play. It is indifferent to the decency of our factories and the safety of our streets alike. It does not include the beauty of our poetry or the strength of our marriages, the intelligence of our public debate or the integrity of our public officials… the gross national product measures neither our wit nor our courage, neither our wisdom nor our learning, neither our compassion nor our devotion to our country. It measures everything, in short, except that which makes life worthwhile; and it can tell us everything about America - except whether we are proud to be Americans.

Why do we need JavaFX when we have Groovy?

June 5th, 2009

The more I learn about Groovy, the less I understand why the world needs JavaFX.

Back around 2002 or 2003 I studied Java, but it seemed heavy to me, verbose, and slow to program with. My attitude has mostly been, life is short, so I’d rather program in light-weight, high level programming languages. I want to be able to go as fast possible. For the last few years I’ve mostly been doing web development, mostly with PHP, though I did one project with Ruby On Rails.

But then the iPhone came out. And then the iPhone app store. So I became intrigued with the idea of programming for cell phones. But I didn’t want to especially learn Objective C just to be able to work with the iPhone. I was relieved to hear that Google was coming out with its Android operating system for cell phones, and programming for Android would be done in Java. That opened the door to using the light-weight languages (derived from Java) for cell phone programming. Very cool.

So I began to delve into the world of Java, something I hadn’t done much in the last few years. At first I was attracted to JavaFX, which Sun was hyping. But then I began to wonder why JavaFX was suffering such a slow uptake, and why programmers seemed less thrilled about it than I.

Now that I’ve started to study Groovy, I realize why JavaFX has so little traction: it isn’t needed. Much of what I liked about JavaFX is already present in Groovy. Lexecorp expresses some of the same hesitation that I feel:

I wonder whether I will be able to like JavaFX! Have I been spoilt already by Groovy (it does, virtually, the same thing)? Maybe, but I managed to accept the long winded Java language well after Perl’s expressive power had spoilt me. I learned to love Java for its platforms and immense libraries, so what can I love about JavaFX?

Consider this tutorial, which showed how to draw a coffee cup, and which showed off the clean, declarative style of JavaFX:

def plateGroup = Group {

translateX: 250
translateY: 300

content: [

// The gray ellipse under the plate
Ellipse{centerX:0 centerY:10 radiusX:160 radiusY:50 fill:Color.DIMGRAY},

// The thin "lip" of the plate (provides a sense of 3D)
Ellipse{centerX:0 centerY:3 radiusX:170 radiusY:50 fill:Color.LAVENDER},

// The large plate ellipse
Ellipse{centerX:0 centerY:0 radiusX:170 radiusY:50
fill:RadialGradient{
centerX:0.5 centerY:0.75
stops:[Stop {offset: 0.0 color: Color.WHITESMOKE},
Stop {offset: 0.5 color: Color.LIGHTGRAY},
Stop {offset: 1.0 color: Color.DARKGRAY}]
}
},

// Recessed plate center
Ellipse{
centerX:0 centerY:5 radiusX:90 radiusY:22
fill:RadialGradient{
centerX:0.5 centerY:0.75
stops:[Stop {offset: 0.0 color: Color.BLACK},
Stop {offset: 0.4 color: Color.LIGHTGRAY},
Stop {offset: 1.0 color: Color.GHOSTWHITE}]
}
}
]
}

def cupGroup = Group {

translateX: 152
translateY: 20
scaleX: 3.0
scaleY: 4.0

content: [
// Cup body
Circle {centerX: 100 centerY: 100 radius: 50
fill: RadialGradient {
centerX: 0.4 centerY: 0.0 focusX: 0.5 focusY:.65, proportional:true
stops: [Stop {offset: 0.0 color: Color.GHOSTWHITE},
Stop {offset: 1.0 color: Color.SILVER}]
}
},

// Cut top of cup
Rectangle{stroke: BGCOLOR fill: BGCOLOR
x:25 y:50 width:150 height:50},

// Outer rim
Ellipse{fill: Color.WHITE centerX:100 centerY:100 radiusX:50 radiusY:8},

// Inner rim
Ellipse{centerX:100 centerY:100 radiusX:48 radiusY:7 //inner rim
fill: RadialGradient {
centerX: 0.4 centerY: 0.0 focusX: 0.5 focusY:.4, proportional:true
stops: [Stop {offset: 0.0 color: Color.GHOSTWHITE},
Stop {offset: 1.0 color: Color.SILVER}]
}
},

// Create “coffee in cup” by intersecting coffee ellipse with inner rim ellipse
ShapeIntersect {

fill:Color.SADDLEBROWN

//Inner Rim
a: Ellipse{centerX:100 centerY:100 radiusX:48 radiusY:7} // inner rim dimensions

//Coffee
b: Ellipse{centerX:100 centerY:102 radiusX:46 radiusY:6} // coffee dimensions
}
]
}

Stage {
title: “Coffee Cup”
width: 500
height: 500
visible: true
scene: Scene {
fill: BGCOLOR
content: [plateGroup,cupGroup]
}
}

That’s impressive! Look how clean the code is! So much simpler than Swing! But then Andres Almiray turned around and demonstrated how to draw a coffee cup with Groovy:

group( id: ‘plategroup’, bc: ‘none’ ) {
// gray ellipse under the plate
ellipse( cx: 0, cy: 10, rx: 160, ry: 50, f: color(’darkGray’).brighter() )

// thin ‘lip’ of the plate (provides a sense of 3D)
ellipse( cx: 0, cy: 3, rx: 170, ry: 50, f: ‘lavender’ )

// large plate
ellipse( cx: 0, cy: 0, rx: 170, ry: 50 ) {
radialGradient( cx: 1, cy: 1, fy: 100, r: 270 ) {
stop( c: ‘whiteSmoke’, s: 0 )
stop( c: ‘lightGray’, s: 0.5 )
stop( c: ‘darkGray’, s: 1 )
}
}

// recessed plate center
ellipse( cx: 0, cy: 5, rx: 90, ry: 22 ) {
radialGradient( cx: 1, cy: 1, fy: 20, r: 180 ) {
stop( c: ‘black’, s: 0 )
stop( c: ‘lightGray’, s: 0.4 )
stop( c: color(’white’).darker(), s: 1 )
}
}

transformations {
translate( x: 250, y: 300 )
}
}

group( id: ‘cupgroup’, bc: ‘none’ ) {
subtract( id: ‘cup’, asShape: yes ) {
circle( cx: 100, cy: 100, r: 50 )
rect( x: 25, y:50, w: 150, h: 50 )
}
draw( cup, keepTrans: yes ) {
radialGradient( cx: 0.4, cy: 0, r: 100 ) {
stop( c: ‘whiteSmoke’, s: 0 )
stop( c: color(’whiteSmoke’).darker(), s: 1 )
}
}

// outer rim
ellipse( cx: 100, cy: 100, rx: 50, ry: 8, f: ‘white’ )

// inner rim
ellipse( cx: 100, cy: 100, rx: 48, ry: 7, id: ‘innerRim’ ) {
linearGradient( y2: 1 ){
stop( c: ‘whiteSmoke’, s: 0 )
stop( c: color(’whiteSmoke’).darker(), s: 1 )
}
}

intersect( f: color(’darkOrange’).darker().darker() ) {
shape( innerRim )
ellipse( cx: 100, cy: 102, rx: 46, ry: 6 )
}

transformations {
scale( x: 3, y: 4 )
translate( x: -16, y: -70 )
}
}

transformations {
translate( x: -50, y: -50 )
}

Damn. Doesn’t that look similar? There are some syntax differences, but both use a declarative style, and both require less work than using Swing.

Groovy offers some solid MVC frameworks. For web development, there is Grails, which is an imitation of Ruby On Rails. For the desktop, there is Griffon. Consider this post on Transentia:

Although it is early days yet for the project, Griffon aims to bring the same “Configuration by Convention” goodness to desktop GUI development that Grails has brought to Web development. In fact, Griffon ‘borrows’ heavily from Grails: many of the build scripts, etc. are straight carry-overs, meaning that anybody familiar with Grails can get started easily.

This is all that is needed to get started:

griffon create-app GT
cd GT
griffon run-app

These three shell commands give a simple immediately runnable application.

As with Grails, Griffon imposes a clear MVC structure for the code and also creates a standard project filesystem heirarchy.

I haven’t yet worked with Griffon, but the setup described on Transentia looks very clean. Certainly, everything I’ve learned so far about Groovy has left me impressed. And since Groovy integrates with regular Java far more smoothly than JavaFX, why do we need JavaFX? Can anyone name one thing that JavaFX gives us that Groovy hasn’t already given us?

A fast Symfony

May 25th, 2009

A very clever trick for using a portion of the Symfony framework to respond to Ajax calls:

Now I can execute a component from the client side. The component architecture offers native View/Controller separation, and the configuration initialization brings autoloading, database access, and more. It does work perfectly, but is it fast? Speed tests show that not launching the filter chain saves about 40% to 50% of the cost of a symfony initalization. This means that you can multiply the number of requests that your server can handle by two - for very simple requests.

Paul Krugman would have been a good game designer

May 24th, 2009

Back in the 1990s, I enjoyed programming some games for myself and friends to play. Once the game existed, and we’d played it a few times, we’d start asking, “How would the game change if we changed X?”

Via Brad Delong, I stumble upon this oddly simple economic model from Paul Krugman:

But if the money supply is constant, M’ = M; also, C = L. Given the utility function, consumers will spend a share 1-s of their initial wealth on goods, s on money. So we can represent equilibrium either by the condition that demand for goods equal supply,

L = (1-s)(L + M/P)

or by the condition that demand for money equal supply,

M/P = s(L + M/P).

Both ways of looking at it imply the price-level equation

P = [(1-s)/s)](M/L)

so the price level is proportional to the money supply.

If he’d flunked out of economics school, he could have done a lot to improve SimCity.

Web 2.0 was such a long time ago

May 21st, 2009

I thought the title of this article was funny:

Converting legacy Rails apps to Grails

So now there are “legacy Rails apps”. Sort of makes Rails sounds really ancient. One of the dead languages. You know, Cobalt, Fortran, Rails…

What industries will be effected by crowd-sourcing?

May 21st, 2009

Jeff Howe writes about crowd sourcing and how some sites are getting designers to work on spec:

So one might expect crowdSPRING and 99designs to wither away like so many other seemingly ill-conceived Web 2.0 start ups. Instead, they seem to be flourishing. 99designs says it has paid out over $4 million to its community of 30,000 artists, and crowdSPRING expects to be profitable by next year. The success of crowdsourced design has sparked a vibrant, highly emotional debate within the design industry.

Alarmed by the popularity of the spec model, a group of designers formed a protest group called NO!SPEC to persuade their colleagues (and prospective clients) to just say no to design contests.

He make the point that what is now happening to design is what earlier happened to stock photography:

iStockphoto and other so-called “microstock” agencies capitalized on a similar disparity. The result was the total disruption of the $2 billion stock photo industry. iStock is now the third-largest purveyor of stock images, and some 96 percent of its “workforce” is comprised of amateurs. In my crowdsourcing book I posed the question of whether stock photography was an isolated case, or just the canary in the coal mine. It was an open question as of April 2008 when I submitted the final changes to my galleys. Now it ain’t. The canary is prone, lying motionless on a bed of its own droppings. It looks like it’s time to find another mine.

My dad was a stock photographer during the golden years, 1950-1990, when it was possible to make really good money doing stock photography - adjusting for inflation, 6 figure annual incomes. That began to change in the 90s, due the proliferation of royalty-free images, and distribution over the Internet (some of the same forces that re-shaped the music business). And then, there was the incredible consolidation of the business. An industry that had been made up of hundreds of small and mid-sized businesses consolidated around just 2 giants: Corbis and Getty.

Getty, in particular, acquired a reputation for offering harsh contracts to photographers. My dad was irritated that they offered “on spec” contracts, where sometimes the photographer was asked to shoot a subject, but had no guarantee of pay, or inclusion in the collection. My dad never signed such a contract, but rather, continued to work with some of the smaller stock agencies that remained independent. But these firms all suffered declining revenues.

The new micro-stock royalty free web sites are again transforming the business.

By the way, this is off-topic, but I find it amusing. Be careful what you photograph:

Thibaud Elziere, the CEO of micropayment site Fotolia, was detained by police for eight hours after he took a photo of a security camera at the French Prime Minister’s residence.

According to a posting on the Fotolia company blog, Elziere was testing a new camera while on a walk in Paris on Sept. 21. Police officers stopped him when they saw him snap a picture of a security camera.

According to the blog, Elziere didn’t realize he was photographing something sensitive. He explained to the police who he was and what he was doing, and deleted the picture from his camera as an act of good faith. Police checked his background before releasing him eight hours later.

Some bits of simplicity coming in Symfony 1.3

May 19th, 2009

This looks very promising:

I recently introduced the sfFormSymfony class in the 1.3 branch, which includes this pearl of a method:

$form->bindRequest($request);

So clean, so simple. Compare that to the code necessary to do the same thing in the 1.2 branch:

$form->bind(
$request->getParameter($form->getName()),
$request->getFiles($form->getName())
);

Ugly, huh? Fabien’s term was “not ugly, explicit” (I couldn’t help but laugh at his turn of phrase).

Keeping track of big imports in Symfony

May 19th, 2009

This would be handy for a project I still need to finish, managing very big imports:

I don’t know if I’m the first or only person to find this functionality useful, but in a recent project of mine one of my tasks was used for importing large amounts of data which took a total of 20 minutes combined. It was extremely nice knowing where in the import it was so I wrote a function which would write out the progress, clear the previous, and re-write.

Empowering great designers to work freely with the HTML in a Symfony project

May 19th, 2009

I’ve had the good fortune to work with some truly great designers. These are people who are understand the client’s needs, who understand the users, and who naturally develop web sites that feel intuitive to the people who use the site. Long ago I learned that, when working with such designers, it was important to empower them with the code they needed, but to otherwise stay out of the way. In particular, such designers need access to the HTML of the site. When I hide the HTML away inside of PHP functions, I’m limiting the ability of these maestros to perform.

This has implications when working with a framework like Symfony.

A lot of computer programmers would add an image to a Symfony template by using one of the image helpers:

<?php echo image_tag(’banner.jpg’) ?>

But what if the designer needs to add a CSS class to this? What if they are working late at night, and they are unable to reach me? Or they are working in the middle of the day, but it is a day I’m spending away from my computer?

The designers I work with can read PHP code fairly well. And they can look up the image_tag helper and figure out its syntax. But this is a big waste of their time. It takes them further into the world of programming than they should need to go.

When creating URLs in a Symfony project, it is important to use helpers. The helpers take care of figuring out what the right URL should be for things like images. The helpers allow us to develop on one machine and deploy to another server when we go live, and even if that other server has a completely different directory structure, we don’t need to change any links, because the helpers take care of all that for us. However, managing the URLs is the only thing that the helpers should do.

So we do not do this:

<?php echo image_tag(’banner.jpg’) ?>

Instead we either do this:

<img src=”<?php echo $sf_request->getRelativeUrlRoot() ?>/images/banner.jpg” />

or we do this:

<?php sfLoader::loadHelpers(array(’Url’)); ?>
<img src=”<?php echo public_path(’banner.jpg’) ?>” />

This way the URL is managed by Symfony’s helpers, but the rest of the IMG tag is still free for the designers to work with. If a designer needs to add a CSS class, they don’t need to call me on the phone and get me to do it, and they don’t have to start researching Symfony helper tags, instead they just add the CSS class like they always have:

<img class=”header” src=”<?php echo public_path(’banner.jpg’) ?>” />

This is an important bit of project management. It allows for a correct separation of concerns - the designers get to focus on design, and the programmers can focus on the programming.

The new programming style: high-level and low-level languages mixed together

May 18th, 2009

As I recall, when I was getting into programming in the late 90s, and especially when I was getting into PHP, there was a debate about the value of light-weight scripting languages, such as Ruby, Python, Perl and PHP. Some old-school programmers insisted that working with those languages didn’t count as “real” programming - those languages were too easy. And many old-school programmers were critical of the performance hit one takes with the light-weight scripting languages. After all, for some tasks, a routine written in C will run more than 100 times faster than the same routine written in PHP. A two-order-of-magnitude difference in execution speed needs to be taken seriously. Of course, on the flip side, a programmer can rapidly prototype new software with a light-weight scripting language, whereas using C would take much, much longer, and then it would be harder to change once it was done.

Back then, the decision was seen as either/or: either use a light-weight scripting language, or use a lower-level language that is more efficient.

In recent years, the new style has been “both”: mix the high-level and low-level languages. Use light-weight scripting languages to prototype some software, then look at the bottlenecks and drop into a lower level language for those parts of your code that need the speed. For instance, consider what David Heinemeier Hansson says about Campfire, the chat software he helped developed. First written in Ruby On Rails, it soon became clear that the code that polls to see who is in the chat room needed to be as fast as possible:

We rewrote the 100 lines of Ruby that handled the poll action in 300 lines of C. Jamis Buck did that in a couple of hours. Now each poll just does two super cheap db calls and polling is no longer a bottleneck.

Campfire and a shared todo list is different because they’re not working on a shared resource. There’s no concept of locking. Or two people dragging the same item. So a 3 second delay between posting and showing up doesn’t matter. It does when you’re working on a shared resource.

In between C and the light-weight script languages are those languages that added some extras, such as Java, C# and Erlang. Java and C# offer object orientation and automatic garbage collection, whereas Erlang offers automatic concurrency. The crew at 37 Signals has decided to re-write the polling in Campfire, using Erlang:

Last Friday we rolled out the Erlang based poller service into production. There are three virtual instances running a total of three Erlang processes. Since Friday, those 3 processes have returned more than 240 million HTTP responses to Campfire users, averaging 1200-1500 requests per second at peak times. The average response time is hovering at around 2.8ms from the time the request gets to the Erlang process to the time we’ve performed the necessary MySQL queries and returned a response to our proxy servers. We don’t have any numbers to compare this with the C program that it replaced, but It’s safe to say the Erlang poller is pretty fast. It’s also much easier to manage 3 Erlang processes than it was the 240 processes that our C poller required.

The diversity of language choices allows programmers to find exactly the right level of abstraction. When do you need programmer efficiency, and when do you need the code to execute efficiently? One needs a variety of languages so one can always get the right level abstraction for a given project. I think this is part of what Larry Wall was talking about:

Doing it right involves treating the evolution of the language as a pragmatic scope, or as a set of pragmatic scopes. You have to be able to name your dialect, kind of like a URL, so there needs to be a universal root language, and ways of warping that universal root language into whatever dialect you like. This is actually near the heart of the vision for Perl 6. We don’t see Perl 6 as a single language, but as the root for a family of related languages. As a family, there are shared cultural values that can be passed back and forth among sibling languages as well as to the descendants.

As I previously wrote:

Larry Wall is a deep thinker. And he has been developing a deep philosophy of computer languages. Yet the world of Java has, quite surprisingly, opened up and become a world of many languages: Groovy, JavaFX, JRuby, hecl, Jython, etc. No one would have guessed, in 2002, how much Java was going to open up. But while Larry Wall has been thinking about Perl 6, the Java community went ahead and created the reality that he was merely thinking about: “So there needs to be a universal root language… [and] shared cultural values that can be passed back and forth among sibling languages as well as to the descendants.”

I’ve written a little Java in the past, but I’ve always hated how heavy it is. Double casting a variable when you declare it leads to code that strikes me as overly verbose, for my purposes. Most of the time, I work on code that should be built quickly, and execution speed is not a concern. However, I’ve recently started studying Groovy, and I like it quite a lot. It is a light-weight scripting language that runs on the JVM. Using it, one can drop back to standard Java any time one needs a performance boost, or one needs to take advantage of a library that is specific to Java. You could knit together software made of Java pieces, using Groovy as the glue.

This, it seems to me, is the new style. We no longer face an either/or decision about high-level and low-level languages. Rather, the new pattern is, start high, and then drop down to a lower level whenever you need the extra power.

Binary math and PHP bitwise operators

May 18th, 2009

A great tutorial about binary math and PHP’s bitwise operators.

Dependency Injection in the upcoming Symfony 2.0

May 18th, 2009

(I’ve previously written a post where I tried to take Martin Fowler’s essay and change some of the examples into PHP.)

Fabien Potencier writes:

During the first five articles of this series on Dependency Injection, we have progressively introduced the main concepts behind this simple and useful design pattern. We have also talked about the implementation of a lightweight PHP container that will be used for Symfony 2.

This looks like a series worth reading, especially as a glimpse of the future of Symfony:

When creating software, you can get the greatest performance speed by getting rid of any framework and writing arbitrary, ad-hoc code that suits the particular problem you face today. But, of course, such code quickly becomes an unmanageable nightmare, which is why so many of us use a framework. But frameworks are slow. Having a formal system of dependency injection adds another layer of abstraction, providing greater flexibility, but even worse performance. Given that traditional trade-off, this sounds absolutely amazing:

How can you have the best of both world? That’s quite simply. The Symfony Dependency Injection component provides yet another built-in dumper: a PHP dumper. This dumper can convert any service container to plain PHP code. That’s right, it is able to generate the code you could have written by hand in the first place.

How does Symfony rank compared to other frameworks?

May 16th, 2009

[Update: I've re-written this post to take into account the information that Javier Eguiluz posted in the comments.]

[Update: Jacob Coby points me to Google Trends, which offers the visuals for the numbers that I quote below.]

TIOBE only tracks computer languages, not frameworks. I’m interested in how Symfony compares with the other PHP MVC frameworks. Borrowing the search idea from TIOBE, I just ran these searches:

symfony

codeigniter

cakephp

drupal

The results (how many hits on Google):

Symfony - 6,270,000 (3,900,000 for ‘php’ and ’symfony’ together)

CodeIgniter - 748,000

Cake - 4,540,000

Drupal - 28,500,000

A comparison: Ruby On Rails: 12,600,000

Meanwhile, WordPress blows away everything else: 295,000,000

My guess is that WordPress has retarded the growth of PHP MVC frameworks. The 80/20 rule applies here with some force. WordPress meets the needs of most people who need a website. PHP allows for self-contained software, such as WordPress, which is something the world of Ruby has not seen. Ruby on the web has largely meant Ruby On Rails, which one has to be a programmer to setup and use. Designers, intelligent people who are not programmers, all such people can default to WordPress.

From the point of view of a computer programmer, the code in WordPress is fairly awful. But designers love WordPress, and it needs to be given credit for successfully creating a package that designers feel comfortable with. No designer would know how to set up a Ruby On Rails site, but most web designers know how to set up a WordPress site. And for all its limitations and flaws, it must be acknowledged as the dominant platform written in PHP. Compared to WordPress, all the MVC PHP frameworks are just a footnote.

I’m going to repeat these searches every 3 months, and see how these ranks change over time.

Propel and many-to-many relationships

May 16th, 2009

I seem to recall reading that Propel (an ORM written in PHP) could not handle many-to-many relationships. Perhaps I’m actually thinking of Criteria, which Propel uses for database abstraction?

Anyway, apparently Propel has a way of working with many-to-many relationships:

As mentioned in the chapter introduction, Propel’s support for many-to-many relationships involves a middle step: defining the cross-reference table in your data model, and using results to perform lookups.

Take for example, a need to relate books with the people reading them — many people reading a single book, one person reading many books:

<table name=”book_reader_ref”>
<column name=”book_id” type=”INTEGER” required=”true” primaryKey=”true”/>
<column name=”reader_id” type=”INTEGER” required=”true” primaryKey=”true”/>
<foreign-key foreignTable=”book”>
<reference
local=”book_id”
foreign=”book_id”/>
</foreign-key>
<foreign-key foreignTable=”reader”>
<reference
local=”reader_id”
foreign=”reader_id”/>
</foreign-key>
</table>

In your PHP script you will need to make use of the “middleman” cross-reference table to retrieve the related entities:

$books = BookPeer::doSelect(new Criteria());

// for every book get all readers
foreach($books as $book) {
$readers = $book->getBookReaderRefsJoinReader();
}

The code above will execute two SQL statements:

1. SELECT * FROM book
2. SELECT * FROM book_reader_ref INNER JOIN reader ON reader.reader_id = book_reader_ref.reader_id WHERE book_reader_ref.book_id = $book->getBookId()

While this method is not excessively wasteful — as performing a single select to retrieve many-to-many joined results doesn’t usually make sense — but it is also less elegant than the support for one-to-one joins. Requiring the explicitly reference of the cross-reference table is a drawback to using the very literal data modeling approach adopted by Propel (inherited from Torque).

A profitable niche in the world of personal blogging

May 9th, 2009

Penelope Trunk says you won’t make money from blogging. I assume she’s talking about personal blogging, otherwise her advice amounts to “You can’t make money with an online magazine” and clearly that is not true, since there are lots of profitable online magazines (like TechCrunch, Salon, etc).

Apparently, in the world of personal blogging mommy-blogging is a profitable exception:

Welcome to the world of mommy blogging, where women juggle the demands of childcare with building audiences online. It’s also, increasingly, a place where top brands battle for their attention, hoping for reviews from “real moms” and access to the valuable power of word of mouth. Being a player in the mommy blogger world can mean access to free products, getting big media buys and even trips to the red carpet in Hollywood and Caribbean cruises.

Twitter: can a single company amount to an entire open platform?

May 8th, 2009

Reputable news sources on the tech industry, such as Techcrunch, seem very positive about the future growth of the Twitter eco-system:

Twitter is quickly turning into the media sharing platform of choice for many people, despite the fact that it, uh, doesn’t have any actual media sharing functionality. But a variety of services are popping up to fill the need, including countless Twitter-specific sites for sharing images, music, and video.

Twitter seems to be taking off the way weblogs and RSS feeds took off during the last recession. But weblogs and RSS feeds were open platforms, with dozens of companies competing to offer tools. The openness and the competition helped drive the tools forward, which helped the practice of blogging to move forward. There was never a single company that could say “Weblogging will no longer be allowed unless you start paying a fee for our tools” (SixApart tried this and immediately lost market share).

Twitter is just one company. It is only as open as it wants to be. Right now, it is synonymous with micro-messaging (micro-blogging?). But I am doubtful that a single company can come to represent the whole of some online activity. I suppose the nearest analogy would be Google and search, but that seems like an imperfect fit. The highest estimate of Google’s market share is 72%. Whereas Twitter owns 100% market share of Twittering.

Maybe hecl is the new Applescript or Hypercard?

May 8th, 2009

(In this post, I will let hecl stand in for all scripting languages that aim to make programming easy to do on cell phones.)

All through the 1980s and for most of the 1990s, Apple made efforts to make programming easy. In 1987, Apple released Hypercard, probably the single easiest programming environment ever. Apple’s dedication to empowering people - allowing minimally-technical people to program - earned it a great deal of goodwill, so much so that Bill Atkinson (the inventor of HyperCard) basically gave it to Apple as a free gift, in exchange for the promise that it would be included on all Macintosh computers. Sadly, in this decade, Apple has forgotten about Hypercard. My sense is that this represents a larger trend within Apple: a general retreat from the goal of giving minimally-technical people easy programming tools. The death of Hypercard lead to mourning among its many fans (myself included). Danny Goodman summed up the feelings of many:

I shed my buckets of tears for HyperCard (and what might have been) many, many years ago. The first crude demo that Bill showed me was, at its root, what the World Wide Web has become. Coulda, woulda, shoulda.

Despite valiant post-version 1.1 efforts by dedicated and exceptionally bright serfs (their recollection brings fond memories), HyperCard never truly recovered from its detour to the Claris dungeon and the dungeon masters. It’s a tale of perhaps the biggest opportunity Apple missed in its self-defense against a rising Windows tide.

When I look at the current product, I see facets that are still ahead of their time, not the least of which is the extraordinarily elegant HyperTalk language by Dan Winkler — a kid straight out of college, who Bill Atkinson said was the only programmer who could keep up with him. At the same time, aspects of the product have been embarrassingly behind the times for years. Kevin was well on his way to fixing that, but the scenery changed.

Back when Apple was still proud of HyperCard, and boastful of its use by minimally-technical people, this is the kind of article that I read over and over and over again:

I thought it was really cool to see - not because I’m interested in quilting, or the program is anything brilliant (it’s simple and functional), but because enabling stuff like this is part of what I built Hecl for: to make mobile phone applications easier, quicker, and simpler to create. Someone went and typed in the code on Heclbuilder, got the program running, and now a number of people have a handy tool to do some calculations for their hobby, which is a heck of a lot easier than fooling around with SDK’s, Eclipse or Netbeans, and so on and so forth.

But this is no longer Apple talking, rather, it is David Welton, talking about Hecl.

The other tool for programming by minimally-technical people that Apple has promoted has been AppleScript. Influenced by HyperTalk (HyperCard’s programming language), Applescript has a syntax that in many ways mimics English, and therefore it is easy for English speakers to learn.

The digital revolution continues to change our lives. The biggest change over the last few years has been the mass acceptance of cell phones. Most people that I know no longer have landlines, they only have cell phones. This is the next great frontier for computer programming. And yet, Apple hasn’t yet made Applescript available to run on the iPhone. Yet hecl can run on Android.

Personally, I would love to be able to write apps for the iPhone. But I don’t want to have to learn the Object C language. I don’t have the time. I agree with Simon Brocklehurst’s criticism of this decision:

Recently, Apple bowed to the inevitable, and has released an SDK for developer testing. The language they chose to base the SDK around is Objective-C. This wasn’t a complete surprise - after all, it’s the “native” language of Mac OS X. However, while it’s not a surprise, I wonder if it’s not a major strategic error on Apple’s part. The point is this: the Mac is a niche platform, and is especially niche in terms of numbers of developers building applications in Objective-C. Compare that to iPhone, which because of its technological lead, has the chance to become a major volume player in the mobile phone space. If Apple wants iPhone to succeed, it seems strange to attempt to force developers to use an unpopular language for programming it. That isn’t the way to win - developers have many, many choices of platforms they can spend time developing for.

Brocklehurst thinks Apple should pick a popular language for its SDK. I think Apple should pick one that is easy to learn. A light weight scripting language. If Apple came out with an implementation of Applescript that ran on the iPhone, then I would start writing iPhone apps tomorrow.

But for now, it doesn’t seem like Apple is planning on doing that. So when I look around for relatively easy ways to get into cell phone programing, other light-weight scripting languages jump out at me. And they lead me to platforms other than the iPhone.

So maybe hecl is the new Applescript/Hypercard? For people who want to put together a quilting site with a cell phone connection, what is the easiest way for them to do that? Who is, right now, showing commitment to the old ideal of empowering minimally-technical people to write the apps that they want?

Maybe informal social spaces are a bad place for businesses to spend time or money?

May 7th, 2009

David Griner has a list of problems for businesses to avoid when they start using social media (I assume he’s thinking of Twitter, Facebook, MySpace, etc. The only site he mentions, in the past tense, is MySpace). At first, these might sound like clever warnings:

1. Lust: Loving your customers is great, but take it slow.

2. Gluttony: Don’t bite off more than you can chew.

3. Greed: It’s hard to shake hands while you’re reaching for someone’s wallet.

4. Sloth: Always avoid the temptation to “set it and forget it.”

5. Wrath: There are a lot of people out there itching for a punch in the nose, but you’re not the one to give it to them.

6. Envy: Don’t be dissuaded by other people “doing it better than you.”

7. Pride: Stay humble, rock star.

Sadly, the post is devoid of any data suggesting that these bits of advice have the slightest validity. Rather, the advice is hopeful, but fact-free:

In the ribald days of 2006, a business would sign up on MySpace and then start “friending” everyone with a pulse. These days, lusting after fans like that will get you labeled as desperate — or even as a spammer. So keep it in your pants and truly get to know the first people who connect with your brand. In return, they might just love you for life.

I’ve written before of my efforts to help The Second Road with their marketing. We spent a lot of time trying to find a marketing firm that we could hire. We were disappointed by most of the folks we talked to. They were fuzzy. What we wanted was a scientific approach. If, for instance, we spent $100 buying an ad on Facebook, how many people would that bring to our site? What if instead we hired a well known blogger? Everything needs to be tried, using small amounts of money. We wanted research, well-tested solutions, or experiments where success and failure were clearly defined. Instead, we got a lot of mush about things that are difficult to measure, for instance, “We will influence the way opinion shapers think of your site”. Okay, but how to measure that? We could potentially measure how many times the site got mentioned on blogs, but how much of that could be traced back to a particular marketing effort? If there was an uptick in mentions on prominent blogs, was that because of the efforts we’d made over the previous 3 months, or was it because of the new marketing firm we just hired? How to measure?

Susan Payton’s advice was a bit of a shock to me. I was almost offended by her tone of “let’s ignore the facts and do this anyway.” Her argument for social media marketing was wholly faith-based:

I think we need to shift our thinking about marketing results in terms of having absolute control and ability to micromanage the results and just sit back and let it happen. You won’t see results overnight, but if you use social networking sites correctly and participate in the right conversations, you will see a positive change. You will see traffic to your site increase. You will see sales climb. Just relax and let it happen.

Let’s all take a deep breath and let out all those years of being control freaks, of needing to know exactly how everything will pan out. Marketing 2.0 is happening as we speak. There is no precedence set. We are making history with internet marketing and social media. Do you want to go along for the ride or sit this one out and regret it later?

I’m unwilling to have that kind of blind faith in a strategy that has never been tried before and, frankly, I have to question the reasonableness of anyone making such a suggestion. I need some data before walking down that road. Even a few success stories, however much over-hyped, would help to justify this strategy. But where are the great breakthroughs? What company can say “We made friends with our customers on Facebook and results were amazing! Sales doubled!”

I apologize for picking on David Griner. I’m sure he is a nice guy. But his post gives me a good starting point to repeat my concerns about hype regarding “social media marketing.” Griner is apparently in the marketing industry. His blog describes him thus; “David Griner is a social media strategist for Luckie & Company. He’s also a contributor to Adweek’s blog, AdFreak.com.”

What I feel is missing from some of Griner’s advice, and from the advice I’ve been hearing from other enthusiasts of social media marketing, is a sense of ROI, some concept that maybe the dollars might be better spent elsewhere. Consider this concluding bit from Griner:

Successful social media really is easier than you’d think. If you plan ahead, pace yourself and listen more than you talk, you’ll strike a chord with existing customers and potential fans alike.

Right, but is it cost effective? I’ve no doubt that a company can forge close relationships with a few hundred people on Facebook or Twitter, if it makes enough of an effort to do so. But will those few hundred people actually be worth the effort? I’d like to see a lot more information on this, detailed studies, before I’d trust this approach.

In Symfony, one’s validators must match the form inputs

May 7th, 2009

I ran into this same problem, for which Symfony fails to offer a sensible error message:

It then occurred to me that the entire validator schema was being processed, not just the fields that are actually posted! This means that all the validators that are required=false will silently return a “clean” value, which is most likely the database default.

So what did this mean? Well, it meant that the validator was “cleaning” all the columns that had not been submitted with the form, including the version column, which was being set to null. When the versionable behaviour kicked in, it read this null value and incremented by 1 for the next version, which then became 1 - a version which of course already existed, causing the error.
The solution

The solution is blindingly simple, we don’t just declare the widget schema, we must also declare the validator schema. Whilst this seems like it makes sense, I feel that it is a shame that I have to essentially copy and paste the necessary validators from the base class.

Symfony and Subversion

May 7th, 2009

A while back I asked for advice about using Subversion to track a Symfony project. Scott Meves points to this informative article.

First, get in the game. Then figure it out.

May 5th, 2009

If one’s intelligent and thoughtful analysis of a situation has determined that there is an opportunity worth pursuing, then I think the best strategy is to start the pursuit and figure out things as one goes. Each problem domain has a thousand issues that are specific to it, and one has to become the expert of those thousand issues if one is to do well, but there is no way to become expert until one is focused on that domain and working with it everyday. I’m pleased to see 37 Signals says the same thing:

Why don’t we just call plans what they really are: guesses. Unless you’re a fortune teller, long-term business planning is a fantasy. There are just too many factors that are out of your hands: market conditions, competitors, customers, the economy, etc. Writing a plan makes you feel in control of things you can’t actually control.

In fact, you might as well change the name of your business plans to business guesses, your financial plans to financial guesses, and your strategic planning to strategic guesses. Do that and you’ll probably start putting a lot less weight into those things.

Ian MacMillan, Wharton professor of innovation and entrepreneurship, and Rita Gunther McGrath, a professor at Columbia Business School, believe “the only plan is to learn as you go.” They say 1) conventional approaches and planning don’t work when you’re trying to get into new spaces, 2) assumptions are what get most companies into trouble, and 3) it’s not failure that companies need to avoid, but rather “failing expensively.”