Friday, March 13, 2009

Write Tools, not Frameworks

In the world of software, a reusable tool is almost always more useful than a framework. Of course, both have their time and place, but if you can structure your project as a tool, you probably should. 

So what's the different?
Tool (or Library) - Usually takes the form of an API that your application can call. Any application can make use of this library where and when they want to. If the end user wants more functionality out of the library they can either implement this on the side of their application or if it's general enough into the library itself. 

Framework - A set of shared code that is designed to be general enough for other code to extend. Frameworks can take the form of a set of an abstract classes that the user should override, or perhaps a set of rules about what the end user should do in his application.

A program plugs into a framework, but makes use of (or leverages) a tool. 

So why is a tool almost always more useful than a framework?
  • A tool can be used by ways unimagined by the original author. Since tools just provide an API, they can be used in almost any setting. The end user can use a tool in a java application, a web application, or a mobile application. A framework generally limits the end user to design a specific kind of application that the framework designer had in mind. A framework often doesn't have the infrastructure to enable the user to be more creative. 
  • A tool has less conceptual weight than a framework. In Josh Bloch's talk on designing a good API, he emphasizes the importance of minimizing conceptual weight. The idea here is that the end user doesn't want to have to spend a lot of time learning how to use something. A good tool should be intuitive, easy to understand, and do exactly what the user wants. A framework usually involves the end user having to learn a new way of doing things while a tool can just be plugged in to the end users' already built system.
  • A framework locks the user into using a certain codebase. If the codebase is buggy, the users entire program is buggy and he would need to find a new place to write his program. If a tool is buggy, the user can simply just not use it and use something else, but keep everything else he's already written. 
I think the most interesting point about this is that it's true on more than just a software level - it's also true on a kind of 'macro' level and is one of the main differences between Twitter and Facebook. Twitter acts as a tool - it offers an API that the end user can embed in any application he chooses. An application that makes use of Twitter can show up on the web, on the desktop, on phones, and I'm sure in many more interesting places in the future. Facebook, on the other hand, is a platform. All users who write a facebook application live in facebook's "walled garden". The applications are made to behave a certain way and must live in only one place. 

This is why Twitter is so much more powerful than facebook and will eventually win.

Saturday, March 7, 2009

What Palm Needs to Do to Win

The Palm Pre has been gaining a lot of hype, and rightly so. They're one of the original smartphone companies (remember when smartphone was synonymous with Palm Pilot?), and the previews of this phone has looked really sleek. They haven't released many details of the phone yet, but from the pictures it could be a real winner. The smartphone market is a difficult market to compete in right now, with stiff competition from iPhone, Android, and Blackberry. What can Palm do to win? I think these three things would guarantee a Palm in every person's hand.. ok that was a really bad pun.

1. It has to have an intuitive, non-buggy UI. This may seem pretty obvious, but for some reason companies haven't been able to actually produce a feature rich, non-buggy smartphone. The Blackberry Storm was a great example of a phone that looked good on paper but when it actually came out it was buggy and hard to use. I think Palm could realistically ditch a camera or even wifi if the phone had a nice and sleek browser, maps program, and contacts. Of course, the phone would have to be able to text and call well.

2. The phone needs to cost under $100. Smartphones are still seen today as something that people don't need. They're a luxury item for the rich and snobbish who like to have cute iPhone games in their pocket. I think if Palm prices this at $99 (which they never will, by the way), this would bring the smartphone into the mainstream. Yes, there exist smartphones at this price point on major carriers, but they suck (see #1). 

3. They need to make a deal with Verizon. This is killer, the #1 reason I hear people tell me for not getting an iPhone is "I'm locked into a family plan with Verizon". The next potential 'iPhone killer' NEEDS to be on Verizon. AT&T already has the iPhone, and Sprint/T-Mobile are just not big enough carriers to make a dent in the smartphone market. Palm is probably locked in with Sprint for at least a year or so, but they need to be first to get on Verizon.

If Palm makes a smartphone with an intuitive, non-buggy ui, prices it as under $100, and (eventually) makes a deal with Verizon, this phone will be the first smartphone that my friends who live outside of San Francisco actually use. 

Tuesday, January 20, 2009

Hulu Show Feeds

While I'm on the subject of RSS feeds, one neat feature about Hulu is that you can get RSS feeds for pretty much anything you want on the site. This is particularly useful if you want to follow a show. For example, if you want to know as soon as there is a new Daily Show episode, just browse to the "All Episodes" page for the Daily Show and click the feed icon. 

Obama Administration Official Blog

It's great to have a president that embraces technology. Check out the White House Blog or the White House Blog RSS Feed

Saturday, November 22, 2008

Great New Websites

Lately there have been some pretty cool Web 2.0 sites popping up around the interwebs. I'd like to take a moment to highlight some of the best that I've found recently.

Lala
Listen to any song in their extensive catalogue for free once, buy the 'web-only' version of the song for 10 cents, and buy an un-drm'd mp3 for usually less than 99 cents. The user interface is really nice, and loading the website in chrome is much faster than waiting and waiting for iTunes to load. You can even upload mp3s you already own to the website so you can listen to your library from anywhere. The 'follow friends' feature is pretty nifty too for discovering new music that your friends are listening to. There's only one downside - if you upload your music collection, you can't redownload them as mp3s, which means lala will not replace your existing music collection on your harddrive.

Hate your bank's website? I know I do. Bank of America has a terrible UI and you practically have to pass an exam to log in. I understand they're concerned about security, but answering 10 trivia questions about my account before logging in is ridiculous. Mint allows you to monitor your finances in an easy intuitive interface. Not only that, but you get some great meta-information about your account for free - how much you're spending on food per month, graphs of your spending from month to month, etc. They were really useful when they sent me an email saying, "Did you know Bank of America just charged you a 220 dollar service fee?" I did not know! Luckily, I sorted this out with the Bank and thanks to Mint I'll know if something like that happens again. 

Found out about this one from last week's episode of Diggnation. Basically, you win prizes for free on the internet - and for the first time, it's not actually a scam! They are ad-supported so you just go to the website, get raffle tickets for prizes, and then check back when the raffle ends to claim your prize. Additionally, some profits from each raffle are given to charity, which means not only do you win free stuff, you feel good while doing it. I'm definitely going to be spending a lot of time on this site.

Any cool new web applications that I'm missing? Leave a comment and let me know.

Sunday, October 19, 2008

Why iPhones aren't just for Snobs

For the past couple months I've been using an iPhone, and when people ask me what I think about it, I respond: "This phone has completely changed the way I use the Internet." Now that's a pretty bold statement, I know, but the following is why I think that in 5-10 years, everyone will have the Internet in their pocket and the world will be a different place.

A level of disconnect exists between the Internet on a desktop and its general usefulness. Think of the case of using Google Maps or MapQuest. The common use case is to type your destination into Google Maps, print directions, and bring these directions in your car so you can use them to know where you're going. With the Internet on a phone, the common use case is to type your destination into Google Maps, and then go.

So what's the real difference here? Having the Internet on your phone is having the Internet when you actually need it. You don't need directions when you're at home planning your trip, you need directions when you're in the car wondering how to get to a destination.

The analogy I like to draw here is the replacement of land line phones with cell phones. Cell Phones are so popular because the idea of calling a person rather than a place is so intuitive. In the same way, having directions at your finger tips when you're in the car is more intuitive than having directions at your home, and needing to print them out to have them in your car.

I think in the coming years, as more and more people have Internet enabled cellphones, the whole concept of what the Internet is and how people use it will radically change.

Monday, September 22, 2008

Qualitative States

This post is about qualitative states. Qualitative states are often (although not uniquely) expressed as "the X of Y" where X is a sense, (like smell, taste, or feel) and Y is something that exists out there in the world. Examples: The smell of a rose, The taste of wine, The feel of getting stung by a bee. Most people would avow that they are familiar with hundreds, thousands, or even millions of these states. "Yeah, of course I know what the smell of a rose is like." Upon deeper inspection though, I think that people are not really as familiar with these states as they lead themselves to believe.

Ask someone to describe the smell of a rose, they will probably give adjectives such as flowery, pleasant, or refreshing. These adjectives don't really seem to describe the scent itself, but are more just labels used to classify scents. Compare this to asking someone to describe something concrete, say, a table. hard, wooden, brown. These adjectives are not just labels, but are actually inherent qualities of the table itself.

Phrased another way, if you group all the things in the world that are hard, and pretend for a minute that they don't exist, there would still be a definition for hard. Hard can be defined independently of things that are hard.

Now take the word refreshing and group all the things in the world together that are refreshing and pretend for a minute that they don't exist. Would you be able to define refreshing without reference to something else that is refreshing? I think not. Try this thought experiment with other adjectives and you'll see that this pattern remains consistent.

So what's the point? Basically, my point is that we don't have the access to our own qualitative states like we think we do. We think we know what The smell of a rose is like but really all we can do is vaguely compare it to everything else we have smelled before. This leads to the intuition that qualitative states actually don't exist at all, but more on that later.