For a while now I thought there was a bug when using Resharper to run my unit tests.
Because my latest changes were not being picked up, I always had to build my solution first and then run the unit tests.
Not anymore.
Today a colleague showed me this ‘Build Settings’ option
Selecting ‘Always Build’ makes sure the latest changes (even to config files) are used when running unit tests. The default is ‘Automatic’ as shown above.
Just be aware of the size of your solution will have an impact on how long the tests will take to run.
As my nephew is coming round to visit in a couple of weeks, I want to create a game he could play.
The aim of the game is to match pictures to a word. The demo shown below uses the jQuery UI library which makes the dragging and dropping possible. If you want to know more check out the excellent draggable and droppable demos. As this is just a demo the animals are hard coded so if you hit play again you will see the same animals.
Can you match the picture to the word?
Drag the picture to the box on the right
Cow
The demo uses the jQuery and jQuery UI libraries (hosted by Google) and the javascript shown below
$(function() {
var result = $('#incorrectResult');
var correctResult = $('#correctResult');
$(".draggable").draggable({
containment: '#gameContainer',
revert: 'invalid',
start: function(event, ui) {
result.fadeOut(1000);
},
stop: function(event, ui) {
if (!$(this).hasClass('correct')) {
result.html("Try again that's a " + $(this).attr("id"));
result.fadeIn(1000);
}
}
});
$("#droppable").droppable({
accept: '.correct',
drop: function(event, ui) {
$(".draggable").draggable('disable');
correctResult.fadeIn(1000);
correctResult.prepend('Well done! You found the ' + ui.draggable.attr('id') + ' ');
}
});
$("#playAgain").click(function() {
location.reload(true);
});
});
The html used to create the game looks like this
<div id="gameContainer">
<div id="gameTitle">Can you match the picture to the word?</div>
<p id="instructions">Drag the picture to the box on the right</p>
<div id="items">
<img class="draggable correct" id="Cow" src="http://www.arrangeactassert.com/wp-content/themes/resources/picturewordgame/cow.png" /><br />
<img class="draggable" id="Pig" src="http://www.arrangeactassert.com/wp-content/themes/resources/picturewordgame/pig.png" /><br />
<img class="draggable" id="Sheep" src="http://www.arrangeactassert.com/wp-content/themes/resources/picturewordgame/sheep.png" />
</div>
<div id="droppable">
<p id="itemName">Cow</p>
</div>
<div id="results">
<div id="correctResult">
<input id="playAgain" type="button" value="Click here to play again" />
</div>
<div id="incorrectResult" />
</div>
</div>
Yes the html and javascript won’t win any awards, the fact it works in a blog post is good enough for me
What’s next?
To begin with I will create a version of the game using ASP.NET MVC, jQuery and jQuery UI. This will look like demo shown in this post with additional functionality to randomise the pictures.
Then I will create a version of the game using Silverlight.
Once this is complete I will refactor both solutions to share as much code as possible. I’m assuming RIA services is the tool of choice but we will see.
After that maybe (way in the future) I might attempt to write this game for the Android platform and take advantage of touch screen mobile phones. I have never developed an application before so this should be an interesting challenge.
The patterns and practices outlined in this book will help you develop more successful software solutions.
How?
Eric Evans shows how you can improve communication with your customer (by doing things like developing a ubiquitous language), implement agile practices and create maintainable solutions which follow good software development principles.
One of common criticisms of the book is that ‘it does go on a bit’.
The good news is that the folks over at InfoQ have come up with ‘Domain Driven Design Quickly’ which summarizes what Domain Driven Design is about.
The even better news is that it’s FREE if you register with InfoQ, which is no bad thing because it’s a fantastic resource with videos, presentations and some very good articles.