Why Frameworks Naturally Occur, and Why It’s Risky to Adopt One

November 5th, 2008

These days, i’m generally a packaged framework-for-the-web curmudgeon. I prefer simple libraries corresponding to simple, common, generic problem sets. It’s one thing to adopt a general-purpose scripting language, or even a general-purpose “hard” programming language, but it’s another thing entirely to download or buy a prepackaged framework on the basis of marketing material or buzz about the shiny new ur-framework for all development. My opinion was arrived at mostly through personal experience, and undoubtedly people will have different opinions based on their own experiences working with such software.

My hypothesis is that frameworks tend to occur naturally out of the needs of specific applications of technology. If you’re using a programming language to build a listing-based website, and you’re building things from scratch, patterns will evolve in your code. If you’re being rigorous about refactoring, you’ll be acutely aware of patterns that may be abstracted away, and it will be very natural to reduce them in some form or another. Eventually, if you add more developers, the lead developer will probably generalize an approach to building features that looks awfully like a framework. It could be lightweight, generator based, MVC based, queue based, or whatever — but this evolved framework, at its essence, is a reduction of noticed patterns about listing data systems to practice. However, why not avoid repeating all this work, and instead skip it by picking up a third party off-the-shelf framework and starting with that off the bat?

A heavily evolved framework is a codification of patterns that work for a specific problem set. This is fundamentally what newcomers to programming languages do not understand when they go reading neato tutorials for the framework du jour. It is also what many framework zealots (and sometimes, evangelists) do not understand when they are aggressively hunting down misguided naysayers who misapply frameworks and complain about it in public.

The risk of having programmers begin their work on top of established frameworks is that they typically do not have the experience necessary to understand what patterns have been adopted, why they have been adopted, and how those patterns would apply to their task at hand. The only people who understand this are usually the most experienced developers of the framework.

Unfortunately, the type of developer most attracted to the marketing claims of frameworks are inexperienced ones. And even more unfortunately, most frameworks’ greatest advocates are experienced developers of the frameworks, whose subtle and nuanced defenses about the proper use of their framework go completely over the heads of most beginners, who only stare googly-eyed at fancy baked demos.

This leads to large, bizarre codebases built on hacks, on top of hacks, on top of frameworks. It also leads to completely unrealistic expectations from businesspeople about the sustainability of development pace for fast, new, framework-based prototypes. It’s par for the course for our industry, and it’ll probably continue for a very long time as the trade of programming grows up in the new century.

Is there a reasonable argument that some “general-purpose” frameworks are good enough for nearly all “straightforward” web applications? Maybe — but this is a tricky subject. Many web applications share the same fundamental characteristics. If you have a general-purpose framework, it may work especially well with the characteristics of web applications. The thing that most web applications have in common is that most of them are dropped far before they get to a very serious type of problem that i’m referring to. So, in the sense that I don’t believe most web applications will get very far, it’s probably fine to use a framework for experimentation or prototyping. But one should be prepared to do the real work at some point, if the project is to be taken seriously.

There is also the annoying fact that when frameworks are popular, they tend to be a big hindrance to prototypes that never got rewritten. The point at which the misapplication of technology becomes a problem too often coincides with surges in popularity of a service. This leaves you open to competition and puts you in a very difficult place, especially if you’ve worked hard to open up a new market.

My advice for anyone starting to get a bad feeling about frameworks: work on real world projects, and start from scratch at least once. Real world projects jolt you out of the 5-minute screencast armchair Internet expert mentality. They have messy requirements, will suddenly strike you with landscape-changing revelations about how you’ve been going about things wrong, and will challenge you to grow more than you thought you ever could. Invest in your frustration up front, and the reward? When you’ve built a mature project, maybe you can generalize it and turn it into a framework… ;P

Tech

Yes We Can

November 5th, 2008

I’m so proud of my country tonight. Barack Obama has become the next President-Elect in an historic Presidential race that saw the best and the worst emerge from everyday Americans. His acceptance speech was moving; not only did he emphasize the importance of individuals to his campaign, he also brought up the topic of humility and addressing the country’s problems together. We can indeed find common ground to work on the most threatening problems to our country.

I’ve had a lot of difficulty even listening to the Republican point of view over the past eight years. I don’t doubt that the neoconservatives in the Bush Administration used and abused the differences of opinions between people in America to drive a wedge between us all – public, house, senate, and media. However, Obama’s campaign has gone beyond just earning my vote; it has also made me reconsider my emotionally charged reactions towards GOP talking points.

The first was Joe Biden’s anecdote about motives during the Vice Presidential debate:

I have been able to work across the aisle on some of the most controversial issues and change my party’s mind, as well as Republicans’, because I learned a lesson from Mike Mansfield. Mike Mansfield, a former leader of the Senate, said to me one day — he — I made a criticism of Jesse Helms. He said, “What would you do if I told you Jesse Helms and Dot Helms had adopted a child who had braces and was in real need?” I said, “I’d feel like a jerk.” He said, “Joe, understand one thing. Everyone’s sent here for a reason, because there’s something in them that their folks like. Don’t question their motive.”

Joe’s point is that although we may oppose other peoples’ political views, we should not succumb to prejudice about their character. Barack Obama’s campaign has shown that you can address the American public with maturity, dignity, and calm assertiveness, and still win the highest office in the nation. We can’t mistrust an entire segment of Americans simply for identifying with some policy views of the Republican party.

We can and should argue strongly with logic and passion when we disagree, but we cannot forget that our opponents are Americans too. I believe that both Obama’s acceptance speech and McCain’s concession speech strummed on this chord, and I sincerely hope that the political bases of both parties can be mature enough to rise to a more respectful level of discourse, and heal the wounds of divisiveness that have proven so profitable for the special interests in this country. Now let’s see what we can accomplish in the next four years.

Tech

On the “Real America”

October 21st, 2008

As much as i’ve hated hearing GOP commentators and Sarah Palin herself talk about the “Real America” that supports McCain/Palin, I don’t personally feel that it’s an expression of racism. Rather, this is a sign of denial on the part of party leaders that they have lost the support of the majority of the American people.

This rationalization for losing is actually a pretty common thing to experience growing up in middle America. Lost the grade-school soccer game to a team that fouled yours a few times? Don’t worry, you were the “real winners.” The characterization of losses as non-”real” is a defensive compensatory mechanism. Subscribing to one party in our political system is often shown to limit your ability to think critically about your own stances.

So, although I think it’s despicable to actually believe that anyone who doesn’t support your own political party is un-(or anti-)American, I don’t honestly think that’s what’s going through the minds of the people giving this explanation for the lack of support for McCain/Palin. It’s just a obvious sign that the faithful holdouts are in denial about the unsustainability of the methods and practices of the modern Republican party.

Tech

Are you the favorite person of anybody?

October 8th, 2008

I stumbled upon this short while researching John C. Reilly, and absolutely loved it.

Tech

A Crisis in Trust

October 7th, 2008

I apologize in advance for the following post, because, firstly, I am an apologist by nature, and secondly, it is a bit less well thought out than most posts, but the topic compels me to write about anyway.

I have a theory that what underlies and led up to the current credit crisis is really a crisis in trust. Trust is the fundamental thing that allows us to enter a transaction with another person (or with a corporation), and if we do not trust our counterparties, then there is no way that capitalism may work. What the financial industry has done in the name of innovation over the past couple decades is to bet far more than they should have on the premise that trust is unnecessary; basically, if you don’t trust someone, you just charge more interest, and extract more of a profit from a larger segment of people to make up for those who default. As long as we were in a boom economy, the relative numbers of parties that would be in default were low, and real, honest-to-goodness counterparty integrity and trust (like getting a loan from a banker you knew in high school) was quietly replaced by complex financial modeling.

What has occurred in the lending market (probably best described by This American Life recently) may the effect of the sudden failure of decades of financial modeling to compensate for the gradual deterioration of real trust between individuals on Wall St. Trust was just a limitation on the levels of profit that could be gained through financial innovation; the real geniuses found out that you could give a loan to basically anyone as long as you could include their probability of default as a number in your financial calculation. The lack of information or faith about the balance sheets of counterparties seemed to become a problem so suddenly because the innovations obfuscated the real cost of the debts that were being incurred (think option ARMs or balloon payments), until finally it all came due and nobody could be counted on to fulfill the terms of the mortgages (or, for that matter, credit default swaps) that they had agreed to. The boom market can not be described as the result of complete trust in all counterparties; it was the hubris of believing that trust could be outsourced to third parties (the ratings agencies), and as such, not being particularly important, instead of being an absolutely essential component of deciding to do business with someone else.

It seems like I’m being a bit hysterical about the importance of integrity and trust in a free market system where capitalists are incentivized only to maximize short term profit, long term implications be damned. To trust recent corporate philosophy, preserving your real trustworthiness is a matter best left to those in branding or P.R., and that your actual actions can be painted over or hidden by name changes or evasive legal maneuvering. However, the culture of a company or even the reputation of a business leader with integrity can visibly affect the way that all people interact with your company. To make my point, i’ll invoke the image of Warren Buffett, whose every word the American public seems to look to as if messages from a mystic oracle.

It may be true the reason the credit market seized up is solely because of the sudden extreme value of cash on hand to protect against strategic competitive moves, such as that alleged by some against J.P. Morgan. It also may be true that trust has no place in a free market; that all decisions should be based upon rational evaluation of the creditor’s ability to pay. However, in this type of an economic storm, I am going to make a prediction that the value of integrity and ability to honor promises, regardless of the cost, is going to be a determining factor in which businesses are able to survive and make it through the recession/depression. Those who are able to cultivate a supernatural track record and reputation for trustworthiness and integrity will survive where the sharp business of the past will fail without trusting counterparties. In fact, I believe it will likely be a successful tactic for small businesses to overtake their failing large competitors caught up in this mess over the next decade. Although I sincerely hope that the country recovers from this crisis quickly, it could very well prove to be a good time to be in business and change the way that business is done in America.

Tech

Is the credit crisis a race to the bottom?

September 30th, 2008

It seems like we’re hearing about failed banks and institutions on a daily basis now. Hitting that point of no return, insolvency, seems to do the trick. At the same time, bank-to-bank lending rates (Libor rates) have been spiking, and that means that banks are relucant to give out cash. This is despite the massive injections of liquidity that the Treasury has been making.

To this casual observer, it would seem that the game is to hoard as much cash as you can, to try and survive longer than your competitors, and also buy out as many competitors as you can on the way down. Also, try to predict the end of the game so you can time your acquisitions well, and also know how much cash to hoard. If that’s the case, then injecting liquidity is just giving the players more time on the clock, it’s not restoring confidence or any such rubbish.

And if the game doesn’t end, and all banks are ultimately insolvent regardless of however much time they get on the clock? I think that’s what the bailout plan is trying to avoid; by providing an end to the game, they hope to stop the cash hoarding and return to normalcy. However, I haven’t heard any indications that the $700 billion is any more than a guess. It’s scary to think that the network of complex financial securities (“innovations”, as they like to call them) may ultimately be more in the value of trillions than billions. There may be no way to bail out these banks at all.

If so, is it worth it to even try? My guess is that it’s worth it to try, but if so, it’s important to either go the Buffett strategy of getting a real market price (instead of a make-believe hold-to-maturity price), or to go the Swedish route that involves buying the companies directly. Even a solution that attempts to stem the tide of foreclosures is woefully inadequate to deal with the majority of Americans in financial distress for whom a mortgage is only one aspect of their difficulties. There’s also massive amounts of credit card debt, car loans, etc. that won’t disappear through renegotiations of monthly house payments.

Sorry for the doom & gloom, but I’m hoping someone can step in and tell me why i’m wrong, because this is the best understanding I can come up with so far.

Tech

The History of Buildings

September 19th, 2008

I found out something really interesting (to me, anyway) today. It’s something that I took for granted – public records at city hall. I knew intellectually that I could go there and ask for information, but had never done so.

Large packets of information, folded neatly, going back to the decade of construction hold some sort of voyeuristic appeal. You can easily look through the history of a building, finding out that it’s been a toy store, a department store, and so forth. Knowing what’s been in the floors and corners lends an air of reality, an air of tangible history, instead of the anonymous and soulless relationship that i’ve had with most buildings.

I know that it puts me in the minority, but I had a lot of fun looking through old public records. I wonder what sort of emotional impact it might have to have these old records scanned and put online for public use. I know that I wasn’t asked for an ID, my name, or even my purpose when I went there, so I imagine that these are freely available for people to see. I can imagine the difficulty, but what if there were a time slider in Google street view?

Tech

A Couple Observations About Financial Politics

September 17th, 2008

First off, the $85 million (ed: billion) AIG bailout scares me, not because of future bailouts that it most definitely encourages, but instead because it still seems like it’s not enough to cover the sheer volume of credit default swaps that it has outstanding. I don’t get the feeling that $85 million billion is enough to cover the trillions of dollars outstanding in the whole international ponzi scheme that AIG has foolishly insured.

The second thing is that the whole “Change” message being put out by the McCain GOP campaign reminds me of the unintentionally funny Match.com “6 Months Free” campaign that’s all over TV commercials right now. The gist of the promotion is that if you use Match.com for 6 months and totally strike out… they’ll give you another 6 months for free. Hey, if you pay for our service and it doesn’t work for you for half a year, waste another half a year of your precious time, on us! It reminds me of the GOP message of “Change” on the economy. If the last 8 years haven’t worked for you, we’ll be happy to serve you with the same administration for the next 8 years!

Tech

Go Read Warren Buffett’s Letters to Shareholders.

September 15th, 2008

In the handful of news articles I read today, I nearly passed over a link to one of Warren Buffett’s Berkshire Hathaway shareholder letters from 2002, the one where his predictions for the derivatives market seem eerily close to the unfolding of current events on Wall Street. Reading his conversational, informational letter is like finding an oasis in the desert. I’ve read other shareholder letters, and most of them feel as if they were written by drones who have no interest in providing anything but cheery opacity.

I was very pleased to find that Berkshire Hathaway publishes all of Warren Buffett’s Letters to Shareholders on their website. Please dig in and enjoy.

Tech

Counterinsurgency-Style Community Management

August 27th, 2008

Grant McCracken linked to Twenty-Eight Articles: Fundamentals of Company-Level Counterinsurgency by Dr. David Kilcullen, Lieutenant Colonel, Australian Army, discussing it in the context of applied ethnography. If you are able to abstract away the most obvious differences between insurgencies and online communities, there is a lot of wisdom in this document directly applicable to the role of community managers.

In a modern online community, while no sane P.R. person would acknowledge that their employees view some segments of a user base as enemies, that attitude does exist, despite the measured tone of external communication. There are direct competitors kept at arm’s length, griefers, trolls, spammers, and many other types of people who (whether consciously or not) act to undermine the stability or quality of an online population. It is a significant portion of the job of a community manager to deal with their everyday activities without causing harm to the community through their own actions. And in many cases, the goal of certain harmful subgroups is to provoke the community’s operators into harsh action which they can then convert into media coverage for their own viewpoints.

If you’re involved creating online communities, i’d highly recommend you go read this article, ignoring temporarily the real differences between our work and the operation of a counterinsurgency. If you can work with the analogy, much of this hard-earned knowledge can be applied in similar ways. For example:

12. Prepare for handover from Day One.
Believe it or not, you will not resolve the insurgency on your watch. Your tour will end, and your successors will need your corporate knowledge. Start handover folders, in every platoon and specialist squad, from day one— ideally, you would have inherited these from your predecessors, but if not you must start them. The folders should include lessons learned, details about the population, village and patrol reports, updated maps, photographs—anything that will help newcomers master the environment. [...] This is boring, tedious and essential.

Staff at online communities come and go, but rarely do I see the operational knowledge of community managers codified into forms that can be quickly picked up by new hires. Often, new community managers are thrust into a situation beyond their comprehension by an engineering staff who has become too busy to deal with user base issues. It’s a great concept to develop handover folders for future community managers, or even engineers switching over to deal with a problem while the main community folks might be away. In some websites set up for community success, there exist mountains of contextual information connected to users, data, and media, visible only to the employees, which perform this function of informing people about the context behind a situation while they consider solutions. An emphasis on problematic user groups, topics, and geographical regions would be a useful component of such documentation.

18. Remember the global audience.
One of the biggest differences between the counterinsurgencies our fathers fought and those we face today is the omnipresence of globalized media. [...] When the insurgents ambush your patrols or set off a car bomb, they do so not to destroy one more track, but because they want graphic images of a burning vehicle and dead bodies for the evening news. Beware the “scripted enemy”, who plays to a global audience and seeks to defeat you in the court of global public opinion.

This is a fantastic insight into the operations of hostile parties on large, established communities. In some cases, direct competitors provoke a company into hostile action, which they use to get attention for their own startups by claiming injustice. In other cases, it’s an attention- or pageview-seeking bloggers causing problems then writing digg-bait about being banned from your service. With the speed of global blogging, it’s essential to remember that all correspondence and actions taken during a ban may be posted online, resulting in your trial in the “court of global public opinion.” Bans in this case, are commonly not finished when the moderator clicks a button.

I could go on, but i’ll let the article speak for itself. Some of my favorite pieces are the discussions of understanding a population locally and deeply, and gaining its respect, if not its love. I love finding cross-disciplinary overlaps, and this is one of the best examples i’ve seen in a while.

Tech