• Using Angle Brackets in Javadoc

    I’m not sure how I’ve never run into this, but I recently noticed that writing XML in Javadoc results in it not being rendered correctly.

    As an example, let’s take a look at Betaville’s Collada exporter and what its Javadoc looks like when viewed

     * Exporter for COLLADA files
     * <COLLADA>
     * 	<asset/>
     * 	<library_cameras/> // not important
     * 	<library_lights/> // not important
     * 	<library_images/>
     * 	<library_effects/>
     * 	<library_materials/>
     * 	<library_geometries/>
     * 	<library_animations/>
     * 	<library_controllers/>
     * 	<library_visual_scenes/>
     * 	<scene/>
     * @author Skye Book
     * @experimental - incomplete

    No @code tags means bad news

    Gross!!!  What happened?  After some digging, I found that it is necessary to wrap the documentation in question with the code tag using {@code someCodeHere}.  But the fun doesn’t end there, if you want to do something akin to an XML structure, you must wrap each line with the code tag as follows.

     * Exporter for COLLADA files
     * <p>
     * {@code<COLLADA>}</br>
     * 	{@code<asset/>}</br>
     * 	{@code<library_cameras/> // not important}</br>
     * 	{@code<library_lights/> // not important}</br>
     * 	{@code<library_images/>}</br>
     * 	{@code<library_effects/>}</br>
     * 	{@code<library_materials/>}</br>
     * 	{@code<library_geometries/>}</br>
     * 	{@code<library_animations/>}</br>
     * 	{@code<library_controllers/>}</br>
     * 	{@code<library_visual_scenes/>}</br>
     * 	{@code<scene/>}</br>
     * @author Skye Book
     * @experimental - incomplete

    So nice!

    Well with that sorted I guess there’s no more excuse for poor documentation, eh?

  • Dealing with New York City's GIS Data

    I give the city an enormous amount of credit for the GIS data that they make available online.  Unfortunately, the city’s love affair with Esri’s ArcGIS means that its spatial reference system (SRS) can be difficult to identify.

    Fear not, however, as a quick trip over to one of my favorite websites ever, spatialreference.org, can help you find a corresponding EPSG code.  The available conversions are invaluable for anyone interested in geospatial data.  Simply give the site the contents of your .PRJ file or the projection’s well-known text (WKT) and you will get back that magical identifier.

    Ah, and if you’re looking for the reference system that New York City usually uses then you’re probably looking for EPSG:2263

  • Published My First Android App

    Big news, I’ve finally gotten around to publishing my first Android app!  I figured it was a good idea to get around to making something cool before I hit my one year anniversary of being on the Android platform.  Without going to deep into details, the App is part Betaville client, part Betaville ‘joyphone’ (as dubbed by Carl Skelton of BxmC, it can remotely control a 3D app’s camera).  The neat thing about this little side project from my day job is that it allowed me to do some tinkering with a number of different parts of the Android SDK.  From networking to MapViews to sensor data, I’ve gotten a nice feel for the development process.

    I have to say, I’m extremely impressed.

    The tutorials on the website were concise and clear without cramming ‘best practices’ down your throat, the Eclipse add-on has come a long way since I last tried it in the summer of 2010, and the publishing process was a breeze.  My only gripe is with the new project form that doesn’t make a minimum API field mandatory.  Lo and behold, upon uploading my signed apk, I was warned that it was missing.  That said, if you’re putting up an app, make sure your AndroidManifest.xml includes something along the lines of:

    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>
  • Google Chrome Icon Not Displaying – Sometimes its the Simple Things

    I re-installed Windows 7 on a partition a few weeks ago and upon installing Chrome was disappointed to find that the icon wasn’t working (not that I care much for the new icon anyway).  After a few days of fiddling I decided to, ahem, reinstall Chrome.  Sigh, that did the trick..  There’s really no substitute for the simple fixes :)

  • Auto-Refreshing Temperature Sensor in Terminal

    Here’s a neat little script I whipped up this morning to give me some real time information on what my desktop’s load temperatures are. Please note that this requires lmsensors to be setup for your box.

    while : ;
         sleep 3
         sensors | grep Core

    If you don’t have lmsensors setup, its pretty easy to do in Debian/Ubuntu

    sudo apt-get install lm-sensors

    And then run this to set it up:


    Edit: Our good friend Torben has very wisely pointed out that this could actually be much simpler using the watch command. Thanks Torben!

    watch -n 3 “sensors|grep Core”