The code snippet below shows how to retrieve the currently logged in user and to retrieve his documents/folders or listitems/folders according to the type of list you're working with:
The first things you need to do is to prepare the objects such as ClientContext, the current web & site, the current user (get_currentUser()), then you load them and you call your first asynchroneous execution.
I've just recorded a new Chopstick on the SharePoint 2010 EcmaScript client object model API. This new API really rocks and will dramatically improve both the user and developer experience.
In a few words, it allows you to build easily some AJAX-aware components without requiring any AJAX knowledge (or almost). You simply develop as you would do server side.