Sunday, April 20, 2014

Accelerated hacking

Yesterday a couple of friends, Tyler and Matt, wanted me to look at a program they are writing, and they got me up to speed by helping me install software tools they use. It was a mind-blowing experience, not because of any one tool or piece of code but for how much, fast and smoothly many complicated things happened while we communicated remotely.

This is not a tutorial, just a high level description of my experience. 

Using only a laptop and a decent internet connection, we shared code, interactively shared code changes (with ~1s latency), ran modified code immediately, talked about the results (with ~.1s latency), and shared interactive graphic results (a dynamic interactive app -- a game). These programs can be compiled for all common handheld devices.

To debug my OS/machine/configuration, Tyler copied and simplified the main loop with a single graphics call ('newLine'), using a physics engine call ('addBody'). I then ran the code on the Corona simulator, showing dynamic feedback of event driven programming. We ran the code on different OS's while at different locations. I didn't have to tell him how my system behaved, because I shared my desktop through Skype.

This is what that looked like on my screen, showing almost the complete top level code base for the test app:

While I was testing out configuration changes, they could either tell me what buttons to push or were googling for answers and copy-pasting the results into Skype's chat box.

I'm a robopsychologist, and from my perspective code is a way to get machines to behave well. While I enjoy programming and keep up with what I need to know at the moment, many of the tasks involved are not what I want to do, just what I need to do to make machines work like I want them to. I want machines to be capable of doing sophisticated things and to show them how to do it in as easy a way as possible.

I'm an old coder in the sense that I have used personal checks to acquire floppy disks and paper documentation through snail mail. I use more modern methods now, but I was still blown away by how sophisticated and powerful newer tools have become. I regularly collaborate remotely with a couple colleagues in the next state, using Github, Skype and a cell phone when needed. I've tinkered with mobile telepresence. Still, for solving difficult issues fast and effectively this was a new experience.

These friends are relatively young and new to programming, but more sophisticated than me in many respects. They figured out what tools they wanted to use, and showed me how to use them. I learned a new high level language (Lua, an interpreted scripting language), installed LuaEclipse by dragging an HTML based 'install plugin' icon onto a desktop IDE (Eclipse, an Integrated Development Environment), installed and learned how to use a collaborative programming tool (Saros), and configured Eclipse to use the Corona interpreter, SDK and device simulator. And I got schooled in how they structured their program.

Many IDEs, including Eclipse, are repositories of feature bloat, opaque and intimidating in many ways. An alternative is to use a text editor with syntax color coding, which is the core of programming and nearly universally available and accessible. But this set of tools running in conjunction with Eclipse was very impressive. In was not easy, but getting past the multitude of issues between strings of bits and a working program was greased by sophisticated tools, particularly those that allowed remote, low latency collaboration.

Tuesday, April 1, 2014

Looking for sea shells on Mars

Mars had some warmth and water in it's early existence, but probably not long enough for complex life to evolve. It is not clear if even the simplest life could or did occur.

But that doesn't mean we can't look for seas shells in a previously flooded basin. There's lots to see, and finding pretty pebbles is a noble goal. Unusual shapes catch the eye, and beg for a close look. Would we even recognize a Martian fossil? What would it take to be convinced?
"I do not know what I may appear to the world, but to myself I seem to have been only a boy playing on the sea shore, and diverting myself now and then finding a smoother pebble or a prettier sea shell than ordinary whilst the great ocean of truth lay all undiscovered before me." Isaac Newton
Is unlikely a sea shell. Detail of top-right of image below.

At this location, at the Kimberly, there are lots of shiny pebbles embedded in a sandstone matrix. These are also not a dime-a-dozen on Mars -- it's not obvious how small stones get rounded and polished. Wave action and river transport is usually how it happens on earth.

The side of this sandstone block shows layering with roughly uniform thickness. On earth this would indicate seasonal deposition, perhaps due to annual fluctuations in composition.

Nearby some course grains with angular facets slowed erosion along an edge of a bedding plane.

Beneath the block sand slips down-slope.

Curiosity's robotic arm and instrument packages are even shinier, smoother and less likely.
"All computers are just carefully organized sand."
This is the position at which the MARDI camera took the top images:

Just before moving to this position, a mast camera took this shot of one face of the arm's instrument package, to check that every thing was in order. Can't get much more ordered.

All Curiosity images that make it back to earth are available at: