fringley (adj)
Nice, very shiny, interesting, out of the ordinary. An extraordinary person. Almost unreal.

ChrisTingley


Articles

Essential TextMate Plugins June 4, 2010
Our development team has now got upwards of 20 man-years experience with TextMate so we thought it would be a good idea to share with you the most useful bundles we’ve come across so far. If you feel there are any glaring omissions, then please leave a comment!

Strange problems with ruby-debug (rdebug) after installation of Ruby Enterprise (REE) June 1, 2010
Some of us had some troubles with ruby-debug after upgrading to Ruby Enterprise Edition. One of the issues was with ‘debugger’ statements within the source code causing the debugger to break, but to report line numbers multiplied by two!

Take care when writing to files using puts February 5, 2010
For writing text files; especially line by line, it’s perfectly acceptable to use puts. But, be warned that this will append a line break after the data being written. This behaviour is not desirable when working with binary files, when IO::write is a better choice to avoid unwanted line break characters...

Long-holding shortcut keys in OS X (and other cool combos) January 24, 2010
I switched to Mac around 10 years ago and have picked up a variety of shortcuts over the years to streamline my workflow. But, something I only found out about this weekend was the “long-hold”...

onbeforeunload event and differences between browsers January 19, 2010
The [recently in webkit] supported onbeforeunload window event can be very useful to inform the user if they are about to loose some data which they haven’t saved yet etc. So, in your method that the event calls you will probably have some logic to decide if the method should return or not (returning a string from the method causes the message to be displayed to the user).

Keeping custom Rails model validations DRY January 18, 2010
There are a few blog posts on writing model validators – this is another one which follows the DRY (don’t repeat yourself) philosophy...

Datatypes in Javascript – setting the record straight December 23, 2009
It’s a question that often comes up and there are many places on the internet that give an inaccurate answer, so here’s the real-deal...

An Introduction to Ruby on Rails Presented at the 1st Reading Geek night, November 11, 2009
"He showed us some 'speed coding' with a live demo of Ruby on Rails. In the space of 15 mins he wrote a web app from scratch (including writing some test cases) and gracefully recovered from an (extremely rare) mac related crash! Chris is clearly a Ruby ninja and opened a few eyes to what you can do with an MVC framework like Rails." [reference]

Reading Geek Night November 5, 2009
An open community event for techy-types is getting underway in Reading. These events are for people to get together in an informal setting, share knowledge and have a couple of beers!

Detecting an invalidly parsed date in Javascript November 24, 2009
When parsing a date in Javascript, it is important to ensure that the resultant object has been parsed correctly. This is made slightly tricky as the resultant object will always be a Date object if created with new Date()...

Installing modporter for Rails on Ubuntu Hardy Heron September 19, 2009
It’s not an uncommon scenario for Apache to not play nicely with Rails when dealing with multipart forms and large uploaded files. There are a few solutions out there, but the best we have seen is modporter from the guys at ActionRails...

Tracking down a stolen laptop August 22, 2009
This is a bit off-topic, but worthwhile sharing. I recently, rather unfortunately had my laptop stolen and now I have a replacement; I remember hearing about software that could use the built in iSight to take photos of the thieves and mail them back to me...

Ruby is beautiful – longest word length July 2, 2009
Sometimes it makes me smile how things can be implemented in such a simple and beautiful way in Ruby...

Overriding fundamental ActiveRecord methods (like destroy) whilst preserving callbacks June 5, 2009
OK, so you’ve decided that it’s a good idea for you to override one of the fundamental methods on one of your ActiveRecord models. But in doing so, you have discovered that all of a sudden your callbacks have stopped working...

Comparison <=> operator on string attributes of ActiveRecord objects June 5, 2009
Here’s a little gotcha for you which caught me out by surprise, obvious when you think about it, but irritating if you miss it: the ruby String comparison operator does case-sensitive comparisons...

Performance implications of procs and blocks in Ruby November 19, 2008
Whilst profiling the performance of some code, I wondered why a method that was yielding to a small block of code was taking so long...

Writing ruby code that only executes in development mode November 11, 2008
Our application does a lot of parsing of tree structures in development mode which aids our application developers in creating squeeky-clean code. However, in production we don’t really want and don’t need the overhead of all these additional recursive tree-parsing methods, but we also don’t want to change the application code...

Profiling your Ruby on Rails application November 11, 2008
At some point you want to check that there aren’t any really slow bits of your application and even if there aren’t, you might like to know where to spend effort in optimising. Luckily for you the script/performance/request script coupled with ruby-prof gem produces very useful profiling reports...

Using RCov with a remote server or mechanize October 23, 2008
Here at workbooks, we use a number of different testing techniques including server-based unit and rspec testing and client-based selenium testing...

Undefined local variable or method ` ‘ October 9, 200
Ever had this little nugget of information? Lets play spot the difference...

Running remote rdebug in client-server mode October 2, 2008
I’m still trying to get rdebug to debug my script/server on a remote machine from Textmate and still no luck. However, I had another play with rdebug and have finally managed to get the client-server mode working. I never managed to find any blog posts that worked for me, so hopefully this will work for you!

Including developer notes as part of your cruisecontrol.rb task October 2, 2008
So we can stay on top of our TODOs, FIXMEs and CHANGEs, we include the “notes” rake task output as one of the custom build artifacts. As I haven’t found a better way to pipe the output of invoked rake tasks, we redirect stdout into a file...

Really useful Rails/Ruby debug helper functions June 4, 2008
OK, so printing stuff out to the console is pretty important when debugging your really nifty RoR application. Here’s a couple that we find exceptionally useful...

Using jQuery and Ajax to load sub-sections of a webpage May 12, 2008
OK, so this isn’t really rocket science, but there are a couple of neat uses for this technique...

Dumping and loading seed data for Rails database resets May 9, 2008
As mentioned in our previous posts regarding database migrations in Rails, we have introduced a method of managing seed data in migrations. Although this methodology still has some problems, generally speaking it works pretty well...

Seeding data in Rails Migrations (Part 2) May 9, 2008
We’ve had a significant number of hits on our first article on Seeding data as part of Rail database migrations which just goes to show that people are finding this a bit of a problem! As we have been using our technique for a few weeks now, we’d like to point out a few of the problems with it that we have found (some with solutions, and some that we just haven’t figured out yet!)...

Simple client-side form validation in javascript using jQuery April 15, 2008
I’m new to jQuery (I come from a prototype background), so I quite enjoyed my first little jaunt using jQuery… and I used it to create a simple client-side form validation library.

Seeding data as part of Rails database migrations April 10, 2008
So, we stumbled across a slight problem when trying to seed data as part of our database migration scripts. The de-facto standard seems to be to keep the seed data in yaml files and load them in using fixtures. This is a perfectly adequate way of doing it for seed data that will never change, but doesn’t really fit into the infrastructure of migrations. There are also many plugins out there to help with using fixtures to seed data, but none of them allow you to have different seed data for different migration versions...

Supported data types for create_table in Rails 2.0 April 10, 2008
Even given the sketchy documentation, I managed to glean the data types for create_table from the ActiveRecord::Migration Rails Framework Docs as being...

Selenium RC environments with whitespace characters April 7, 2008
We use selenium grid to orchestrate our acceptance testing over multiple browsers on multiple platforms. One of the nice things with registering environments with the selenium grid hub, is that you can use descriptive names like: “IE on Windows XP” and “Firefox on OS X” for example...

Chris Tingley CV
2009, Available as downloadable Document (70kB). Downloaded 4142 times
My CV

Working towards an emotion-based agent architecture
2006, Available as downloadable Paper (200kB). Downloaded 2126 times
It is known that emotions provide useful functions within animals and humans. It has been proposed that agent systems can also benefit from biologically inspired emotions, but to do this an adequate emotional-based architecture must be developed. This project has developed such an architecture using a test platform consisting of three physical robots and a number of virtual agents. From observing the emergent behaviors of the agents equipped with the developed emotion-based architecture, several interesting and beneficial traits were identified. 1) A reduced complexity in behavioral programming and action selection due to the abstraction of inputs in which turn leads to simpler creation of emotional responses. 2) Reduced bandwidth between the agents and controllers and 3) more realistic behaviors.

Developing an emotion-based agent architecture and Development Platform
2006, Available as downloadable Technical Report (1MB). Downloaded 1909 times
Abstract: This report introduces the importance of emotions and their uses in control mechanisms for autonomous agents, but in order to develop such architectures, a suitable development platform is needed. This project not only tackles the problem of laying the foundations for a comprehensive emotion-based agent architecture, but also addresses the need to have an extensible platform to develop and test both physical and virtual implementations of the developed agent architectures. The project has successfully culminated in a reliable mixed reality environment where physical and virtual agents can coexist and interact, whilst providing a solid base for a number of other projects using the same installation. Alongside this, an architecture has been developed providing a number of benefits which are outlined in the results in section 3 including (although not limited to) simpler behavioral programming and reduced bandwidth requirements between agents and controllers.

Exploring the needs of Emotions in a Multi-Agent System
2006, Available as downloadable Research Paper (1MB). Downloaded 2146 times
Human emotions have fascinated scientists for many years because of the diversity of findings between differing fields of study. Even though there is no clearly defined answer as to what emotions are and why we have them; we can still apply our limited knowledge of emotions to other areas of science. Distributed artificial intelligence; specifically Multi-Agent Systems (MASs), is a relatively new area of science that has only come about within the last 10 years. As a result of its' infancy, many MASs suffer from a number of common fundamental problems. Planning, scheduling and goal management are all inter-related problematic areas of MASs. These are caused by large search domains, multiple dimensionality, non-linearity, conflicting interests and NP-complete problems, all of which are seen to be echoed, but more importantly solved in human systems. This paper will show how human systems overcome these problems using simple emotional mechanisms. A hypothesis will be made that many challenges within MASs can be solved by implementing mechanisms which mimic the purpose of human emotions.

Developing an emotion-based agent architecture and development platform
2006, Available as downloadable Technical Report (49MB). Downloaded 2033 times
This report introduces the importance of emotions and their uses in control mechanisms for autonomous agents, but in order to develop such architectures, a suitable development platform is needed. This project not only tackles the problem of laying the foundations for a comprehensive emotion-based agent architecture, but also addresses the need to have an extensible platform to develop and test both physical and virtual imple- mentations of the developed agent architectures. The project has successfully culminated in a reliable mixed reality environment where physical and virtual agents can coexist and interact, whilst providing a solid base for a number of other projects using the same instal- lation. Alongside this, an architecture has been developed providing a number of bene?ts which are outlined in the results in section 3 including (although not limited to) simpler behavioral programming and reduced bandwidth requirements between agents and con- trollers.

Cybernetics Tech Report Latex Files
2006, Available as downloadable Files (1MB). Downloaded 1748 times
UPDATED! Version 4. Fixed a few more bugs! A must have for anyone doing a cyb technical report in Latex. Includes an example .tex and the all important .sty. Thanks to Robert Oates and John Wesley for providing version 1.

Cybernetics SCARP Latex Files
2006, Available as downloadable Files (1MB). Downloaded 1778 times
Latex style files for SCARP paper submission. Note: there still remain some issues with this style file, please see the example for workarounds.

Evolutionary Computation Coursework
2005, Available as downloadable Files (222kB). Downloaded 1836 times
This zip file contains the C#.net projects and source code suitable to implement a generic evoluationary algorithm (specifically a Genetic Algorithm) to solve either: Part A - single peak function, Part B: A multi-peak function, Part C: the Iterated Prisoners Dilemma. See the accompanying PDF for more details.

An Introduction to: Evolutionary Computation
2005, Available as downloadable Technical Report (1MB). Downloaded 2410 times
Evolutionary computation is a broad name for several incarnations of evolutionary algorithms (EAs). In general, EAs maintain a population of individuals which evolve based on a number of stochastic and algorithmic techniques applying to the selection, recombination and mutation of each individual within the (often randomly) created population. Several different types of EA will be explored, their similarities and differences illustrated, before implementations of two EAs are described and the influence of varying techniques and parameters on their results are discussed.

Highly Integrated Navigation Algorithm for Alfresco Mobile Robots
2005, Available as downloadable Paper (172kB). Downloaded 2276 times
Abstract: A team of six were formed to compete in the 2005 MEng. Robot Challenge and as such build a robot to autonomously navigate between a series of GPS (WGS84) coordinates. This paper discuses the authors work in designing and implementing a highly integrated navigation algorithm to marshal data between numerous types of sensors and actuators. The intermediate results of the project will be explored and a successful start to the project will be ascertained.

Mobile Robot Project
2004, Available as downloadable Technical Report (1MB). Downloaded 2189 times
Abstract: Mobile robots have many uses in todays modern society and are creeping more and more into the public eye. This project is aimed to give an understanding some of the basic principles in designing and building such robots. The mobile robot produced for this project had one simple goal in life to follow an object at a fixed distance.

Content-based language analysis MLP
2004, Available as downloadable Files (2.5MB). Downloaded 1985 times
A zip file containing source code (and library MLP code) and XCode project for a MLP Neural Network designed to learn and classify text files in different languages. See the accompanying report for more details, or the readme file for useage information.

Using Multilayered Perceptron Artificial Neural Networks in Content-based Language Classification
2004, Available as downloadable Technical Report (3.9MB). Downloaded 2272 times
Abstract: Multilayered perceptrons (MLPs) are a form of artificial neural network (ANN), which are particularly good at classification problems. Content-based language classification (CBLC) is one such example of a classification problem. This paper will look at the design methodology behind creating an MLP network in C++ and show the testing of the network on a so called hard problem. The paper will finally discuss the implementation of CBLC and show how a trained network can successfully classify up to six European languages; with an accuracy of up to 99.8% on unseen data.