1. Stop.Mocking.EVERYTHING

    I've flip flopped on how to use mock objects since 2008. It's took me nearly five years to finally claim to have a solid, practical answer on what is in my opinion, their correct use.

    Mock Everything

    Some developers told me to mock everything. Every. Single. Collaborator. I wasn't sure …

  2. Dont Tie Yourself to a Framework

    • Programming is great
    • Software development is the crap bit. You'll spend more time configuring, integrating and faffing rather than writing logic most of the time.
    • Test Driven Development makes development easier as it forces you to decouple your code. - Your core logic should be pure, dependency free C\#, Java, Python …
  3. I Need to Stop Misusing Namespaces

    At the recent NSBCon one interesting question that came about was how to structure a project. The panel consisting of various speakers had no answer, after all this is dependant upon the project in question. Therefore there is no right or wrong answer.

    However one point they were in unison …

  4. SOA Done Badly vs SOA Done Right

    I was under the assumption I had been doing SOA for over 3 years. Previously I have had services which did stuff, these talked to other services which did other stuff and so on. We would group services around functionality.

    We would break these services down if they got too …

  5. Design is Important

    When I was a student I used to cheat. Not in exams or practical assignments, but I used to cheat when it came to my process to develop code. Early on I noticed a common pattern. After receiving an assignment I would perform some analysis, figure out a basic design …

  6. TDD is a Tool

    I remember being introduced to Test Driven Development (TDD) very well. This is because it had such an overwhelming change on how I write code day to day. It was incredibly alien, difficult, yet rewarding. On this journey for the last five years I've changed my style, learned how not …

  7. The Correct Way to use var in C#

    The .NET community is not widely controversial, though there is a strong topic that appears to come up time and time again when I pair with other developers - how to use var in C#.

    The var keyword was introduced in .NET 3.5. Unlike other languages this is still a …

  8. The Anti If Campaign

    Firstly if you are unaware of what the Anti If Campaign is, I advise you to take look before coming back. My first impression a few years ago was the site must have been some sort of spoof. Programming without "if" statements, this was crazy nonsense. After all the "if …

  9. Why are you not using Design by Contract?

    When learning to program I distinctly remember coming across the concept of placing asserts within your code. Assert statements are primarily used for "things that cannot happen", but in my early days I was too focused on the stuff that was supposed to happen!

    "Defensive programming" was also introduced. Principles …

  10. Object Calisthenics

    Recently I ran a session on Object Calisthenics. I was first exposed to this challenge a few years ago and personally found it a fun, yet difficult experience. This is intentional as the challenge is designed to push the boundaries of best practices. The instructions are simple, there are nine …

  11. Object Discovery

    Recently we had @kevinrutherford in to talk about object discovery. While TDD is a great tool, it is no excuse for some sort of design process. If you don't, you'll most likely end up with a mess. This session was based around this principle.

    One point that was discussed what …

  12. Codeweavers Code Retreat

    Last week we had @kevinrutherford in to run a coderetreat. It was the first retreat I've taken part in personally, the same applying to much of the team. The day was to focus on one challenge - Conway's Game of Life though each iteration would introduce new constraints.

    Iteration 1

    The …

  13. Warnings as Errors

    One thing that annoyed me when starting at Codeweavers was the amounts of warnings that would occur during a build of any of our projects. Seeing the build progress only to spew out a screenful of text was something that did not sit right with me. I was not the …

  14. Log Everything

    This post was originally conceived back in mid 2011, starting a new project made me think back to this event, hence the post.

    Any developer worth their salt will know what logging is. You could argue there are two types of logging, either developer logging or auditing. Developer logging would …

  15. Smalltalk Conversion mapped to C#

    Lately the team has been making some rather drastic changes and re-designs to our codebase in an attempt to minimise friction to change. In other words, we've identified areas that are painful or tedious to work in and have hopefully rectified them by re-writing the code. The proof of this …

  16. The Best Code is Written Twice

    Recently myself and two colleges completed a new feature in an afternoon's programming session. Despite this we ended up binning the feature after all agreeing it was horribly complicated and in turn would cause far more problems down the road than it would solve.

    We decided to rewrite the feature …

  17. Mapping Objects via TDD

    Why we map?

    Many times at Codeweavers we often have tasks which involve mapping between various objects. It is no secret that I dislike such tasks. The reason we map between objects though is actually a good thing as pointed out by several developers. Mapping means our components are less …

  18. Getters and Setters are Evil

    Update: There is a new version of this post.


    I've been programming with OO languages since I was seventeen yet in the last week I've had what is without doubt one of the biggest learning experiences since I've started.

    Numerous developers that I've worked with claimed that we aren't doing …

  19. MBUnit to NUnit

    Over the last few weeks we've ported our tests from MBUnit to NUnit. This was done as after a quick spike it was seen that NUnit tests run almost fifty percent quicker. For example our common projects' test time went from around 40s to around 20s on average.

    This whole …

  20. Mock Roles not Types

    "if it feels wrong, it probably is" - numerous Codeweavers' developers

    The framework we use at Codeweavers is the excellent Moq, therefore when something is difficult to mock we are forced by the framework to write an adapter. We use an interface for testing, then create a concrete type which simply …

  21. Lists or Objects

    "Our rule of thumb is that we try to limit passing around types with generics (the types closed in angle brackets). Particularly when applied to collections, we view it as a form of duplication. It's a hint that there's a domain concept that should be extracted into a type." [Growing …

« Page 2 / 2