Introducing…

The Munsell color system, showing: a circle of...

Image via Wikipedia

nCode I.T. Limited! Yes, I’ve finally got round to setting up my own limited company. Since it makes more sense from a taxation point of view, and also gives me a platform to launch my own Micro-ISV. Since I’m deeply entrenched in the .Net world at the moment, I thought a bit of word play on the nXXX series of tools (nHibernate, nUnit etc) would have a cool geekiness to it. Anyway, the site basically gives a few details about my skill set & what I’ve been up to, purely for the contracting & outsourcing work, but the final (and as yet unlinked) section will pint to some of the work I’ve been doing outside contracting hours that’s helping me towards the fully fledged Micro-ISV status.

My first commercial product for my Micro-ISV will be a set of Bitmap Effects for .Net 3.5SP1.

This Effect pack will include :

  • Desaturation Effect
    One of the most missed features of WPF is that of greying out interface elements when disabled. when buttons containing bitmap artwork are disabled, the bitmap doesn’t go grey. There are lots of messy kludges and workarounds for this, but this effect addresses that problem completely. As opposed to some of the other available effect this doesn’t just change the element to grey scale it allows you to set a specific saturation level, allowing you to do cool effects like fade out your entire application to grey when it loses focus, kind of like the windows XP shutdown state. Unlike many other average-the-colours type of grey effects this uses the true NTSC colour weights to produce a correct desaturation.
  • Colorize Effect
    This will allow you to change the colour of any element and colorize it any new colour. Colorizing respects the pixels luminance, but changes the colour of each pixel to the new colour you’ve chosen. A simple effect. but very useful for fixing elements to all have the same set of tones.
  • Skin Shade effect
    This is the special one. It allows you to completely re-skin your application (if it is set far enough up the visual tree, i.e. on the top level window) because although it changes the colours, it respects the relationship between them. In other words if you picture the shades used in your application on a colour wheel, they will remain the same relative distances after they’ve changed. This means that if you chose analogous, split compliments, or triadic hues, they will remain that way, but their base hues will be rotated. It sounds much more complex than it actually is! The end result is that as long as your colour set was pleasing to start with, it will remain that way, even after you apply the effect.

Here’s an example of the skin shade effect. Two different ‘skins’ provided by applying the effect right at the top level window. Allowing an almost infinite range of skins is now only 3 lines of XAML away! This is the WPF outlook Hands-On-Lab that the effect has been applied to.

Fancy a rose pink outlook ?

clip_image002

and a fraction of a decimal away are shades of purple.

clip_image002[7]

Notice that although the colours change, the intensity and saturation stay constant. If you have a nice pastel colour set, all you’ll get after applying the effect is more matching pastel colours.

Obviously these effects could be achieved by making sure you set all your element colours to dynamic resources, and then defining lots of resource dictionaries with colour schemes in, then adding an interface to load those schemes. Although this is the traditional way to manage themes (and obviously still has its place) making sure all your elements share the same styles or dynamic resources for colours its a royal pain, and error prone.

Using a single effect like this allows you to define one set of harmonious colours for your application, then get an almost infinite set of harmonious colours at the switch of a floating point value, without ever forgetting to set an elements colour, and also doing away with the resource hit of using dynamic resources for every screen element that you want to change colour.

Another feature of the Bitmap Effects is the ability to selectively apply the effect based on an Opacity value. This allows you to add the bitmap effect to your top level window but still maintain control of which elements actually get affected by the effect right down at the element level.

An example case where you would need this is an application that displays photographs. You really wouldn’t want your grandmothers purple rinse extending across the whole photo just because it was part of the visual tree that the Colorize effect had been applied to! Using a specific value for the Opacity we can exclude elements from the effect. There are samples provided which explain how to do this selective effect application.

All the effects in the library support selective application at the pixel level. Another useful thing this feature allows you to do is maintain a specific colour for your control’s text, and have it excluded from the application of the effects.

I’m currently working on the documentation and samples, but when these bits are done, you can purchase this effects library and get updates, support, and implementation help via the official nCodeFxLib Bitmap Effects site

Enjoy.

Rob

Reblog this post [with Zemanta]
Posted in General | Leave a comment

Comedy web ordering with the Carphone Warehouse….

The Carphone Warehouse

Image via Wikipedia

I’ve just tried to order my son a new LG Cookie for Christmas from the Carphone Warehouse. Tried being the operative word here. I’m absolutely amazed at how we’re still struggling to get the whole on line ordering experience right. I’d filled in the form, and the list of errors were almost as long as the form itself.

I’d like to think that I’m not really that big of an idiot that I can’t get an on line order form right…but Carphone warehouse succeeded in spectacular fashion. So when the website even gives me 3 errors regarding my home phone number I’m left wanting to click the close icon.

Error #1 – the phone number is too long. Why ? See error #2.

Error #2 – the phone number has spaces in it.

Error #3 – the phone number is invalid.

Forgive me for thinking that it’s really at the bleeding edge of technology to determine whether a phone number is valid or not. With or without spaces. Id entered 3 phone numbers. So there was a total of 9 errors, just for the phone numbers, when the code could easily have stripped out the spaces, or even god forbid, used something as technologically advanced as a regular expression to make sure it was valid.

After fixing the errors I’m left with the final error. It appears my credit car information is  invalid. Why? Oh, we won’t actually tell you that. We’ll just say that there’s *something* wrong. Did anyone do *any* usability testing on this? I can’t believe it. Absolutely atrocious for a single page form.

Thank you Carphone Warehouse. And, Goodbye.

Oh, if anyone from the Carphone Warehouse by chance happens to read this, I’m available to help you out. Trust me, you need all the help you can get.

Reblog this post [with Zemanta]
Posted in General, Personal | 1 Comment

Designer stereotypes?

Where did that whole designer stereotype come from? I was amazed to see that it’s still alive and kicking when this pair of black turtleneck sweaters dropped into my inbox!

When I was heavily involved in the games industry, you could spot a designer a mile away. Strangely enough I didn’t see any at Team17 (everyone there was far too cool 😉 , it was usually attending a show, or when we had visitors that the turtlenecks were out in force!

Black turtlenecks should be raised to the same status of socks and sandals.

Reblog this post [with Zemanta]
Posted in General, Personal | Leave a comment

Long Time No Post part 2!

PALO ALTO, CA - SEPTEMBER 16:  The HP logo is ...

Image by Getty Images via Daylife

On the home front it looks like my time at "EDS an HP Company" may be coming to an end! They’re big, but they’re just not big enough to contain my passion and enthusiasm! I’ll know more tomorrow after a discussion with my superiors, but I think my future lies elsewhere.

Hint : I’ve updated my Contracting CV.

Posted in General | Leave a comment

Long time, no post!

Wow, its been so long since my last post that I’ve almost forgotten what a blog is. Well, almost.

Many things have happened both personally and professionally, hence the post hiatus.

But once again, I’m back and hopefully this time, I wont be straining myself trying to crank out humongous posts that take days to complete. Maybe if the posts are short and sweet i’ll end up with a more regular flow of useful snippets, rather than a 3 month delay then a 20 page monster article. These will still happen, but they won’t be the focus of my attention.

Anyway here’s a few things that have been keeping me away from the blog (if anyone’s interested!)

  • I’ve won another award for the project I’m working on – this time it was cash. Cold hard cash 🙂
  • I’ve come to the uncomfortable conclusion that I’m working masses of overtime for the wrong people, so it’s time to redress the balance. I won’t be working less, I’ll just be shifting what I’m doing, and who I’m doing it for. Working less is for sissies.
  • I’m setting up a Micro-ISV. After being infected with the Micro-ISV bug from my good friend Tim Haughton. After many conversations, I’ve been convinced that my talents lie elsewhere. Well other than permanent employment that is. More about this later.
  • I’ve been put through the assistive technologies wringer, and befriended a blind user who’s convinced me of the value of proper screen reading access. I can’t imagine using a PC without seeing the screen but he manages just fine. Truly amazing. One thing it has made me aware of is the vast market for well written useable products that aid users, even if they’re just partially sighted. Our WPF application at work has scalable fonts throughout, and i don’t think there’s a single user that doesn’t change the font sizes to make them larger.

Anyway, that’s enough posting for this entry, or I’ll be back on a 10 pager. I *will* be back tomorrow with a post about a good way to allow assitive tech to read the stuff on a WPF application under Windows XP. Damn that was tricky.

Reblog this post [with Zemanta]

Posted in General | 4 Comments

SSH, Safe surfing and avoiding the wrath of the Net Filter

Traffic control in Rome, Italy. This traffic c...

Image via Wikipedia

Many of my friends often wonder how to avoid their corporate firewalls, and secure their traffic against snooper. Well, its pretty easy to avoid the network traffic cops.

People need a method to be safe anywhere where they end up logging on outside their homes, where they have (mostly) all of the privacy and security they need.

Maybe they just want to browse the latest torrents, or god forbid run a P2P client outside their own network.

Obviously there are many restricted uses of corporate resources, (should you really be downloading playmate images at any time outside your own home?!) but reading private emails in your dinner hour? Checking how your shares are doing ready for the purchase of your 60ft yacht?

Well I often wondered that too; how I’m going to get a 60 foot yacht, not about tunnelling IP traffic 😉 !

It turns out my esteemed WPF co-worker, Tim Haughton, has just put up a nice blog entry about how to set yourself up to do just that. Check out the offending blog entry 🙂 He’s articulated much better than I could.

Oh, and happy surfing.

Reblog this post [with Zemanta]
Posted in Hackery | Leave a comment

.Net3.5sp1 RTM?

A little bird’s told me that the .Net3.5sp1 will be RTM on 11th August! Wonder if the Pixel shader API has been rationalised… Multi-texture here we come 😉

Posted in General | 2 Comments

No post?

Ok, my bad. I’ve been real busy at work WPF is really soaking up all my time right now. That’s actually a good thing, anything that forces more WPF into my head can’t be a bad thing.

On an alternate note I’ve solved the iPod software problem. I’ve settled on winamp! Although it has native support for the iPod, it’s pretty poor, but there’s a much better plugin available called ml_ipod. Support and features are excellent, and because i’ve been using winamp since it first came out, getting used to the feature set was a doddle.

Anyway, anything to get rid of iTunes! Winamp+ml_ipod all the way!

Posted in General | Leave a comment

10,000 Visitors!

How one earth did that happen? Someone has to be messing with my stats! I didn’t think this muck was that interesting. Really. See, my wife is wrong when she says I have no friends. Do virtual friends count? 🙂

Posted in General, Personal | 4 Comments

System.Windows.Data Error: 19

Thought I’d brain dump a little problem I came across earlier today. Data Error 19.

Here’s the full error.

System.Windows.Data Error: 19 : Cannot convert ’40’ from type ‘Int32’ to type ‘System.Int64’ for ‘en-US’ culture with default conversions; consider using Converter property of Binding. NotSupportedException: ‘System.NotSupportedException: Int64Converter cannot convert from System.Int32.
   at System.ComponentModel.TypeConverter.GetConvertFromException(Object value)
   at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
   at MS.Internal.Data.DefaultValueConverter.ConvertHelper(Object o, Type destinationType, DependencyObject targetElement, CultureInfo culture, Boolean isForward)’

How did I get here? Well, I have a bunch of generated values that come from a data dictionary , they’re generated into classes that contain Key/Value pairs, where the Key is an Int32.

This list is shown in a combo box, and the current value of the combo box is then bound to a CLR value type in a class. The only problem is that the classes CLR Type isn’t an Int32. It’s an Int64.

Now I know the the real fix is to generate a list of values for the combo box who’s type matches the destination bound value of Int64. The trouble is that I don’t always have that type information available. Thing is, I can’t remember any other control having the problem of changing types.

Heck,if you look at the conversion that it’s trying to do, it should be able to cope, converting an Int32 to an Int64 isn’t a narrowing cast, so there should be no problems with overflow. Eitherway, i just want to bind up this stuff and not worry about the types.

So, I wrote a small test app to verify what was going on.

boundVaueTest

Both the slider and the combo box are bound to an internal value, called surprisingly , "BoundValue" that’s declared as an Int64, and there’s a textbox that is then bound the "BoundValue" to show its current value.

 

Continue reading

Posted in General | Leave a comment