Design your Silverlight application for TDD !

There is one major flaw you must have encountered whilst working with Silverlight for a while: its incompatibility with unit tests! Unless you’ve been using Silverlight solely for drawing circles and rectangles, surely you must have tried to use the Silverlight Toolkit unit test project template to try to put some TDD in your project ! …most probably you were disappointed by it because it’s fairly poor…

(more…)

PowerShell v2 – My Best Practices

After working more than a year on different projects using PowerShell (v1 and v2), I would like to share with you some Best practices that I could identify.

I decided to write this article when I realized that I was always using the same tips/tricks and asking people working with PowerShell to use them as well.

Some of the tips that I’ll give may seem stupid and/or quite common (not to say mandatory), in the development world… But scripting is not really part of the “development world” and I realized that it’s much easier to write dirty codes.
(more…)

Groovy Minute – inject() and accumulators

What the f*** is a Groovy Minute?

I am thinking about starting a new kind of post about Groovy. Publishing short articles on a regular basis where I will give some Groovy hints and try to exchange on Groovy code with others.

That’s what a “Groovy Minute” stands for, some Groovy minutes in your day-to-day work -and mine. Not sure at what pace I will do it it but I am willing to publish something each time I come with some worthy-to-share Groovy code. That’s for the title of this series. Concerning the content of these posts, I will talk about some of the language constructs (what they could be used for) and try to share and improve some code I have come up with.

First minute…about the inject() method

So today, I will talk about the inject() method. Why? I have been preparing a Coding Dojo recently and tried to come with a solution to the Roman to numeral problem. (Read more…)

Analyzing Groovy / Grails code

Groovy and Grails are a breeze of fresh air in Java development and Web application development as they enable you to write far more expressive and readable code. They also solve most of the classic Java pitfalls (BigDecimal, equals(), etc…) all new Java programmers meet along their way. Even if you write more readable and thus more maintainable code in Groovy, this is not enough let alone: of course you need some good practices to keep your code under control as your application keeps growing.

One of these practices would be to analyze your source code and check how metrics and static checks evolve from release to release, or even on a more sporadic way for a specific release. In this field I must say that the Java programmer is one of the best tooled as there are plenty of choices, free or not, for performing such a task (PMD, FindBugs, CheckStyle, Sonar etc…). So, what about it in Groovy / Grails? (Read more…)

Unit of work, Transactions and Grails

Working with Groovy and Grails often gives you the feeling that things are magic and when you dive in, you realize that things are more complex than expected. At the same time, you often realize that a reasonable default behavior has been chosen by Groovy/Grails framework: What about transactions’ magic in Grails? For me it was hard to believe so let’s try to understand a little more how things work. (Lire la suite…)