July 10, 2008

We’re Getting Close to Photo-realism in Games

Check out this screenshot from Crysis Warhead, and this one, too. Now if only the colors could be a little less brown and gritty, and maybe go a little less on the bloom.

July 8, 2008

The State of the Web Illustration – Summer 2008

I liked this illustration of 2008 Internet and tech trends by Matt Inman. He did one back in 2007, too. It’s not particularly comprehensive, I just think he’s a good illustrator. His portfolio is creative and vibrant. Now that I’m working on my own web projects, I’m starting to appreciate good, original design work.

July 1, 2008

Mobile Web Panelist Discussion

Just yesterday I attended a panelist discussion about mobile web browsing organized by Mobile Monday Boston. I did a write-up of the event here.

This is a good opportunity to plug my new blog, Boston Startups (where the write-up exists).  The purpose of this new blog is to more properly separate my coverage of Boston area startups from my personal blog, as well as to provide a voice for the Boston startup community. I welcome guest posts and coverage of events.

Regarding the event, I enjoyed it. Turn out was somewhere between 50 and 100 people. At an after party, I learned about some companies relevant to one of my current projects: Admob and Quattro Wireless. Both deal in mobile advertising, and Quattro is local to Waltham, MA.

June 11, 2008

Location Tracking and Heat Maps

citysense-smallCitysense by Sense Networks launched two days ago. Since the cat’s pretty much out of the bag, I might as well talk about this. Quote:

What if you could look at your cell phone and see a heat map of where everybody in the city was at that very moment? The more people at any given location, the redder it would appear on the map. That’s what Citysense does. It is a mobile application that is supposed to help you figure out where the hottest clubs and night spots are so you can go there (or avoid them, depending on your preference).

The reason why I find this so curious (and why this post has any mention of cats escaping bags) is that this is an idea Henry and I were strongly considering about two months ago. We wanted to use heat maps of cell phone activity to plot the hottest places. Since it would be done in near real-time, the theory was that it could help people find popular nightlife or help businesses find ideal retail locations.

We were so intrigued by the idea that we used it on our application for Y-Combinator’s summer round of funding. I even spent two weeks making a heat map demo that could render thousands of data points.

What happened? Y-Combinator didn’t invite us for an interview. We got a form letter back saying the equivalent of “better luck next time.” It was no surprise; they got enough applications to bring down their server right before the deadline. Our application probably just got lost in the shuffle.

After the Y-Combinator application was over and we got our response, we promptly dropped the concept. There were some problems with the idea (which I’ll get into), and we had other, related ideas to investigate. It’s funny how when you run your own company and can do anything, a lot of ideas come and go.

Now it’s two months later, and Sense Networks, maker of Citysense, is rolling out location tracking analytics and heat maps in a big way. They have an impressive set of executives, too. Of interest to me are the two guys with ties to the MIT Media Lab, Alex Pentland and Tony Jebara. I’ve seen some of their work before. Check out Pentland’s Reality Mining.

In a way, this launch confirms that we were on to something, and it makes me wonder why we dropped the idea. However, the idea did have some drawbacks which we realized at the time.

The largest problem was data. How do you get enough data to actually have realistic and useful statistics? You could start from the ground up with each individual cell phone user, asking them to install an application that tracks them. From the user’s perspective, there are two main problems with this method:

  1. Any rational person will have huge concerns about the privacy implications of installing the tracking application on their cell phone.
  2. The user needs to perceive some benefit from the application, otherwise they won’t want it.

An application like Citysense is a great way to overcome these two problems. It aggregates anonymous data, and it’s branded as a fun way to find active nightlife. This was the same solution we came up with to solve the need for data.

That said, I’ve ignored the elephant in the room. No one will want to use the nightlife application if no one else is using it. For the first few users, there will be nothing to look at. You need thousands of people for the data to be any good.

How does one overcome this? Well there are other sources of data. You could go to cell phone companies and ask for access to their data. That would surely get you lots of information, but I’m sure the cost would be astronomical. Plus, cell phone companies aren’t know for being open with their data.

That’s where Sense Networks has an edge. They have prominent executives, namely guys like Pentland, who have long standing research relationships with major cellular companies. For us, location tracking and heat maps was an idea we had two months ago. For Pentland, it’s been a core focus of his research for years, and this is at MIT, a place known for having great connections.

Taking all of this into account, we are still interested in this area, and the launch of Sense Networks won’t stop us. There are massive opportunities waiting in mobile devices, and we are just beginning to see them bloom.

Aggregating, analyzing, and acting on the behavioral data that mobile devices generate will be one particularly hot area. It will enable contextual applications, and it will change the game similarly to how Google changed online advertising with contextual ads. I won’t say exactly what we’re doing yet, but we have a pipeline of products lined up to get involved in this particular opportunity.

June 6, 2008

More on Maglev

After a little more searching around, I found some good pieces which bring back to reality the performance claims of Maglev and potential problems with object oriented databases. Let’s not forget that Maglev isn’t even out yet, and we have no idea if it’ll be what it claims to be. In the mean time, there are other well known Ruby intrepreters and VMs, such as Ruby MRI, JRuby and YARV.

Check out these in depth looks at Maglev:

This is by Charles Nutter, contributor to a popular Ruby intrepreter written in Java called JRuby. In it, he calls Maglev vaporware, thus Gemstone’s Maglev performance claims don’t mean much at this point. The key to his point is that we have no idea if Maglev is fully Ruby compliant, and to prove his point, he shows us actual numbers for performance gains that can be achieved in JRuby by removing some compliance features.

Sho Fukamachi questions the Maglev performance claims and the usefulness of OODBs.

My Thoughts

My point in the last post was that mapping from OO languages to relational DBs can get ugly. Naturally then, I’m curious about other ways of looking at the problem, but other solutions could have problems, too.

Design patterns such as Ruby’s ActiveRecord have popped up to abstract relational systems to an OO style. However, abstracting relational DBs to an OO model can often result in more DB queries, and it’s easy for inexperienced programmers to write bad, query heavy code. They just see everything as objects, and they don’t understand the consequences of their manipulations.

For this reason, it’s no mystery to me why people often complain about Ruby’s scalability. It isn’t necessarily Ruby that’s the problem. It might be the programmers. Perhaps an OODB is the solution since it would remove the need to map and reduce the aforementioned consequences, but I really don’t know.

May 31, 2008

On Database Abstraction, PHP, and Ruby

It took me a couple days on my current PHP/MySQL project to get the DB abstraction with proper error handling, input validation, and relational support coded to the point where I’m happy with the model. This was after trying Zend_Db, Doctrine, and Propel, which are all good libraries, but I hit points where the work of getting it to do what I wanted efficiently just wasn’t worth it. I decided it would be faster to just roll my own slim library.

I’m always mystified at why DB models are such a hassle to code, so I spent a little time reading. I think I get it now. It has to do with the mapping problem between relational systems and object oriented systems.

Ted Neward, writer of several books on C# and Java, calls this “The Vietnam of Computer Science“. What he’s saying is that object-relational mapping (ORM) quickly reaches a point of diminishing returns. The problem stems from the conceptual disconnect between the language and the data store.

Hoping to shed additional light on the subject, I went looking for alternative perspectives to my PHP/MySQL solution. Since it’s all the rage for ease of use, I was mostly curious about Ruby, the Rails framework, and object oriented databases.

Ruby is certainly different, but after some reading, I’m starting to understand why the language lends itself better to the OO style of DB abstraction. On top of that, Rails has powerful scaffolding that lets you flesh out pieces very fast without the code getting ugly. With ActiveRecord in mind from the ground up, things can be pretty elegant some times.

I also found some really cool systems for bridging the gap between languages and data stores. For instance, check out MagLev for Smalltalk/Ruby. Imagine using an OO DB so you don’t have to do the relational mapping, doing it in a distributed fashion, and using things like shared memory more efficiently as an object staging area between your running site scripts and the DB. That’s kind of MagLev.

All of this is interesting, but for the current project I’m sticking with PHP. However, on the next project I might try Ruby on Rails. I want to see first hand if and how it overcomes some of the challenges.

On a slightly tangential subject, a part of me really dislikes the weak typing of both Ruby and PHP. The net effect in PHP is that you pretty much end up using arrays for everything, making it hard to keep track of structure. Ruby on Rails does get around some of the weak typing issues with some better built-in validation, scaffolding, and member attributes (I’m not sure if that’s what they call them). Sometimes I’d rather be doing C#.

May 20, 2008

Barcamp Boston 3 Recap

Barcamp Boston 3 Cafeteria

I spent this last weekend attending Barcamp Boston 3, a two day grassroots technology event on Saturday and Sunday, as well as the Barcamp pre-event party at Betahouse. I put some pictures from Barcamp up on Flickr, and here are pictures from everyone.

Barcamp is best described by the following snippet on their web site:

BarCamp is an unConference, organized on the fly by attendees, for attendees.

There is no registration fee, but you don’t just attend a BarCamp — you can participate in discussions, demo your projects, or join into another cooperative event.

Topics may include, but are not limited to: open source software, startups, UI design, entrepreneurship, AJAX, hardware hacking, robotics, mobile computing, bioinformatics, RSS, Social Software, programming languages, and the future of technology.

Barcamp Boston is just one instance of Barcamp – there are other Barcamps all over the world. You can find them on the main Barcamp web site.

(For those of you who aren’t programmers, “Bar” in Barcamp doesn’t refer to a place where alcoholic beverages are served. It comes from Foobar, a common placeholder name in programming.)

For a list of sessions, I took pictures of the Saturday and Sunday session boards from both days. Flickr displays them out of order, so I marked them with numbers.

Barcamp Boston 3 - Google App Engine PresentationSessions I attended:

  • Saturday
    • Visualization at an Internet Scale by Matt McKeon from IBM’s Many Eyes project
    • Distributed Twitter by Joe Cascio
    • Git as a subversion replacement by Josh Nichols
    • Google App Engine by Shimon Rura and Brian Olson (shown in picture)
    • iPhone Development by Dan Grover
    • Viral Marketing by Matt Peters from Pandemic Labs
    • Open Source Backup and Recovery Discussion led by Joe Slag
  • Sunday
    • Code Secrets
    • Build your own wireless router
    • Ubuntu Discussion
    • PHP Development Discussion led by me

Here are some links to products and web sites I learned about:

  • Career Numbers – career analytics currently in stealth mode
  • Wonder Warp – iPhone and Mac applications from Dan Grover. He did a talk on iPhone development.
  • Draconis Software – web application development
  • Diet.com – nutrition information with access to info over SMS
  • My Punchbowl – party planning and invitations, fairly well known and funded. He hosted a discussion on hiring people in tech.
  • Gigafloat – social messaging, link sharing, etc.
  • Babbledog – social bookmarking and news.
  • Many Eyes – data visualization research from IBM

This is just a small sample. The Barcamp Boston 3 wiki has a much more comprehensive list of attendees with links to their sites.

I enjoyed the event, met a lot of great people, and received many clever suggestions for my company.

Some events on the horizon include:

May 8, 2008

Paradigm Shift in Web Development to MVC

A few days ago, I started development on the web site portion of one of my new projects. The project is comprised of mobile applications working in tandem with a main web site to deliver a service. However, this post isn’t about the specifics of that project. It’s about a paradigm shift in web development that I have noticed upon returning to the space.

I started development as I always have: prototyping a MySQL database and then constructing PHP pages to flesh out an experience. There would be one PHP script per user facing page, and each would be rife with HTML, include statements, session checks, database queries, display logic, and so on. A library directory would contain includes with common procedures.

Then it hit me: this is exactly how I would have done it five years ago. Web development has changed in that time, and surely I am wiser now. How can I do this better?

The approach I just described is what I refer to as the traditional PHP approach. There may be more official terms, but that’s what I think of it as. Data, presentation, and procedural logic are all intertwined. You write a set of library procedures for manipulating data, all following the create, read, update, delete (CRUD) model, and then call these procedures within PHP/HTML pages for each user facing page.

You usually end up with files like this:

<?php
    require_once('config.inc.php');
?>
<html>
<head>
<title>Search</title>
</head>
<body>

<form action="" method="post" name="searchform">
Search <input name="search" type="text"/><br/>
<input name="search_submit" type="submit" value="Search"/>
</form>

<?php

if (isset($_POST['search']))
{
    require_once(LIB_DIR . '/Db.inc.php');
    require_once(LIB_DIR . '/Search.inc.php');

    $db  = DbSingleton(MY_DB_STRING);
    $res = Search($_POST['search'], $db, 'table');
    while (($row = $res->fetchRow()))
    {
        PrintRow($row);
    }
}

?>

</body>
</html>

This is a simple abstraction for a search page using the traditional approach. An included config file defines the location of the library and a database connection string. There is some HTML for the form and a PHP block for querying the database and displaying results.

As you can see, logic, data, and presentation are all in one file. Think about this for a moment, and you’ll realize that this approach is going to get real ugly, real fast. Without clean separation, it becomes harder to isolate tasks such as web design from tasks such as business logic and data manipulation.

Addressing this problem is the whole point of hot, new frameworks like Ruby on Rails. Rails separates data, presentation, and logic, and it achieves this through the use of the Model-View-Controller (MVC) paradigm.

MVC is a design pattern for structuring applications. How you interpret that pattern is up to you, but in general, the pieces are:

  • Models are objects that abstract away your data.
  • Views are objects that handle the presentation layer.
  • Controllers bridge the gap between models and views with logic based on user input.

In other words, the controller interprets a request, instantiates the appropriate models and gets the data, then it packages the data up and hands it to the requested view for presentation.

MVC makes sense as a good paradigm for developing a web site, and Ruby on Rails is the predominant example. However, that doesn’t mean one should drop their favorite language in favor of Ruby on Rails. I like PHP, and PHP can do the MVC pattern just fine. To that regard, I found 7 reasons I switched back to PHP after 2 years on Rails by Derek Sivers to be enlightening. Here is a quote:

I spent two years trying to make Rails do something it wasn’t meant to do, then realized my old abandoned language (PHP, in my case) would do just fine if approached with my new Rails-gained wisdom.

The “Rails-gained wisdom” – the MVC paradigm that I’m talking about – is really what’s important, not the language you do it in. As Derek found out, Rails still has some drawbacks despite all the buzz. You might be better off applying the “Rails-gained wisdom” to a language you are more comfortable with.

If you are a PHP person like me, you don’t have to roll your own framework. The PHP community has joined the MVC bandwagon with projects like Zend Framework, Symfony, and CakePHP.

I recommend trying Rails or one of the PHP frameworks before trying to write your own. People interpret the MVC pattern differently. Trying other frameworks will help you discover which interpretation style works best for you.

I like the Zend Framework the best, and this article pretty much explains my reasons. Plus, it’s sponsored by Zend Technologies, the creators of PHP. Some resources I’ve found helpful are:

This is the extent of my discoveries so far. I hope this post helps someone else thinking of starting a web project. I’ll be using the Zend Framework in my new project, and we’ll see how it goes.

April 23, 2008

This is why DRM is bad

I normally wouldn’t mention tech news (if you want to know what I’m reading, just look at my Google Reader feed), but I hate DRM enough to bring this up:

DRM sucks redux: Microsoft to nuke MSN Music DRM keys.

Customers who have purchased music from Microsoft’s now-defunct MSN Music store are now facing a decision they never anticipated making: commit to which computers (and OS) they want to authorize forever, or give up access to the music they paid for. Why? Because Microsoft has decided that it’s done supporting the service and will be turning off the MSN Music license servers by the end of this summer.

This is precisely why you shouldn’t be using DRM based services such as iTunes. If and when they go defunct, your whole music collection (that you paid good money for) is toast.

If you’re lucky, they’ll do what Microsoft is doing, and they’ll let you create a permanent license for the music. Even then, you are kind of screwed, because the license will probably be tied to a specific OS and computer, and we all know that no one keeps the same computer indefinitely. You’ll one day reach a point where the only thing that’ll play your music is the dusty junk in the basement that you stopped upgrading years ago.

Instead, buy DRM-free music from Amazon and never worry about it again.

April 11, 2008

TED Talk – Johnny Lee: Wii Remote hacks

Here’s a short video of some of the coolest Wii Remote hacks I’ve seen to date: