Note to self: how to post on facebook as a page

How to obtain a long-term access token for a page and programmaticaly post to it: From here: http://stackoverflow.com/questions/8231877/facebook-access-token-for-pages Go to the Graph API Explorer Choose your app from the dropdown menu Click "Get Access Token" Choose the manage_pages permission (you may need the user_events permission too, not sure) Now access the me/accounts connection and copy … Continue reading Note to self: how to post on facebook as a page

logging container-managed datasource jdbc with log4jdbc

In my new 'old' project which I just inherited there is - once more - Hibernate and plain JDBC access to a database, happily mixed. Hibernate logs SQL nicely, but that leaves out whatever datbase access the rest of the application is performing. I found log4jdbc very convenient which allows fain-grained logging over every interaction … Continue reading logging container-managed datasource jdbc with log4jdbc

Replacing social sharing buttons with javascript-less alternatives

Social sharing widgets slow down page loading For every public facing site there comes the moment where its content has to be shared in social media. We all know the dreaded "Like" or "Tweet" buttons on many sites or blogs. They not only compete for the reader's attention but also for screen real estate and … Continue reading Replacing social sharing buttons with javascript-less alternatives

Eclipse/SVN keeps asking for keystore password on a mac

For my current project I'm working on a Mac and Eclipse kept asking for the OS keystore password every time SVN was accessed.  The eclipse error log says: "StorageException: No password provided." While I am sure that there are proper solutions to this problem, relaxing a constraint in the OS keystore did the job for … Continue reading Eclipse/SVN keeps asking for keystore password on a mac

On URL accuracy, versioning and the immutable-redirect pattern

So you have this requirements: serve content (might be a static file or a dynamic page) under a URL make it cacheable by defining appropriate HTTP expiration headers yet, the content might change - serve it under a new URL the old URLs should still be valid but show the new content In my current … Continue reading On URL accuracy, versioning and the immutable-redirect pattern

Speeding up development by splitting a webapp into parts

I love tagfiles: they feature a well known syntax (EL from JSP), they allow for reusable UI components, they are well supported by my favourite IDE and, most importantly, modifications are instantly visible because the servlet container does not have to restart. At least in theory, because reality often looks different: after a few edits … Continue reading Speeding up development by splitting a webapp into parts

HTTP: The importance of declaring non-cachable resources as such

It works fine with Chrome and it fails on an Android 2.3 browser - the page is performing an XmlHttpRequest to the server for a resource that just changed for sure and yet it gets back an older version. That's the result of a. the browser assuming a resource is cachable even if no Etag … Continue reading HTTP: The importance of declaring non-cachable resources as such

CRTL + Left click on java methods/members/classes slow in Eclipse

In a certain, corporate installation of Eclipse on a quite fast computer CRTL+Left click on java classes, members and methods in the java editor incurred always several seconds of a locked up eclipse which coincided with moderate network traffic. When disconnecting the network the delay would magically vanish. Pierre-Antoine Grégoire came up with the reason … Continue reading CRTL + Left click on java methods/members/classes slow in Eclipse

Solving the 8 Queens puzzle with bit operations

The 8 queens puzzle is a classic (and quite fun to solve) toy problem: place eight queens on a chess board in such a way that all queens could fully move without being obstructed by any other queen. While without practical applications, it illustrates a number of aspects of designing algorithms and implementing programmes: - … Continue reading Solving the 8 Queens puzzle with bit operations