Web

Google Maps now includes NY Public Transit info

September 23rd, 2008

Walking through Grand Central this morning I was surprised to see a bunch of enormous, larger-than-life sculptures that looked like little Google Maps pins. Then I noticed a massive wall-sized poster for Google Maps.  Even at that early hour, then, I figured something was up with Google Maps!

Well it turns out I was right.  Google Maps now includes New York area public transit options in its directions.  The NYTimes has the details.

Here’s an example of directions from Lab49’s offices to UBS in Stamford, CT (link) :

Directions from Lab49 to UBS

I chose this route because it includes multiple modes of transport - walking, the NYC subway system, and the Metro-North train.  Google did all that automagically, all I did was enter in the two addresses and click for directions.  Try it yourself!

PureMVC

August 13th, 2008

Cross-language implementation of the MVC meta-pattern - PureMVC. Supported languages:

  • ActionScript 2
  • ActionScript 3
  • C#
  • ColdFusion
  • haXe
  • Java
  • Perl
  • PHP
  • Python
  • Ruby

Microsoft linking Silverlight, Ruby on Rails

June 3rd, 2008

From here:

Microsoft Corp. plans to demonstrate integration Friday between its new Silverlight browser plug-in technology for rich Internet applications and the Ruby on Rails Web framework.

Google IO 2008 Day Two

May 29th, 2008 / Listen to Me!!!
HTML 5 - Gears

From a vendor's perspective: You don't win users by being super standards compliant. At best, you don't lose users. Gears targets developers, not users. So, Gears considers standards to be a profit center rather than a cost center. Gears is a playground for new web APIs. One such example is SQL in Gears, which once proven successful in Gears, was included in HTML5.

Dalvik VM Internals:
Dalvik is designed to run on a slow CPU, with relatively low RAM, and on an OS without swap space while powered by a battery. The system library takes around 10MB. Thats a fairly large library at the application developer's disposal. Memory is saved via minimal repetition, per-type pools, and implicit labeling. Zygote is a pre-initialized process + pre-warmed Dalvik VM. This ensures responsiveness. When requested, it forks and returns the new process. The advantage is that the application shares the API classes in memory so that the memory foot print is less. Android manages multiple processes which have separate heaps, and separate GCs. When an application is installed, it is verified so that it does not violate the constriants of the system. The application is also optimized( static linking, inlining some native methods etc) so that when the application is run, it runs faster. Oh btw: the Dalvik is not a stack based machine but it is a register based machine. Theoretically, it is defined to be an infinite register machine. This results in fewer instructions to perform operations.

Inside the Android Application Framework:

Lifecycle:
Android provides a lot of hooks for application developers to plug-in custom code during the lifecycle. In my APIs, I try to give my developers a powerful yet simple looking APIs. Granted it is a tricky decision to make, but it is all about drawing a line and finalizing on the API. The Android lifecycle hooks are pretty complex and remind you of EJB lifecycle. Hopefully, a lot of developers will not get confused with differences between methods like onCreate(), onStart() and onStop(), onDestroy()

Threads:
Each process has a thread. Each thread has a Looper which handles a message queue. Any events are posted to this message queue. And, are processed by the thread through the Looper. Loopers cannot accommodate multi-threaded access. Loopers support a message handler to handle multi-threaded access. Looper also handles calling local service calls. Local services are ones defined in the same process.

Processes:
Each process is given it's own user ID. The only processes that run as root as Zygot, runtime, and init. A process has Intents, Services, and ContentProviders among other things. A Service is used to expose some functionality to other applications. To expose data, a ContentProvider is used.

Google IO 2008 Day One

May 29th, 2008 / Listen to Me!!!
Keynote by Vic Gundotra
3 areas that Google is concentrating on are Client, Connectivity, Cloud.

Client:
The client from Google's perspective is the browser. Google Gears is spearheading to improve the browser capabilities. The Gears team is a major contributor in HTML 5.

Alan, Vice President of engineering from myspace showed an interesting usage of Gears by utilizing the local computing power of the PC. When a user with Gears performs a search on myspace, the results are served in realtime by the gears server on the local machine and using it's power and not having to make a trip to myspace's servers. Better experience for the user, lesser load for myspace. This is an interesting usage as Gears was initially designed to solved the disconnected client problem.

Connectivity:
Nice to findout that Webkit browser built into android. And, yes it is embeddable into Android applications. When cell applications and bandwidth of the mobile phone industry mature enough, browser will play a major part in how we deploy and run applications on the mobile. Nice to note that google is working on Gears support for Android. Next was an Android demo. Browser, Maps, Notification, Games, built in Compass et al. Can't wait to get my hands on an Android powered phone !!!

Cloud:
Kevin Gibbs the Tech Lead of App Engine gave a talk about the current capabilities of the App Engine platform (checkout my previous blog about App Engine) and the future direction for the project. One of the features that google is working on is offline processing for AppEngine. The ability to import and export data and to perform batch processing. Oh yes, App Engine now supports memcache. Google released a pricing for AppEngine and oh yes, AppEngine is public now. So, go and sign up if you already haven't. But, no Java/Groovy support yet. I spoke to a few Googlers about Java support for AppEngine. As we all know it is in the works. But, they were pretty tight lipped about it.

GWT: Bruce Johnson - Engineering Manager GWT
For me, being able to use GWT on mobile phones is the ultimate. Development in GWT is quite nice but, some things are not as productive as they could be. For example, having to define an interface for each component, using an custom Interface to access resource bundles. After looking at the buttoned down approach that Rails and Grails take for web development, I think GWT will really fly if it supports a scripting language(jvm based obviously) to develop.

Introduction to Android - Jason Chen
Looks like there are 1.1 billion PC based internet users and over 3 billion mobile users. And, most of the mobile market is fragmented with more than a dozen platforms to develop applications on. Jason discussed the android application stack which you can find here.

Anatomy & Physiology of an Android Application
Linux Kernel: Android built on linux kernel but it is not linux. All android specific functionality is built as drivers that run on top of the kernel. Thanks to the power of microkernel architecture. Android has custom linux drivers like Alarm, Ashmem (shared memory), Binder (IPC), low memory killer, power management, kernel debugger and logger modules.

Binder: Reduces IPC(Inter Process Communication) overhead and manages security issues. Uses shared memory (data between applications is shared). Manages per process thread pool. Performs Reference counting and mapping of object references so that shared objects are tracked and cleaned up. It also supports synchronous calling between applications to enable IPC. When process A calls method foo on service stub, binder driver proxies the object and sends it to the service. Since there is no serialization, there is no overhead that is encountered by a typical IPC.

Power Management:
Mobile devices run on battery power which have limited capacity. So, Android builds on linux's power management to manage power better. It does not replace linux power management. Android uses wake locks (partial, full) which expose the platform' power management to the developer. An Application requests a wake lock, PowerManager makes sure that the device is powered on until the application releases the wakelock. Alternative way of implementing wakeness is userActivity which takes a time period and keeps the application processing part of android alive.

Sitting on the linux kernel are libraries written in C++. Like Bionic (the custom libc implementation) Function libraries like Webkit browser, SQLlite and Native libraries like the SurfaceManager. Applications write to surfaces and the surface manager coalesces the different surfaces and outputs it to the frame buffer (display). Audio Manager works similarly. Audio Flinger routes different audios to different audio devices like speaker, headset, ear piece etc.

Hardware Abstraction Library: These are native libraries that sit above the linux kernel. This layer defines APIs for developers to port android to different hardwares.

Android Physiology:
When the Android platform starts, it starts the linux daemons like USB, Debug Bridge etc. It them starts the Zygote process which is basically a template for future processes. Next, it starts the service manager as the default binder. Overall, this talk rocked.

Under the covers of App Engine Datastore - Ryan Barrett

The AppEngine datastore is powered by BigTable. BigTable is basically a sharded sorted array. Supports sort of test and set operations. They call it single row transactions (read-update)

All entities are stored in a single table called Entities table. Entity keys have a field name:value format(hierarchial). The entities table is ordered by key. So, accessing an entity with a key or iterating on adjacent keys is easy. Although, the only way to re-parent an entity is to delete it and re-create it.

Composite Index:
You define the index yourself in index.yaml Or, when the app runs in the dev area, app engine looks at it's queries and creates indices by default. The flip side of auto-index is if a query has not been hit in dev mode, the prod refuses to handle it, and throws an exception. So, run all ur code paths in dev mode.

Transactions: AppEngine datastore supports atleast read-committed using a last committed timestamp embedded into the data.

Oh yes, there was a 4 hour party at the end of the day. Good music, good food and got to network with Geeks and Higher-ups alike.

Silverlight Interop with client script

May 23rd, 2008

Features that Suck!

May 21st, 2008 / London Coder

Features come in many types: only one type really matters. The rest suck!

The one that matters is the User Requested Feature. Sadly its apparent that this type of feature never crosses the mind of many of the folks that build applications and web sites. And even more sadly these features tend to be complex so get dropped first when projects enter Phase 3.Designed by someone who likes tetris

The first type of feature that does not matter is the Developer Feature. These can range from outright bugs to messy APIs that can only be used if you know what going on behind the scenes. Diabolical UI Crimes also belong in this category. These confusion inducing features come from a lack of User Requested Features.

The second type of feature that does not matter is the generic spec feature. These usually come about due to BAs  guessing what users would like from their application. “Well we have a list of things… so… we’ll definitely need to sort by every column, …bound to be important”

Outlook is a perfect example, you can sort and group (slowly) all your email but what you really want to do is search, which you can’t do. Contrast that with GMail. Give people what they want not what you think they want. Lookout did just that and Microsoft bought them to hide their shame. Again this type of feature comes from a lack of User Requested Features.

When the owners wife adds a feature...The third type of feature that is not important is the old technical expert feature. These come in the form of ropey architectural decisions like “we’ll use technology blah” from technologists that are now above programming so just deal out great wisdom… yawn. If you can’t code it, don’t suggest it.

The fourth (be certainly not final) type of feature that doesn’t matter is the infinite configurability feature. Whenever a decision point comes; you go both ways and then let the user configure which behavior they ‘want’. Let me tell you a secret: users don’t care, and being asked just angers them. Take as many decisions as possible, use intelligent defaults and don’t make users think!

User Requested Features are almost the only type of feature your software should have. The problem is that they can be complex, tricky to implement and usually require some creativity to solve. But they’re so neglected there is always some low hanging fruit.

So… if you’re a developer, try asking your users for a small feature they would like and …just add it. If you work for BigCo you’ll start making powerful friends and if you work on the Internet you’ll drive more traffic!

And who knows you might just enjoy it…

(Short && Simple) == Sweet

May 20th, 2008 / London Coder

There’s quote attributed to Blaise Pascal that goes:

“The present letter is a very long one, simply because I had no leisure to make it shorter.”

It’s an observation that brevity is more difficult to produce that verbosity.

However, modern programming ideologies encourage you to write your solutions in a verbose framework or with an X-first methodology (pick an X) or with restrictive rules to help you “be a better programmer”.

It\'s all very complex you see

There are plenty of (typically aggressive) ideology pundits that will rattle off the usual straw-man arguments about using their strict set of rules: the power of sameness, easier maintainance, easily understood code… etc. etc. You can usually spot these people because conversations with them feel like you’re playing an old skool text-based adventure game …and you’re probably stuck in a loop.

The truth is that only Deliberate Practice will make you a better programmer. Only loose coupling and simple architecture will make a system maintainable. And the ONLY way to make good software is to build it for the people that will use it, with their feedback.

Having 7 classes where you could have had 2 is gold-plating. Building everything to an interface is gold-plating. Having more than 1 factory is gold-plating.

So the next time your tempted to build a system of abstractions think of the words of Seneca:

“Love of bustle is not industry”

Aside: In Pascal’s day letters cam in iterations because there were word processors, perhaps a good thing we’ve lost…

Awesome – www.tripit.com

March 23rd, 2008

Just forward your trip confirmation emails (from airlines, travel agencies, hotels, whatever) to plans@tripit.com and it sorts it all out into a nicely organized itinerary.

From there it lets you do all sorts of things:

  • Pick up your current travel info from your smart phone – just email a query (such as “get flight today”)
  • Add a calendar feed of your travel plans within Outlook
  • Share your travel information with friends and colleagues

By taking on the fairly simple task of creating structured data (an itinerary) from unstructured (a confirmation email) TripIt adds a huge amount of value.

And there’s no need to go through some horrible “registration” process – you forward it the confirmation emails, it figures out who you are (duh!) from your email address.

Useful, friendly, simple = Awesome.

Mix08: Tim Vercruysse from Lava Trading interview

March 13th, 2008

In this show I chatted with Tim Vercruysse, Director - Software Development, Citi/Lava Technology.  We discussed the unique challenges that he faces, being in the financial services industry, and how they differ from what most people mean when they talk about "user experience".  Tim also talked about the main benefits - beyond user experience - that he sees from Silverlight and WPF.  Last, we wrapped up with a discussion of what developers in the financial services industry need to learn in order to stay relevant in this demanding environment.

Listen to the podcast here (Quicktime file link)

ASP.NET MVC

March 10th, 2008

Microsoft released a new MVC extension for ASP.NET which allows users to build asp.net applications using the MVC framework.

A little about MVC:
The MVC framework enables you to easily implement the model-view-controller (MVC) pattern for Web applications. This pattern lets you separate applications into loosely coupled, pluggable components for application design, processing logic, and display.

To makes things easier, the release was accompany with a serious of nice videos given by Scott Hanselman. Even though this new framework is very new (and experimental I must add), there are some nice thing there that I’m sure will become a part of the next LINQ version.

Blogging and podcasts from Mix08

March 5th, 2008

I’m here at Mix08 where I’ve signed on as a guest blogger and podcaster for Zoom-In Online. You can see all of my posts here:

So far I posted a couple about the keynote, including Ray Ozzie and Dean Hachamovitch (General Manager for IE) with plenty more to come.

ReMix07 Boston Session Content coming online

October 25th, 2007

Via Bob Familiar at the ReMix07 Facebook group, the content from the ReMix07 Boston sessions is coming online, there’s an RSS feed to stay on top of it here.

Microsoft Popfly - Silverlight In-Action

October 23rd, 2007

I came across this Microsoft new gig, named Popfly. While I’m still trying to figure out what the purpose of this site (and I’m sure the guys in Microsoft doing the same), everyone who’s looking to get a feeling of what you can do with silverlight, should check it out as well.

Basically, Microsoft is trying to market Popfly as a platform to create mashups, Widgets / Gadgets or web-pages. I’m not sure whether they try to compete with GooglePages or just try to promote the Silverlight (which heavily struggles with Adobe Flex), but it might be a good start.

Popfly also has a nice plug-in to visual studio, which i believe the Visual Studio Express users will find it more attractive.

Bottom line, try it out, just to get the sense of Silverlight.

Attending ReMix 07

September 27th, 2007

I’ve just registered for the ReMix07 conference up in Cambridge October 7-9. Shoot me an email (daniel at lab 49 dot com) if you’re Boston-based and want to chat with a Lab49 founder. Otherwise, check back here for blogging and photos from the event.

Visual Studio 2005 Keyboard shortcuts

June 4th, 2007

For those who are interested, Microsoft made all of the VS.NET keyboard shortcuts available in a nice downloadable and printable guide. Get the C# version here and the VB.NET version here.

How to improve server performance

June 3rd, 2007

Web 2.0

June 1st, 2007

From the Digital Ethnography dept. at Kansas State University. Watch it

New York Times Reader gets an upgrade

May 16th, 2007

Is del.icio.us doing JSON right?

May 14th, 2007