Posts

More test coverage and (rspec, scalacheck, and hunit)

I added more test coverage to botlist; basically adding tests by language. I don't have much to add to this entry except to say, here are some examples on how I used these test frameworks in botlist. Links to the actual libraries are at the bottom of the post. RSpec http://openbotlist.googlecode.com/svn/trunk/openbotlist/tests/integration/ruby/rspec # create mock tests include_class 'org.spirit.bean.impl.BotListCoreUsers' unless defined? BotListCoreUsers include_class 'org.spirit.util.BotListUniqueId' unless defined? BotListUniqueId include_class 'org.acegisecurity.providers.encoding.Md5PasswordEncoder' unless defined? Md5PasswordEncoder include_class 'org.spirit.bean.impl.BotListProfileSettings' unless defined? BotListProfileSettings include_class 'org.spirit.contract.BotListContractManager' unless defined? BotListContractManager include_class 'java.text.SimpleDateFormat' unless defined? SimpleDateFormat include_c...

Adding rspecs with jruby and for the spring framework

I will have to discuss this in future blog entries. But this is a rspec helper script for setting up rspec and spring (with jruby): ### ### Author: Berlin Brown ### spec_helper.rb ### Date: 2/22/2008 ### Description: RSpec, JRuby helper for setting up ### spring rspec tests for botlist ### lib_path = File .expand_path( " #{File.dirname(__FILE__)} /../../lib" ) $LOAD_PATH .unshift lib_path unless $LOAD_PATH .include?(lib_path) require 'spec' require 'java' include_class( 'java.lang.String' ) { 'JString' } include_class( 'java.lang.System' ) { 'JSystem' } # Have to manually find the spring config files spring_config = File .expand_path( " #{File.dirname(__FILE__)} /../../../../WEB-INF/botlistings-servlet.xml" ) spring_util_config = File .expand_path( " #{File.dirname(__FILE__)} /../../../../WEB-INF/spring-botlist-util.xml" ) puts spring_config # The logs will get output here JSystem .getProperties().put...

Botlist Hackathon - Adding test/build server and Lisp web frontend

It is going to be a fun weekend. I am building a simple build server/jobs that will create daily builds. Also, I plan on creating more test coverage for the botlist system. Fun, fun, fun. Botlist is built with many languages so it will be interesting to build a complete test suite. In case you are interested, languages actively being used. In order of use. (leaving out html, xml, bash and other misc items). 1. Ruby/JRuby - Main web front-end (see botspiritcompany.com). 2. Python - Misc scripting tasks, web scraping, etc. 2b. Python/Django - New web front-end. 3. Java/J2EE/SpringMVC - Part of the main web front-end. 4. Haskell - Text processing back-end. 5. Erlang - Web scraping, IRC bot. 6. Lisp - New web front-end. Other notables. A. Perl - for misc scripting tasks B. Factor - used for web test framework, I started it, but didn't get to work on it further. Still a powerful language for such tasks, probably better than some above. Updated: Actually, if you really want to...

TDD in one sentence, "Only ever write code to fix a failing test"

"Only ever write code to fix a failing test" EOM

Great application

Great application for persisting key/value data. Seems to just have been released. (Memcachedb) http://code.google.com/p/memcachedb/wiki/Performance

More fun this week, Analysis for wikipedia data

Analysis for WEX: http://blog.freebase.com/?p=108 "Growing at approximately 1,700 articles a day, Wikipedia is a significant repository of human knowledge. With its focus and depth, Wikipedia has emerged as a public good of information, fueling a small industry of computer science research. And though Wikipedia contains a wealth of collective knowledge, due to is idiosyncratic markup and semi-structured design, developers wishing to utilize this resource each incur significant start-up costs simply handling, parsing and decoding the raw corpus."

Semantic web indexing

Here is a good article on semanatic web indexing. "The most surprising figure here is probably the abundance of FOAF namespaced arcs, this appears to be largely due to the FOAF data automatically generated by services such as Live Journal (http://livejournal.com/) which, of the documents indexed so far account for 89% of the documents using the FOAF namespace." FOAF Semantic indexing from w3