Thursday, January 17, 2008

Because Developers Are (Stupid) People Too


Look, I understand that developing applications is a long, difficult, sometimes even arduous task, but with the proper amount of planning you'd be surprised how easy it is to just make the goal happen. I've been developing Flash and PHP applications for about eight years now, and I've made my fair share of bungles and mistakes, but everytime they've made me a little wiser, and I try and talk to the people I program for to get an idea of the direction they want me to head in, and the features they need.

Programmers are people too, and as such, subject to doing things wrong from time to time. Despite that, we are sometimes held to an impossible standard. After all, we're only capable of providing what the language and computer system is capable of handling. Sure, I could program a modern multiplayer 3d shooter game in flash if you gave me the time and funding, but your processor couldn't possibly survive that. Flash is not designed to do such a thing, and while it can, it sure as hell shouldn't.

As an example of a failure to think ahead, take the Graffiti application in Facebook. It is a great application with two major flaws in my mind. First, there is no save button, although to their credit they say its in the works. The majority of people just make a bunch of squiggles, but there's a lot of us who will spend an hour and half drawing something very detailed because, well, we're artists and this is the stuff we like to do. It would be nice to have the ability to save our work and come back to it at a later date, or in the event that something happens, I won't lose my two hours of blending and shading.

Now what could happen that makes me lose my work? Flaw number two, the ads on the bottom of the screen constantly refresh, and if one of those ads takes more than 30 seconds to load (for those on a slow connection or a shoddy wireless connection), the operation will time out and the whole window will go to your default search page. Congratulations, two hours down the drain. Not that it wasn't to begin with, after all, you're drawing a graffiti, but when you put so much into it, it's like painting a portrait for someone that everyone can see. It is, dare I say, important to the artist.

I don't know the specifics of the architecture of the application, but my guess is that every brush stroke is ultimately saved in XML format to be recounted later. Since every brush stroke can be expressed as a mathematical function, being vectors, you just need to save that mathematical function along with the color and opacity information, and then play them back in order. When the picture is done, it'll just save a .jpg from the final bitmap created by the vectors.

Anyhow, all you need to do is save the XML information periodically, maybe every 5 minutes or so, along with a .jpg of current progress. Can't be all that difficult. It's actually really easy, considering it's essentially the same script as the final submission script.

Oh, and stop rotating the ads, no one looks at them anyway.

Thanks.

No comments: