Tuesday, 27 April 2010

Update: I'm being very anti-Microsoft at the moment because they make it too expensive for me to get an MSDN license to develop at home. In the past, I've been a big fan but I'm going to defect if they continue down the money or nothing path. Until they stop excluding me from their expensive community, I shall sulk and ridicule them. Please read and have a giggle. It's meant in jest.

I love reading Eric Lippert's blog because he is great at explaining complex ideas in an easy way. That is something severely lacking online. He also dishes the news on my latest reading obsession... C# 4.

They have managed to slip in a few extra features last minute in to the next version of the language. He describes them in more details here. The one's I thought were cute and make the language a little more interesting are the goes to --> and is approached by operators used in loop conditions.

Interestingly, when I mentioned the last minute additions to a colleague she commented that she hopes they implemented them properly. In C# 3 they snuck in partial methods and auto-properties which I wouldn't want to live without (although I am in Java-land at the moment).

I'm excited about C# 4. Now I just have to get Microsoft to give me a reasonably priced MSDN license for an individual who isn't a student, a company or a start-up. Market gap.

Here is a quick email I threw together for a friend who has started writing automated tests and asked if there is a reason to have lots of different kinds of tests covering the same area. Yes, it's simplistic and I'm sure a bunch of ThoughtWorkers would kick me and say it is better explained in other ways but I think this is a good summary. In case it helps others, here it is...

OK, this is the way I structure testing of an application. This works when the tests are written retrospectively or if the application is written in a test driven manner.

There are three types of tests:

Functional tests - UI testing that uses the terms of the users/business. You'll see tools like Selenium with junit/nunit/rspec used at this level. Functional areas of the application are tested in a similar workflow to what I user would use. Happy path comes in here for primary workflows. Deliberate error (validation and business logic) and exception testing at the highest level occur now;

Integration tests - these tests are used when you are plugging all the bits of your system together. Bits can mean layers, components within a layer, or dependencies outside of your system (third party web services, etc...). The point of this is a test interfaces and APIs that are public to the component or application parts. You test input and output in a black box way. Again, with all good data and then causing errors and exceptions;

Unit tests - These tests are the very specific low level tests that check that a unit of functionality is working. This can be at a class level, library or component. You'll see mocking frameworks used here to imitate data sources or connecting systems. At this point, you do not want to be distracted by the possibility of functionality external to this unit causing issues so it doesn't talk to anything and gets all input or directs all output to mocked objects.

The reason for the three layers individually is explained above in each point. The reason you do them together is that with continuous integration and thorough test suites, you can easily track down where an error is occurring and focus in on the area of concern. All these tests should be used together.

This is a starting point and written at a high-level. Ask me if you need it clarified further.

Most installers available for download online these days, will actually download a a small executable that will download the rest of the required installation files form the Internet as it progresses. If you have a slow connection or are using a proxy then it will often fail.

Do not fret.

Usually, there will be an option to use what is called an Offline Installer. It will be accessible from another location of the installer's website. If it isn't obvious and easy to find then search for application installer offline in your favourite search engine.

Search This Blog

Follow by Email

About Me

I am a nomad. I travel a lot for work and for fun. For the last 20 years, I have been building big web applications that business wants and users like to use. I've worked for federal gov, large media organisations, banks and a couple of startups in the areas of mobile technology and vision tracking. I was at ThoughtWorks for a while being agile and having fun as a polyglot programmer. Then I was a Developer Premier Field Engineer at Microsoft where I was the Asia Pacific ASP.NET MVC Lead, an agile software development coach and a languages and integration specialist.
For a while, I was playing in .gov.au as an Architect building Voice Authentication for Aussie citizens. My further adventures see me delivering more large systems for gov.au. Now I'm living in Seattle and working for a large book store. I love cats, cocktails and cooking. People are more important than things. Ideas drive the world.
I do not speak for my employer. All opinions are my own.