Thursday, July 24, 2008

Still bugs in the C# compiler.

I have been putting together some simple training for VB6 developers who have had little or no experience with C# or object orientation and I found this lovely bug in the 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.

William Anderson

14th December 1906 - 13th July 2008


Tuesday, July 08, 2008

Fuel prices getting you down?

In Europe we're paying 1.5 euros per litre or more at the moment so the question of fuel consumption is a big issue.

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.

It's sometimes hard to keep the modern stream of consciousness flowing when stuff as truly unimportant as work gets in the way. This however has been my limiter for a while now.

In 2005 I was asked by an old acquaintance to go look at the problems plaguing a C++ application that he was responsible for. This thing does electronic trading of credit derivatives for one of Europe's biggest banks. My contract was for a week.. I am still at the company with more and more work to do each week.

I recently moved from credit derivatives to commodity trading where I am now on a small team of architects dedicated to dragging the company kicking and screaming into the 21st century. I've always considered myself more as an educator than anything else and this job is no different to many of my others because I am mentoring a whole team of VB6 developers in how to survive in the real world. I recently gave a presentation on patterns in which I started by asking "Has anyone heard of patterns?" All the hands went up. I then asked "Who knows any patterns or has used one in their work?" I was rewarded with a room full of blank-staring faces and no hands.

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

I'm not afraid of dying. I'm afraid of not having lived enough.

Bob Powell, 2008.

Sunday, April 20, 2008

Lighten-up

I just took delivery this weekend of three Asus EEE-PC machines.
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

How can I have too much praise for this band? I have been listening to their album recently and I can't get away from the fact that these people aren't rock-star millionaires even thought they should be.

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

For almost three years now I have worked in the commercial finance industry and have been advising banks and insurance companies on how to write software that stands the test of time.

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?

At work today I remarked to a friend that the name "Architecture" can apply to some software in the same way that "Building" can apply to a beaver dam.

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.

Here's how the Internet is the most wonderful thing that ever happened to the human race.

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 enter your e-mail address...

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

The first computer I ever had, I built myself. It had a Zilog Z80 processor and 2K of static RAM. I understood it at a fundamental level and when I learned to program I did it in pure machine code. It was some time before I used even an assembler let alone a high-level language like C.

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

The Chinese have a curse; May you live in interesting times. The 1990s certainly were interesting for programmers. A vast proportion of applications coded during those years were written in Visual Basic and, believe it or not, these applications are still hanging around today.

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

I responded to a post in one of the Microsoft newsgroups the other day where someone asked "Is MVC a good pattern to use and should I port my old implementation of it to my new C# application" (I am paraphrasing here).

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

Ok, I know this is a tagline for Infragistics but I think they'll forgive me because they are pals of mine. The thing I'd like to expound today is just what is a "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!

I so love the internet. I messed up my satellite dish today and needed to know where to point it so I found this... http://www.dishpointer.com/

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

I am working on my new WPF FAQ which will be available on my site shortly.

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.

I am currently trying to immerse myself in WPF from a practical and useful standpoint. My usage of this new system has been fairly light and fluffy up until now, I have been puzzled by some of the new concepts, realised that the framework has taken a totally different direction recently and been have wowed by the promise of "A New Hope" or, if you'll forgive me, a paradigm shift.

However, when I began seriously looking into what can be done on a practical level with XAML and how data and XML can be used to build pretty cool applications I find myself coming to the conclusion that its all really business as usual in the world of the programmer.

When you look at XAML and the various cool looking demo applications that are out there you will see in fact that XAML is only as good as the components you can use on your pages and windows. The supply of these components requires programming skills that are firmly based in traditional methods and despite the fact that XAML provides a declarative way of creating an interesting look and feel, when one begins writing a custom control, one is still forced to roll up the sleeves and get to work with good old C# or Visual Basic in the codebehind file.
Certainly XAML is a great way of defining a user interface and incorporating the design elements we need now but the need for strong architectural skills and a supply of high quality controls for all these markup-jockeys to consume is still of paramount importance.

Thursday, November 08, 2007

Problems with source-control and ItemGroup entries in .CSPROJ files

Here's an interesting one that just happened to me.

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

Arthur C. Clarke once said "Any sufficiently advanced technology is indistinguishable from magic"

A few times recently, I've been in a situation where I just wanted to hold my head in my hands and groan "Noooo not again!! make it stop!!". Why? Well, because even after seven years of .NET people still don't get the idea of what advantages there are in fully embracing the framework's philosophies to create really great applications or components.


Imagine dumping a medieval man into the middle of London. Aside from the obvious initial shock, he'd become used to the idea that cars travelled about without horses attached to them, he could even learn to drive a car. He would become used to the idea of lighting without flames and he'd eventually become a consumer of fish and chips or MacDonald's burgers without necessarily understanding how it all happened or what made it all tick. After his short period of adjustment that went from screaming fits and soiling himself with fear, we would eventually get someone who can function just fine in the environment. Whether he could design a car or grasp the concepts of electricity would be however, a different subject entirely.


This is the sort of thing that happens when someone who is "expert" in 1990's technology gets hold of the concepts of third millennium .NET framework. They become a perfectly adequate programmer, able to apply their concepts of programming to C# or VB.NET and as long as their efforts are contained within a single sealed up application all is well and you can't tell the difference from the outside.


What happens however when that person, however innately intelligent they may be, applies 1990's ideas to .NET architectures and has the responsibility for creating, say, a huge data management framework of industrial proportions? You guessed it. A complete and total disaster that does nothing but make people groan with disbelief.


For me, the best aspects of .NET architecture are the ones that don't fall readily to mind, even if you're a world-renowned C++ guru and have 20 years of experience in your field. For example, the idea that your objects may take part in a design time environment. This was not even a possibility in the old world of C++ but now you should seriously consider whether your objects should at least carry the attributes such as Browsable, Description, Category etc. Furthermore, you should ensure that your object has a type-conversion strategy, should implement ToString correctly, provides a design-time editor, possibly a graphic editor, certainly a smart-tag, some designer verbs and so-on.

When designing an architecture today, we also need to look to current trends in data-binding. It used to be that tying an object to a GUI was a laborious process that required either brute-force, the preferred C++ method, or implementation of some pattern such as Model View Controller (MVC). Any remotely skilled Windows Forms engineer will immediately use data binding which neatly sidesteps these issues. However, the objects in question need to either provide changed events for properties or implement INotifyPropertyChanged. So, I hear everyone reading this beginning to say "Well, if the object is some deep part of a framework and not exposed to the GUI, why bother?" The answer here of course is that data-binding is no longer a GUI only issue. .NET 3.0 and 3.5 already has data binding that can take place between any two properties so that otherwise invisible objects can be bound. This is not only interesting for WPF maniacs but for anyone who has an object that receives input from another.

Finally, meta data and reflection coupled with new type description systems are so powerful that it adds vast new aspects to object orientation that are so outside the realms of the classic Encapsulation, Inheritance, Polymorphism triad that classes have ceased to become immutable definitions and have entered the realms of chimeric virtual objects that appear to be one thing when they are, in reality, something totally different.

If you're an architect and expecting to create a framework for your flagship product by all means pick .NET. Just don't go blundering about like a medieval peasant when you could be using magic instead.

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?

With the recent release of .NET 3, Vista, WPF and the WCF systems one might think that the choice was large. However, from everything I've seen recently the most impressive and important technology of today isn't what one might imagine.

I think that there is only one truly outstanding thing in all of todays new technologies and in fact it's probably one of the most fundamental concepts because, after all, what we do as programmers is normally to enable our users to visualise otherwise cryptic data.

The technology of which I speak is, of course, data-binding.

As an architect of systems that manipulate otherwise boring and complex data, I've found that the method of databinding used can make the difference between a mediochre application and a truly fantastic one.

Data binding techniques are in the process of evolving. Look at the ideas in .NET 3.0 and you'll see that not only can the properties of data objects be bound properties of user-interface objects but just about any property may be bound to any other.

The binding mechanism is also becoming more of a presentation mechanism with the ability to add inline bi-directional conversions to the data so that raw data in a property may be treated in some way before it gets to the user interface.

These ideas may seem to be spurious at first glance. Who needs to bother how data binding works on a deep level? The answer may surprise more than you imagined. Why? Consider this.

For many years, since the early days of MFC and since the work of The Gang Of Four, design patterns have been talked about in the industry and many attempts have been made to implement them correctly. The Document-View model in MFC, the implementation of patterns such as MVC (Model, View, Controller) and more recently MVP (Model, View, Presenter) as used in the CAB (Composite Application Block) have all been the subject of various implentations attempts that were more or less successful.

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.

Monday, July 31, 2006

Sandcastle

I am a documentation freak. I do /// style docs by habit whenever I code and until recently I've used NDoc to generate the final output.


Microsoft have been amzingly quiet about documentation. The old doc generator from visual studio sucked and NDoc seemed to have been its far-superior successor so I was waiting eagerly for a version of NDoc that would do generics and all that good stuff. Sadly, I recently read a post that said that the developer of NDoc was giving up because it was obvious that although it was far superior, NDoc couldn't compete against Microsoft's new Sancastle doc generator.


There are two things here that are a real shame. First, NDoc rocks yet the guy never recieved anything like the amount of support he should have. I mean, a 5 buck donation on paypal from everyone who used NDoc would have allowed him to work on the project full time and finish up NDoc 2.0. Did this happen Not on your nellie.

Secondly, not wishing to belittle the Sandcastle effort in anyway but given that Microsoft has a huge fund of cash available, why didn't they just buy NDoc and integrate it into Visual Studio? I guess that would have been too simple.


Anyway, the Sandcastle CTP is out...

Monday, July 24, 2006

How much does a meeting cost?

I've been working for the last few months for a huge company who shall be nameless.



Managers in this company like to call team meetings so that the team can bring the manager up-to-speed on what's going on and how progress is. The typical team meeting will go on for an hour and a half and there will be between nine and twelve people sat around the conference table basically reiterating stuff that could have been said in e-mail in under five minutes.



The main problem is that the managers themselves are non-technical and have more responsibility for administrative tasks than for getting the product out the door. This company prices all its work in man-days and a manager who called todays meeting was recently heard to say that the team had spent 150 man-days this year on project X and "nothing had been done"



Well, apart from the fact that the whole team has moved from C++ to C#, had courses in Windows Forms, changed the development practices from "useless hierarchical" to XP / Scrum and defined a .net application architecture, each person on the team spends more than four hours a week in meetings.



Half a day per person per week means 8 lost man-days per week. On a six month project, this means 200 man-days lost out of a budget of 2000. This also means paying a developer to sit and do nothing but scribble on a jotter for two-thirds of a year.

Friday, July 15, 2005

Speed freaks...

I've been working for a client who had a Win32 based application that did some graphics creation tasks for a consumer product. They wanted to update the look and feel of the program and hired someone to create a new application for them. This engineer did a pretty good job but, through lack of personal funds and the availability of a freebie, wrote the application using the C# express beta for C#2.0.

The customer took delivery of the partial code and then discovered that to release it to their customers they'd have to back-port it to .NET version 1.1 and finish up the program. Because of the highly graphical nature of the application and because the original implementation was rather slow they asked me to pep it up a bit.

After solving many of the drawing issues and getting the application up and running we got to the stage where people were installing it to test and everyone who saw it was horrified at the startup time. Some machines saw a 35 second wait between the initial first click and the appearance of the application window. They had never seen a fat .NET app before.

There were two problems with the whole scenario. First, the cycle was to install a new copy of the app, to click the application icon and sit there with a stopwatch waiting for something to appear. This meant that every time they saw it it was going through the process of creating the native image copy for the application cache. Secondly, even though the application had a splash screen this was a part of the application that needed JIT compiling too so often it didn't appear for some time. This encouraged the user to click a second time.

To solve these problems I've tried two things. To make the splash screen appear instantly I wrote a small program launcher that just displayed the desired image and then used Process.Start to launch the real program. This gives the user the feeling that something is happening and discourages them from clicking the icon again and again. Secondly I wrote a custom installer clas that used ngen, the .NET framework native image generator, to create the native-code compiled version of the program at install time. This meant that the first run of the code already had the native image in the cache and reduced load times to the barest minimum. On a test machine I got the load time from 30 seconds down to 6 seconds total using this method.

Sunday, June 19, 2005

Duality of purpose.

I find myself embarrased at times when answering questions in the various forums I hang out in. On occasion, I find myself with no other answer than "Buy the tool I created to do that".

This sometimes seems to be mercenary and is not well recieved by the users of the forum. Last year I practically gave up offering advice in a VB forum because the people who frequented it thought that the only reason I was there was to tout my wares.

To be honest, I always hesitate to answer "if you're interested in a commercial solution..." and think more than twice about posting a link to my business site but recently I've begun to wonder why people are so anti a good solution.

Looking at the situation logically, the kinds of questions I answer with a commercial offering are the ones that would start out with "Well, you need to build yourself a small nuclear power station. First mine some uranium and then..." followed by a couple of pages of complex overview. These are not trivial questions then and hence have no trivial answer.

What I really don't understand is when someone pops up on line and demands a FREE-SOURCE-CODE-INCLUDED tool that does just exactly what they want and moans like the clappers if someone suggests they should pay a few bucks registration fee or even buy a developer license

Work is money and money is work. If someone is faced with a weeks work figuring out how to do a specific task and can get the answer for a thirty buck registration fee then how can they be so indignant when someone says "Ok, I'll save you a weeks worth of finding out how to do this yourself in exchange for the cost of one hour of your precious time.

If it were me, and it frequently has been, I'd jump at the chance and register there and then. Then again, like my dad says "Theres nought so strange as folk"

Wednesday, April 20, 2005

GPS Software

I recently purchased a GPS system for my car. The hardware is a Windows CE device running dedicated software from the German Navigon company. This little box of tricks will plan routes for you and speaks instructions such as "At the next junction, turn right" or "Leave the roundabout at the third exit".

In itself, the machine is an excellent companion to anyone who needs door-to-door driving instructions with intelligent route planning and re-planning if you, despite all the instructions, take a wrong turn or end up on a detour that closes the roads the machine thinks you should be taking.

What makes this, in my opinion, the greatest thing since sliced bread is Navigon's customer support service. I had a problem with my machine that was my own fault and contacted Navigon to see if I could fix the problem. I fully expected to have to pay for the fix but Navigon exchanged a few e-mails and have fixed me up like new.

So many companies these days make you jump through hoops and do as much as possible to place the blame for the fault on the purchaser to save money on support. Navigon's excellent customer support policies were a real breath of fresh-air.

Thursday, April 14, 2005

More printer ink thoughts


After printing a 1000 page PDF file I decided that the printer ink situation should be resolved once and for all.



I wrote this article to show how to refil Epson TO452, TO453, TO454 and TO441 cartridges.


Friday, March 25, 2005

Serif fonts.

I have developed an aversion to serif fonts such as Times New Roman. For preference I use Verdana which has subtle differences from Arial or MS Sans-Serif and which I think is a far more readable typeface.
Arial is a slightly cramped typeface that has connotations of a serif font particularly because of the lower case "a" which I find to stand out almost as though it was purposefully created in a different style from the rest of the font.
Verdana has an open style which is far better proportioned and the "a" fits right in with the rest of the font as if it belongs.
Times is a very cramped typeface, this paragraph is the same point size as the Verdana above but you must agree is not nearly as easy on the eye. It reminds me of cheap paperback books and seems to lower the quality of the text. I know it's almost a 'traditional' font but I do wish that it wasn't the default for everything.
Georgia is Verdana's serif cousin and is more open and readable so as a compromise I tend to use it when serif fonts are required.
For me, Verdana is the queen of fonts.

Unsafe isn't

I've noticed that many programmers seem to have an irrational fear of the "unsafe" keyword in C#. It's almost as though they are afraid that if they use it in their code then program will turn into a Frankenstiens Monster and leap opon them in their sleep.
Unsafe refers only to the fact that the code might reference unmanaged and hence non type-safe code. Not that one is taking a calculated risk by using it.
Personally, I only use unsafe where the highest performance is required and I don't want anything to intervene between my code and the bytes it's working on. In most of my puplicly available examples these days I use the Marshal class because it enables me to create code in C# which is readily translated to VB. This is of course just my lazy nature and not a fear of the evil that may befall me if I use that dreaded keyword.

Monday, March 14, 2005

Turn the world on it's head!

Today I have had a bit of a shock. In response to a newsgroup posting I decided to update my article on generating 1 bit per pixel images from 24bpp colour. The original article used a mixture of Bitmap.GetPixel and LockBits to determine the pixel brightness and write the single bit pixel to the image array and I had decided to convert this to a LockBits solution on both sides of the equation for the sake of completeness.
I re-wrote the C# code so that instead of using unsafe pointers it used the Marshal class to read and write the bytes. This made the code identical in function to the VB conversion. After testing the C# code I did a quick conversion to VB and wran the two applications on the same image.
I noticed that the VB application seemed to be faster so I added a diagnostic routing to time how long the central part of the loop, the one that actually does the conversion, took. To make sure the code had a good chunk of data to work with I used an image that was 4000*3200 pixels.
To my great surprise the VB code is consistently faster by over three seconds with the C# doing the loop in around eight seconds and the VB running the functionally identical code in only five.
I have seen instances before where the VB compiler was demonstrably better at generating code than the C# one but have never seen it so clearly shown to be superior at simple tasks than the C# compiler.
The timed code is shown in both C# and VB here:
C#
DateTime dt=DateTime.Now;

//scan through the pixels Y by X
int x,y;
for(y=0;y {
for(x=0;x {
//generate the address of the colour pixel
int index=y*bmdo.Stride+(x*4);
//check its brightness
if(Color.FromArgb(Marshal.ReadByte(bmdo.Scan0,index+2),
Marshal.ReadByte(bmdo.Scan0,index+1),
Marshal.ReadByte(bmdo.Scan0,index)).GetBrightness()>0.5f)
this.SetIndexedPixel(x,y,bmdn,true); //set it if its bright.
}
}

//tidy up
bm.UnlockBits(bmdn);
img.UnlockBits(bmdo);

//show the time taken to do the conversion
TimeSpan ts=dt-DateTime.Now;
VB
'for diagnostics
Dim dt As DateTime = DateTime.Now

'scan through the pixels Y by X
Dim y As Integer
For y = 0 To img.Height - 1
Dim x As Integer
For x = 0 To img.Width - 1
'generate the address of the colour pixel
Dim index As Integer = y * bmdo.Stride + x * 4
'check its brightness
If Color.FromArgb(Marshal.ReadByte(bmdo.Scan0, index + 2), Marshal.ReadByte(bmdo.Scan0, index + 1), Marshal.ReadByte(bmdo.Scan0, index)).GetBrightness() > 0.5F Then
Me.SetIndexedPixel(x, y, bmdn, True) 'set it if its bright.
End If
Next x
Next y
'tidy up
bm.UnlockBits(bmdn)
img.UnlockBits(bmdo)

'show the time taken to do the conversion
Dim ts As TimeSpan = dt.Subtract(DateTime.Now)
I'll have to compare the IL for the two compiled sections to see where the C# compiler fails to get that extra few ergs.

Friday, March 11, 2005

Does there have to be a reason?

I am a proponent of wordy explanations but there are some times when a simple and definitive answer should be taken at face value and not questioned.

Children often ask "Daddy, what would happen if I were to poke my tongue in the electrical outlet?" wherupon daddy will reply "You'll die a horrible and painful death son". This should be enough of an answer and should be heeded by all small boys.

When a programmer asks "Can I store the Graphics object?" the answer is "No!". This is one of those definitive answers that is usually questioned but which always ends up being "No!" however many times or in however many different ways it's asked.

Just to recap....

Do not store the Graphics object. Do not store it in a local variable, a static variable, a shared variable, an object, a structure or a database. Do not put it in an envelope and post it to your aunt, do not draw a picture of it, do not photocopy it, do not have Monet make a painting of it.
Do not put it in your pocket for later, do not hash encode it and e-mail it to the CIA, do not put it on a Post-it note and stick it to your screen, do not grind it into powder and sniff it up your nose with the other stuff you just had. In short....

DO NOT STORE THE GRAPHICS OBJECT!

Saturday, February 12, 2005

Falling in love again.

I have always been a "client side" kinda guy. Most of the work I do is fairly heavy graphics code and I'm reasonably good at problem solving when I can sit down in front of a good algorithm and bash out some code.
I am forced through circumstance to do work in HTML and I generally use FrontPage for my web site work but I can honestly say that HTML and presentation stuff of that nature is BORING BORING BORING so I tend not to put as much effort into it as I normally do my other work. I find that this reluctance is also affected by the fact that it's so dammned complicated to get a web site to do anything at-all interesting and the mix of script and the hokey way it fits into HTML coupled with the truly abysmal debugging options one has for working with it means that I do the minimum possible to make my sites work.
Up until recently, I had hosted my sites on cheap servers that didn't offer ASP.NET services so I was stuck with whatever active stuff I could be bothered to learn in the JavaScript fashion. About a year ago however I moved BobPowell.NET to a server at Brinkster because they had much more bandwidth than the godaddy servers I had been on before.
Now, I'm a great believer in "If it ain't broke, don't fix it!" so I have used the brinkster service as a high bandwidth home for my old site and not made that many changes to it. Within the last few weeks however I have got back into using ASP.NET beause I'm writing a complete licensing, support and customer management package for XRay tools. Of course, I knew how this all worked from a theoreical standpoint and had done lots of sample stuff on ASP.NET but never sat down to write an end-to-end application in it.
Well folks, I'm in love. What an excellent way to create an application. It has all the visual afdvantages of HTML with all the algorithmic advantages of client-side work. I can write my web-site in the same way that I'd write a Windows Forms application and it works so well!
I'll definitely be putting LOTS more active stuff on my sites from now on. GO ASP+!!!

Friday, February 11, 2005

Bitmap manipulations.

I keep having online conversations with people who bemoan the fact that their computers have a spot of bother dealing with images with pixel counts of 10,000 * 8,000 or 13,000 * 18,000. They complain that the image scrolls slowly and they can't drag an image about but they obviously haven't the faintest idea of the implications of such an image.

One bright spark complained of the poor performance of an image having 13000 by 18000 pixels so I sat and did a little calculation which, I think, brings home just how much information is stored in such an image.

13000 * 18000 is 234000000. Multiply this by 4 for the bit depth of images stored in memory on the computer and you get 936000000 (936 million). Ok, A page of type in a programmere reference book runs out at about 88 characters by 36 lines. Thats 3168 characters per side and 6336 for a single sheet of paper.

On my bookshelves I have several books over 1000 pages in length and a thousand page book works out to be somewhere in the region of two inches thick. Our 6336 characters goes into 936000000 about 147727 times. This means a book with 148 thousand pages, 2 inches per thousand remember, is 24.6 feet thick.

Now I don't have many bookshelves in my house that are 25 feet long but if I had one I'd know that that was one fat book!

Even given the power of todays computers that's one huge chunk of info to mess around with. Why don't people understand that before they start whining about the scrolling performance of their image viewer application?

Friday, January 14, 2005

Still alive and kickin'

You may ask yourself "What the heck is that Bob Powell up to these days?" It's true that I've not paid attention to the Blog much because my work has just gone crazy and I've had months of pretty intense stuff going on and no time to report on other things.

I'm writing a book. This is not too surprising I suppose but what will really blow your socks off is that it's a book for Visual Basic programmers.

As a self-promoting guru I get vast amounts of mail from people who ask for help on every subject, not just Graphics, and I have seen a dire need for a book that explains how to create a correctly object-oriented architecture for VB users. So many people come from the VB6 world and discover that although VB.NET is syntactically similar the principles of software architecture in an object-oriented system such as .NET is a mystery. Consequently they make the most fundamental mistakes and create truly horrible applications that are beset with faults.

The book is entitled "Object Oriented Programming for .NET" and is presented in both VB and C# but with the emphasis on the VB angle.

The "day job" is keeping me well employed doing exiting things with public-address advertizing systems. I must say that there is rarely a boring day.

Keeping an amount of churn in the GDI+ FAQ and Windows Forms Tips and Tricks also puts a load on.

Finally WellFormed is on my list of important items and I'm working on a new system that will deliver content to subscribers via the web. I originally hosted the service with a provider who shall remain nameless but which SUCKED! and cost me too much money and time. Now WellFormed.NET is on Brinkster but the application that serves the content is even more work for my thinly spread working day. I have a prelim version working but it has bugs that I just don't have time to chase at this second.

I suppose being over-employed is better than being under-employed :-)

Saturday, December 18, 2004

I've been thinking of a plan

I recently started a beginners guide to GDI+ which seems to have put my site hits up by about 10%.

Are simple guides more popular?

Just thinking out loud here, which is what a blog is I suppose.

VAT collection by non EU sites

A question that has nagged at my brain in the last few months is "How do non EU companies collect VAT"
You see, VAT or Value Added Tax is europes form of sales tax. It is levied at a swingeing rate of up to 20% on some items so it can be a significant portion of the cost.

European union companies that collect VAT are obliged by law to put their VAT registration numbers on all invoices that charge VAT. Recently however I've noticed that many on-line shopping systems charge VAT to EU customers but don't put their VAT numbers onto the sites or on the invoices making me wonder if this is just a handy way for a US company to extort 20% of sales from europeans.

I have been charged VAT by Symantec and I don't know their VAT number for my company accounts.

Moreover, the rate of VAT isn't in line with the VAT rates in the countries to which they sell. This leads me to believe its bogus too because if there's one thing a tax man is keen on it's getting the percentages right. You see, the VAT rate for Symantec products is 20% no matter what EU country the purchase is made in. Does this VAT collected go into the general pool of VAT for Europe. I suspect not.

If I pay VAT I want to know it's going to the place it's supposed to go or I want a refund if the application of sales tax is just there to enrich the company because they think no-one has noticed.

Tuesday, October 05, 2004

Programming styles I use and why....

When the code you write is for the benefit of others, a clear and readable coding style is as important as a good prose style. This is my personal style guide which I use in all my programming.

#1 Naming conventions.

Concise naming is important if code is consumed by someone else. Cryptic names for variables, methods and properties are for obfuscators, not programmers.

Private Fields begin with an underbar and a lower case letter such as _data. Long names are CamelCased such as _myLongData.

Accessor properties remove the underbar and capitalize the first letter such as Data or MyLongData.

Variables in a method begin with a lower-case letter and are camel-cased if long such as "variable" or "myLongVariable". Parameters passed to a method follow similar convention.

Class names begin with capital letters and are camel-cased where necessary.

Class, method, property and field names are indicative of function wherever possible.

#2 Code layout

Code should be well laid out and as concise as possible.

Whitespace doesn't impact code size but can make a lot of difference to readability. Blank lines can be as informative as lines full of code.

Namespace items, classes, methods, properties and field groups are separated by white space to give separation between elements so that the eye automatically distinguishes between one section and another.

Braces are on their own lines and indentation is used to indicate nesting or scope. The exception to this rule is in the case of simple accessor properties where the get and set accessors may be defined on a single line. Acessors that are more complex than assigning the value to the associated private field follow the method brace and indentation rules.

#3 Comments

Be liberal and verbose with comments and documentation. Basic Inline XML documentation is a great help when studying a class library but little or no use when trying to get into the head of the programmer, even if that programmer may have been you two years ago. Remember the remarks and examples as well as internal comments

See the code example here.

Thursday, August 19, 2004

Fun with DHTML

I just published a new article on the Tips and Tricks page but this one has a difference. You may have noticed a few of my pages have optional C# and VB code sections that can be chosen on-the-fly as you read. These are simple DHTML scripts that turn different sections of the page on or off according to choice. The problem was with the method, which I got from another web-site I hasten to add, was that if more than one section of code needs swapping out then the javascript becomes ever more complex with each new bit. What I needed was a way of turning on all the C# or all the VB in one go.

This is the first time I've messed about with DHTML in any serious way and so I'm rather pleased with the end result. What I did was give all the C# or VB statements a unique ID based on the pattern "CSA" "CSB" or "VBA" "VBB" and so-on. Then I created code that went through all the specially named elements one by one turning them on or off as needed. Finally I put a couple of sexy mouseover buttons on the page to finish the thing up and voila...


If you'd like to see the code in it's production form go read the article. If you'd like to see the bare-bones dynamic page you can see it here.

I'm sure I'll get a bunch of responses from clever DHTML jockeys telling me it's all wrong but I'm as pleased as a dog with two tails...

Well Formed

I have temporarily suspended all Well Formed subscriptions while work goes ahead on the new site. I am currently fielding tens of requests per day that go something like this.

Subscriber: "Bob, I haven't seen the latest issue of Well Formed. Whats up??"

Bob: "Hi, your e-mail system bounced the subscription, heres a duplicate"

Subscriber: "Bob, are you there??"

Bob: "Hi, yes, your e-mail bounced that one too because it had an attachment, why not try using yahoo mail or something"

Subscriber: "Bob, I have written to you twice with no reply. Why are you ignoring me??"

Bob: "Dude, I'm not ignoring you, your SPAM filter has decided I am bad news and you can't see my replies"

Subscriber: "Bob, you are an ignorant useless git and I'm cancelling my subscription forthwith. I've never seen such unprofessional crap in all my years as a blah blah blah"

You can see that when this happens about 10 times a day it make me happy, contented and glad to be of service _NOT_.

Wednesday, August 18, 2004

Big changes going on.

If you've visited my site recently you'll have noticed some major changes going on. BobPowell.net is going back to its roots inasmuch as it will no longer provide consulting or tools offerings but will be a place for publishing information such a the FAQ and Tips and Tricks. It's becoming increasingly difficult to separate my need to educate from my need for an income and I don't want my personal site to degenerate into a mish-mash of confusing stuff that people go to for help but that screams "money-money-money!!!" at every turn.

For the commercial side I have a couple of projects in work. WellFormed.net is a site that will shortly be running the Well Formed Magazine and XRayTools.net will be providing tools to developers in a clear-cut and commercial manner. Both of these sites will sponsor BobPowell.net. This will allow me to get on with the business of creating articles and code of the higest quality possible for the FAQ and Tips and Tricks along with whatever else comes along.

Google Adsense is my only concession to online commercialism on that site and I came to a bit of a revalation the other day when I was explaining to my son Robyn, who wants to be a webmaster bye-the-way, that effectively, AdSense makes the hosting cost of the site free! This means that a site such as bobpowell.net can be self sustaining and self justifying without even worrying about the commercial aspect of trying to make a hard-sell every time someone visits the site.

Things will be a little bit up-in-the-air for a while but when they settle down again I hope that the new look and feel coupled with the philosophy of free information will be well received.

Friday, July 09, 2004

The best upgrade so-far.

I recently purchased a 19in. LCD flat-screen to replace my cheap little 15in. job. The big screen is excellent for editing code because the resolution is that much higher and I was all-ready to give the smaller monitor to one of my children when I realized I had an old matrox PCI video card hanging around somewhere. I found it, plugged in and attached the 15in. LCD monitor to it.

What an incredible difference! I am convinced that the combination of both monitors is probably ten times more useful than just replacing one monitor with a larger one. Of course, having the 19in. screen is great for editing code but to be able to drag stuff from one monitor to another is a real boon. Now, when I read newsgroups and click on a link Internet explorer pops up on the second monitor and doesn't obscure the newsgroup. I can run a virtual machine in full-screen mode on the second monitor to test longhorn or whidbey. The readable area of both screens multiplies the usefulness of the display rather than simply adding to it.

Of course, the secondary display will not handle some graphics tasks because the matrox card is a bit long in the tooth but for text and simple graphics it's adequate. I cannot play a DVD movie on the secondary screen for example but I can play one on the main screen and still browse the Internet on the other.

As the title of this post suggests, this is probably the best upgrade I've ever given my computer and would highly recommend it to anyone that spends a long time switching between windows as I do.

Monday, June 28, 2004

Long time no blog...

My day job is keeping me incredibly busy. I just got Longhorn 4074 and it's SDK up and running on Virtual PC so maybe I'll report on some avalon stuff later.

Anyway, I'm not dead...

New GDI+ article

If you're not already subscribed to the GDI+ FAQ RSS feed, now would be a good time to do so.

A new article on creating text-halo effects has just been published.

Saturday, May 29, 2004

Should I continue...

to post notifications of GDI+ FAQ and Windows Forms tips and tricks here or is it sufficient to assume that people who are interested will subscribe to the feeds for those services?

(if you're interested I updated the double buffer article with VB code today)

Peace of mind.. at a price

I just bought the MailWasher spam remover. It works really well but has a slight disadvantage inasmuch as my mailing system that answers all my PayPal purchase notifications now doesn't run automatically.

Mailwasher examines your POP or IMAP mailbox and marks suspect mail for deletion but if the automatic send and receive runs from outlook or whatever client you use, the mail is still downloaded, spam and all. You have to explicitly process mail in MailWasher to get rid of the junk and then run the send-receive manually.

I must say though, I am impressed with it's catch-rate.


Friday, May 28, 2004

Ppl i h8. u?

I h8 ppl who wrt 2 me like ths.

any 1 who wrts 2 me in ths style will b ignored!

It's 2 much trub 2 decipher & it bugs me.

At least people should have the decency to write as though they care!
If it's too much bother to put all the characters in a word I'll start doing that with code I supply and let them figure it out for themselves!!

Strategies

My site bobpowell.net will be changing radically soon. The content will remain similar but I'm going to a more web-based system for Well Formed and other new content.

I just wrote an RSS feed in ASP+ that builds a feed on demand and reads the database of articles to keep content fresh.

Well Formed will be moving to an online format so subscribers can access it and code without having to store it locally and to prevent me from having to e-mail to all the users each month. I get a lot of subscriber mail bounces these days and there are so many people that I can't spend time chasing their cases any more.

All the xray tools will leave that site and be moved to a new commercial site. I have a bunch of other tools but havent finished productization yet so it's another thing i need to do. When the commercial site is up and running It'll inspire me.

I want bobpowell.net to become a repository for knowledge and divorce it from the rest of my business.

As a result of all this, the site might be in a state of flux for a while. I just noticed that a feature I'm preparing has escaped into the wild before it was ready.

Ah well, back to the old grindstone.

Blogs

Rob Scoble is in new-scientist, Scott Wingo is on BBC radio. What is it with bloggers?

Some may say that it's just a way of self publicizing but is there more to blogging than talking about blogging?

Scoble seems to spend a lot of time writing about the process of blogging. He's an RSS nut-case who would have the whole world subscribe to his full-content blog. I say that's ok but only if you can afford to provide the bandwidth necessary for the world to hit your RSS feed once an hour. For people in the real world, it's probably overkill. If everyone demanded full content RSS feeds the internet would grind to a halt. We can afford to do it if we subscribe to very few full-content feeds but it should never be the norm.

Scott Wingo was probably one of the first true bloggers when taken in the current context. His MFC FAQ was a regular release that he worked for long hours on getting right. He used this communications vehicle as a marketing tool that sold Stingray software components to the developer community. Scott's writing skills are excellent and he pens a coherent and readable paragraph (although you'd never think so looking at his recent work in the eBay strategies blog [Sorry Scott]) He was the absolute master of guerilla marketing and someone who I respect enormously. I'd like to see Scott doing more of the real stuff.

Perhaps the process of putting your ideas down for everyone to see clarifies it in your own mind. After all. What use is an idea if it cannot be communicated? Perhaps bloggers are the sort of people who write things in their diaries and then leave the book open in the hope that someone will read it. Maybe they just need to be seen.

Do you blog? Why?

Friday, May 21, 2004

New GDI+ FAQ article

The GDI+ FAQ now contains an article that explains how to create multi-frame TIFF files and includes code in C# and VB that demonstrates the process with a neat drag and drop file creator.

RSS feed changed

This might not reach all of the intended audience :-/

Roy Osherove's SiteFeeder server seems to be offline. The site feed that was on here is gone and updates aren't getting out.

All is not lost however because Blogger now provides syndication via it's own system.

Check out the XML feed from the button in the left-hand column.

Sorry for any inconveinience. The matter was out of my control.

Saturday, May 08, 2004

Support, or lack of it.

My euphoria at getting the site moved to the new servers was short lived because I soon discovered that it was impossible to edit the information that I had transferred there. Frontpage refused to connect either to allow me to open the site for editing or to publish changes I had made using my development system. Of course, the first thing that I did was to read the frequently asked questions lists and knowledge base articles on the providers site but soon have to resort to contacting their support department. As usual, I got the standard support letters with links to all of their helpful frequently asked questions even though I had mentioned in my mile to the support department that I had actually read all of their frequently asked questions and could I please have some real support now.

When dealing with these people I get the vision in my head of spotty faced youths who act as salesman in companies like Dixons (the British equivalent of Best Buy ) who know absolutely nothing about the product they are selling and who quote from a standard set of texts and are incapable of making an independent intelligent judgment on their own.

After having my "support" case passed backwards and forwards between five different personnel, each of them having sent me the same knowledge base articles, I discovered, through my own hard work and investigation, that the problem is indeed at their end and is because the site does not support the authentication scheme required by frontpage to connect through a proxy server.

Hopefully, I can persuade them to adjust this because it seems to me that using a proxy server is not an uncommon thing these days and not to support such a thing is ridiculous. I certainly hope that my continued relationship with Brinksters "support" team does not continue in this way otherwise this won't be the only move I make to a new server.

Spoke too soon.

The site is up but the email isn't.

BobPowell.net back up.

Wow, quick and efficient changeover to Brinkster. The site was only down for 12 hours or so. Business as usual resumes!

Friday, May 07, 2004

BobPowell.net is offline...

I just cancelled the old hosting account. Mail and web will be offline 'till the new stuff propogates.

I feel kinda sad. Don't know why.

Wednesday, May 05, 2004

Moving day is set for May 7

The up and coming move of the BobPowell.net servers is set for May 7-9. The domain itself has been moved from Yahoo and the server already set up on Brinkster. Bandwidth is going up to 300Gigs per month and I'll be able to run ASPX applications so the possibilities will be greatly increased.