Sunday, January 15, 2012

Book: "Dreaming in Code"

Cover of "Dreaming in Code",
by Scott Rosenberg
As I mentioned previously, I have been reading a book on programming called "Dreaming in Code" (by S. Rosenberg, full ref may be found below). Seeing as I've just finished it now, I thought I would share a few brief thoughts on it. In all, I enjoyed reading it. It wasn't what I was expecting, and I read it relatively slowly, over the past month, reading a half-to-full chapter at a time. In all, whilst it is about programming, with a particular emphasis on large projects/programmes, it covers history, basic software engineering concepts, and the story of a single open-source development project in a mixed-up sort of way, but a way which still managed to keep my attention (i.e. I didn't have to expend too much effort in picking the book back up after leaving it for a few days).

In going through the development (evolution is perhaps a better word) of an open-source software project - a PIM called Chandler - a number of general software development issues are come across and discussed in the context of historical software engineering developments. This is what I particularly liked about it - the central story of a particular software development project, with the deeper consideration and historical context for some of the central features of its ongoing work, both technical, and personal. And this is what seems to persistently emerge as a fundamental confounding factor of software development: the computer is as precise as could be wished for, but those telling it what to do are decidedly not so (an observation so familiar to anyone who has written, or attempted to write, any piece of code).

Having said this, unlike some other reviews, I found the chapter dedicated to methods (chapter 9) to be a bit too contrived and preachy - particularly given the easy-going style of the rest of the book. This isn't to say the subject matter is out of place: it goes through . I think it's no coincidence that this chapter seems to depart furthest from the Chandler story narrative, a form that suited the rest of the book so well. I suppose it depends on your perspective: I enjoyed the Chandler story, with it providing the context for delves into general software engineering principles and history, so when this context fell away in chapter 9, I was left missing it.

So, would I recommend reading this? I think it depends (which is a cop-out of course...). I'm technically minded, I write code regularly, but I'm not a software engineer, and I've had no real prior knowledge of how big software projects are run. As such, the book provides a little glimpse of this. I think that while it would be too much to say that this book provides a full coverage of software development techniques by means of little examples, it does provide enough that I learned something from it. If, however, you have already been embedded within a formal software development setting, then I don't think you will gain anything new by reading this - apart from confirmation that software development (closed-, open- source of otherwise) is hard work, with many pitfalls, and having more money to do something actually seems to make it even more difficult. This of course could be reason enough though! For me though, I enjoyed reading the book, for the little asides to the main story as much as anything. However, what is obviously minimally required is some form of interest in the way computers are cajoled to do our (collective) bidding.

It seems as though since the book was written, Chandler has fallen to the very criticisms that the book makes of closed-source, commercial software developments: closed development, lack of user testing, and changing specifications (among others). However, despite the departure of the books seemingly main protagonist, Mitch Kapor, Chandler does seem to still be going, with the 1.0 release the focus of so much discussion in the book, but with not too much activity (e.g. planning pages on project wiki last updated in 2008, and project blog not updated since 2009...).

Scott Rosenberg (2007), "Dreaming in Code", Crown Publishing, ISBN: 978-1400082469. Website accompanying the book is here.

Thursday, January 12, 2012

World's smallest frog discovered

The story on the BBC News website that the world's smallest frog has been discovered. Really? Wow!

Smallest frog? Picture from the BBC News story.
/rant

No!! Have they taken a measurement and not bothered to look up the standard measurements of other frogs? Are they now certain that there are no more species of frog that could ever be found? Perhaps even they have discovered some theoretical reason why a frog could never possibly be smaller? Maybe I'm being overly pedantic, but surely it should be (along the lines of) "a new species of frog has been discovered, which is now the smallest known species of frog". I doubt such a claim would be in a peer reviewed paper, so maybe this is just sloppy wording to maximise 'impact' on the website...

/endrant

Saturday, January 07, 2012

CFP: AAAI'12 special track on Cognitive Systems

At the 26th AAAI conference this year (in Toronto, Canada) there will be a special track on Cognitive Systems:

In an attempt to return to the original goals of artificial intelligence and cognitive science, this special track invites papers in human-level intelligence, integrated intelligent systems, cognitive architectures, situated embodied cognition, and related areas that aim to explain intelligence in computational terms and reproduce a range of human cognitive abilities in computational artifacts. The track will focus on various cognitive capabilities in the context of artificial cognitive systems, including the following, as well as other related integrated cognitive functions.
There are a number of other special tracks too, in addition to the main technical programme, among which are the intriguingly titled "computational sustainability and artificial intelligence", and more conventional "robotics". In any case, the deadline for submissions is not far off: January 20th 2012.

Friday, January 06, 2012

MATLAB alternatives (free, of course...)

I don't use MATLAB very much at the moment, or even in recent years. Production of a couple of graphs perhaps, maybe a little data processing, but nothing that can't really be done using any other piece of software available to me (MS Excel, LO Calc, or a bit of my own code). I have used MATLAB extensively in the past, mostly Simulink though, for some signal processing and control stuff, so know it can be a very useful tool. However, given my current MATLAB inactivity, and that where I work doesn't have an endless supply of licenses for research (and these are fairly expensive as you may have noticed...), it seems that my occasional use can be easily covered by the open-source/freeware.

The main options seem to be Octave and SciLab. Both are open-source and free, and can be used in Linux, Windows or MacOS (I like cross-platform compatibility...). As open-source 'versions' of MATLAB, both of have at least some degree of compatibility with it. Although there seems to be some disagreement on which is closest to full MATLAB compatibility, from what I've read while only briefly looking a little further into it, Octave tries to maintain the same syntax (so aiming for m-file compatibility, and treating any deviations from this as bugs), whereas SciLab offers a tool for conversion. I think that a similarity to MATLAB in terms of functionality and syntax is beneficial because of its pervasive nature, and the subsequent opportunity to share resources.

In terms of a comparison between these two in a more computationally technical sense (comparison of calculations, plotting and syntax with MATLAB), see this tech report, which also mentions another possible candidate too - FreeMat. This report concludes that Octave does actually offer a viable alternative to MATLAB, with limitations found in both SciLab and FreeMat.

Why did I write a post on this? Mostly just because I want a record of these links for myself, but partly because hopefully someone else will find this useful too.

Wednesday, December 28, 2011

Software Quality

I do not regard myself as a software engineer. Sure, I 'do' programming (usually with some C-based language if you're interested), but such programming is to implement some functionality that I want or need for some purpose - to implement a model or a data processing tool for instance - which has been for my own use. As such, there has been minimal effort put into inherent extend-ability or modalarisation of my code. I've always paid relatively good attention to code commenting and some flexibility of use (personal, that is), but that mainly stems from my inability to remember implementational details rather than some grand vision of code reuse. I've also never really been bothered about efficiency or speed. I think this stems from the fact that when an undergrad, I did some programming with some fairly limited processors, on which resources (particularly memory) were limited and had to be at least considered, if not actively managed - moving from those things to a proper desktop led me to stop worrying about resources to the extent that I stopped even considering them. I would, and do, implement code in the way that it looked like it worked in my head, not in a way that would have been particularly efficient either in terms of computational resources or (my) time: another side-effect of the lack of memory on my part, I could look back on my code and almost reconstruct my line of thought. In summary, I was more a hacker than a crafter of code - it was more important what the stuff did and how it corresponded to the things swirling in my head, than how it looked on the screen, or how it actually worked. And I thought that this was all that was required, and was to be honest a little smug in thinking so.

Sometimes I feel that this is what programming actually is... Image from here.

However, in more recent times, my programming has had a number of additional constraints imposed. These are probably so fundamental to most normal people (by which I mean most programmers and software engineers), that me mentioning them may border on the ridiculous, but I think that they are probably not to your bog-standard academic-type, like me. It basically boils down to a simple fact: that there are other people out there, and that under certain circumstances, they might actually need to use/modify your code, or collaborate with you on this code. This process has only relatively recently begun to directly affect me and my work, since a little way into starting as part of the ALIZ-E project, but it's one that I am increasingly having to take into account, and one that I seemingly find myself a little reluctant to. Basically, I would say that the idea is that putting the effort into those aspects of software development that are not necessarily directly related to the desired functionality, but to more general infrastructure and usability from the perspective of the programmer (as well as the notional user of course), is very beneficial in the long run. Put like that, it seems sensible. But it's not particularly obvious when you're actually trying to throw together something that works in the face of a deadline. At least it didn't to me.

Anyway, this issue was raised in my mind over the past week or two for two reasons: firstly, I noticed that a project colleague has put up (or updated?) a page on his website about software quality; secondly, I just happen to be reading a book (given to me by some very dear friends) about programming (which is far more interesting than it may sound, but that is I think for another post when I've finished reading the book...).

This project colleague is Marc Schroder, and he is at DFKI in Germany, and this is the page I am referring to. The first time I met him was at the first ALIZ-E software integration meeting, at which he kept talking about good programming practice, and good practice regarding implementation structures and methods. To be perfectly honest, I viewed a lot of this as programming idealism, and distracting from the task at hand: implementing a (complex) system that would do what we wanted. Speaking to him during one of the meeting intervals, I made the point to him my opinion that a lot of academic programmers were hackers like me - good at making code that did what we wanted, but not necessarily good software engineers. I have no doubt that he'd heard and experienced this before, and indeed he was probably rather exasperated at the situation with the academic-hacker-types like me. He, on the other hand, has a good deal of experience with not just good quality programming, but also of multi-party project management, of which I had no experience. So, he knows what is involved in making some software actually work in a collaborative environment in which the participants are remotely interacting.

From the description on his software quality page page, and the various evangelist-style talks he's given us in the project on good coding practice (and I don't mean this in a negative manner - just descriptive of the style that academic-types speak to each other on subject matters that deeply interest them...), I have subsequently expanded my list of coding requirements. Or at least, I've added them to my desiderata, and am trying to actually incorporate them into the stuff I normally do. The order is roughly in importance for me at the moment, and misses things out (from Marc's list at least) probably because I don't (yet!?) understand their necessity.

  1. Error handling - as in properly, returning descriptions of what actually went wrong, so that you can figure it out, not just some way of not crashing the entire computer when something doesn't go to plan...
  2. Test-driven development - I think I understand the main principles involved, but to be honest, the practical details of how this actually should be approached are still tantalisingly out of reach... The idea of it being something like a living specification that keeps up to date with the code, is an actually useful tool in verifying updates, and replaces (to a certain extent) an external body of documentation, seems like a good idea all round.
  3. Refactoring - now this is something I have actually been doing for a while, though not for the efficiency aspects, but more for the matching of code operation to my internal cognitive machinations, and for some (limited) future flexibility (so I can easily change parameters and rerun for example)

I'd say that I now understand the necessity for these three things at least. And that I know that I need to apply it to my work as a fundamental feature rather than a mere after-thought. But I am also aware that this process has just begun for me, and that there is far more that I need to learn about testing regimes, interface definitions, etc, that are as yet just too unfamiliar to me. And yet there remains this vestigial resistance to such practice in favour of the hack-together-for-application methodology...

Tuesday, December 20, 2011

CFP: AISB Symposium on Computing and Philosophy

An upcoming event with which I have a minor involvement is the 4th incarnation of the AISB Symposium on Computing and Philosophy, which is due to take place in Birmingham, U.K., between the 2nd and 6th of July 2012. The AISB convention is this year being held in conjunction with the International Association of Computing And Philosophy (IACAP), and will mark the 100th anniversary of Alan Turing's birthday. There are 16 different symposia at this convention in all, all with varying emphases on the interaction between AI/Computing and Philosophy. For those of bent in that particular direction, there will be plenty to attract your attention!

An overview of the Symposium on Computing and Philosophy, from the website:

Turing’s famous question ‘can machines think?’ raises parallel questions about what it means to say of us humans that we think. More broadly, what does it mean to say that we are thinking beings? In this way we can see that Turing’s question about the potential of machines raises substantial questions about the nature of human identity. ‘If’, we might ask, ‘intelligent human behaviour could be successfully imitated, then what is there about our flesh and blood embodiment that need be regarded as exclusively essential to either intelligence or human identity?’. This and related questions come to the fore when we consider the way in which our involvement with and use of machines and technologies, as well as their involvement in us, is increasing and evolving. This is true of few more than those technologies that have a more intimate and developing role in our lives, such as implants and prosthetics (e.g. neuroprosthetics).

The Symposium will cover key areas relating to developments in implants and prosthetics, including:
  • How new developments in artificial intelligence (AI) / computational intelligence (CI) look set to develop implant technology (e.g. swarm intelligence for the control of smaller and smaller components)
  • Developments of implants and prosthetics for use in human,  primate and non-primate animals
  • The nature of human identity and how implants may impact on it (involving both conceptual and ethical questions)
  • The identification of, and debate surrounding, distinctions drawn between improvement or repair (e.g. for medical reasons), and enhancement or “upgrading” (e.g. to improve performance) using implants/prosthetics
  • What role other emerging, and converging, technologies may have on the development of implants (e.g. nanotechnology or biotechnology)
But the story of identity does not end with human implants and neuroprosthetics. In the last decade, huge strides have been made in ‘animat’ devices. These are robotic machines with both active biological and artificial (e.g. electronic, mechanical or robotic) components. Recently one of the organisers of this symposium, Slawomir Nasuto, in partnership with colleagues Victor Becerra, Kevin Warwick and Ben Whalley, developed an autonomous robot (an animat) controlled by cultures of living neural cells, which in turn were directly coupled to the robot's actuators and sensory inputs. This work raises the question of whether such ‘animat’ devices (devices, for example, with all the flexibility and insight of intelligent natural systems) are constrained by the limits (e.g. those of Turing Machines) identified in classical a priori arguments regarding standard ‘computational systems’. 
Both neuroprosthetic augmentation and animats may be considered as biotechnological hybrid systems. Although seemingly starting from very different sentient positions, the potential convergence in the relative amount and importance of biological and technological components in such systems raises the question of whether such convergence would be accompanied by a corresponding convergence of their respective teleological capacities; and what indeed the limits noted above could be.

For more information, see the symposium website. For those interested in submitting a paper, the deadline for submissions is the 1st of February 2012.

Monday, December 19, 2011

Me: films and robots

My first post in over a year, so lets start with something silly :-)

I'm sure that anyone who is working, or has worked, with robots has been influenced in some way (if not inspired) by some depiction in a work of fiction - most likely film - whether they choose to admit it or not (those who don't are probably lying). I'm quite happy to admit to this - and can point to two such robotic intelligent devices. What precisely about them gave rise to this influence I don't know - and I don't really want to deconstruct it in case it turns out to be ridiculous and/or trivial - but here they are nonetheless for you to assess.


Johnny 5 is alive!
The first one is the amazing - and actually fairly realistic (in terms of achievable mechanical complexity) - Johnny 5 from Short Circuit. I can't really say enough about this dude - I did really want one of the little mini-me's from the second film though! I can't really remember the first time I watched this, but I do know that over the many occasions I've watched the films I'm still drawn to it, despite the occasionally dodgy special effects (I'm thinking of the dancing)... 

The second one is the intelligent space-ship/robot arm thing in the Flight of the Navigator - 'Max'. I'm not entirely if this is supposed to be AI robot, or alien-being-controlling-a-robot, but any device that can fly a spaceship, go manic, and time-travel is alright in my book. The single eye-on-an-arm-thing was a bit strange, though even with such a fairly simple setup, the array of emotional expression was really quite impressive.

(I've only just realised that both of these films were released in '86 - this is just coincidence, as I watched both on TV a number of years afterwards - I didn't watch them in the cinema or anything). I'm not sure sure these would be the choices of most people - and I'm not going to bring age into it - but they're mine :-)


/rant
Having said all that though, there is a bit of a cautionary note I think. As much as the portrayal of the robot in science fiction is of course hugely beneficial in terms of building and maintaining interest in these synthetic devices, I do wonder sometimes whether this actually has the long-term reverse effect: building expectations of what such devices can do, not just beyond that which is currently possible, but beyond that which is even probable as possible. In the end, would this just not turn people off when they realise that the real state-of-the-art is actually fairly mundane? Or that what people like me think of as really quite exciting in terms of development just pale in comparison with the vividly recreated imaginations of script writers and graphic designers? In the end, surely such levels of unfulfilled expectation will serve as a damper on funding initiatives (am thinking of potential career prospects here...!) - "but what you are trying to do isn't really exciting, they were talking about it in the '70s/'80's/'90's/etc...". Either that, or the reality drifts so far from expectation that most people don't understand what's going on, and you end up in the same place. But that is perhaps for another discussion, on public engagement with science...

Or maybe I'm reading far too much into all of this, and should really just sit back, relax, and enjoy the view...

/endrant

Friday, December 10, 2010

Thesis finally published

I am pleased to say that my thesis has now finally been published and submitted, with my graduation ceremony next week. After that, I will have truly finished the long and arduous road that was my PhD. Since I've stayed in academia (so far at least...) I'm going to engage in a little self-promotion (what's a blog for otherwise?), and give the thesis abstract for those (very few) of you who may be interested.


Foundations of a Constructivist Memory-Based approach to Cognitive Robotics:

Synthesis of a Theoretical Framework and Application Case Studies

Cognitive robotics are applicable to many aspects of modern society. These artificial agents may also be used as platforms to investigate of the nature and function of cognition itself through the creation and manipulation of biologically-inspired cognitive architectures. However, the flexibility and robustness of current systems are limited by the restricted use of previous experience.

Memory thus has a clear role in cognitive architectures, as a means of linking past experience to present and future behaviour. Current cognitive robotics architectures typically implement a version of Working Memory - a functionally separable system that forms the link between long-term memory (information storage) and cognition (information processing). However, this division of function gives rise to practical and theoretical problems, particularly regarding the nature, origin and use of the information held in memory and used in the service of ongoing behaviour.

The aim of this work is to address these problems by synthesising a new approach to cognitive robotics, based on the perspective that cognition is fundamentally concerned with the manipulation and utilisation of memory. A novel theoretical framework is proposed that unifies memory and control into a single structure: the Memory-Based Cognitive Framework (MBCF). It is shown that this account of cognitive functionality requires the mechanism of constructivist knowledge formation through ongoing environmental interaction, the explicit integration of agent embodiment, and a value system to drive the development of coherent behaviours.

A novel robotic implementation - the Embodied MBCF Agent (EMA) - is introduced to illustrate and explore the central features of the MBCF. By encompassing aspects of both network structures and explicit representation schemes, neural and non-neural inspired processes are integrated to an extent not possible in current approaches.

This research validates the memory-based approach to cognitive robotics, providing the foundation for the application of these principles to higher-level cognitive competencies.


This work was conducted at the University of Reading (U.K.) under the supervision of Dr. Will Browne. While I enjoyed my time there, it was a fairly lonely research process, and I am very much appreciating the opportunity for frequent and open discussions that I now have in Plymouth.

Monday, December 06, 2010

What's the point of having evidence..

... if it's not going to be used, or ignored because it doesn't match the current state of public opinion.

Sometimes it's frankly just embarrassing...

The removal of a few lines from a piece of paper (admittedly legislation) is going to remove the requirement for formal scientific advice in the determination of drug policy in the U.K. (noted though that it doesn't necessarily mean that no scientists will form part of the relevant committee - but it's surely not a good sign: these are politicians we're talking about.) I would have hoped that the change in government might have meant that 'squabbles' of the past may have been left there - but then the idea that government policy could be challenged by people who know more than politicians would be worrying for anyone in power, whatever their political persuasion. Besides, the manipulation of evidence (and statistics) to serve political ends is hardly new is it - except that now it can technically be done without the evidence in the first place.

Oh well, only another 4 years until the next opportunity to register displeasure at the ballot box...

Thursday, October 14, 2010

On Memory, from St. Augustine

I've been sitting on this quote for a while. I somehow came across it a few years ago (though I can no longer remember how I first found it), and used part of it as the opening quote of my thesis (in that quest to find a really old, obscure, but relevant way of opening the first chapter - I guess as a means of 'showing off' your supposed breadth of research...):

"There are all things preserved distinctly and under general heads, each having enetered by its own avenue, as light, and all colors and forms of bodies, by the eyes; by the ears all sorts of sounds; all smells by the avenue of the nostrils; all tastes by the mouth; and by the sensation of the whole body, what is hard or soft, hot or cold, smooth or rugged, heavy or light, either outwardly or inwardly to the body. All these doth that great harbor of the memory receive in her numberless secret and inexpressible windings, to be forthcoming, and brought out at need; each entering in by his own gate, and there laid up. Nor yet do the things themselves enter in; only the images of the things perceived, are there in readiness, for thought to recall. Which images, how they are formed, who can tell, though it doth plainly appear by which each hath been brought in and stored up? For even while I dwell in darkness and silence, in my memory I can produce colors, if I will, and discern betwixt black and white, and what others I will. Nor yet do sounds break in and disturb the image drawn in by my eyes which I am reviewing, though they also are there, lying dormant, and laid up, as it were, apart. For these too I call for, and forthwith they appear."
From the 1976 Translation version of "The Confessions of St. Augustine" (398 A.D.), Book 10, by Edward B. Pusey.

I've not found a more poetic description of the introspective function of memory, which is of course as relevant now as it was when written in the 4th century A.D.