Drawing Hands by M.C. Escher (1948)

Jeff Mesnil

Archive for the ‘web’ Category


“Read Lature”: A Web Application to Save Articles and Read Them Later

On August 25th, 2009 in java, misc, web (No Comments »)

As an exercice when I learn a new programming language or a new environment, I develop simple applications to get a feel on the language, the platform, its libraries, etc. When I lack ideas for these applications, I redevelop applications that I use.

In order to learn Clojure and Google App Engine, I have developed Read Lature, a web application to save articles and read them later (very similar to Instapaper)1.

The idea is simple: I want to keep reference on articles or blog posts that can be interesting but I don’t want or don’t have time to read them immediately. I do not use bookmarks for that (either using my browser bookmarks or delicious): my bookmarks are long-lived while I want to keep a reference to these articles only for a short period (and keeping them open in tabs does not scale).

To save articles, you just need to drag a bookmarklet to your bookmarks bar. When you find a good article or blog post, you click on the bookmarklet to save it. It will be added to Read Lature so that you can read it when you have some time. Once it is read, it is automatically moved to the archive. Articles can also be starred for further readings.

The second way to save article to Read Lature is to use Google Reader. Setup a custom link and you can send articles to Read Lature directly from Google Reader (as explained in the instructions).

I mainly use Read Lature to save articles and read them later on my iPhone when I am away:

Reading from the iPhone

The application is hosted on Google “Cloud” and leverages Google accounts for user credentials.
To try it, go to Read Lature, login using your Google (or Gmail) account, and follow the instructions.

The application is written using Clojure, Compojure and jQuery and is less than 500 SLOC (75% is Clojure code, the rest is JavaScript).
Read Lature code is released the code under Apache 2.0 License on GitHub.

I will write later a review of the book “Progamming Clojure”, that I have just finished reading, and some thoughts about Clojure base on my experience with it so far.


  1. So similar in fact that I first named the project Instapapure for “Instapaper in Clojure” but I did not like it and renamed it Read Lature (for “Read Later with Clojure”). Naming projects is a dark art that I do not master… 

HTML Glyphs Cheatsheet

On August 12th, 2009 in web (No Comments »)

I don’t often need HTML glyphs apart from the usual suspects (&amp; for &, &lt; for <, etc.) but when I need to find a specific one, I always waste time finding it again.

I found a good reference which lists all the glyphs. However it is slow to load all the glyphs and the default font size is too slow to see the details of the glyphs. I need to increase the text size (and reload the whole page) several times to have a better look at the glyphs, making it really slow.

I finally decided to have my own cheatsheet to reference the glyphs I sometimes need (and some I may use one day…).
I will never waste time again to find the Command key ⌘ (&8984;).

Adam Bosworth is back on the web

On October 6th, 2007 in web (No Comments »)

Cool: Adam Bosworth is blogging again.
I thought it was a shame he stopped talking when he was hired by Google because a few people could not make the difference between his own opinion and the company he was working for.

Now that he has left Google and created a new startup, I’m looking forward to reading what he is up to….

Google Gears & Alchemy

On May 31st, 2007 in web (No Comments »)

Google just released Gears which is :

“an open source browser extension that enables web applications to provide offline functionality:

  • Store and serve application resources locally
  • Store data locally in a fully-searchable relational database
  • Run asynchronous Javascript to improve application responsiveness”.

At first glance, it seems to be the implementation of what Adam Bosworth envisioned when he was talking about BEA’s Alchemy and browser connectivity (search for “When connectivity isn’t certain” at the middle of the page).

Gears is already enabled for Google Reader. I wonder how long it will take to have it supported in Gmail

Another potential use case for Gears is to develop browser-based desktop applications. Their main data store will be provided by Gears database which could be synchronized from time to time to a web store. Office applications (document, spreadsheets, calendar) seem like good candidate for that approach: they’ll feel faster and more responsive that way. Synchronizing them will only be done when (auto) saving the document/spreadsheet/event.

Coolest Shopping Cart!

On February 20th, 2005 in web (2 Comments »)

Spotted on Ruby On Rails mailing list: http://panic.com/goods/.

I especially like the ability to drag and drop items and the ‘puff’ effect when you remove an item from the shopping cart (it’s the same effect than on Mac OS X Dock).

Putting some order in chaotic wiki

On January 19th, 2005 in web (No Comments »)

By its very own nature, a Wiki is a bazaar and it works great like that. But from time to time, you neet to get some order from that chaos.
Let take the example of a big corporate wiki with thousand pages and hundred users. Most of the pages are related to a few other pages only and each users modify and read only a few pages. More than often, the wiki ends up with a lot of related information disseminated on hundred pages with no apparent navigation between them. Given that users deal only with a small subset of this huge wiki, they may not be aware that potential useful information is sitting at other places.

To build some order in this chaos, a very useful feature implemented by most wiki is backlinks. To put it simply, a backlink on a page gives you a list of all the wiki pages pointing to that page thus enabling a backward navigation.
For example in the c2 wiki, every page has a backlink which is the title of the page. If you click on that title, you get a list of all wiki pages which points to that page. Other wikis present that differently (in Twiki, it’s a Ref-By link) but most wikis I encountered got that feature.
You then can use some naming rules. For example you can have (possibly empty) wiki pages whose names ends with Category (e.g. DevelopmentCategory, XmlCategory) and every pages related to that kind of category can add a link to one of these category pages. E.g. on a page documenting XML binding, I would put a “in XmlCategory” at the beginning of the page to create a link to the XmlCategory page. An user interested to find information about XML has just to use the backlink of the XmlCategory page to find a link to my XML binding page.

<

p> Basically with this very simple naming rule, you can categorize your wiki pages so that you can then browse the whole wiki through its backlinks.
To make it even better, I can create a CategoryCategory page which has a backlink to every other category pages. You have then an entry point to browse all the wiki based on these categories.

What is great with that approach is that users who write the pages and are the best to categorize it can help other users to find the information very easily.

As an aside, when I wrote this entry, I realized that there is a recurring pattern in the way I want to organize my data. I don’t organize my data anymore (a.k.a all in one place and no deep tree structure) but rely more and more on classification with tags, labels, categories to find it. This behavior is occuring with my mails, bookmarks, wiki pages, pictures,… But more about that in another post.

Simple del.icio.us bookmarklet

On January 19th, 2005 in web (1 Comment »)

It’s so simple, it’s not really a bookmarklet…

I added a bookmark in Firefox which points to http://del.icio.us/jmesnil/%s and added a keyword d for it.
So now when I want to go to my del.icio.us java bookmarks, I just have to type d java in the address bar to go to it.
If I want to go to my java and jms bookmarks, it’s d java+jms.

<disclaimer>
I’m a total keyboard junkie. Too much emacs has definitely hurt my brain.
</disclaimer>

A del.ici.ous browser-based desktop application

On January 7th, 2005 in osgi, web (5 Comments »)

Following my last post on browser-based desktop applications, I prototyped a little application to play with these ideas.

<

p>I’m a big fan of the social bookmarks manager del.icio.us which enable you to bookmark urls and categorize them. However, all your bookmarks are available to everyone else (it manages social bookmarks after all). But, from time to time, I also need to bookmark urls that I don’t want to share (e.g. private ones or professional ones which could give too much hints to competitors).
So I bookmark these URLs with my browser. But they can not be categorized like del.icio.us ones (folders don’t help). So when I want to check bookmarks for a given topic I’ve to look in two different places and interfaces (the web bookmarks toolbar and del.icio.us).

I prototyped a simple application with the following requirements:

The prototype is a browser-based desktop application (i.e. a standalone application which runs its embedded HTTP server and is displayed in the browser).
The application keeps a list of private bookmarks and aggregates them with del.icio.us ones (retrieved with del.icio.us REST API thanks to the delicious-java library). In fact, from the user interface, it is quite similar to del.icio.us interface. The only differences is that private bookmarks are automatically categorized with a private tag. (As an aside, I first had two type of bookmarks: public and private ones. But as I coded, I realized that I could used the bookmark own tags to categorize them as public or private…).
Special urls (like for displaying bookmarks for a set of categories) redirect to the application which filters both del.icio.us and private bookmarks.

Here some screenshots (I haven’t care much for the layout but it is based on del.icio.us):

del1
To save a bookmark, type its url, its description, its (optional) extended description and list of space-separated tags. To save it in the application ( i.e. on your desktop), tag it as private. Otherwise, the bookmark will be saved on del.icio.us.

del2
If I look for all the bookmarks with the osgi tags, I see that some of them are categorized as private. They’re stored on the application and not on del.icio.us (see my del.icio.us OSGi page to see the differences).
As you can see on the screenshots, the only differences is that private bookmarks are categorized with a private tag.

I haven’t reproduced all features provided by del.icio.us but this first prototype is functional enough to help me vizualize what browser-based desktop applications could be.
I see this prototype like the equivalent of Google Desktop Search but for bookmarks. Both application aggregates local and web data and displays them in a consistent way in the browser.

<

p>As for the technology I used, it’s based on the OSGi framework and its HTTP service (I used Knoplferfish implementation). The cool thing is that everything can be delivered as a standalone application that sits anywhere on your hard drive. You just start it and point your web browser to http://localhost:8080:<your del.icio.us name>. It’s also possible make it a Windows or Mac OS X service with a cute little icon in the tray.
And, being based on OSGI, you can also use it from your PocketPC!

One other cool feature of this application is that since it sits on your own machine, you can also bookmark local files and categorize them.
For example, I’ve a local version of the OSGi specification in PDF file. I bookmarked it with my application with the url file:///Users/jeff/doc/…../r3.book.pdf. So when I want to see all my bookmarks related to OSGi (http://localhost:8080/jmesnil?tag=osgi), I’ve got both web url and local documentation (URLs starting with file:// are automatically tagged as private and local).
del3
The only problem is that you can’t open the files from their URLs (I already blogged about it but I haven’t find a correct solution yet).

There is nothing rocket science in this prototype but there is some potential for such browser-based desktop applications to integrate in a consistent way desktop data with the whole web.

Accepting file:// URL from localhost HTTP server

On January 7th, 2005 in web (2 Comments »)

I have got a stupid problem: I have a HTTP server on localhost which serve web pages containing links to file:// URLs.

Firefox refused to open these URLs (which is completely understandable to avoid security holes). In fact, you can’t load them by clicking on the link but you can load them by dragging the URL to Firefox address bar.
If I want to load them by click, I can bypass Firefox security by setting security.checkloaduri property to false (in about:config preferences page). However it will also expose this security hole to any HTTP server which is clearly not acceptable. What I’d like is that Firefox accepts to load file:// URL from http://localhost only but not from any other HTTP server.

I can’t find documentation to enable this… I need to look for another solution to this problem…

A new breed of applications: browser-based desktop applications

On January 5th, 2005 in web (5 Comments »)

There is a lot of talks about RIA since there are web application which require richer widgets than HTML. Some approaches are XUL, XAML, Flex,…

However I wonder if there won’t be an opposite trend of browser-based desktop application, i.e. desktop applications which are used from a web browser. An example which comes to my mind is Google Desktop Search.
The advantage of such applications is that they could enhance user experience by seemingly integrate local manipulation of data with the whole web. For example, would it be interesting to have a browser-based application which aggregates your weblog entries, google searches, del.icio.us bookmarks and flickr pictures to provide a web dashboard (or more precisely a local web portal)? You could then be able to drag and drop a google results link in your del.icio.us bookmarks. Or drag and drop a flickr picture in your weblog. Or drag and drop a picture from iPhoto in flickr. Or…

The application could be based on OSGi framework and its embedded servlet container. You have several bundles composed of Servlets for each type of “service” (del.icio.us, blog, flickr) and a dashboard which deals with interactions between the services. Data could be aggregated by REST Web services (either through XmlHttpRequest or HTTP/XML/XSL Java libraries).
Another potential advantage of such an approach is that these local applications could use an intelligent cache (a la Adam Bosworth‘s Project Alchemy except that this cache is not located within the browser…) which will keep the HTTP requests if you’re offline and send them once you are online again.

Does that make sense or is it a crazy stupid thought?