If you ever needed to visualize hierarchical data with JavaScript in the browser, the library dGraph will help you out. It will draw a layered directed graph as SVG based on the Sugiyama algorithm. Checkout dGraph from GitHub.
Quick tip: How to document a dojo AMD module for JSDoc 3
Unfortunately, JSDoc 3 does not fully support documenting AMD style modules that return a declare function, e.g.:
define(['dojo/_base/declare'], function(declare) {
...
return declare([], {
...
});
});
But with a bit of verbosity each module and the class will be properly documented:
Continue reading “Quick tip: How to document a dojo AMD module for JSDoc 3”How to Generate JavaScript Documentation with JSDoc 3 and PhpStorm
This guide is outdated. I wrote the new tutorial Use JSDoc 3 and PhpStorm to generate JavaScript documentation
This is an update to my previous article How to create JavaScript documentation in PhpStorm, since the JsDoc Toolkit is no longer under active development. It got replaced by JSDoc 3, with better support for current coding practices, particularly the CommonJS Modules standard and also its improved format, Asynchronous Module Definition (AMD).
This guide should not only work for Jetbrains’ PhpStorm, but any IDE, such as Eclipse or Aptana, that lets you call an external tool with parameters. It is written for Windows 7, but should also work for Mac/Unix users with minor modifications. It assumes you have installed Java Runtime JRE 1.7 and added it to the Window system path.
Continue reading “How to Generate JavaScript Documentation with JSDoc 3 and PhpStorm”Weight comparison of super-telephoto lenses
I got invited by Nasim Mansurov from photographylife.com to write the guest post Canon vs Nikon Telephoto Lenses.
The guest post is based on charts that compare the weight of Canon and Nikon Telephoto Lenses.
Best way to transport your photo equipment including a 600mm/f4 lens
When traveling by airplane, the size of the case and the weight of the photo gear is usually a big problem. Currently, luggage size on international flights is limited to an overall length of 157 cm (length + width + depth) and weight is limited to 23kg. Carry-on is limited to 115 cm (56 + 36 + 23 cm) and weight to 5-12kg, depending on the airline.
Continue reading “Best way to transport your photo equipment including a 600mm/f4 lens”
Nikon versus Canon lenses: If weight is important.
A few weeks ago Nikon announced the release of the new AF-S NIKKOR 800mm f/5.6E FL ED VR. This is the first Nikon telephoto lens, which has basically the same weight as its Canon counterpart. It is Nikon’s lens with the best focal length to weight ratio. You get 176 mm per kilo. I also seems to offer superb image quality. I updated the lens comparison charts accordingly.
Footwear for the jungle
When planing my trip to Guayana I was wondering what kind of shoes to bring in addition to my Teva Sandals. After reading through numerous blog posts and watching some videos including the excellent one by junglecrafty on Jungle Boots, I decided to buy OTB’s JungleLite Boots.

Guyana’s Wildlife along the Rewa River
I just returned from an amazing trip to the Amazonian jungle of Guyana. Together with friends and local guides I spent a month on the Rewa river searching for wildlife. Aside from many birds, insects, snakes, frogs and lizards, we got rewarded with outstanding sightings of tapirs, anacondas, capybaras, harpy eagles, an ocelot, a jaguar, giant river otters and even a puma.

SQL tip: How to bind NULL with PHP and Oracle
Neat little trick to bind a null value without using an if clause.
How often have you done something like this when a variable might be null:
$sql = "SELECT * FROM someTable WHERE col1 = :firstVar";
if ($secondVar !== null) {
$sql.= " AND col2 = :secondVar";
}
...
oci_bind_by_name($stmt, ':firstVar', $firstVar);
if ($secondVar !== null) {
oci_bind_by_name($stmt, ':secondVar', $secondVar);
}
Then checkout this, which is quite a bit shorter and a lot easier to read:
$sql = "SELECT * FROM someTable WHERE col1 = :firstVar
AND (col2 = :secondVar OR :secondVar IS NULL)";
...
oci_bind_by_name($stmt, ':firstVar', $firstVar);
oci_bind_by_name($stmt, ':secondVar', $secondVar);
How to recharge your camera batteries in the Amazonian jungle
I’m going on a photo expedition into the jungle of Guyana up the Rewa river. I’m planning on bringing my Nikon D800 camera and the D300 as a backup. In order to be able to recharge the batteries, I had to come up with a solar solution since there is not going to be any electricity. Therefore I purchased the waterproof and flexible solarpanel CHEPRE by SIStech Switzerland. It weights only 530gr, but is powerful enough to recharge both batteries, the EN-EL15 for the Nikon D800 and the EN-EL3e for the Nikon D300.

Solar panels produce only direct current (DC), but the standard battery chargers expect alternating current (AC), so no luck using the standard chargers that come with the camera. Furthermore, both camera use a different type of battery, which would mean to bring two cradles, one for each. Fortunately, there is a smart solution of a universal battery charger with exchangeable plates which can be connected directly to the panel or to any standard 12v cigarette lighter plug. It is advisable though to use a powertank as a buffer to be independent of sunlight.
I successfully loaded both batteries within a few hours even on slightly over casted days. I was also capable of charging the Ultrabook ASUS Zenbook UX31A via the powertank.