Simo Råman

Less common unit testing strategies - Extract & Override

(originally published September 1, 2012 at simoraman.wordpress.com)

I have been reading Art of Unit Testing by Roy Osherove. He talks about a strategy he calls Extract & Override. It is a way to break dependencies in order to make class more testable. Let’s look at a simple example:

public class Class
{
 public int DoCalculation(int number) 
 {
 var value=Singleton.Instance.GetValue(); . . .

Read More

September 01, 2012

The pain of Windows Installer creation

(originally published August 6, 2012 at simoraman.wordpress.com)

Recently I worked on a project where Windows application is delivered to the customer with Windows installer(.msi). Msi-file was created using the out-of-the-box Visual Studio Windows setup-project. The setup project was built whenever new .msi had to be delivered. The first time building the setup-project failed because some file was left . . .

Read More

August 06, 2012

Web crawler in python

(published originally April 17, 2011 at simoraman.wordpress.com)

Intro

I needed to do some web crawling for a personal project. Instead of using any of the crawlers that are available I decided to write my own.

Python is a language I love to dabble on so I decided to write my crawler with that. Python also has awesome Beautiful Soup –library for parsing html. I wrote it using IronPython, . . .

Read More

April 17, 2011

Active Record with Linq To SQL, part II

Saving and deleting (published originally March 6, 2011 at simoraman.wordpress.com)

This is second part of a series. Check out the first part if you haven’t already. The code can be found at BitBucket repo.

Last time we looked at data retrieval using Active Record –pattern. In this part we’ll do data persistence and do little bit of refactoring.

Saving and deleting

If we have made changes to a . . .

Read More

March 06, 2011

Active Record with Linq To SQL

Retrieving data (published originally February 2, 2011 at simoraman.wordpress.com)

Introduction

I decided to try and write a series about different data access methods. Main motivation being to learn them better. The first one in the series is Active Record. I am mostly a .NET-guy these days and I really want to get to know linq better, so I will be using Linq to SQL and C#.

Martin Fowler describes Active . . .

Read More

February 02, 2011

Archive

This update link alerts you to new Silvrback admin blog posts. A green bubble beside the link indicates a new post. Click the link to the admin blog and the bubble disappears.

Got It!