January 12, 2014

Releasing WPF diagram under Creative Commons license

Filed under: Uncategorized — Ian @ 11:37 am

Someone asked for the original file which I build in Visio, and thought “Why not?” I was being a little precious about it, but It’s probably much more useful if people can edit it and add/remove bits. Ultimately that’s the goal right? 🙂

You can’t upload Visio documents to WordPress for some reason. Not “documenty” enough? Which is why it was always a PDF.

It’s released under the Creative Commons most permissive version which basically says, you can use it however you see fit, but I’d like a mention.

You can find the original here for the moment:


June 11, 2013

WPF class hierarchy diagram 1.2

Filed under: C#, WPF — Ian @ 12:15 pm

This is a tiny update to include ContentPresenter and a couple of its derived classes. I’m also planning to add a bunch of the children which should be under FrameworkContentElement, but I’m running out of space. I also need to add 4.5 stuff, but I’ll do that when I get around to doing V2.

November 12, 2012

Windows 8 UI madness

Filed under: Uncategorized — Ian @ 9:58 pm

I quite like the new start menu screen in Windows 8. I would like it more if I could order the icons as I see fit. The dance than follows any attempt to swap two icons is mesmerising but not what I want. In a grid of 4 across and 6 down, try moving the third icon on the top row left by one position.

I count 10 individual tiles position. Why? I can follow the logic that decides which position to move them to, the why is why the hell would you want it to do it that way?


August 19, 2012

Windows 8 and the lost configuration options

Filed under: Windows 8 — Tags: — Ian @ 7:28 pm

Windows 8, or Mountain Lion as I’m starting to think of it, seems to have lost some config options.

I noticed when I went to move windows around with the mouse that I’d end up grabbing the top edge and resizing it. It turns out it wasn’t my mouse skills at fault, there’s a bloody great border around the window now. In the olden days of Windows 7 and XP you could change these settings, but now you need to go to the registry.


In case you want to:

Run regedit,

HKEY_CURRENT_USER/Control Panel/Desktop/WindowsMetrics

PaddedBorderWidth change from default to 0 (My default was -60)


I’ve now regained some of the wasted space and no longer accidentally resize the window when I go to move it.


Visual Studio 2012 RTM. Not quite there yet.

Filed under: Visual Studio, Windows 8 — Ian @ 10:21 am

I’ve just migrated to Windows 8 RTM (A little on that later) and decided initially to only install Visual Studio 2012 rather than both 2010 and 2012. This has not worked out.

I use a lot of Visual Studio extensions, and it seems the one I rely on most heavily (after Resharper *heart*) is “Productivity Power Tools” which currently isn’t available in 2012.

If you haven’t used it, the most invaluable feature involves overlaying useful information onto the editor scroll bar. If you do a Ctrl+F find, small orange dots appear in the scroll bar showing the position of each of the occurrences of that entry. It seems I really can’t live without that.

The other thing I’m struggling with in 2012 is the colour scheme. It fits in with Microsoft’s new look, and I don’t like it. I’ve been using Office 2013 as well and don’t like that either.

Some of it will be familiarity, and I imagine will improve. Right now however I find my eyes hunting, desperately seeking visual cues from where they can start looking for the feature I want. And on that search they are assailed by brash, retro, iconography, each one, all sharp edges, hurts.

Windows 8 however I’m quite enjoying. The RTM release is good, a solid step up from the CP release and a bit of a “Phew” moment if I’m honest. Some bits of software didn’t work, but were under active development, AVG anti virus for example. So while it was annoying I couldn’t use it under CP, I knew it would be fixed. Some games however didn’t work, and they don’t tend to get patched after a certain age. GTA IV wouldn’t work for me under CP, it works under RTM, so that’s positive.

It’s worth upgrading to purely for the speed at which it starts and stops. Reboots fast, start up from sleep is instant. These are significant to me.

Look and feel wise, it works. Almost. While it reboots quicker, It takes me longer to get to the restart option than it used to. I do however avoid anything that uses the “Formerly known as Metro” mode of operation. I’ll choose how many app’s I can see at once thanks. I’m not a sufferer of ADHD, so I don’t need MS enforcing artificial blinkers on my experience.

April 6, 2012

Solution Items in Visual Studio 2010. Renaming it?

Filed under: C# — Ian @ 9:47 pm

I like things to be tidy, squared away, all pointing north, sorted chromatically according to the rainbow, etc. So have a solution folder called “Solution Items” annoys me. I want it to appear at the top of the list out of my way.

Well, if you rename it Visual Studio gets confused and creates a new one with the original name. There is a solution though.

It doesn’t matter where “Solution Items” exists, so I create a solution folder called “_Solution Items” and move the original “Solution Items” into that. Any new solution items appear in the now nested folder.

Android and the bleeping UI again

Filed under: Uncategorized — Ian @ 9:43 pm

Why does Android 2.3 insist on notifying me the battery is charged? Well actually I can answer that, It’s green and anyone, someone might like to know. The real question is why can this not be turned off? Seriously? I plug my phone in to charge when I get in and then get a helpful bleep around 2am. ICS had better have this fixed.

February 12, 2012

Lumia 710 – Why?

Filed under: Uncategorized — Ian @ 1:49 pm

Just picked up a Lumia 710 to have a play with. If this is what Nokia think will save them, I fear the worst.

February 8, 2012

Windows Phone 7. What’s missing

Filed under: Uncategorized — Ian @ 11:29 am

I’ve a bunch of phones. There’s the iPhone of course and some Android phones and a lowly WinPhone which doesn’t get used ever. This is a shame because WP7 is pretty good. It should be my favourite because I can develop software for it far more easily than I can for the other platforms.

So why does it languish in a drawer? What is it missing? I’ve made a list.

1) Hardware
My first foray into WP7 territory was with a cheap HTC WinPhone. The thing that struck me was how long applications took to load. I had never before realised this might be a problem, but suddenly I was waiting over a minute for a game to load. This is a deal breaker for someone who uses their phone in elevators. Seriously, if I saw that in a demo in a store against any Apple or Android phone I would put the WinPhone back on the shelf immediately.

2) Expansion
Microsoft have a funny idea about expansion. Apple want everything on the cloud, I don’t as the cloud doesn’t reach my train, tube, elevator, office. Give me a little SD slot. Oh and I’d like to be able to put a card in it without having to take the battery out please.

3) Extra hardware
Apple has this so right at the moment. I was on FireBox.Com a moment ago and there are 81 iPad accessories on sale. I can control my iPhone with my car. My alarm clock, digital photo frame and hifi have iphone docks. This is a huge area to get right. Apple can do this largely by controlling the range of phones. You basically have one size to fit your gadget to each generation. Microsofft can’t do that (see point 4) but they can make things easier. Once I can buy an adaptor which will connect the WinPhone to my car through a single connection on the phone, then we have a bit of a win. I’m not talking running a cable from headphone socket to audio in. I want proper digital out and control of the basic music functions and preferably the phone. I get most of that on a gadget that cost me 10quid for the iPhone.

4) Hardware variety. It’s all a bit of a disaster at the moment. There’s the high end Lumia 800 its little brother, and… Well some low end HTC boxes. I have a flock of Android phones. One has a 3d display (LG), another is like a small 5″ tablet (Sammy Note). They all look better, perform better and fill a need that WP7 isn’t.

5) Software
I don’t like the cloud. It is never available when I need it, that’s what happens when you live in the present instead of some Jobsian future. Give me practical software that makes online available offline and use this as a usp. The OS itself has potential, but who the heck designed the UI? Playing with it I spent way too much time flicking left and right and hunting around for the app I wanted. My iPhone has 20 apps on one screen, and 16 of those can be folders each holding another 16. The Android phones vary, but they all beat the iphone let alone the WP7 phone. It doesn’t feel like they designed it as something to live with, rather as something to use as a concept. Great for demos, rubbish every day.

6) Fundamentals
And last but clearly not least. Don’t forget it’s a phone. I’ll have it in my pocket for a day and I will want to comfortably get through a minimum of 36 hours without needing to charge it. Almost all the Android phones I have are afflicted in some way by dodgy battery life. the Iphone is the only one to get this right. It is the gold standard. Then remember I want to make calls to people in my contacts list, and send SMS messages. Both those should be very easy to do. Finally I want to know what time it is. Seriously, who wears a watch any more? Everyone I know uses their phone. Oh and harking back to a previous post. Shutdown and start up should be SILENT. Especially Shutdown.

October 12, 2011

Code reuse, not a holy grail; not a guiding beacon.

Filed under: C# — Ian @ 9:54 pm

Over the years we’ve seen many idioms, patterns, methodologies and guiding principles come and go. I’d like the mantra of code reuse be one of the ones that go.

It’s one of those concepts much loved by “management” because of the perceived time savings. Build one reporting application and if it’s suitably flexible, everyone can use it! Wow!

The problem here is not in reuse per se, it’s in the re-purposing of existing code to cope with previously unanticipated requirements. It’s a mistaken belief that you are protecting the time already invested in a code base and saving time on future developments.

The reality is you end up with either spaghetti code, loaded with conditional functionality and little fixes introduced by those poor buggers that inherit the project.

That doesn’t always happen, sometimes it ends up as a hugely flexible framework driven by xml configuration files and its own unique scripting language. In effect it becomes an alternative programming environment. Your developer knows C#, now he has to learn the idioms of some meta programming solution.

So what’s the solution? Well, follow some of those nice easy to remember acronyms for a start. KISS (Keep It Simple Stupid) never hurts. YAGNI (You Ain’t Going to Need It) is great advice. SOLID (Ok, that’s five separate principles, google it) will keep you on track for software you can refactor.

But most of all, don’t fear the reaper. Code should be transient as it decays over time. Remember code consists of two things; the code itself and the knowledge of the developers using it. Developers come and go, so even the best code becomes half as clear once a new developer sits in front of it. Design your code with obsolesence in mind. Interface segregation (The I in SOLID) gives you the option of coding a new module against an existing interface to change functionality. Dependency injection (The D in SOLID) gives you the option of injecting that new module into the code easily.

Keep things small. If a class has a 1000 lines of code, chances are it doesn’t reflect the Single responsibility principle (S in SOLID (I am going through them all aren’t I…)).

Don’t use class access modifiers defensively. If you are making a lot of methods private, you will probably benefit from a separate helper class which encapsulates that functionality. Why? You can plug it in and out AND test it. Not private you see so you can run a few NUNIT tests against it.

Older Posts »

Blog at