Incremental vs completionist problem solving

October 21st, 2015

Do you solve the problem one step at a time, slowly ever going forward, but without the final goal?
or do you see the goal and work steadily towards it?

Of course you do both but might be biased.

Below is a readworth article about this.

Bra kommentar om teknisk skuld

October 5th, 2015

Den hyggligt korta artikeln delar upp teknisk skuld i flera delar: programmeringsskuld
, designskuld, testskuld och  kunskapsskuld. Jag tycker det var lite onödigt komplicerat; men samtidigt upplever jag det gav en möjlighet att diskutera. T.ex. vet jag ett projekt som klarar sig bra på allt utom kunskapsskulden. I och med att uppdelningen gav mig möjlighet att prata om, just, kunskapsskulden utan att blanda in all annan teknisk skuld tyckte jag att jag fick fram det jag ville säga.

Sedan undrar jag om man skall räkna in de andra skulderna i teknisk skuld.

Vidare undrar jag om “skuld” är rätt ord eftersom det är något man, förhoppningsvis, kan amortera bort. En teknisk skuld kommer aldrig försvinna för när man kommer närmare målet ökar man bara sin ambitionsnivå.

Ursprunglig artikel.

Designing a REST API

September 18th, 2015

Apigee has kindly written a book with simple illuminating examples on how to design a REST API.

It is short, concise and has good examples from the Real World like Google, Netflix and Twitter.

Logging all SQL from nHibernate

April 16th, 2015

There are several ways to see what queries are used by Nhibernate.

If you are doing serious development I recommend Nhprof. It costs some but it is second to none regarding overview and ease of use. One bug caught and it is paid for. The GUI is a bit clicky but does a good job of providing good S/N ratio.

Sniff the traffic. I have not done this seriously but once wrote an ADO sniffer since there wasn’t any profiler for MsAccess.

There there is tracing the RDB. Possibly gratis or even free, depending on database (I haven’t checked them all, only Microsoft’s one). In my experience it is too noisy to have running during the whole development cycle like one can do with Nhprof.

Then one can use Nhibernate itself to log. Check Nhibernate succinctly, chapter 12, for how to setup Nhibernate with Log4net. If you want to log through another framework the same author wrote an article.

Wrap the logging framework

April 15th, 2015

If you haven’t decided whether to use Log4Net, EnterpriseLibrary, nLog, home baked or any of the other logging frameworks – wrap it or abstract it.

Common.Logging is an “ordinary compiled lib”. It is strongly named with its pros and cons.

LibLog on the other hand is just a file (like Dapper). When developing a lib for public use this might be good to keep fewer dependencies.
The author of LibLog mentioned some pros for LibLog (vs Common.Logging) here. It uses dynamic and Tuple so it is Dotnet4+.

Simple Logging Façade is a compile lib, like Common.Logging.

Keyboards, 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.

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

Ergodox. Does still not exist. It’s a hacker project so it will probably be F/OSS.

Keyboardio home page. is open source and ergonomic. A bit ugly but triggers my want-hormones. It also has a wooden surface and and an Arduino to run it all. Kickstarted.

Ultimate hacking keyboard. Split. Crowdsourced.

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.


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.

Search words: windows multiple monitor screen saver

tags: , | categories: Miscellaneous | no comments »