Freigeben über


Being Cellfish

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

2009 Advent Calendar December 12th

So now we need to fix the broken ImportantProvider making sure it uses one lock: 1: public class...

Author: Emil Gustafsson Date: 12/12/2009

2009 Advent Calendar December 11th

Like yesterday I only have a passing test to add today: 1: public class...

Author: Emil Gustafsson Date: 12/11/2009

2009 Advent Calendar December 10th

Today I'm just adding a passing test. 1: public class...

Author: Emil Gustafsson Date: 12/10/2009

2009 Advent Calendar December 9th

With the solution we have from yesterday we still have a big problem. Whoever uses ImportantObject...

Author: Emil Gustafsson Date: 12/09/2009

2009 Advent Calendar December 8th

So far we've kind of assumed for most of the time that the ImportantObject is easy to create. If not...

Author: Emil Gustafsson Date: 12/08/2009

2009 Advent Calendar December 7th

Now that we have a working transaction from yesterday we need to add the important object to it. So...

Author: Emil Gustafsson Date: 12/07/2009

2009 Advent Calendar December 6th

Since I want the transaction we're creating to take the lock when created I also want to release the...

Author: Emil Gustafsson Date: 12/06/2009

2009 Advent Calendar December 5th

Even though the solution created yesterday ensures thread safety when ImportantMethod is used I'm...

Author: Emil Gustafsson Date: 12/05/2009

2009 Advent Calendar December 4th

The problem with yesterday's solution is that we're only testing that the lock is taken when...

Author: Emil Gustafsson Date: 12/04/2009

2009 Advent Calendar December 3rd

Let's continue with the same lock interface and MutexLock implementation as yesterday. In order to...

Author: Emil Gustafsson Date: 12/03/2009

2009 Advent Calendar December 2nd

Adding virtual methods to handle locks as we did yesterday is really not a good solution. The lock...

Author: Emil Gustafsson Date: 12/02/2009

2009 Advent Calendar December 1st

One way of adding tests for thread safety is to let the important object handle the locking through...

Author: Emil Gustafsson Date: 12/01/2009

The 2009 Advent calendar situation

Assume that you have some important object that performs some important task. It may look something...

Author: Emil Gustafsson Date: 11/29/2009

Advent calendar 2009 - how to TDD thread safety

Last year I wrote the same test in 24 different ways as a little advent calendar for you to enjoy....

Author: Emil Gustafsson Date: 11/28/2009

How do you reward good service at a restaurant?

I bet your answer to this question is; by giving a good tip. So what do you do if the service was...

Author: Emil Gustafsson Date: 11/19/2009

Pugh Decision Matrix

The Pugh decision matrix is a is a tool to help you make decisions when you're trying to sort out...

Author: Emil Gustafsson Date: 11/12/2009

How to prevent the use of "SELECT *"

One good tip for writing good SQL code is to always select the columns you need and never just...

Author: Emil Gustafsson Date: 11/08/2009

Team Coding Dojo 7

This time we did a new Kata - variant of poker hands. Instead of being so specific about the...

Author: Emil Gustafsson Date: 11/06/2009

How do I get someWin32API method to work in .Net?

It was some time since I last needed to use P/Invoke but it seems like I always need something from...

Author: Emil Gustafsson Date: 11/01/2009

Definition of mocking

When I read what Uncle Bob wrote today about how he usually hand-rolls his mocks it not only stirred...

Author: Emil Gustafsson Date: 10/28/2009

Five reasons to shorten your sprints

I've been involved in a few discussion on iteration length lately and was going to write something...

Author: Emil Gustafsson Date: 10/26/2009

Never convert your story points to time!

When I read these observations on estimations I was reminded of a thing that happened to me a few...

Author: Emil Gustafsson Date: 10/23/2009

How many t-shirts in your next iteration?

So considering my last post on t-shirt sizes and burn-downs, how do you decide on how many t-shirts...

Author: Emil Gustafsson Date: 10/21/2009

How to burn down estimates in t-shirt sizes

Some people estimate their user stories is t-shirt sizes, i.e. each story is either small, medium or...

Author: Emil Gustafsson Date: 10/19/2009

Software development at the fish market

The Fish market at Pike place is famous for its flying fish. I was there this weekend for the second...

Author: Emil Gustafsson Date: 10/12/2009

Creative solutions for remote team members

I'm always amazed when I hear how teams make remote team members being co-located with everybody...

Author: Emil Gustafsson Date: 10/07/2009

Coding Dojo 6

It was MineSweeper for the 6th MSFTCorpDojo today. We also applied the object calisthenics rules...

Author: Emil Gustafsson Date: 10/06/2009

Adding days to an iteration (sprint)

In Scrum you never extend a sprint. Read that again. Never. So why do some teams extend their sprint...

Author: Emil Gustafsson Date: 10/03/2009

Exceptions or not?

I've always had mixed feelings for exceptions. First of all exceptions should only be used for...

Author: Emil Gustafsson Date: 10/02/2009

SQL programming mistake #12

I would like to add another thing to my previous list. And that is the mistake of not properly...

Author: Emil Gustafsson Date: 09/27/2009

Extracting methods is just another level of indirection, or is it? - Part 2

Had a discussion about the final version in Uncle Bob's post that I linked to the other day. The...

Author: Emil Gustafsson Date: 09/17/2009

Extracting methods is just another level of indirection, or is it?

Over the last months (since I first tried the object calisthenics rules) I've been starting to...

Author: Emil Gustafsson Date: 09/16/2009

SQL programming mistakes

I recently read this comprehensive list with ten common mistakes done when writing SQL. And I'd like...

Author: Emil Gustafsson Date: 09/14/2009

Second Generation Lean Product Development

I just finished a nice book on lean software development. I actually started to read it because one...

Author: Emil Gustafsson Date: 09/09/2009

One way of executing the daily stand-up

I think the daily stand-up is one of the most important parts that makes a team work well together...

Author: Emil Gustafsson Date: 09/05/2009

Coding Dojo 5

Yesterday was the fifth MSFTCorpDojo. MineSweeper as usual and we tried switching person at keyboard...

Author: Emil Gustafsson Date: 09/02/2009

pthread_cond_timedwait behaving differently on different platforms

pthread_cond_timedwait is a nice little function that can be used to "atomically" release a mutex,...

Author: Emil Gustafsson Date: 09/01/2009

Premature optimization is the root of all evil, or is it?

I've been sitting in a lot of code reviews and code inspections where somebody suggests a change to...

Author: Emil Gustafsson Date: 08/30/2009

Team Coding Dojo 5

This time we took the completed BankOCR Kata from last time and tried to refactor it using the...

Author: Emil Gustafsson Date: 08/27/2009

Object Calisthenics: Rule 9: Don't use any getters, setters or properties

This is my favorite rule. I think it's a forgotten guideline in OO design to tell objects what to do...

Author: Emil Gustafsson Date: 08/24/2009

Object Calisthenics: Rule 8: Use first class collections

Yet another rule to keep your objects focused at a single responsibility. Any class with an instance...

Author: Emil Gustafsson Date: 08/23/2009

Object Calisthenics: Rule 7: Don't use any classes with more than two instance variables

This is another aspect of keeping your entities small I think. Classes with a lot of instance...

Author: Emil Gustafsson Date: 08/22/2009

Object Calisthenics: Rule 6: Keep all entities small

This is a funny rule when exercising this. No class should be more than 50 lines long and no package...

Author: Emil Gustafsson Date: 08/21/2009

Object Calisthenics: Rule 5: Don't abbreviate

This rule has a weird name I think. What it means is that whenever you abbreviate in a class or...

Author: Emil Gustafsson Date: 08/20/2009

Object Calisthenics: Rule 4: Use only one dot per line

Not only is a long line with a lot of dots harder to understand. It usually means that your object...

Author: Emil Gustafsson Date: 08/19/2009

Object Calisthenics: Rule 3: Wrap all primitives and strings

This rule states that no parameters should be a of a primitive type (e.g. int, double) nor a string....

Author: Emil Gustafsson Date: 08/18/2009

Object Calisthenics: Rule 2: Don't use the else keyword

Some people think that the if branch should be the every thing is good branch and the else branch...

Author: Emil Gustafsson Date: 08/17/2009

Object Calisthenics: Rule 1: Use one level of indentation per method

First of all a method with a lot of different indentation is harder to understand than a method with...

Author: Emil Gustafsson Date: 08/16/2009

Object Calisthenics: First contact

A few weeks ago I was introduced the the object calisthenics described by Jeff Bay in the book The...

Author: Emil Gustafsson Date: 08/15/2009

<Previous Next>