Being Cellfish

Stuff I wished I've found in some blog (and sometimes did)

Browse by Tags

Tagged Content List
  • Blog Post: What is technical debt really about?

    When you think about the reasons for reducing technical debt; what do your think about? Read more here .
  • Blog Post: Evolution of a hand rolled fake - part 5

    As you may know if you followed my blog before; I like to roll my own fake. For interfaces it is pretty straight forward with explicit implementation of the interface and properties with delegates for implementation. Read more here.
  • Blog Post: How would I test a WebAPI controller

    Kind of related to my previous post , this article on how to test ASP.Net WebAPI controllers made me think. As you can see from the article it is fairly easy to get your controller under test, but it does take some work to get everything setup properly. And I have never tested my WebAPI controllers like...
  • Blog Post: Evolution of a hand rolled fake - part 4

    Another hard problem when it comes to creating fakes is when the interface contain overloads (i.e. same method name but different parameters) like this: 1: public interface IYetAnotherInterface 2: { 3: int DoSomething(); 4: int DoSomething( int x); 5: } The Fakes utility in VS11 will generate...
  • Blog Post: Evolution of a hand rolled fake - part 3

    So how do I fake an interface with properties? 1: interface IAnotherInterface 2: { 3: int SomeProperty { get ; } 4: int SomeOtherProperty { get ; set ; } 5: } Most of the time I just let my fake have the property implemented. This works most of the time but only really well if the interface...
  • Blog Post: Evolution of a hand rolled fake - part 2B

    While the last version I showed is very flexible I have experimented a little more. Why would you ever have a public getter on the fake handler properties? Maybe if you had a fake that needed to wrap existing fake behavior but this is probably pretty rare. So this is what it would look like with no public...
  • Blog Post: Evolution of a hand rolled fake - part 2

    In a recent discussion at work I realized that the main reason I started with the constructor based fakes descried here was not to clutter the object with properties called Something Handler . By having my fake implement the interface explicitly I could create a fake like this: 1: public class FakeTheInterface...
  • Blog Post: Evolution of a hand rolled fake

    I usually hand roll my own fake objects for my tests. They have always looked a lot like what Stubs generate. I just think that it's so cheap to create them that I don't even need Stubs. In this series I'll assume an interface that looks like this: 1: interface ITheInterface 2: { 3: void DoSomething...
  • Blog Post: Dependency injection and good design

    I helped preparing a meeting on dependency injection on my team and we had that meeting last week and it lead to a number of interesting discussions. Before we go into that I have to explain the title (which was the same as the title for this blog post). If you look at attributes people tend to claim...
  • Blog Post: How object calisthenics can save the day

    I recently talk to a friend who was migrating a large/complex system he wrote in J++ (ten years ago) to C#. The old system used integers and doubles for a lot of things like amount of money and number of months/days/years. Also over the years he'd learned that a lot of bugs came from the fact that a...
  • Blog Post: Team coding dojo 2.6

    We did Bowling this time. The group was satisfied with completing something. Or it was the donuts somebody brought in. We decided to aim for something closer to our day to day work next time so I have to come up with a Kata that includes the use of CCR . That will be fun.
  • Blog Post: Team coding dojo 2.5

    Yet another MineSweeper . This time we let one person do all design work before we started and make all the decisions. Compared to previous sessions in meant we got a better coding flow but at the same time we did not open up to changes driven by the tests written. For the next time we'll try something...
  • Blog Post: Team coding dojo 2.4

    MineSweeper again. One thing that struck me today is that coding dojos with a new team is a great way of learning about other team members. Who wants to have a complete design, who likes to focus on error handling, who rushes forward without consideration etc. So there you are; another great reason to...
  • Blog Post: Team coding dojo 2.3

    Yesterday we did MineSweeper with almost no upfront design at all. We also had the biggest group I've been in for a long time. So we ended up being a little unfocused on the direction. A lot of minds pulling in different directions. It's hard to find the balance between guiding the group and letting...
  • Blog Post: Team coding dojo 2.2

    Today was the second time I organized a dojo in my new team. We did the MineSweeper and it turned out interesting as usual . The highlights today was how the design got pushed in one direction by a typo in a test. The typo made us expose the internal representation of an mine field before the sweep which...
  • Blog Post: TDD Brownbag payback

    One of my colleagues who attended my recent brownbag mentioned something about his experience as a TDD newbie the other day. He said that it took him about an hour to start liking the way the code turned out when you wrote a lot of unit tests for your code. And even better; the unit tests found a lot...
  • Blog Post: Team coding dojo 2.1

    Yesterday I had my first Coding dojo with my new team. We did FizzBuzz in the same way I've done before . Turned out to work pretty well as a first dojo where nobody had participated in a coding dojo before. If I could do it again I would probably not have the faked dependency in the Printer class. And...
  • Blog Post: Unit tests makes it harder to refactor code

    During my recent brownbag on TDD one comment was that having a lot of unit tests makes it harder to refactor code. First of all the word refactor is in my opinion misused as much as mocking. There is a difference between refactoring and rewriting. Refactoring means you change the code to be "better"...
  • Blog Post: The test stairway (or what to test how)

    A while ago I was asked how to handle the case where setting up unit tests became complex because you wanted to test at a lower level. Since that question itself confused me I tried to understand the problem and it turned out that person started by writing a test for some high level abstraction faking...
  • Blog Post: Good tools may hide symptoms but not cure the disease - mocking frameworks edition

    Yesterday was about writing good test fixtures rather than using a tool that makes you get away with bad designs. The same thing goes for mocking frameworks . If you use a mocking framework you should avoid using it do fake things you wrote yourself. And you should use it rarely for anything else. That...
  • Blog Post: TDD is not about writing tests

    This week I held a brown-bag on TDD and coding dojos in my new team . The key point was that TDD (or unit tests without TDD) should not be about writing tests. It is about documenting behavior and writing good code. As a side effect you get a test suite that make you confident your code works as intended...
  • Blog Post: Team dojo 12

    Today we continued where the last dojo ended. Since last time we've created a small backlog with user stories using this tool . And we implemented one user story; As a robot developer I want to be able to turn my robot . Apart from a long interesting design discussion we also covered another interesting...
  • Blog Post: Team Dojo 11

    This time we decided to start a little larger project that we will work on over several dojos. This lead to more design discussions and less coding than usual but hopefully it'll pay off the next time. Interestingly enough we did one mistake that I think is common when doing TDD; focus too much on low...
  • Blog Post: Should a professional developer always use TDD?

    The answer is no - a professional developer should always use BDD. No seriously. I read this today and didn't hesitate a second to steal the topic since I there are two discussions around TDD I love; the discussion with people who struggle to write good code and the discussion with people who write...
  • Blog Post: Why go to a coding dojo?

    I've previously mentioned what a coding dojo is but never really covered why you should go. I wish I could just direct you to this lightning talk from 2009 . The slides are in English but the talk is in Swedish. I guess a summary of the lightning talk is that you go to a coding dojo to learn and share...
Page 1 of 4 (82 items) 1234