A visual presentation of Caliburns popularity
With a little tweaking on Google Analytics, I managed to come up with a map overlay of all page view related to Caliburn:
IPhone summer
Summer vacation and IPhone is a good combination. Here are ten of my favorite IPhone Apps for a great vacation while travelling in Norway:
- Ship Tracking. Keep track of ships nearby!
- Star Walk. For nice summer nights. The most incredible IPhone App I have ever seen!
Double-clicking Visual Studio solution files in Windows 7
I guess I am not the only one annoyed by the fact that I could not open Visual Studio by double-clicking a solution file. Finally I looked into this problem and first found a simple, but not satisfying solution:
By setting Visual Studio to not run as an administrator. But if you ever tried running Visual Studio on Windows 7 without admin rights, you know this is not a satisfying solution!
Using the AutoCompleteBox in the WPF Toolkit
In this blog post I will look into the AutoCompleteBox in the WPF Toolkit, added in the february release of the WPF Toolkit. The AutoCompleteBox works, just the way I had expected it, but it actually adds a couple of more features than what I would have expected. Only one dll is needed to use the AutoCompleteBox:
System.Windows.Controls.Input.Toolkit
I will not describe all the features in details, only describe the basics of what you need to know to use it! To add a basic AutoCompleteBox, I just add the following line to my XAML:
<Controls:AutoCompleteBox Name="autocompleteBox" />
Unit testing Caliburn applications in NUnit
This is part three in my series on Caliburn, if you haven't please read Part 1: Getting started with Caliburn and Part 2: Multiple Views on one ViewModel.
In this post I will look into the unit testing features of Caliburn and try to give a quick introduction to the essentials of what you need to know to write a couple of small unit tests in NUnit. The documentations on caliburn.codeplex.com on unit testing is fairly good, so I will only try to fill in some missing pieces and give a quick start guide to unit testing Caliburn. If or when you bump into problems with the simple setup described here, it's time to move over to more detailed documentation available in both the documentation and discussion forum on Codeplex.
Optional parameters in C# 4.0
A while back I blogged about the great features of the Dynamic Language Runtime introduced in .Net 4.0. Today I will look into another great feature introduced in C# 4.0, namely the new named and optional parameters.
If you are familiar with C++, you have probably used optional parameters earlier, but C# has missed this feature until now. As a work around we had to use overloaded methods, but in the concept of clean code, I'd rather prefer to use optional parameters!
Splash screen in WPF
Remember the time when adding a splash screen to application was a hassel? In WPF this is now extremely simply, follow these few steps, and you splash screen is available in your WPF application!
Running NUnit in an STA thread
While unit testing a WPF Caliburn application, I bumped into the following error:
The calling thread must be STA
and I ended up with a cross-thread exception. When diving into this problem I found that TestDriver.Net actually runs in STA (acronym for Singel Thread Apartment) by default, but NUnit is not! It is however a fairly simple configuration change to get NUnit running in STA. Add or update your app.config in your test project with following:
Features vs. user stories in Scrum
As Scrum has grown in popularity, the concept of user stories has made its way from theory and dust covered UML books, to developers every-day vocabulary. In the "old days" we tended to focus on one layer at a time, instead of one user story at a time, we focused on writing large classes supposed to solve all possible scenarios for later re-use instead of simple YAGNI focused classes pin-pointing its purpose and we focused on large-upfront design instead of gradually adapting to the maturity obtained by the customer (and developers) through the project.
We started out with allot of user-stories and even more good intentions, but ended up with phase 2 and 3 and a bunch of long forgotten concepts and diagrams. Today we are not better at planning one year ahead; we have just realized that this is almost impossible. We started focusing on business value which closely relates to user-stories. We started working with user stories weekly and we started estimating and prioritizing user stories in our Product Backlogs.
Converting from Blogger to Wordpress
- Allot of hard work
- Leaving the old familiar Blogger tool
- Learning Wordpress
- Trying to convert my old Feedburner readers to my new domain
- Making the shift without too much traffic loss
Luckily most of my traffic are from referring sites, so I guess with a little work and a couple of emails, I could redirect much of the traffic over to ISerialized.com. Beyond the statistical facts, what are my lessons learned from these last couple of days?!
How to unit test private methods in C# using NUnit
Ever had the need to unit test a private method? Ever change a private method to public just to able to write a test for it? You are definitely not alone! A couple of weeks back I had a very interesting discussions with a very good colleague of mine: "What to do if I want to unit test a private method in C#". In this post I will show how you can use NUnit in combination with Reflection to unit test private methods!
The is keyword: Yet another hidden treasure of C#
A while back i blogged about the yield keyword and called it a hidden treasure of C# as I seldom see it used, and many senior developers never use it! Today, I came across a similar one, namely the is-keyword. And frankly, I had actually forgotten about myself, even though I have used it in the past on several occasions.
Daily Stand-Ups in Scrum
I just came across a great summary of the daily stand-ups in scrum, written by Joakim Karlsson. I guess most Scrum teams start out with good intentions and focus in the begging, but as time goes by, we start falling into the old "around the table" reporting habit to the project manager, the Scrum master becomes more and more a project manager, and we gradually drift away from the core principles and ideas behind the daily stand-up!
Dynamic Language Runtime in .Net 4.0
The upcoming .Net 4.0 contains many new and exciting features, in this blog post I will describe some of the new features of the DLR including the dynamic keyword.
To quote MSDN:
The dynamic language runtime (DLR) is a runtime environment that adds a set of services for dynamic languages to the common language runtime (CLR). The DLR makes it easier to develop dynamic languages to run on the .NET Framework and to add dynamic features to statically typed languages.
The architecture of the DLR in combination with the Common Language Runtime CLR and C#, IronPython, IronRuby and Visual Basic is visualized through this illustration:
As seen from the illustration, the DLR adds three new and important features to the CLR:
Why use Custom Control instead of User Control in WPF?
When I first started experimenting with WPF I was quite confused with the new custom control introduced in WPF. I did a quick Google search but never got the full understanding of the difference, but I read somewhere that in most cases a custom control was not necessary, so I just focused on the regular user control back then.
What’s new in WPF 4.0
Microsoft has just release a series of short (15 minutes long) how-to videos for WPF 4.0 introducing the various new features of WPF 4.0.
Getting started with Caliburn Part 2: Multiple Views on one ViewModel
The documentation and tutorials on Caliburn is still very limited, and is one of the biggest obstacles getting started with Caliburn right now. In this post I hope to fill some of the gaps I have seen in the lack of documentation by showing how you can easily hook up two Views to one ViewModel.
Extension methods in 60 seconds
Extension methods enables you to hook up extra methods to an already existing (and possibly sealed) class, without the need of subclassing or changing the original class. Lets say I have a class from a third party vendor I use, which contains information on persons
A quick start guide to yield return and yield break
The yield statement was introduced in .Net 2.0, but I am a bit surprised that I meet many senior developers who has never used yield return (and yield break)! For some strange reason, yield has become some kind of hidden treasure in .Net. Through this post, I hope I can show some simple examples, and give some of the ideas, benefits and limitations with yield.
Working with globalization, string parsing and number formats in C#
On a project I attended a couple of years ago, we struggled a lot with string parsing, date formats and cultures. The product was shipped to among others China, Japan and US, and getting your code to work seamless in all culture formats can be a bit of a hassle if you are not fully familiar with how .Net and C# handles cultures and globalization. Back then I crated a small Windows Forms application to help me fully understand the details of conversions and parsing to avoid problems when our application was run on e.g. a Chinese laptop.
SqueezeBox Server won’t scrobble to LastFm
For the second time this week, I saw that my Squeezebox Server won't scrobble my played (and loved) tracks to last.fm! I started investigating, and in the server log of my Squeezebox server, I found the following errors:
Memoization using generics – Part 2
This is Part 2 of my series on Memoization. In Part 1 I described the basic principles behind memoization, and showed some examples on how to create an effective generic method to do memoization of methods with zero and one parameter. In this post I will show how to do memoization of methods with two parameters
Getting started with Caliburn
The lack of documentation and examples of usage is one of the biggest obstacles getting started with Caliburn. I hope this article can help somewhat!
One of my biggest fears when starting a new project is heading in the wrong direction and not realizing that we are headed for disaster until it's too late. Due to architectural decisions, this is always a worry, but the new project is based on WPF, the risk and possibility of a failure is drastically increased. I'm afraid that my WPF projects become "Windows Formish", not taking advantage of MVP/ MVVM.
This is Part 1 of my series on Caliburn, Part 2 on multiple views on one ViewModel can be found here, and Part 3 on unit testing Caliburn can be found here.
Caliburn was designed to aid in the development of WPF and Silverlight applications, enabling easier use of among other MVP and MVVM. This article will be a walkthrough of a rather simple WPF application based on Caliburn. The example used here is a very simple application retrieving a value from a textbox, publishing it to an EventAggregator, and then let another component handle the published message. Hopefully I am able to show some of the advantages of Caliburn through this example.
Closing in on 20 000 reader on my article at CodeProject!!!
Back in 2006 when I started working with .Net, I posted an article at The Code Project, where I wrote about Sending parameters at thread startup. My competence with .Net has grown rapidly since then, but I check back today to check my profile at The Code Project, and realized that my article was read 20 000 times!
Adding C# and ASP.Net to Blogger (Part 2)
In one of my earlier posts I recommended using Windows Live Writer and the "Paste from Visual Studio" plugin to add code to your blog. But two days of struggling with layout I gave up, and stumbled upon the C# code formatter which is very easy to use!
Memoization using generics and lambda expressions
Memoization is a hidden treasure of programming techniques. Most developers has a good understanding of caching and use it to optimize queries, but why even do calculations on cached or live data, when you don’t need to calculate at all?
Adding C# and ASP.Net code to Wordpress
In the case of WordPress, adding C#, ASP.Net and similar code is very simple. Just use the sourcode tag in the following way (discard the underscores):
Adding C# and ASP.Net code to Blogger
Many developers ask, how can I paste C# code in my blog? I have looked into several ways of doing this, my verdict: Use Windows Live Writer!
Struggling with impedance mismatch, obstacles and technical debt in Scrum projects
Lean processes such as Scrum has no requirements regarding specific software design methodology, but on the other hand an agile software process requires an agile code base!
Twingly and AdSense: My “incredibly rich without working” idea
The idea: As a blogger I can add AdSense to my blog to make money, based on hits and clicks. But the dollar per click ratio is rather low, so to become incredibly rich I need a blog with MANY hits per day. So how can I do this? I can start blogging, like I do with the Notorious N.E.R.D blog, but this blog has too few hits to make me rich, or I can experiment with my genious idea: Using Twingly, AdSense and all newspapers of web to gain hits without any work!
Focus on the product backlog and business value of Scrum projects
While struggeling on a customer project, I came across a post in Eric Lee's blog The root of all evil in Scrum
We are struggeling on a customer project to get scrum working. I joined the team a couple of months back, when they had allready been scrumming for a while, but I found a SCRUM team in a big crises, where they were scrumming, but as I asked them, why?
Accessing Sharepoint 2007 from Office 2010 Technical Preview
I have really struggled with my Office 2010 Technical Preview the last few days. Most of the Office 2010 is working really good, but accessing word and excel documents located on a Sharepoint 2007 server, has not been easy!
Version 1.0 of Windows 7 code pack
Today the Windows 7 code pack version 1.0 was released. With the code pack you can start using the new features in Windows 7 from your own .Net 3.5 applications, eg. progress bars, icon overlay, Thumbnails toolbars +++
Getting started with Windows 7 (Tips and tricks)
One of the biggest problem with each new version of a framework or OS is getting known with all the new features and functions. I personally never have the time to sit down and read pages upon pages each time I upgrade, but today I came across a really good page with quick videos of Windows 7 tips and tricks. Short videos between 30 sec and 1,5 minute.
Setting up Gmail on Windows Mobile 6.1
Accoring to this article, it should be rather straight forward to setup Gmail with IMAP on WM 6.1. I manged to this on my HTC TYTN II when I was running WM 6.0, but after upgrading to WM 6.1, I never had the choice during installtion to avoid automatically retrieving setting, so I was forced into a POP-setup, which has never been any good i combination WM6 and Gmail.
Upgrading Windows 7 Beta to Windows 7 RC
A couple of months ago I attended a MSDN Live session in Stavanger Norway, where I talked to a Microsoft representative regarding the Windows 7 beta-program. To avoid too much extra work, I considered waiting for the RC before installing the Windows 7, but based on the "guarantee" from Microsoft that upgrading for Windows 7 beta to RC 1 and final version be would straight forward, I went ahead and installed the beta!
Logging in .Net: a short study
I have been using different third-party logging tools for both .Net (C# and C++) and Java, but in my current project we are using a custom logging tool. Don't ask me why we have written our own framework for this, but I guess it's partly because we have worked on our current code base since before .Net 1.0 was released, hence I guess the number of available frameworks at that time was quite limited. But now I am tired of spending time and money maintaining code we could get for free elsewhere!
Using icons in windows applications
Today I came across the same problem that I have had many times earlier: I need a new icons in an application, this time for a refresh button. So what do I do? I Google it ofcourse and get hundreds of hits to all kind of crappy icon libraries, most of the costing me a fortune!


.png)
