By barneyb on July 20, 2011
In case anyone wants to know, here are the specs for Boggle – both for Original Boggle and for Big Boggle – in a handy machine-readable format. The format is line oriented with each line representing a single die, and the sides of the dice delimited by spaces. Note that there is a [...]
Posted in cfml, groovy, random
By barneyb on May 28, 2010
Joshua (a coworker) and I have been talking about gravity simulation for a while, and this week I threw together a very simple model to do exactly that. This grew out of a game called Flotilla that he came across somewhere and has been working with the developer to add a network multiplayer mode. Flotilla, [...]
Posted in development, groovy
By barneyb on May 26, 2010
Yesterday I presented CFGroovy to the Tulsa CFUG via Connect. The recording is now available on Connect, thanks to Steve. You can also grab the slidedeck (as a PDF) I skimmed through, and of course, the CFGroovy framework itself (project page, core SVN, demo SVN), including the demo files that I showed.  Note that the [...]
Posted in cfml, groovy, personal
By barneyb on May 25, 2010
If you've ever wanted to do raw JDBC stuff in your ColdFusion applications, you probably know that you can get a javax.sql.DataSource via this code:
createObject("java", "coldfusion.server.ServiceFactory")
.dataSourceService.getDatasource("myDSN")
Unfortunately, this doesn't work on Railo, because the result isn't actually a javax.sql.DataSource, it just looks like one (see RAILO-43). To put that another way, it's duck typed.
Fortunately, [...]
Posted in coldfusion, groovy, railo
By barneyb on May 18, 2010
Next Tuesday (May 25th), I will be presenting CFGroovy to the Tulsa CFUG via Connect. Details are at http://www.tulsacfug.org/meetings.cfm, but the important bit is that it's at 12:30 central time, not in the evening. Steve Bryant – who manages the group – graciously extended a general invitation to anyone else who would like to join [...]
Posted in coldfusion, groovy
By barneyb on April 23, 2010
This afternoon I presented on Polyglot Programming at cf.objective() 2010. Unlike most presentations I give, this one has almost no code, so the slidedeck (as a PDF) is the whole shebang. The in-deck content is admittedly light; really just an outline to follow along as I talked. The short version of the verbal part is:
Using [...]
Posted in cfml, development, groovy
By barneyb on April 5, 2010
As I've stated at various times and places, CFGroovy 1 (with Hibernate integration) has been superceded by the ORM functionality now available in ColdFusion 9 and soon to be available in Railo 3. It has never been my intention to compete with the CFML vendors in the Hibernate space – without access to the engine [...]
Posted in cfml, groovy
By barneyb on March 5, 2010
The next sudoku strategy is called a "pointing pair" which I'm going to start by generalizing into "pointing triple". The strategy is pretty straightforward: if, for a given number in a given block, all the potential cells are in the same row or column, then that number cannot exist in any other block's cells of [...]
Posted in groovy, sudoku
By barneyb on February 18, 2010
The next Sudoku solving strategy I want to dig into is called "hidden single". Here's the implementation to start with:
class HiddenSingleStrategy implements Strategy {
static getTests() {
[
new Test(
'0' * 9 + '000200000' + '0' * 9 [...]
Posted in groovy, sudoku
By barneyb on January 27, 2010
A couple days ago I posted about implementing a Sudoku solver in Groovy as a sort of cross-training exercise, and promised to delve into the strategies a bit more. So here's GameRulesStrategy:
class GameRulesStrategy implements Strategy {
static getTests() {
[
new Test(
[...]
Posted in groovy, sudoku