by Tom
1. September 2010 15:59
Yes !! I did it !!!
I have been making a few attempts to combine BDD with CQRS/event sourcing, since they seem to make a perfect fit.
After mailing to the DDD/CQRS newsgroup for a few times, I finally managed to make something presentable... this is the BDD part for the domain :
And this is the resulting output after running the console runner
More...
by Tom
24. August 2010 04:01
Introduction
I have been playing poker for quite some time, most of the time just for fun and a few eurocents... I especially love playing MultiTable SitNGo's (i.e. small tournaments which start when a certain amount of players has registered).
I am quite successfull playing this kind of games at lowstakes, at least I usually manage to get into the top 5% around halfway the tournament. But then the following usually happens (fictiuous situation):
- I get a premium hand (AKs for example) and raise 2-3 BB...
- I get called by a bigstack on the (BB)
- Flop, low card rainbow
- Bigstack checks
- I raise 2/3 pot
- Bigstack calls
- Turn: K
- Bigstack checks
- I raise POT
- Bigstack calls
- Some lowcard falls
- Bigstack goes all-in
- I call (I know I shouldn't, but I'm pot-commited)
- bigstack show something like 2-7os, but hits a double pair, where he hit the 2 on the flop, and the 7 on the river.
- I get busted out of the tournament (usually just before the bubble)
It's a leak !!!
Yes, now that I am reading it, I know what I should do: fold after the all-in.
I also should not have raised after the flop, maybe just a check-call if the investment is not to big.
I know I can't go all-in directly, since it's a bigstack that calls anything with rags (i.e. donk). He usually only folds on the river if he hits nothing at all (and maybe after value betting first)....
In the long term/purely based on statistics, I would probably beat him with AK. The problem is that in this phase of the tourney, in a comfortable position, I should play a whole other post-flop game, since staying in the tournament is simply more valuable then gaining a few chips
However, most of the time this happens just before the bubble, and I played a whole game just to get busted before the bubble...
And this happens to me a lot !!
So what should I do ?? Fold if the bigstack plays ?? Maybe I should, maybe I shouldn't.... but this got me thinking....
Fix the leak !!!
What if I could write an app that analyses these things, and gives me (based on statistics) the best possible solution for this situation..
I know these allready do exist, but since I am a developer and I love playing poker (even though I am really bad at it), I am going to write my own app for this... And while doing so, I will also blog about it, in order to get the discussion going and find the best possible solution for the problem.
More...
by Tom
11. August 2010 07:35
Introduction
This article will give you a brief introduction on how to get started with BDD (Behaviour driven development). It is my second attempt for such an article.
I will show you the complete workflow on how to write an app using BDD in .Net.
Background
Small note: if you want to know why you should use BDD, I would like to refer you to another one of my articles: The advantage of using BDD over TDD
Today I finally managed to upgrade my Aubergine BDD framework to v0.1.
This is now starting to get really usable (I've been dogfooding it for a while now).
This release contains the following changes:
- Very basic support for NUnit
- Build script using JeremySkinner's Phantom build engine
- Properly named namespaces/dll's (i.e. no more Be.Corebvba.*)
In this spirit I decided to write a small tutorial on how to do BDD development in .Net, so maybe some people might find some use for this !!
More...
by Tom
20. May 2010 14:21
Introduction
As you might allready know, I am maintaining a .Net CF application for one of my customers. Unfortunately, the design of the app is a total disaster, and maintaining it is actually a living hell. Fortunately however, my client decided to order a complete rewrite, which I started today. This post will not contain the sourcecode (as it is a proprietary app), but rather explain the guts of the underlying architecture and some info about the design decisions used.
Maybe I will release some of the reusable components in the future under open source, but I am not quite sure yet...
Yet another framework ?
Actually, yes !! My main concern about this app framework is keeping it lightweight, flexible, ultraportable and easy to use. By ultraportable I mean that the app should both run on the default .Net, as well as on the Compact Framework, without recompilation.
Since no framework known to me meets my criteria, I decided to get started on yet another framework.
The main design decisions are heavily based on my previous experiences with MvcExtensions, my other framework, as well as a very inspiring and well-know lecture by Rob Eisenberg: "Build your own MVVM framework".
More...
by Tom
20. April 2010 15:02
Introduction
For one of my customers I needed to have some kind of versioning for a whole bunch of entities on my database. Since I use my very own MvcExtensions framework, I wanted to include a functionality which would automatically filter all entities based on this interface :
public interface IVersionAware
{
string Version { get; set; }
}
In short, I only want to get the entities of the current version through my repository. This interface would then automaticly imply that all data could be filtered by setting a version filter.
I took me quite some time, but spending a weekend at the Dutch coast cleared my mind a bit, and after the weekend I managed to get it working...

More...
by Tom
12. April 2010 07:28
It has been a while, but I finally managed to push a major upgrade to MvcExtensions; this is the change list:
* Upgraded spark for MVC RC2
+ Extra string operators for MyText
+ Added abstract model for Joe Celko's NestedSet
+ Added Dynamic SQL (text sorts etc)
+ Added HttpContextBoundObject
* Improved & extended FluentNhibernate/Database
+ Added Fluentnhibernate TextAlteration for mytext field length in db
* Improved SetCultureLanguageAttribute
+ Added a class SetCultureHelper for temporary changing language
+ Added IEnumerableHelper extensions for Page & Paging
+ Added helper for building jQuery jqGrid models
* Bugfixed MyTextModelBinder
* Improved MvcExtensionsModule
This application framework has allready been used for 2 custom customer applications, and I have to say that it made my development quite successfull.
I have to admit that the documentation is still lacking a lot, but there is a sample project included.
As always, you can download the code here :
http://github.com/ToJans/MVCExtensions
by Tom
31. March 2010 04:28
Introduction
Today I was reading an article on Codeproject, and I was really astounded by the way some people rate articles and give comments...
It was an article about someone who had implemented a simple service locator which contained the following code sample :
using System;
using CuttingEdge.ServiceLocation;
using Microsoft.Practices.ServiceLocation;
public class Global : System.Web.HttpApplication
{
protected void Application_Start(object sender, EventArgs e)
{
// 1. Create a new Simple Service Locator container
var container = new SimpleServiceLocator();
// 2. Configure the container
// Register a delegate that will create a new
// instance on each call to GetInstance.
container.Register<ISamurai(() =>
{
var weapon = ServiceLocator.Current .GetInstance();
return new Samurai(weapon);
});
// Register a single object instance that always
// be returned (must be thread-safe).
container.RegisterSingle(new Katana());
// 3. Register the container to the Common Locator
ServiceLocator.SetLocatorProvider(() => container);
}
}
Which seems quite obvious to me. Since I noticed a comment titled 'my vote of 2', I was curious why this article would be voted such a low score (2 out of 5). I checked the comment and I was astounded:
Please note: the keyword "var" is supposed to be used with anonymous types. You should not use it for anything else. Otherweise please start
programming java script
More...
by Tom
29. January 2010 20:16
Introduction
This is my first screencast for my MVCExtensions project, it shows you how to get started and build a simple tasklist.
PS: This is the direct link to the powerpoint used:
http://docs.google.com/present/view?id=dgt3mk3c_6fmhrd9c5
Some background info
This was my first screencast, and it took me about 7 attempts to finally get it to a point where it was more or less acceptable. For my sixth and seventh attempt I finally found some good screencap software : BBFlashback Express.
Anyway, this has been an interesting experience, and now enjoy mvcextensions !!!
More...
by Tom
26. January 2010 13:48
Introduction
After reading the latest post from @jeremydmiller I felt the urge to write a small article about the BDD part since there might be missing a vital part here about BDD...
More...
by Tom
20. January 2010 19:28
Introduction
Today I finished v0.4 of my MVCExtensions library and I pushed the sourcecode to github.
I also included a very simple tasklist, in order to show you on how to get started using this library. You can also see (slightly outdated) example code in this blog post...
You can see a demo of the tasklist app running here. (Try entering a task without a name, or with a name that has more then 256 chars to see the custom strings in action).
You can download the full sourcecode here.
Update
I now made a screencast as well. it is available here.
More...
e9852058-4621-4b1f-825d-495c4d95d43e|0|.0
Tags: .net, asp.net mvc, aubergine, bdd, c#, codeproject, commercial, git, jquery, linq, open source, mvcextensions
CodeProject | Development | News