So, this blog is in its infancy, but I hope to populate it with a mix of technical and research detail, and hopefully some slightly more accessible material. I’m a physicist with a background in quantum, solid state and then medical physics, have just embarked on the ENFOLD project at UCL-CASA under Alan Wilson, and I have an interest in bringing research to the public – so let’s see what we can find.
In the last few weeks, I’ve been working in Java with the Processing toolbox (and one of its libraries, ControlP5, for some nice-looking sliders), to create some simple visualizations of migration flows between different countries. Processing itself comes with a nice, slightly retro, environment, but after coding for a week or so, I realised that I was essentially building some quite large and fiddly java code in a fairly simple editor, and migrated it to NetBeans, which was a relatively painless process. Processing is quite clever in that the interface hides some of the java housekeeping like class declaration (the root classes built in Processing extend the PApplet class); however, once you get beyond a simple sketch, this isn’t much of an advantage compared to not having proper debugging facilities. Of course, if you’ve spent your programming life doing command line coding (I pity R users), then not having a decent environment is probably not chief amongst your concerns.
The problem came when trying to combine multiple maps within one window – PApplets are extensions of Applets and have their own threads. Despite spending some time trying to fix it, I’m a very weak thread programmer, and I decided to create a new PApplet object which could draw multiple maps within itself; and a utility class to store variables associated with each map. This took a lot of reprogramming but seems to be working a lot better.
My latest endeavour is to get it talking to a MySql database – java seems to play nicely with MySql via a connector class, but I’m running into a few problems. Ho hum…