The Lucifer Effect: How ordinary people becomes monsters … or heroes

Philip Zimbardo knows how easy it is for nice people to turn bad. In this talk, he shares insights and graphic unseen photos from the Abu Ghraib trials. Then he talks about the flip side: how easy it is to be a hero, and how we can rise to the challenge. Some of the imagery in the talk is disturbing, yet for all the horror Zimbardo describes to us, his overarching message is one of hope.

Why do some people always complain about something, yet do nothing to change the situation?

By far the simplest answer to this question is: complaining is easy but actively trying to change things requires work!

I always hated it when people start off a diatribe by saying “There’s two kinds of people in this world …”, yet I find that I’m about to do exactly that. It feels to me that you’re either the kind of person that see’s something that’s wrong and decides to do something about it openly and honestly… OR you’re the kind of person who sits there whining and complaining about things but doesn’t have courage or the conviction to get up off your ass and actually do something about whatever it is that is bugging you.

If you disagree with something, if you think you’re being treated unfairly, or you perceive that there’s some kind of injustice being perpetrated then, grow a set of balls, find you’re voice and confront the issue. You might actually find that other people lend their voice to yours and you can actually effect change, or at the very least they’ll respect you for speaking up.

I don’t require or expect anyone to agree with me over anything I do in life or write on this blog … I always speak my mind, openly and honestly, my words are my own and they reflect what I believe, and how I perceive the world around me. I hide behind no-one. I always try to change those things that I disagree with, I don’t always succeed but at least I speak up. If you don’t like me, or you feel differently to me then find your own voice, and make yourself heard and fight to change that which you disagree with … but in doing so, please, have the courage to do it openly rather than cringing like a coward behind the anonymity you’ve chosen.

You must be the change you wish to see in the world.
            Mahatma Ghandi

It ain’t about how hard ya hit. It’s about how hard you can get hit!

Inspiration can come from the unlikeliest of places occasionally you read something or in this case hear something that resonates so deeply that you can’t help but smile …

I'd hold you up to say to your mother, "this kid's gonna be the best kid in
the world. This kid's gonna be somebody better than anybody I ever 
knew." And you grew up good and wonderful. It was great just watching 
you, every day was like a privilege. Then the time come for you to be 
your own man and take on the world, and you did. But somewhere along 
the line, you changed. You stopped being you. You let people stick a finger 
in your face and tell you you're no good. And when things got hard, you 
started looking for something to blame, like a big shadow. Let me tell you 
something you already know. The world ain't all sunshine and rainbows. 
It's a very mean and nasty place and I don't care how tough you are it will 
beat you to your knees and keep you there permanently if you let it. You, 
me, or nobody is gonna hit as hard as life. But it ain't about how hard ya 
hit. It's about how hard you can get hit and keep moving forward. How 
much you can take and keep moving forward. That's how winning is done! 
Now if you know what you're worth then go out and get what you're worth. 
But ya gotta be willing to take the hits, and not pointing fingers saying you 
ain't where you wanna be because of him, or her, or anybody! Cowards do 
that and that ain't you! You're better than that! I'm always gonna love you 
no matter what. No matter what happens. You're my son and you're my 
blood. You're the best thing in my life. But until you start believing in 
yourself, ya ain't gonna have a life.

                                                       - Rocky Balboa

Fix multiple ghost aliases in Finder Sidebar

I’ve been experiencing an odd problem in Finder for some time now. It intermittently duplicates the aliases under Places in the Side Bar. I have no idea why it does that but I finally figured out one way of fixing the problem. If like me you find that you have duplicated aliases in the Sidebar, all you have to do is delete the following file, then logout and log back in.


Once you have done this and logged back in you’ll find that you have very little under the Places heading, at this point you need to drag back into here any folder shortcuts you want to make available. Thanks to this my sidebar is now looking nice and tidy again …

Test-Driven JavaScript Development with JsUnit

The last time I used JsUnit was when I first joined Talis. At the time my colleague Ian Davis asked me to write a JavaScript client library for one of our platform API’s to make it easy for developers to perform bibliographic searches. It wasn’t a particularly difficult task and I did it relatively easily. It was around the same time that Rob was extolling the virtues of Test Driven Development to me, and to try to prove his point we agreed to do an experiment: he asked me to set aside the library I had written and to see if I could develop the library again using test driven development. It meant I had to figure out how to unit test JavaScript, and thats when I found JsUnit. I did the exercise again and even I was impressed with the results. By having to think about the tests first, and design the interface to the library as I wrote each test it evolved very differently to my original solution. Consequently it was also far superior.

Anyway fast forward two and half years and I find myself in a similar situation. We have only just begun to start writing bits of JavaScript code based around prototype.js to help us create richer user experiences in our products if we detect that JavaScript is enabled in the browser. This now means I want to ensure that we are using the same rigour when writing these bits of code as we do in all other parts of the application – just because its JavaScript and executed inside the browser this doesn’t mean it shouldn’t be tested.

I’ve just spent the morning getting JsUnit installed and figuring out how to get it to run as part of a continuous integration process, as well as thinking about how to write tests for some slightly different scenarios. Here’s what I’ve discovered today:

Installing JsUnit

Couldn’t be easier … go to and download the latest distribution, and extract into a folder on your system somewhere, lets say
/jsunit for now. The distribution contains both the standard test runner as well as jsunit server which you will need it if you want to hook it into an ant build.

Writing Tests

In JsUnit we place our tests in a HTML Test Page which is the equivalent of a Test Class, this test page must have a script reference to the jsUnitCore.js so the test runner knows its a test. So lets work through a simple example. Let’s say we want to write a function that returns the result of adding two parameters together. The Test Page for this might look like this:

  2. <html>
  3.  <head>
  4.   <title>Test Page for add(value1, value2)</title>
  5.   <script language="javascript" src="/jsunit/app/jsUnitCore.js"></script>
  6.   <script language="javascript" src="scripts/addValues.js"></script>
  7.  </head>
  8.  <body>
  9.     <script language="javascript">
  10.     function testAddWithTwoValidArguments() {
  11.         assertEquals("2 add 3 is 5", 5, add(2,3) );
  12.     }
  13.   </script>
  14.  </body>
  15. </html>

For now lets save this file to /my-jsunit-tests/addTest.html

To run the test you need to point your browser at the following local url:


The test will not run since we haven’t defined the add function. Let’s do that (very crudely):


Now if you go to that URL it will run the test and report that it passed. Excellent, we’ve written a simple test in JavaScript. Now lets extend this a little, lets say I want to write something more complicated like a piece of JavaScript that uses Prototype.js to update the DOM of a page. Is this possible? Can I do that test first? It turns out that you can …

Lets say we have a div on the page called ‘tableOfContents’ and we want to use Prototype.js to dynamically inject a link onto the page that says [show] and lets say we want to write a function that will toggle this link to say [hide] when the user clicks on it, this link will also set the visible state of the table of contents itself which for now we’ll say is just an ordered list (OL). Our test page is going to be slightly more complex …

  2. <html>
  3.  <head>
  4.   <title>Test Page for multiplyAndAddFive(value1, value2)</title>
  5.   <script language="javascript" src="/jsunit/app/jsUnitCore.js"></script>
  6.   <script language="javascript" src="scripts/prototype/prototype-"></script>
  7.   <script language="javascript" src="scripts/tableOfContents.js"></script>
  8.  </head>
  9.  <body>
  10.     <div id="tableOfContents">
  11.     <h2 id="tableOfContentsHeader">Table of contents</h2>
  12.     <ol id="list-toc">
  13.     </ol>
  14.     </div>    
  15.     <script language="javascript">
  16.     function testTOC()
  17.     {
  18.         var title = $(‘lnkToggleTOC’).title;
  19.         assertEquals("should be Show the table of contents", "Show the table of contents", title);
  21.         toggleTableOfContents();
  23.         var title = $(‘lnkToggleTOC’).title;
  24.         assertEquals("should be Hide the table of contents", "Hide the table of contents", title);
  26.     }
  27.   </script>
  28.  </body>
  29. </html>

There are some differences in this test. Firstly the html contains some markup, that I’m using as the containers for my table of contents. The table of contents has a header and the contents in the form of an empty ordered list. Now I know that I want the javascript to execute when the page is loaded, so I’ve written this test to assume that the script will run and will inject and element called ‘linkToggleToc’ which is the show/hide link next to the heading. Therefore the first line of the test uses prototype.js element selector notation to set a local variable called title to the value of the title of the element that has the id ‘linkToggleToc’. If the script failes to execute then this element will not be present and the subsequent assert will fail. If the assert succeeds, then we call the toggleTableOfContents function and then repeat the same evaluation only now we are checking to see if the link has been changed.

The code for tableOfContents.js is as follows:

  1. span class=”st0″>’load’‘Show the table of contents’‘Hide the table of contents’‘list-toc’).hide();
  2.     $(‘tableOfContentsHeader’‘inline’‘a’, { ‘id’: ‘lnkToggleTOC’, ‘href’: ‘javascript:toggleTableOfContents()’, ‘title’: titleShowTOC, ‘class’: ‘ctr’ }).update("[show]");
  4.     $(‘tableOfContentsHeader’‘after’‘list-toc’‘lnkToggleTOC’).update(‘[show]’);
  5.         $(‘lnkToggleTOC’‘lnkToggleTOC’).update(‘[hide]’);
  6.         $(‘lnkToggleTOC’).title = titleHideTOC;
  7.     }
  8. }

Now if we run this test in the same way we executed the previous test it will pass. I accept that this example is a bit contrived since I know it already works and I’ve skimmed over some of the details around it. The point I’m trying to make though is that you can write unit tests for pretty much any kind of JavaScript you need to write, even tests for scripts that do dom manipulation, or make AjaxRequests etc.

Setting up the JsUnit server so you can run it in a build

JsUnit ships with its own ant build file that requires some additional configuration before you can run the server. The top of the build file contains a number of properties that need to be set, here’s what you set them to ( using the paths that I’ve been using in the above example)

  2. <project name="JsUnit" default="create_distribution" basedir=".">
  4.   <property
  5.     name="browserFileNames"
  6.     value="/usr/bin/firefox-2" />
  8.   <property
  9.     id="closeBrowsersAfterTestRuns"
  10.     name="closeBrowsersAfterTestRuns"
  11.     value="false" />
  13.   <property
  14.     id="ignoreUnresponsiveRemoteMachines"
  15.     name="ignoreUnresponsiveRemoteMachines"
  16.     value="true" />
  18.   <property
  19.     id="logsDirectory"
  20.     name="logsDirectory"
  21.     value="/my-jsunit-tests/results/" />
  23.   <property
  24.     id="port"
  25.     name="port"
  26.     value="9001"  />
  28.   <property
  29.     id="remoteMachineURLs"
  30.     name="remoteMachineURLs"
  31.     value="" />
  33.   <property
  34.     id="timeoutSeconds"
  35.     name="timeoutSeconds"
  36.     value="60" />
  38.   <property
  39.     id="url"
  40.     name="url"
  41.     value="file:///jsunit/testRunner.html?testPage=/my-jsunit-tests/tocTest.html" />
  42. </project>

You can then type the following command in the root of the jsunit distribution to launch the jsunit server, executes the test, and outputs a test results log file, formatted just like JUnit, and reports that the build was either successful or not if the test fails.

  ant standalone_test

Remember that in this example I’ve used a simple Test Page, however JsUnit, like any XUnit framework allows you to specify Test Suites, which is how you would run multiple Test Pages. Also the parameters in the build file woudn’t be hardcoded in you continuous integration process but would rather be passed in, and you would want to call it from your projects main ant build file … all of which is pretty simple to configure, once you know what is you want to do and what’s possible.

Visual Interfaces to the Social and the Semantic Web (VISSW2009)

I’ve recently been invited (and accepted) to join the Program Committee for the Visual Interfaces to the Social and the Semantic Web workshop which will be held as a part of the 2009 International Conference on Intelligent User Interfaces which takes place in February in Florida. Here’s a brief description of the workshop:

This workshop aims to bring together researchers and practitioners from different fields, such as Human-Computer Interaction, Information Visualization, Semantic Web, and Personal Information Management, to discuss latest research results and challenges in designing, implementing, and evaluating intelligent interfaces supporting access, navigation and publishing of different types of contents on the Social and Semantic Web. In addition, the workshop also serves as an opportunity for researchers to gain feedback on their work as well as to identify potential collaborations with their peers

I’m quite excited about this workshop, I’ve been spending some of 10% time at work on playing with ideas around how to visualise data on the Semantic Web just over eighteen months ago I was already using and extending Moritz Stefaner‘s excellent Relation Browser to visualise semantically structured data, and was effectively walking around entire graphs of data:

However there were problems with this approach, performance over large sets of data was one, and I spent a considerable amount of time extending the tool. However it occurred to me that with Relation Browser and other similar tools you are forced to take a very node centric view, when sometimes whats more useful is to be able to take a graph or named graph centric view – its not only important to be able to center on one node and see it’s direct relationships it’s often just as important to understand where that node sits with a much wider context. To that end I’ve been experimenting with visualisations that allow you to not only center on a particular node and ‘follow your nose’ but to also pan out take a more hollistic view of that graph of data – I’ve also been thinking about ways to visualise the provenance of data.

I wish I had known about this workshop sooner, it might have been the kick I needed to actually finish demonstrators of these ideas, I think I might still have time though …

With reference to the workshop itself though here’s some important dates and other bits of information if you’re interested in submitting a paper:

  • Paper submission deadline: 14th November, 2008
  • Notication of acceptance: 7th December, 2008
  • Camera-ready paper submission deadline: 14th December, 2008
  • Full papers which should be between 6 and 10 pages.
  • Short papers and position papers which should be up to 5 pages.
  • Demo papers – 2 page description with a screenshot of the working prototype or preferrably a link to an online demo.
  • Submissions must be in PDF format and prepared according to the IUI format.

It promises to be an excellent conference, and one that I will definitely be attending.

Some quick Anime reviews

Afro Samurai
I really enjoyed this movie, it’s several genre’s rolled in to an action packed animated film. It’s not difficult to tell that the film is heavily influenced by Blacksploitaion Films, Standard Eastern Anime and Japanese culture. The visuals are exceptional, the animation is amazing. The story is simple – Revenge, ’nuff said’. I have to say though that it certainly isn’t for the feint hearted or the squeamish! Be prepared for blood, dismemberment, and some pretty strong language. The voice of the Afro Samurai is provided by the uber-cool Samuel L. Jackson, and the voice of his nemesis is provided by the bone-chillingly evil Ron Perlman (Hellboy, Alien Resurrection). At 175 minutes long the movie was originally a short series, but I actually preferred watching it in one go.

Based on Masamune Shirow’s acclaimed manga, APPLESEED is a haunting and thrilling vision of an apocalyptic future in which human life is slowly being controlled by a new breed of Biodroids, creatures that are half android, half man. In this future, the remnants of the world’s governments create a city named Olympus designed to be a utopia. However, this utopia is controlled by the Biodroids, and soon the human population has had enough. Rallying together a band of terrorists, the humans decide that they must destroy Gaia, the computer that runs Olympus, thereby freeing themselves and delivering a fatal blow to the reeling superpowers.
Visually this film is stunning, the semi-cell drawn animation gives it both a 3D feeling but also allows the movie to retain a strong sense of a traditional Anime. It’s so good I converted the DVD to put onto my iPod so I can watch anywhere!

Appleseed – Ex Machina
This computer-animated feature continues the story of Deunan Knute, a woman warrior whisked away from the ruined battleground where she lives to a distant city in which mankind seems to have put its destructive past behind it. The utopia of Olympus is maintained by the Bioroids, artificial people whose emotional capabilities are diminished in order to balance the careening passions of regular human beings. As a member of ESWAT, Deunan finds herself threatened by cyborg terrorism, a surprise attack on Olympus, and the appearance of Tereus, a human doppelganger for her cyborg lover and partner Briareos. Whilst I didn’t think this was a good as the original it’s still a stunning movie that remains true to the Manga.

Lady Death
This was a pretty dark movie – Hope is a young noble woman living in 15th century Sweden who has no idea her father Matthias is actually Lucifer. When the town priest discovers his secret, Matthias escapes to Hell, leaving his daughter behind to pay for his evil. As her execution draws near, she is given a horrific choice by Pagan, one of Lucifer’s minions. When she takes Pagan up on his offer, she quickly learns why her father is “The Lord of Lies”, as she is sent to Hell, betrayed, beaten, and left for dead. Her soul undergoes a transformation and becomes vengeance incarnate, a being with awesome powers, and a strong fighting prowess. She becomes “Lady Death” and vows to overthrow Lucifer himself. Whilst it all sounds pretty silly, it was fun, I wouldn’t rate it as an Anime masterpiece but it was entertaining.

CK-12 Next Generation Textbooks

Came across CK-12 whilst looking for information on tools and approaches used to help learners achieve their goals. It also appears as though their textbooks are available under a Creative Commons Attribution Sharealike license, but I need to confirm this. It’s a really interesting project and one I’ll be watching closely:

Our mission is to reduce the cost of textbook materials for the K-12 market both in the US and worldwide, but also to empower teacher practitioners by generating or adapting content relevant to their local context. Using a collaborative and web-based compilation model that can manifest open resource content as an adaptive textbook, termed the “FlexBook”, CK-12 intends to pioneer the generation and distribution of high quality, locally and temporally relevant, educational web texts. The content generated by CK-12 and the CK-12 community will serve both as source material for a student’s learning and provide an adaptive environment that scaffolds the learner’s journey as he or she masters a standards-based body of knowledge, while allowing for passion-based learning

Also found the following Google talk that provides some useful background information from the creators of the project

… on the subject of science

Since I’ve been ranting about the importance of science today … I recalled the following …

"The mere formulation of a problem is far more essential than its solution, 
which may be merely a matter of mathematical or experimental skills. To 
raise new questions, new possibilities, to regard old problems from a new 
angle requires creative imagination and marks real advances in science."
   - Albert Einstein

It’s so easy to become disenchanted due, as a species, to our seemingly limitless apathy, yet what is truly regrettable is that because of that apathy it’s often hard for us to remember our achievements, and the limitless potential within us.

Is LinkedData really more important than the Large Hadron Collider?

I’ve just read Daniel‘s recent post entitled Linked Data is more important than the Large Hadron Collider. Like Daniel I am also a passionate advocate of Linked Data and am currently working on deploying number of real world Linked Data applications along with my colleagues at Talis. Sadly though I have to confess that I found myself cringing whilst reading his piece.

Like many other scientific endeavors the Large Hadron Collider project attempts to provide scientists with huge quantities of data that might help them answer questions about the origin of the universe. As a project in it’s own right it is massive, combining the efforts of thousands of scientists from around the world.

To dismiss it, as Daniel has done, because it’s “too expensive”, or because “it wont find the cure to cancer, or HIV”, or question its relevance because “we’re still going to be here whether or not the Large Hadron Collider was successful”, is bad enough but to then use those rather specious arguments as a prop to advocate Linked Data is absolutely ridiculous.

Worse is that it overlooks the rather obvious rebuttal which is that Linked Data wont cure cancer, it wont cure HIV, and we’ll all still be here whether we have Linked Data or not :-). Even more importantly though … should anyone in our Community and by that I mean the Linked Data community really be questioning the value of any project that’s sole purpose it generate data? To then say this …

Just imagine a world where you can easily browse through the history of the atom, and then delve into the science found on the atom, and then go deeper into the subatomic level, and then browse back out into the historic realm, finding out about experiments that happened and whether it had any impact on society.

… completely misses the following point: the data to do this exists, not because of you and I Daniel, but because of the fact that since man appeared on this planet his thirst for knowledge is what has driven him forward to the point where people like you and I can sit here and say … “if you format your data like this, and give everything a dereferncible uri – that’ll be really useful!”. I’m serious … Linked Data is not a radical technology change, nor is the Semantic Web, both represent a paradigm shift, a new understanding, a new way of doing things but the fact is that the technology has been around for ages, we are only now understanding the importance of being more open, of having common vocabularies to describe things, and the importance of linking concepts together in this web of data.

The absolute last thing we want to do is to start saying to scientists, not matter how obscure ther field of research is, or how relevant we consider that research to be (personally), that it’s somehow less important than what we, as a community, are doing … because it absolutely isn’t. Are you really sure you want to be asking people to believe that answers about the origin of the universe and our existence in it are less important than an “interesting browsing experience?”