Expanding my bootable VHD

18.12.09 av perfp

I just love booting from VHD in Windows 7. I have a playground for prerelease software, and just now Microsoft is releasing a torrent of them for the coming 2010 wave.

But the other day the VHD I booted from ran full. The disk is dynamic, but had a max size of 25 GB. After booting back to my physical drive, I tried Disk Management, but there was no option to expand the VHD there. The solution was a two step procedure:

1) Use DISKPART to expand the file:

select vdisk file=c:\vm\example.vhd
expand vdisk maximum=20000

2) Attach the VHD. In Disk Management you will see this:
image 
Right-click the volume (F:) and select Extend Volume.

Alternative 2): Complete the process without leaving diskpart. Make sure you you use the correct warning for

attach vdisk
select volume F:
extend filesystem

Smidig systemutviklig i større prosjekter

09.12.09 av perfp

Systemutvikling i større prosjekter er en krevende utfordring. For å levere store løsninger kreves store team. Et stort team forbruker timer veldig fort og det er derfor viktig at alle har en felles forståelse av hva som skal løses.

Utvikling med store team har tre store risikofaktorer:

  • Misforståelser som fører til at krav løses på feil måte.
  • Friksjon i utviklerteamet som gjøre at utviklere må vente på hverandre
  • Teknologivalg som koster mer å implementere enn forutsatt.

For å sikre best mulig felles forståelse av løsningen benytter man modeller som beskriver kundens domene. Dette er et kommunikasjonsverktøy for å sørge for at kunden, leverandøren og alle utviklere har felles visjon av hva løsningen skal gjøre, og et felles begrepsapparat som gjør at man minimerer risikoen for misforståelser i samtaler og dokumenter om løsningen. Dette modellarbeidet er formalisert og har faste elementer som man baserer seg på når man designer løsninger.

Til utvikling av løsninger har man flere verktøy som passer på historikk for alt som utvikles, bygger hele løsningen automatisk for hver endring, kjører analyser og tester, og produserer rapporter som viser tilstanden til løsningen til en hver tid. Disse verktøyene gjør det enklere å gjøre endringer i løsningen fordi man har tillit til at det ikke får uforutsette ringvirkninger. Dette gjør også utviklerteamet i stand til å være veldig smidig fordi at man kan forlate oppgaver som er påbegynt og fortsette med andre oppgaver som får høyere prioritet underveis.

Store prosjekter er ikke en god arena for å teste ut ny teknologi, disse bør fortrinnsvis baseres på teknologi som har vært utprøvd i mindre skala og som er kjent av teamet.  Ny teknologi som tas med i løsningen flagges tidlig som et risikomoment slik at man kan prøve dette ut og få det avklart tidlig i prosjektet. I tillegg benyttes det arkitekturprinsipper som har som mål å minimere den enkelte teknologi sin innflytelse på funksjonaliteten i løsningen.

Profilling to the rescue

30.05.09 av perfp

I was recently asked to to a performance review of a solution my colleagues have  been working on for the last year. It’s quite large, about 60 Visual Studio-projects. I was told that a certain form was particularly slow, but I was uncertain how to start reviewing the problem.

So I started the application and JetBrains’ dotTrace, and enabled profiling while I opened the form in question. And it became quickly clear to me that they were using web services in a particularly chatty fashion.

Check the screen shot for an example:

Spill inn

Typemock with new ASP.NET Bundle.

19.05.09 av perfp

Unit Testing ASP.NET? ASP.NET unit testing has never been this easy.

Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle – and for the launch will be giving out FREE licenses to bloggers and their readers.

The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both Typemock Isolator, a unit test tool and Ivonna, the Isolator add-on for ASP.NET unit testing, for a bargain price.

Typemock Isolator is a leading .NET unit testing tool (C# and VB.NET) for many ‘hard to test’ technologies such as SharePoint, ASP.NET, MVC, WCF, WPF, Silverlight and more. Note that for unit testing Silverlight there is an open source Isolator add-on called SilverUnit.

The first 60 bloggers who will blog this text in their blog and tell us about it, will get a Free Isolator ASP.NET Bundle license (Typemock Isolator + Ivonna). If you post this in an ASP.NET dedicated blog, you’ll get a license automatically (even if more than 60 submit) during the first week of this announcement.

Also 8 bloggers will get an additional 2 licenses (each) to give away to their readers / friends.

Go ahead, click the following link for more information on how to get your free license.

Windows Home Server backup problem solved, sort of…

03.03.09 av perfp

I bought a Windows Home Server to protect my family images and videos last year. Since then I’ve been struggling with backing up one laptop, my dear Acer TM6292.

It will not wake up at night to back itself up automatically. None of the other computers i have had a probem with this. I’ve tried two ThinkPads an MSI Wind and a HP tx1000. I’ve always believed that this was some kind of software configuration problem, but as it turned out, the problem is that the Acer cannot wake from sleep mode with the lid closed.

The only problem now remaining is to make it go back to sleep after the backup completes.

Getting new members on the team

27.01.09 av perfp

When you are doing software development on larger projects that has been running for a while, it’s inevitable that the staff will change. These people, no matter how experienced they are, will need some training to understand the project. How to train these people has been a challenge that I’ve never really solved.

I’ve been struggling with this issue for quite a while. I’ve had several lengthy discussions with colleagues, project managers, business analysts etc, but nobody could give me a solution to this. I’ve tried writing simple and complex documentation, a variety of models and diagrams, mentoring and pair programming, self study with follow up, throw-them-in-the-water-and-see-if-they-swim and several other techniques.

I am currently reading a blog post from Scott C Reynolds: On Teaching, Learning, and Being Honest With Ourselves. I say currently reading, because after reading just a few lines, I knew that I had to write down my thought as I read it to be able to reuse them in the future. At this point, I’ve read the wikipedia article about the Dreyfus’ model of skill acquisition, and I realized what I’ve been doing wrong all this time.

Mistake #1 – Introducing a large distributed solution to a  novice:

I’ve been taught that everyone needs a map to see where they are in the big picture. I’ve tried to give everyone an overview of the solution before assigning them tasks in a particular subsystem. That way, they should have a better understanding of what their task is contributing to the whole solution. 

A few things that resonated with me:
“Beginner casts a very wide net…” 

I agree totally; beginners want to learn everything at once. Narrowing the scope to something they can actually grasp in a few hours will make a much better learning experience for them.
“Am I able to sum this up into essentially recipes and step-by-step instructions with defined rules?”
This sounds very much like the question I should have been asking myself, but never did.

Mistake #2 – Believing that an experienced project manager is something else than a novice in distributed systems

Several of my project managers have told me to prepare documentation that a new developer can use to familiarize themselves with the system. Sometimes that has worked, and new developers have started improving the existing codebase from first checkin. Other times this has failed miserably, with developers never getting source ready to check in because they never figured out where it should be added to solve the user story.

“Keep in mind the Dreyfus Model applies atomically to a given skill. ” 
An experienced project manager can still be a novice when it comes to compex software systems. Therefore, one need to teach them in the same manner as you teach other novices.

Mistake #3 – Trying to use the same technique for novices as for competent or proficient developers.

Novices have a lot of challenges to solve at once:

  • Learning the rules of the project
    • 3rd party tools and components
    • Coding standards
    • Checkin policies
    • Unit Testing
    • Maintenance procedures: e.g deployment scripts 
  • Learning the problem domain
    Depending on the particular task, this can be quite a challenge 
  • Learning the tools and platforms in use
    • .NET Framework 
    • ASP.NET
    • WCF /WPF
    • NHibernate
    • SharePoint
  • Understanding the task and how to implement it
  • Understanding how to commit the implemented task to the solution
    • Updating documentation
    • Notifying PM or customer
    • Writing test descriptions

 

 

 

 

So what have I learned?

For novices

  1. Use numbered lists ;)
  2. Do not try to teach advanced OO or Agile Principles
  3. Limit the context to the task
  4. Ease the constraints and rules
  5. Do frequent code reviews
  6. Encourage improvement
  7. Expand rules, context and scope task by task.

For competent or proficient:

  • Assign user stories, not tasks
  • Encourage talking directly to the customer
  • Require the use of advanced OO and Agile Practices
  • Require continous improvement of both the code, maintenance procedures and documentation.

Programming Visual Basic applications?

25.01.09 av perfp

Programming Visual Basic applications?

Typemock have released a new version of their unit testing tool, Typemock Isolator 5.2. 
This version includes a new friendly VB.NET API which makes Isolator the best Isolation tool for unit testing A Visual Basic (VB) .NET application.

Isolator now allows unit testing in VB or C# for many ‘hard to test’ technologies such as SharePoint, ASP.NET MVC, partial support for Silverlight, WPF, LINQ, WF, Entity Framework, WCF unit testingand more.

Note that the first 25 bloggers who blog this text in their blog and tell us about it, will get a Free Full Isolator license (worth $139). If you post this in a VB.NET dedicated blog, you’ll get a license automatically (even if more than 25 submit) during the first week of this announcement.

Go ahead, click the following link for more information on how to get your free license.

Blog redux

21.01.09 av perfp

I’ve revived an old blog that’s been dormant for quite a while. It started out as a notepad on blogger before it went into storage on my personal website.

I’ve now brought it back to life, with the intention of using it to take notes as I start a new learning experience.

The last few years I’ve been playing with Test Driven Development (TDD), Domain Driven Development (DDD) and Agile Metods. I’ve been reading the books: Evans DDD, Nilsson Applying DDD and Patterns, Uncle Bobs Agile Principles, Patterns & Practices and Clean Code.

I’m now reached a level of understanding where I’m comfortable with my own abilities to perform as an agile developer, and I’ve started teaching it to other developers.

Outlook chooses wrong language for Replies

31.05.06 av perfp

I’ve had always this issue with Outlook that it chooses the wrong language for spell checking when replying to a message.

Today I finally found the answer to this question: There is one master language setting that fixes this, go to Start Menu – Microsoft Office – Office Tools – Language Settings. There you can set default language for all Office applications, and even remove US English completely :)

Windows cannot set time

04.05.06 av perfp

For windows to automatically set the time on your computer, you need to open UDP port 123 in your firewall. This is the filter set for my Netopia 4542.

UDP123-filter