Apr 30, 2008
When using Rspec stories you have plain text stories which we call the 'story' file and the 'story steps' file that maps the plain text story to programmatic code. Generally you end up with your story files not being DRY. This is not a worry, your stories are the domain specific languages detailing your acceptance/integration tests. Its like saying that your Rails Models are not DRY because they ...
Feb 23, 2008
We can think of JavaScript running within a clients browser as a robotic agent. It has an environment in which it can sense things. The ability to look at the environment and make decisions based on plans.
So whys that useful, well why is a robot useful? You can produce many different complex plans and give them to the robot and forget about it while it does the work ...
Feb 14, 2008
A brief examination of some of the major Admin plugins for rails.
Lipsiaadmin
AutoAdmin
ActiveScaffold
Hobo
Streamlined
Lipsiadmin
http://rails.lipsiasoft.com/wiki/lipsiadmin
Google group Members: No group
Live Demo: http://demoadmin.lipsiasoft.org/admin/
Sample Projects: None
This admin framework mixes Ajax/JavaScript (library Ext 2.0 views) and old school HTML. The interface is presented in an application style reminiscent of Microsoft Outlook.
Feature set
http://extjs.com/ JavaScript library.
Generator Admin code.
Permissions support
Live search
Creation of menus within migrations.
Weaknesses
Community seems non-existent
Sparse documentation
AutoAdmin
http://code.trebex.net/auto-admin
Google group Members (http://groups.google.com/group/rails-autoadmin): ...
Jan 18, 2008
The Magically Appearing Admin
Web developers using an MVC framework produce their websites playing with their models, views and controllers. Then by adding a few lines of magic an admin system appears which allows users to add/edit/delete/view/search their models.
Examples:
Django's Magic Admin (Also NewFormsAdmin - a branch of Django focused on making it easier to customise auto-admin)
Ruby on rails Plugins:
Streamlined framework - http://streamlinedframework.org/
Admin magic/config - outside of the ...
Dec 19, 2007
Latent Semantic Analysis (LSA) is a mathematical method that tries to bring out latent relationships within a collection of documents. Rather than looking at each document isolated from the others it looks at all the documents as a whole and the terms within them to identify relationships.
An example of LSA:
Using a search engine search for "sand".
Documents are returned which do not contain the search term "sand" but contains ...
Nov 27, 2007
A vector space search involves converting documents into vectors. Each dimension within the vectors represents a term. If a document contains that term then the value within the vector is greater than zero.
Here is an implementation of Vector space searching using python (2.4+).
1 Stemming & Stop words
Fetch all terms within documents and clean - use a stemmer to reduce. A stemmer takes words and tries to reduce them ...
Nov 23, 2007
The event calculus planner used within my thesis was based on Dr. Murray Shanahan's ASLDICN (Abductive SLD with Integrity constraints and proof by Negation) planner with compound action support. This planner is an adaptation from one published in one of Dr. Shanahan's research papers
http://casbah.ee.ic.ac.uk/%7Empsha/planners.html
The original planner only supports the generation of a single plan. I needed to support conditional planning. I wanted the planner to generate multiple plans ...
Nov 23, 2007
Prolog can be run as CGI by using a PHP wrapper script which invokes the Prolog engine from within PHP. Prolog can be invoked indicating Prolog files to load and goals to initially achieve once loaded.
Executing the following in PHP can spawn a process which runs Prolog.
$cgiOutput = `sicstus --goal $goal. -l "$cgiPrologScriptToLoad"`;
This specific example is for Sicstus but most Prolog command lines have a similar format. Another ...
Nov 23, 2007
We use the magic __call method in PHP which is called on an object when a declared function is called on it but it does not exist. This behaviour allows us to have default getters/setters but if we want specific behaviour for a get/set we just have to add the function to the class and __call will no longer be used for that class attribute.
[viewcode] src=../projects/php/GetSetExample.php geshi=php[/viewcode]
Nov 23, 2007
Summary
Funkload is an open source python based unit testing tool. It serves as a good tool for load testing. We can use it to create a unit test which simulates a user browsing through a site. To test load run two simultaneous instances of the unit test and so on scaling up the number of concurrent instances.
Offical Site: http://funkload.nuxeo.org/
I have written a python based Funkload build script which:
Builds ...