Insightful, profound, generous, witty, genius; all words that might be used somewhere in this blog.
Tuesday, March 10, 2009
Its just a computer...
I have a project in mind which may be totally spurious but, if I'm lucky, might prove to be a commercial success despite my Portugese pal's misgivings.
Whatever the situation I find myself owning not only an iPhone but also a Mac Mini upon which I have just installed the iPhone developer kit.
When I suggested this to some of my friends, the sharp intakes of breath were heard more than once and some suggested I had been enticed to the Dark Side while others suggested that I had instead gone to the Light Side. Well, my philosophy is that it's just a computer. It is a processer, a bit of memory and despite all outward appearance is practically identical to what I am used to using since many years.
My only misgiving is that the whole project is a bit of a distraction for me because I am also well aware of the fact that I am behind the curve on the WPF and Silverlight front; two technologies that my graphical leanings have made dear to my heart, and that as suggested by Conan Doyle via the proxy of Sherlock Holmes, I think that brain capacity is a finite resource with which we must be organised and not fill up with unecessary information.
My current attitude to the whole Mac side of things, remembering that the original Macintosh inspired me to become a professional freelance programmer and hardware designer in the first place, and remembering that I have also owned an IMac in the past, is one of pragmatism. I need one with which to fulfil a specific need, ergo I have one. It's no more nor no less than another sink in which to pour my intellectual resources, such as they are, and I have long been agnostic about far more philosophically important things than a few logic gates in a pretty box.
I can report that the out of the box experience has been excellent. Nineteen minutes from unsealing the machine to having it live on my network and configured for my e-mail. I also like the fact that it is small and very very quiet; which is not a huge bonus considering that this room has five other PC systems humming away in it.
Looking at the Objective C++ development system I can see I have a lot of head scratching to do. I will just keep in mind that the Program Counter is advancing over the machine code in much the same way as I would expect it to.
Monday, March 02, 2009
We are truly SCREWED!
Well thank heavens for that!
This thing has the potential to totally destroy New York or London or Paris and has only just been discovered. Never mind the war on terror or piddling about with paltry concenes down here. Hows about spending a couple of billion on finding and deflecting these things?
You see, there's no excuse anymore for the idiot story that it's too expensive or not high enough priority. For an idiotic reason of a few fat-cat bankers lining their pockets, governments have the ability to discover a way to authorise trillions of Dollars or Pounds or Euros of -YOUR- money so that the bankers can continue to jilk you out of interest and charge you for spending your own money.
It won't be long before a rock half a mile wide lands in the sea just off Greenland.
Wednesday, February 25, 2009
Open source rears it's ugly head
I will say up front that I use open source software. I have contributed to it when I had nothing better to do and I am sure there is a place for it in technology but; and it's a big but, open source can never work for massive public services, large enterprises or for people that think it saves money over proprietary licensed software. Why? Well, because open source software is inherently altruistic. It must be because the writers of Open Source code must go into the job without the slightest whif of expectation of being able to make money out of it. Whether thay do or not in the end is niether here nor there. The idea must be born in total altruism and it may mature into a money making scheme later.
The problem then becomes the license. Open source licenses state that you should give back to qualify to use it. Public services and corporations don't like to give back, especially if it has anything to do with proprietary data. Now you can theoretically use open source code, modify it to suit your needs and never republish a single line. This however means that the code sits in the code vaults, requires a maintenance staff and, worst of all, diverges from the main-line over time. Simply because no two development teams ever have the same algorithmic philosophies. In the end, maintaining a staff of developers for an indeterminite period of time is often far less cost effective than buying a license and the occasional update.
Lastly, I have a moral objection to open source that many will disagree vehemently with but I don't care what you, dear reader, may say. I object to open source code because it devalues my job in the eyes of people who know SQUAT! about how to craft a good program. People like the shadow under secretary for digital media is a pencil pushing small-time politician who thinks that software is a free commodity that falls from the ether of the internet like rain from the sky and believes that the sheer volume of it must mean that some of it must be good in the same way that an infinite number of monkeys can whip out a few really good sonnets now and again.
Writing software is an art that requires skill and creativity. People today realise more than ever that skill and artistry are saleable commodities. Don't give too much away for free because it cheapens the market.
Off topic..
She never ceases to amaze and delight me!
http://blogs.myspace.com/index.cfm?fuseaction=blog.ListAll&friendID=181118149
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendID=181118149
Go on.. Give her some traffic! ;-)
For Mitsu
Linq to Entities. The full horror...
As it turns out, This might be great long term advice but IMHO right now. If you want a solution that works. Go with Linq to SQL. The offer is more mature and the clincher is that the Entities DLL's have a major fault inasmuch as they have been compiled without the attribute that enables them to run in medium trust environments so, GoDaddy for one will not allow these DLL's on their servers.
Tuesday, February 10, 2009
Incredible lightness of being
Not carrying the weight of a laptop in my bag or having it on my lap cooking my legs is a real luxury.
Saturday, January 31, 2009
The pain of session variables in LINQ
One of them is in how errors are reported in a totally misleading manner.
Consider this little snippet of code.
var q=from t in MyEnities.SomeEntitySet
where t.ID==(int)Session["userid']
select t;
if (q.Count() > 0)
q.Count threw an exception that said:
LINQ to Entities does not recognize the method 'System.Object get_Item(System.String)' method, and this method cannot be translated into a store expression.
This drove me mad for hours because I tried everything such as verifying that the session existed, that the variable was real, was of the right type and was of the value I expected. All to no avail.In the end I solved the problem by first saving the session value into a local variable which I then used in the LINQ expression.
It seems to me that this has to do with the order of how things are evaluated within a LINQ expression and may even constitute a bug in the language. Why? well because it seems obvious now that the direct value from the session variable is somehow used before the cast operation by the LINQ parser and so an exception that seems to have no real relation to actual circumstances is thrown.
I hope that this helps to trap similar errors for people hunting for hours on Google like I did.
Wednesday, January 28, 2009
Fire and forget storyboards...
I have fallen deeply in love with Silverlight and it's evident, in Silverlight 2 at least, that one cannot do everything in XAML and there is still an element of code needed to do a job.
Because of the lack of triggers in the same sense as those that exist in WPF, Silverlight can be a pain when we need to create dynamic animated effects. However I had an idea that leans heavily upon the joys of garbage collection and anonymous methods to provide a fire-and-forget style storyboard which can do animations and handle its own events.
One little job I recently accomplished with this was to create some animation effects that had two stages; for example, to fade one element out and replace it with another.
The joy of this technique is that we can build a storyboard and the associated animation details dynamically, set it running and then just forget it while it does its thing. After the events have fired the whole thing -should- be reclaimed and garbage collected. (He said, wondering about shooting himself in the foot.
Here's some XAML...
<UserControl x:Class="FireAndForget.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="400" Height="300">
<Grid x:Name="LayoutRoot" Background="White">
<Ellipse Fill="red"/>
<Button Content="Click Me" Width="100" Height="25" Click="Button_Click"/>
Grid>
UserControl>
And here’s the button click code..
private void Button_Click(object sender, RoutedEventArgs e)
{
Storyboard sb = new Storyboard();
DoubleAnimation da = new DoubleAnimation();
da.BeginTime = TimeSpan.FromMilliseconds(0);
da.Duration = new Duration(TimeSpan.FromMilliseconds(1000));
da.From=1;
da.To = 0;
sb.Children.Add(da);
Storyboard.SetTargetProperty(da, new PropertyPath("(UIElement.Opacity)"));
Storyboard.SetTarget(da, this.LayoutRoot.Children[0]);
sb.Completed += delegate(Object o, EventArgs ea)
{
Random rnd=new Random();
((Ellipse)this.LayoutRoot.Children[0]).Fill = new SolidColorBrush(Color.FromArgb(255, (byte)rnd.Next(255), (byte)rnd.Next(255), (byte)rnd.Next(255)));
sb = new Storyboard();
da = new DoubleAnimation();
da.BeginTime = TimeSpan.FromMilliseconds(0);
da.Duration = new Duration(TimeSpan.FromMilliseconds(1000));
da.From=0;
da.To=1;
sb.Children.Add(da);
Storyboard.SetTargetProperty(da, new PropertyPath("(UIElement.Opacity)"));
Storyboard.SetTarget(da, this.LayoutRoot.Children[0]);
sb.Begin();
//done!
};
sb.Begin();
}
Good eh?
Tuesday, January 06, 2009
Oh the shame!!
Today, my pals at work had a great laugh at my expense. I was quite happy to show them my new pages on my site, yeah, the ones with the Silverlight banners.. and after a couple of seconds, they laughed so hard that one of them fell off his chair.. Seriously.
So my Silverlight efforts are too "bling bling". My site has a 1970's look 'n' feel. My banners are crass and I have no taste in, well, in anything much!
I live and work in the country of my own country's traditional enemy. I speak their language and accept their customs. I even listen to their ever-so twisted version of history with good humour. I suppose that I'll just have to accept the fact that my site is "moche". Anyone want the code?
Sunday, January 04, 2009
Silverlight fulfilment!
I must say that Brinkster have really made leaps and bounds on the quality of their hosting and particularly their support.
I use GoDaddy for some of my sites because, well, let's face it, they're cheap and cheerful but for all my mission critical stuff I use Brinkster. Even though it costs just a little bit more it's worth the money for the level of support that these guys give.
You can see the new silverlight XmplXaml page by following the link..
Silverlight frustration
The application, which I call XmplXaml, uses reflection to discover the properties of an object and provides a simplified view of the various collections and the types they can contain. So, rather than a class hierarchy you can see the Xaml hierarchy of tags. Running this application on PathGeometry for example, gives a rather nice view of the different PathSegments we can use and their relation to the root object.
So, now to the contunuing frustration part.. My bobpowell.net site is hosted on Brinkster and has been for many years now. I uploaded my new applications only to find that they haven't enabled silverlight on their servers. AARRGGHH!
I will either have to rename all the XAML files to XML, a soloution I am not happy with because I like the idea of doing everything directly from Visual Studio, or to get my old pal Jared over at Brinkster to have his team set up the silverlight MIME types properly. Failing that, I'll have to move my site to a server that supports them. That would be a shame because I like the Brinkster setup.
Here's a little screen-shot of my utility to be going on with...

Thursday, January 01, 2009
Misinformation is driving me insane!
Try any simple search for information and you'll be swamped with good looking content that, after you read a few lines, turns out to be for Silverlight 1.0 beta versions and has absolutely no relevance to anyone using the technology on front-line applications today.
I call upon all authors and bloggers to clean up their blogs and remove every article that still turns up with old and confusing information about uselessly dead beta versions.
Oh.. happy new year too!
Monday, December 29, 2008
Killer iPhone app
My absolute favourite application on the iPhone is Stitcher. It's a neat little app that finds and stitches together podcasts into one long custom radio show.
Being a Brit, I like to listen to UK podcasts from the BBC and the Guardian. Also, having lived in the US for a while I like radio shows such as Car Talk and Science Friday from NPR. The Stitcher application lets me listen to all of these while I am charging around the streets of Paris on my Triumph Bonneville.
Check out Stitcher at http://www.stitcher.com or in the App store on your iPhone.
New content
To be honest, I have been so aware of the fact that there is an incredible plethora of information on these subjects available that I wondered about any contribution that I might make being just so much noise. However, after searching for information that was relevant to problems I was working on and finding nothing but out of date and indeed, misleading blather, on the last-but-one beta, alpha or RTM, I am encouraged to imagine that I may actually have something to say if I concentrate on "la derniere cri" as it were.
Watch these spaces, or, if you're lazy, subscribe to my RSS feeds.
Saturday, December 27, 2008
Embed a silverlight control into an ASP.Net page
I have produced a video using Camtasia that shows how to achieve the task in what seems to be the simplest manner. I hope you like it.
Incidentally, One of my clients is a company that has me creating educational video content for their development teams. I don't have quite the same equipment as they have, a studio and dedicated engineers, but I think that I will do more of these.
To see the video, just follow this link...
Thursday, December 25, 2008
Grumpy old man?
I am a grumpy old man. I am also proud of being one, in the same way that my darling wife is proud of being a crone.
What do I moan about? I moan about my idiot children who have decided that smoking is a cool thing to do. I moan about the way big business has no room for the little person and how there is no real concept of personal service any more unless it's the service of sycophants that expect to be paid for the honour. I moan about shitheads like Robert Mugabe or those blasted Chinese who commit genocide upon Tibetans and who are ignored because the west loves to wear Nike shoes. I moan about the duplicity of governments who have elected officials who refuse to obey the will of the people that elected them. I moan about religion that pollutes the minds of people so much that they would kill innocent children in the name of their useless gods.
Secretly however, deep inside, I am happy. I am happy that I am fortunate enough to be able to feed my idiot children, even if they don't appreciate it yet. I am happy that I have my health and that I have a very low probability that someone will stick a gun in my face in the near future. I am happy that I can vote for my officials even if I know that they still won't really do what I want them to.
I sincerely hope that wherever you are, even if you're a grumpy old sod like me, that you can enjoy this mid-winter festival free from oppression, hunger and looming death. If you can't, rest assured that I am thinking of you and wish that things could be different for you.
Merry Yuletide.
Tuesday, December 23, 2008
Life, the universe and everything.
Frank Drake's now famous equation has been seen, for many years, as a possibility but recent developments in the study of the statistical possibilities of the incidence of life suggest that a much more conservative figure should be expected. Several ideas recently postulated, say that the possibility of life on a potentially suitable planet is only about 0.01 percent. If we take the best case, saying that liveable planets exist in every solar system then we could expect about a hundred million planets should exist in our galaxy with some sort of rudimentary life, some of which would grow to harbour intelligent life.
If we take a very dim view that only one in a hundred solar systems has anything like a Goldilocks zone, perhaps we could imagine a million life bearing planets in the galaxy.
Whatever the outcome, there is still only one possibility. That is that mankind must go out to space, not just as occasional visitors, but en-masse to struggle and probably to die out there but certainly to colonise the universe as much as we can.
In our four million year or so existence we have conquered just about all there is to conquer, at least in a physical sense, upon the earth. In all that time we have also shown that we do our best work when faced with adversity and a frontier to challenge. Having no frontiers remaining on earth will cause humankind to expand to completely fill the boundaries that we have and then to perish in decay.
So many people these days are concerned with the environment and with the destruction we are wreaking on the planet as we grow our technologies. We moan and whine about global warming or carbon footprints but few people see that this planet is nothing more than a stepping stone for the species and that, as the very top of the top of the food-chain, we own the darn planet and we can do with it as we please. If we need to make so much mess on the planet that we have to escape it at all costs then this will do no more than save the human race from the other, more awful possibility that we will one day be wiped out in our complacence and laziness in our own little Zen garden, unable to prevent the sun from evaporating our oceans or an asteroid from erasing us as the Dinosaurs were snuffed out from history.
I love Tigers and Rhinoceroses and frogs and Pandas but really, I don't give a monkeys, if you'll pardon the pun, for any of them if preserving them means that we must endanger our own future. DNA is nothing but software that runs on amino-acids. We can disassemble it at the moment but in a few years we will have an assembler for the stuff too. We can only hope that the democratisation of the gene assembler is used to make things as benign as a new Panda or to raise the Mammoth or the Tyrannosaurus from the dead. You can be sure that before Jurassic park is a reality, a world blighted by pathogens released by religious fanatics will be more likely.
Mankind must have a frontier, men must die to cross it and, as a race, we will never survive if we do not make the supreme effort. Screw the oceans, the fish, the trees and the dammnable Pandas! Grind them all under the wheels of the rocket launchers! Let's get out of here!
Tuesday, November 25, 2008
Has HowStuffWorks lost it?
While the fact that they do work may upset some more militant members of the union, this seems to be a sad comedown for a site that had always delivered good content.
How stuff works seems to have explained all the cool stuff in the world and is scraping the bottom of the barrel to find new material to justify its daily feeds.
I guess until the new Large Hadron Collider is eventually up and running and we finally understand the deepest secrets of the quantum universe, we'll have to be content with things like "How snot works" and "How toilet paper works" and "How dog poo works"
Oh how the mighty have fallen!
Friday, October 03, 2008
Not quite getting it
You can imagine the hilarity that resulted from that!
Wednesday, September 24, 2008
Agile Methodists
I stumbled upon an image of a group of developers participating in the stand-up meeting which, I seem to recall, was on Kent Beck's site and was struck by the similarity between it and images I have seen in Mormon pamphlets, the ones that are obviously an image treated with a Photoshop style aquarelle post-process, that makes the image look as if it was the work of an impressionist painter.
I was startled to make the association between agile methods and religious fervour but re-reading the agile manifesto, which I always thought of as a sort of Marxist text, I see now is more of an evangelical thing.
Suddenly, the pieces fell into place and I felt a chill run up and down my spine when I realised that the morning meeting where everyone speaks a little about what they did the day previously, what they intended to do today and if they were having difficulty on some level or other, was a definite ringer for a witnessing.
Occasionally, meetings get a more conventionally religious overtone when a charismatic developer decides to expound upon hot theories during the sacrosanct fifteen minutes and extends it to forty five while people shift themselves into more comfortable leaning positions on walls and the backs of chairs.
There may even be a burgeoning market for cardboard cut-out pulpits!
Wednesday, September 17, 2008
Is Apple's software quality slipping?
Aside from being locked to their view of the world, a situation that will be rectified very soon when I jailbreak the thing, I was astounded to find that the Apple reputation for thinking of everything and being easy to use falls far short of expectation.
I am a biker and do my daily commute on my Triumph Bonneville so I got a Bluetooth helmet kit and subsequently discovered that the iphone doesn't have an auto-answer function for when the headset is connected. Furthermore, for a touch device not to support handwriting recognition or voice command dialling yet have the processor power to do serious graphics is inadmissible.
I've hadthe thing for a week now and I am getting used to it's little foibles but to be honest, it shouldn't have any!
Posted from my IPhone...
Wednesday, August 27, 2008
Reflector
Personally, I am "gobsmacked" as they say in the UK that Microsoft hasn't done the right thing and paid Lutz handsomely for this system so that it could be included in Visual Studio as a tool. This isn't the first time I've been similarly gobsmacked at the stupidity of Microsoft when dealing with community projects of this type. The previous grave error on their part was to not buy nDoc for a decent price instead of proposing that P.O.S. Sandcastle as a viable alternative.
It seems to me that when it comes to community, Microsoft seems to have lost touch with what community is about. As a long time advocate of community and peer-to-peer education and assistance I believe strongly that some things used by the community are just too good to let fall into the hands of third-party entities that would exploit them in the wrong way.
I imagine that when Reflector was first seen, there were those in Microsoft that were aghast at the idea that all the source code of the framework became open to anyone who wanted to view it. I also remember it as a wakeup call to companies that had no protection for their own code. Despite this initial reaction, Microsoft never made an effort to obfuscate the system DLL's and now, I don't believe that a single developer on the planet who programs for Windows can get through the day without using Reflector somewhere.
As community projects or run by small entrepreneurs, a self-starter tool of such enormous impact as Reflector, nDoc or even nDepend, present no competition to to Visual Studio and do nothing but enhance it. When taken over by a third party, these tools immediately become looming compettitors that may adversely affect the market and reduce resources when Microsoft suddenly realises that they have to build competing functionality into Visual Studio.
A couple of million bucks is a drop in the ocean for Microsoft. Imagine what they themselves would spend in order to try to create something as universally useful as nDoc, Reflector or nDepend. On the other hand, for them to purchase these tools and add them to the Visual Studio system would be an incredibly useful and sane thing to do. Instead, they allow such important work to fall into the hands of third parties that really are potential competition to them.
Microsoft, Wake up! Look at the communities that you say that you value, use the resources in them to enhance the product, don't allow something like this to happen again! It's just plain idiotic.
Thursday, July 31, 2008
The compiler can choose to ignore the fact that a better parameter match exists and use a lazy evaluation of a method in a derived class. Apparently, this doesn't break the rules of OOP or of polymorphism. It just prevents "brittle base class" syndrome.
Personally, although I can see a certain validity in the arguments of MS gurus like Eric Lippert I still feel as though the wool has been pulled over my eyes somewhat. How I missed such a simple thing as this for the last eight years is a mystery to me. I must be getting old.
Ahh well. I suppose I had better brush up on my VB syntax because despite the fact that the language is verbose and redundant they have a kick-ass compiler that is proven to be better at
loop optimisation and now I discover that it handles an important compiler principle in a logical and intuitive way.
Thursday, July 24, 2008
Still bugs in the C# compiler.
Speaking with a friend who works for Microsoft he quickly said it wasn't a bug and gave me a line about explicit casting and method selection in the compiler but I think that the example is really simple and is a clear breach of overloading principles.
I have a base class with a virtual method which contains an integer parameter. In a derived class I include both an override for the original method plus an overload for the same method but this time having a float parameter.
The main function calls the derived class and even when the parameter is cast explicitly to int, the int overload is never called.
This is true in the 2005 and 2008 versions.
To prove a point I wrote the exact equivalent functionality in VB.net and it works as expected.
Here's the code.
class Program
{
static void Main(string[] args)
{
DerivedClass dc = new DerivedClass();
dc.AMethod((int)1);
dc.AMethod(1f);
Console.ReadKey();
}
}
class BaseClass
{
public virtual void AMethod(int i)
{
Console.WriteLine("Base class integer parameter!");
}
}
class DerivedClass : BaseClass
{
public override void AMethod(int i)
{
Console.WriteLine("Derived class integer parameter");
}
public void AMethod(float f)
{
Console.WriteLine("Derived class float parameter");
}
}
Sunday, July 13, 2008
Grandad
When I was a boy I had the great fortune to have lived at my grandparents home for a while whilst the family was in-between houses.
The times I liked most was the mornings. I would hear grandma in the kitchen as she made the breakfast, she would often hum or sing a tune as she worked. Grandad would call us down and we’d have scrambled eggs on toast or boiled eggs. Grandma and granddad were a great team.
Being the first grandchild I suppose I got the benefit of his own feeling of grandfatherhood. We spent a lot of time together and he would often ask me “Robert, do you know how to….” Whereupon, because I most often had no idea, he would launch into a demonstration of something or other. It was granddad who held the saddle of the little bicycle, on which he taught me to ride a “two-wheeler”. It was granddad who introduced me to books without pictures, who gave me a passion for literature and reading and who introduced me to authors like Charles Dickens and H. G. Wells. It was granddad who showed me how to use an index so that I could look for information on my own. He gave me many of the starting points in my young life.
The job I do today is with computers, using math and complex graphics or calculations. All of my skills are rooted in his teaching me how to use a slide-rule or what good the sine and cosines are for and the value of precision in engineering.
In short, I have a deep sense that my granddad contributed a great deal to who I am today.
Later in life I continued my relationship with this man but as an adult. Whenever we saw each other, we would talk at great length on many subjects. Once, he came flying with me when I qualified as a pilot and we flew over his house on the Isle of Wight in a little Piper plane.
Recently, I myself became a grandfather and someone asked me if it made me feel old. I replied that I had actually been looking forward to it a great deal and only hoped that I could be as good a grandfather as the one I was lucky enough to have.
Tuesday, July 08, 2008
Fuel prices getting you down?
Last year we bought a new Honda Jazz, it's a small petrol engined car which the dealer told me was more economical than a diesel. I laughed at this but recently we've been playing a game where my wife and I try to get the best mileage as possible. We've been learning to drive economically but the car is used for all those niggly little taxi journeys that one is obliged to do when one has children.
Driving the car "normally" as in "we don't care about fuel consumption" we were getting 7 litres per 100 kilometres or about 40 miles per gallon.
Recently, since we began the fuel consumption game we reduced it to the 5.5 / 100 region but since last weekend we've done an amazing 4.8 litres per 100 kilometers which works out to 58 miles per imperial gallon!
Cool eh?
Sunday, June 29, 2008
On the move.
So, the mandate of the moment is to assist inexperienced developers to "migrate" a truly vast and monolithic VB6 application set to .Net and make it work. Can you say "Refactoring"?
In one sense I think this is a really shocking revelation that even in today's blog-following, webcast-viewing world of geeks that people who program for a living still don't know about the gang of four and have never even understood the simplicity of Singleton or the joy of Dependency Injection. In another sense however, I allow myself a little chuckle of schardenfreuder-ish glee when I realised that there is still a place in the world for old blokes who know the difference between their arse and their elbow.
A job that was originally a weeks work, that became six-months, that mutated in to two-and-a-half-years of living in a hotel three nights a week has now become a full-time job educating "cub" developers in the joys of how to program in the real world and so 60% of my family (that's six of us) are moving to the metrolopis in the hope of being able to spend more time together. (I don't get to sleep with my wife enough at the moment....)
We've just signed for a lease on a house in a tres chic part of the country, outside of town but 30 minutes from the bank where I work and we intend to move in early August.
Friday, June 20, 2008
Quote of the day...
Bob Powell, 2008.
Sunday, April 20, 2008
Lighten-up
These little Celeron based machines have a four gigabyte flash memory instead of a hard drive drive and a wireless adapter for mobile connectivity.
They come with a Linux system pre-installed and are ideal for simple internet and mail / news tasks but they really shine with a copy of a Windows operating system. Unfortunately Vista requires a minimym of seven gigabytes to install but XP Pro will go onto a 4 gig flash drive with some jiggery pokery.
I have used nLite to create a cutdown version of XP and got the machine up and running with XP on board. Another 4 gig SD card plugged into the machine serves as a second drive, to which I have moved the documents, local application settings, in short-anything that needs lots of writing. Flash drives have a long lifetime but a finite number of writes so I am trying to increase the life of the mainboard soldered components as much as possible. I may try a big fat SD card as the maindrive later and see how that goes.
I have installed the first machine but it's at the limit of space for the flash drive so I'm going to try even more optimisation. I know a guy who has XP and Visual Studio Express installed and does WPF development on the machine.
I will post back here if I have anything interesting to impart.
Sunday, April 13, 2008
Brian McCoombe Band
Last year I celebrated my 25th wedding anniversary to my beautiful wife Chrissy and we decided to hire a band to play music at the event.
Chrissy found Brian's band through an internet search and we decided to hire them, even though the price at the time seemed high. We had gone to the trouble of finding the venue of a French castle for the party so we figured that a band should at least try to fit in.
Unbeknown to us we had hired a band of such incredible quality and skill that we were totally and utterly blown away by their music.
Brian's voice has a soaring quality that one would expect from Freddy Mercury or Stevie Wonder. The band's music is tight and professional and the lyrics rip your soul from you and leave you with the feeling of having been drowned and brought back to life in the same moment.
The Brian McCoombe Band is a celtic rock band with roots in Scotland, Ireland and the Finistere region of France. Their music is original and astounding. Seek them out and be amazed!
World class Software
Institutions such as banks have a client lifetime measured in decades so the idea that software should be robust and reliable is taken for granted. The reality is however, that the software produced in companies that really ought to be irreproachable is often somewhat less than mediochre and that the attention to code quality is less that one would assume.
My rules for world-class software are simple:
#1 All code must be documented with inline comments and white-papers that describe the motivation behind the implementation. When this is in place the superhero programmer cannot die in a skiing accident or be headhunted by the company up the road and leave the development team wondering how the code works.
#2 All code must be tested. Unit testing, black-box testing and white-box testing ensure that the software performs as intended. All three types of testing are needed because none of the individual techniques cover all of the usage scenarios. Testing is a serious business so, rather than leave testing to novice programmers, companies should hire the most expert and devious code-killers possible to test the software. These people are few and far between and should be paid a lot!
#3 Software factories that do continuous build and test are essential. Without these, mistakes in the build can go unseen for days, weeks or months, depending on the release cycle of the application.
#4 Source-control rules must be draconian. Developers must not be allowed access to the same file at the same time. If they need to then you probably have the situation of more than one class in a file. This is totally unacceptable. Checking in of a file that breaks the build should be accompanied by public ridicule in stand-up, daily or weekly meetings. A great thing to do is to have people wear a stupid hat if they break the continuous build.
#5 Code should be monitored on a daily basis. Companies I advise often have code metric analysis tied into the daily builds so that it is easy to see whether a class has become bloated with too many methods, methods are more than a certain number of lines, cyclomatic complexity is too deep or there aren't enough comment lines in the code.
If you're company is in Australia and you need a seriously dedicated architect drop me a line...
Thursday, March 27, 2008
It might be architecture, but is it art?
Both seem to have been thrown together by animals, subject to the forces of nature, inherited by a long line of animals with differrent ideas on how building should be done, do the job they are intended to do with results that depend on the weather or the phase of the moon and are often adversely affected by rot.
The only good thing is that you can get rid of bad software without dynamite and without upsetting a bunch of bleeding-heart ecologists.
Sunday, March 23, 2008
Wonderful internet again.
I've been married for over 25 years to a fantastic lady who I met one afternoon in a farmyard on the Isle of wight. Just before I met her she had been involved with a not incredibly famous progressive rock band called The Enid. This band played all manner of pieces ranging from classical composers to covers of The Troggs Wild Thing and The Sex Pistols Pretty Vacant as well as their own compositions which are pretty good too.
They did a gig in 1978 in Farnborough England where a Swedish fellow by the name of Hans recorded the only recording of some of their music. My wife who was 16 years old at the time was in the audience making noise.
Thirty years later, Chrissy has a MySpace page, contact with the ex band members and through the power of the Internet, Hans. This means that the one and only recording of that gig, made on a handheld tape recorder and never heard elsewhere can live on and enrich the human experience.
You may not imagine that this is important in any great scheme but that data is digital. Ok, the original recording sucked but it was real and it existed for couple of hours. It made memories for a bunch of people that have lasted for thirty years so far and now will be available amongst the petabytes of other data that the human experience has created. Maybe someone a thousand years from now will hear a bit of music that has my wife singing in the background when she was a kid. Maybe someone a million years from now will still be able to hear it.
When all human experience becomes digital and storeable and transferrable and copyable and shareable maybe we will all become immortal.
http://www.myspace.com/theenidsociety
Saturday, March 22, 2008
Web idiocy
Please confirm your e-mail address...
How idiotic can you get? If someone enters the wrong address it's their fault and why should you care?
This has become an annoying habit with many webmasters and i bet they do it just because everyone else does.
Monday, March 03, 2008
Vista 64 and performance.

After upgrading to a new graphics card and more memory I get a performance report of 5.0 on my Vista ultimate 32 bit install.
At the same time, I bought a new hard-disk upon which I decided to install Vista 64 bit but this gives me a lower performance rating of 4.3 and crashes every few seconds with a display driver freeze.
I am interested in using Vista46 because I want to take advanage of the 4 gigabytes of memory that is now in my system. My experience so-far however shows that it's buggy, unstable and has serious compatibility and driver issues. It took me five attempts to install a version that even boots without a bluescreen. I accomplished this with the latest vista install with integral service pack one direct from MSDN.
As an MVP I get access to software for free but I can say unequivocally that had I bought Vista64 ultimate I would be a very unhappy customer.
Saturday, March 01, 2008
Growing up with technology
This gave me a very machine oriented view of the computer. I understood that integers were stored as binary ones and zeros in a specific order in a register. I understood that a mathemtical operation was different from a bitwise logical operation and even today, when I think of an integer or a byte I see a little shoebox with a certain number of pebbles ranged in sub-divided partitions for the bits. Consequently, I find myself surprised when programmers go through their working lives without ever understanding this.
Now, a university student or technical college student immediately sees the high-level language view of the system and may not undertand the implications of the circuitry that carries the signals back and forth along the busses.
I find this to be both interesting from an anthropological viewpoint and disquieting from a professional one. From the first viewpoint its interesting that we don't fundamentally need the deep-down knowledge of the systems we work with anymore. We can work at such a high level that there is no need to understand the mechanism of an interrupt or consider an integer like an array of bits. It's disquieting because there is still a lot of code that relies on these principles so when a new-age programmer sees these techniques in use, they may not immediately understand what the implications are and so make an adjustment that is completely at odds with the architecture.
I wonder how long it will be before even the discipline of logical problem solving and algorithm creation is obsolete? I bet it's less than twenty years.
Sunday, February 17, 2008
Living in the past
I imagined that finding a team that programs almost exclusively in a language as crippled as VB6 is in these days of frameworks and massive API's would be rare in itself but it seems that they are not so rare as I imagined. Trying to train such a team to change working practices to encompass .NET 3.x and C# is a challenge.
Over the years I've seen many .NET projects written by VB programmers and it seems that the pattern is always the same. No layers in the architecture, code factored by functions - not by classes, no concept of encapsulation or inheritance, every dirty trick possible to create global objects and globally accessible functionality.
I never realised that object orientation was something that was still on the frontier of programming practices. Maybe the millions of VB devlopers out there really do need help.
Saturday, February 16, 2008
On patterns...
The answer is; Yes, MVC is a great pattern and NO! don't port it. it's built in to .NET. They just call it databinding.
When pattens became popular in the 90's I was working as a team lead in Stingray's C++ development department and I remember long and fraught discussions about the MVC pattern because my boss saw MVC as somthing that worked on a macro level, the whole view, the whole model and the whole controller. I on the other hand imagined MVC as a light and super granular pattern that only really applied well to individual controls or bits of data. Because he was the boss, Stingray went on to provide an MVC implementation that worked well enough but that encouraged hefty logic built into views and complex interactions with data that sort of spoiled the simplicity and grace of my MVC vision.
Looking at the world now I feel vindicated because databinding is indeed granular and simple and, as I mention in my previous post, is the only thing that Microsoft have really retained between Windows Forms and WPF.
I strongly advise that you don't fall into the trap of trying to reimplement MVC on a .NET platform. I saw an example of this just a short while ago when a very competent and sane C++ programmer was given the thankless task of porting an old C++ program that implemented Stingray's MVC pattern to C#. He spent weeks messing with it and then was disturbed to discover that all that effort could have been avoided with a few simple lines of databinding code.
Friday, February 15, 2008
Powering the presentation layer...
In many people's opinion, The guys at Infragistics included it seems, this smacks of UI and graphics. For me however, this couldn't be further from the truth. For me, a presentation layer is totally non-graphic and is really a buffer between the data and the graphical layer.
One thing that I have learned over the last, oh, thirty years in the business is that the graphics always change, it's the data that remains the same. Consider the current situation; We have a world full of applications based on the hype of Windows Forms and the reality of WPF looming, well, more than "just this side of" the horizon. What does this mean for the application developer? Yup, you guessed it, a massive re-write of everything. Or does it?
Over the last little while, I have been working in the financial sector where data is old and entrenched in massive databases. These financial institutions however need up to date applications to run their decades old loan deals. Recently, the emphasis has been on windows forms but now WPF is taking the world by storm and people have been wringing their hands about re-writing all those applications again. On many of the projects I have worked on, the presentation layer has been the key to success in migrating applications to WPF. Here's how it works:
The MVP pattern suggests a model a view and a presenter. This is a great pattern if only people could get the presenter bit right. In implementations such as CAB, MVP is really crippled and has a poor definition but with a little bit of work we can have a perfect system in which the model is isolated from the view by a "presenter" that is really a two-way buffer between the UI and the data. I say two way because the presenter must play the role of a data conditioning filter that runs both ways. Here's a scenario for you.
The database of a bank contains reprsentations of money values. the database actually holds the value of, say, 124,000,000 but, because this is a bank and banks don't deal in piffling small change, when a bank agent see's a loan or mortgage he actually sees the numbers 124.0. Traditionally the conversion between 124,000,000 an 124..0 would be done in the view where some clever code resides. However, if this operation is done in the presenation layer and the presentation layer is databound to, say a textbox in the view, then the presentation layer "presents" 124.0 to the view and when the user types in 125.0 the prsentation layer "presents" 125,000,000 to the data model.
An even better example of this is when the presentation layer synthesizes data. Take for example the need for a number to be of a certain colour. In the database we may see a representation of 100,000,000 that is seen in the UI as 100.0 with a colour of white for the textbox background. When the value is -100,000,000 then that value really should show up in bright red. Where is the colour gnerated though? That's right, in the presentation layer. The UI doesn't have to have business logic in it to translate colours, it just databinds the value to the presenter and the colour of the textbox background to the presenter's synthesized colour data.
So now, what does this all mean for the future? Well, when Microsoft introduced WPF they threw out everything that we knew about UI and replaced it with something else. Well, actually, everything except databinding, which, incidentally, they made more powerful. This means than that if your applications had a model and bi-lateral presentation layer then you could rip out the 10% of code that was your old UI and databind in a shiny new WPF UI in a few days and come up smelling of roses.
Saturday, December 08, 2007
Internet rules!
What a brilliant idea! I found that all I need o do is point the dish at a landmark nearby and wiggle the elevation till it locks on. Too cool!!
WPF FAQ
Although I know there are many out there, in my new role as a WPF developer I will use it as a target for noting down all those things I find useful during my learning curve.
Hopefully it will benefit others too.
WPF same-old sameold.
Thursday, November 08, 2007
Problems with source-control and ItemGroup entries in .CSPROJ files
I work in a ClearCase source control environment and recently had to have access to a VOB from another team so that I could do a bit of trouble shooting.
The problem arose as soon as I tried to compile their code; the source-control complained that the xxx.csproj couldn't be written because it was write protected. This was normal because I hadn't touched anything or made any checkouts.
The problem was that the system seemed to want to overwrite the files that were not checked out.
After much detective work I found that the XML:
was being inserted into the IN_MEMORY copies of the CSPROJ files.
After some detective work in the registry I found that this was associated with something called STextTemplating which has to do with the template system in Visual Studio and seems also to be associated with Domain Specific Languages (DSL)
After more searching I found that it was necessary to remove the following keys:
{B4F97281-0DBD-4835-9ED8-7DFB966E87FF}
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Packages\{a9696de6-e209-414d-bbec-a0506fb0e924}
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp\Packages\{a9696de6-e209-414d-bbec-a0506fb0e924}
After this, the problem went away.
Here is the link I found after about two hours of digging and pain...
http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework/topic61709.aspx
Thursday, May 03, 2007
2.NET|!2.NET
Saturday, February 10, 2007
A strong business case for WPF?
Hot issues in the computing universe include the advent of Vista and the .NET framework 3.0 including technologies such as Windows Presentation Framework (WPF). Even the most disconnected developer will be aware of the hyped images of videos playing on the faces of spinning cubes and photo-albums that float in a plasma-filled void. All very pretty, amazingly attractive to geeks who understand what it takes to do such a thing, but how do you explain the need for early adoption of such a technology to someone who doesn’t see the need for these sorts of things in their application?
Recently I’ve been working in a company where I’m responsible for the GUI end of a complex data architecture and I am faced with diverse problems on a daily basis. Firstly, the company is a large institution with a phenomenal IT overhead. Everything must be certified; everything must be accepted and verified. As a result it’s only recently that the company moved onto Windows XP systems and even more recently that Service Pack 2 has been accepted and even that is installed on a very few machines. Imagine then how difficult it might be to persuade the people in the system to adopt such a new technology as WPF. When we see WPF we see video games, we see spinning cubes, we see applications that are so much fluff and that have little or no use whatsoever for a company that just needs to display values from a database in a grid. A project manager who sees such demonstrations will dismiss them out of hand, indeed, they have.
However, the managers are very hot on the subject of performance. The data architecture I work with has the possibility to swallow and process large amounts of real-time data. This data comes from complex calculation systems that can change a couple of hundred lines on a data grid in a matter of moments. Using conventional systems, the best commercial grid software we can find and every optimisation technique available to us we still see processor consumption rates climbing to the 100 percent mark on simple machines and the 50 percent mark - this is to say one processor totally consumed - on multi-core systems. Why is this? Simply, because instead of using the processor for doing work, we’re using it to paint the constantly changing cells in a grid. Our graphics and our UI are destroying our ability to do work.
Where does this leave us? In order to liberate the processor we need to stop it from drawing the graphics. We still need the graphics so this implies that they need to be managed somewhere else. By the graphics card itself possibly.
Strangely WPF is here with a system that can make even the most bogged-down two dimensional application fly. With the power of graphics processors on even simple display cards today, the rendering of a grid can become a trivial matter, even when it’s data-bound to a constantly changing stream of data.
Forget spinning cubes, forget cards that bounce and shatter in a waterfall of broken shards, forget plasma fields with smiling babies and dogs catching Frisbees. Show the managers in your company the benefits of freeing up those expensive processors for doing real work and leave the graphics where they belong, on the video card.
Sunday, January 28, 2007
What is the most important technology today?
My own experience with these classic patterns is that the ideas are usually great, the pattern has a logic and a simplicity that suggests that the implementation should render good results but the implementation, when left open to developers who use classic quick-and-dirty methods or just don't understand the architecture, usually falls short of expectations. One of the biggest problems I've seen in many applications is the blurring of the line between the boundaries of the pattern components. The way that we build applications, such as an MFC, Windows Forms or even WPF application, leave so much open to interpretation that developers will often write complex code into a form, dialog or user-control so that the functionality of what should be only, say the view, becomes part view, part controller, part model.
How does databinding solve this problem of interpretation of a pattern and the consolidation of an architecture? Well, the way we use databinding enables us to remove all aspects of business logic from the view and to move the intelligence of the application into the presentation portion where it belongs.
I'm in the process of preparing a number of articles on this subject which I will be posting over the next few weeks. If you're interested in the follow up to these ideas, watch this space.