Keyboard, keyboards, keyboards

March 24th, 2015

I develop programs. I touch type. I use a keyboard extensively.

I don’t take light on keyboards and don’t understand other keyboard jockeys that just use whatever comes with the machine.

I’d love to make my own keyboard.

Here is a the Geekhack forum for DIY and buy.


I have made my own 1337 keyboard layout that mixes the layout of Us-En (good for programming languages), Swedish (my language of birth) and Azerty (switched numbers/characters in top row).


But until then I keep track of existing. Both ergonomic for extensive use and portable for mobile use.

Waytools Textblade. For mobile use. Blue tooth. Qwerty layout but not totally touch type. From about 100€. Might work.
Id love to get my hands on one to test and review.

Atreus. DIY or order. Ergonomic. Open source. Looks wireless. Looks awesome for typing and hacking. Me want.

How to open and edit an erx / ER diagram file in Toad

October 21st, 2014

Creating an ER diagram in Toad is simple. Opening is not. Searching the intertoobs gives the result, mostly, to use Toad data modeler. My Toad data modeler version simply refuses to let me add new tables to a diagram.

So here is my solution.
First ditch Toad data modeler.

Create the ER diagram in Toad->menu->Database->Report->ErDiagram.

ER diagram menu in Toad.

Open an existing ER diagram through Toad->menu->Database->Report->ErDiagram as above.
But instead of editing look on the ugly toolbar for Open file.
Now one can edit the ER diagram.

Open file button in numerous tool bars in Toad.

How to set up IIS 7.5 to use an Apppool user to connect to Sqlserver

October 6th, 2014

Honor those who should.

Setting up a new Web site and then connecting it to Sqlserver is a breeze if one uses the development web server.
But if one wants to use the real McCoy, i.e. IIS, there is more work.

iis apppool:


Why use the real IIS when it is so cumbersome?  Because it looks more like the real production environment.

How do I debug?  Like this:

Start Visual studio i in administrator mode. (if one doesn’t, VS is helpful with this)
Then ctrl-alt-p (menu:debug:attach to process) and choose the w3wp.exe process, with the right user name. Attach. Debug.

Copying a virtual machine in hyper-V

October 6th, 2014

Here is some short info. Hyper-Vmanager 2008 I believe.
I also believe one must not have snapshots. The programming here really sucks – having a snapshot stops you from handing the VM.

Stop the source VM machine.

Export source machine. One has to select a folder “one step up” since Server manager will create a folder with the name of the source VM.
Depending on VM size this might take a while and there is no visual clue about how far the copying has come.

If needed: Change the name of the folder of the target files just created. Don’t change anything within the folder structure, just the top folder. This is done in Explorer.
(I really should create a visual example here on which folder goes where. Not hard but easy to miss a step.)

Back to Server manager and Import virtual machine. Set the radio button to Copy the virtual machine. This takes care of syspreping. Don’t bother about duplicate all files; It should be used when many machines are created, not just one extra as in this example.

Importing has a visual clue. It is in its own window, without task bar presence, so if it disappears you might have to minify everything to make it visible.

Now you have to machines with identical names. Not good.
Select and then choose Settings and typically IDEController0 for the one or other to find out which resides in your newly created folder. This is our target VM.
Change the name of this machine.

Now find the folder for the target VM again. Locate the vhd file. Make a copy of it with the right name.

Back to Server manager. Go for Settings and (typically) IdeController0->Virtual hard disk->Browse. Locate the copy you just made. Press ok. Wait.

Now the machine should be startable. Try it.

If ok. Delete the old vhd file.

Get more windows themes online

October 6th, 2014

To spice up the windows desktop background Microsoft has provided an easy way to import new pictures that can be changed every 30 minutes or so. Either search (write) Get more themes online on the start menu or go here in your web browser.

Step recorder

October 6th, 2014

If you want to record what you are doing on your Windows(8?) there is a little program called “Step recorder” that does just this.

With a magical formula it takes snap shots of your screen and saves as a .mht file which can then be opened in a web browser (ie only?).

I use it for instance when manipulating servers and other hairy stuff to record what I was doing. If I need to I can then look for clues why an update didn’t work.

It can also be used for aiding you mom who complains about whatever icon that doesn’t show up when it should. Start Step recorder, let her do her stuff, stop/save Step recorder and then email the resulting file. YMMV

Here is another usage: You have a bug that shows only sometimes. Record what you are doing and wait for the bug to show its face. Look at how you got there in the mht file.

Xpath axes explained

September 15th, 2014

The original article at explains it best.

If the original article goes missing I have copied it here as a web archive.

All kudos goes to the original author, not me.

The following picture from Crane Softwrights demonstrates the axes graphically.


What the Hyper-V menus mean

September 15th, 2014

The Microsoft Hyper-V user interface is quite good but the menus are not self explaining when it comes to branching and making snapshots.

Thankfully someone has written down an explanation here. All gratitude should go to the original author.

If the original article goes missing I have copied a web archive here.

Dotnet, Sysinternals DebugView, Debug.WriteLine and IIS

September 6th, 2014

I finally managed to write through Debug.WriteLine to Sysinternals DebugView through reading this article. Kudos to the author.

If the original article disappears; here is the recipe in short:

Start Sysinternals Debugview as administrator. Make sure Capture global win32 is checked.
Make sure Visual studio is not attached as debugger because when you run the VS debugger it hogs all information. (In VS you can find the output in the Output window with Show output from Debug.)

Besides Debug.WriteLine also play around with Trace.WriteLine and Console.WriteLine.

Unit tests and comparing long strings or objects

June 16th, 2014

I have tested and really liked ApprovalTests with more info in the blog by Llewellyn Falco.

When the unit test fails, and only if it fails, a comparer of choice pops up (think Winmerge or similar).

Say you have a long string where, somewhere, the testing framework reports a diff; you have to sift through the whole 1000 characters and compare by eye. If the discrepancy is a space/tab or apostrof/accent you might have a very hard time to spot the diff.
Or say you have an object with 10 or so properties. The unit testing framework reports a diff and you have to iterate through the properties and maybe sub properties for two objects. Tedious and not fun even the first time. The third of 10th time you really should be looking for a better solution.

I started writing my own but dropped that project in a second for AprovalTests.

Another, not as polished, solution is from SHaack. It is an extension to a unit test framework. You have to implement your own if you have another unit testing framework of choice.