My blacklisted companies

Here is my current short list of two companies involved with hardware and/or software sale that I won’t buy from again due to the various reasons.

First is HTC, yes, the one that produces all sort of phones. In fact it massively produces new versions monthly. Does this suggest that they are smart and productive? I’d rather say that they a) don’t know what to produce and thus they throw a lot of different versions on the market and b) they count on customers buying newer and newer versions of their hardware instead of keeping existing ones. The latter is strictly linked to the fact that HTC is very reluctant to fix existing bugs and you pretty much can’t count on upgrading to newer OS even though your device could easily run it. Did I mention that they sometime forget to include drivers, like graphics acceleration? Of course, they kindly suggest to buy a new device if you want hw accelerated graphics because they just won’t provide it for your model for some reason. I am specifically talking about HTC TyTN II aka Kaiser, not a cheap device by any means. A device that is in fact in 75% range of iPhone v1 hardware performances including graphics, if there was a proper driver. Yet due to the missing graphics hardware acceleration and very much outdated WM6.x this device is nowhere near iPhone. People might think that the situation would improve with HTC Android devices but it certainly doesn’t look so. True, HTC is creating attractive models from hardware perspective but the little things like bugs, hardware issues and mostly the company’s arrogant and greedy attitude put them to my blacklist of companies I' won’t buy again from. Warning, I am talking about my experience with HTC and I am not implying that other companies are better or worse.

So, what will be my next phone? I’ve decided to try Android. I like the fact that it is open source and modern. What about the device? Currently I am considering Motorola Milestone because it a) has good hardware (a bit faster CPU wouldn’t hurt though) and b) is a Google reference device meaning no custom Motorola UI put on top of it. Why is this good? Because upgrading to newer Android versions shouldn’t take long and certainly they won’t depend on anybody else but Google (hopefully, the future will tell). I certainly don’t want to depend on companies such as HTC anymore. Pity though Milestone isn’t yet being sold nearby (I am not that keen to pay 50€ (>10% of the device) for postage from Germany to Slovenia) in Europe.

The other one is Kettler, a German fitness equipment manufacturer. What it has to do with hardware or software? Oh, it does. Among other fitness machines they have a rowing machine featuring an onboard “computer” and USB port. The older version of this rower featured a PC application (for a healthy price) that linked to the machine through the USB port and could control and/or register various data – it got total control of the rowing machine. Imagine the possibilities. The slightly newer version of the same rowing machine isn’t compatible anymore with this PC software (which I found only after I’ve bought the machine) but they assured a newer version is on the way. This was years ago. I’ve asked them several times whether it is possible to get at least communication protocol specs so I could create the software I wanted myself. All answer were like: “our policy is not to disclose anything, we won’t give you anything” – you get the idea. But will you ever release an updated PC application? “We might be working on it”. Years after nothing to see. I can only deduce that they don’t care about their customers. They never disclosed this version incompatibility. Again, their hardware is fine, it’s their software and mostly attitude that put them on my blacklist. BTW, is anybody out there willing to reverse engineer the 256KB ROM (Freescale HCS12 CPU) to understand the protocol? I’d try but having no experience it would take me a long time (I imagine a skilled person might understand it quickly). The time I currently don’t have unfortunately.

If I were to buy a rowing machine again I’d buy a Concept2 rower which comes with all sort of free PC applications and even a free SDK – heck, the company even encourages you to write applications. In fact I might switch to it after I sell my Kettler on eBay.

Why am I writing all this? Well, sharing bad experience helps others from falling in the same hole. After all we mostly judge companies by bad experience don’t we? Furthermore exposing such bad practices might make them think twice. So take my writing as you wish but consider yourself warned :-). Also I am not saying that I won’t buy from those companies ever: I might but not before the company policy changes considerably.

That said I am interested in your blacklists as I am sure everybody keeps one. Perhaps we can create a blacklist page.

Want to try Parallel Extensions on .net 3.5?

Check out Reactive Extensions to .NET (Rx). Looks like it includes “a back ported (and unsupported) release of Parallel Extensions for the .NET Framework 3.5 in the form of System.Threading.dll”. So, if you don’t have Visual Studio 2010 beta handy you might check it out and let us know how it goes. While you are there make sure you check out Rx as well as it looks an interesting and useful library once you grasp its concepts.

See the related blog post.

Adjusting DevExpress’ XtraTabControl’s page padding

Look at the picture below, it is a DevExpress' XtraTabControl (WinForms) with a single page hosting a normal Button. Both XtraTabControl and Button are set as Dock = Dock.Fill. Somebody (read: my client) considers that there is just too much wasted space around them (annotated with arrows):

image

There are no properties to modify padding behavior but luckily DevExpress supports skinning and I solved it through the use of slightly modified skin based iMaginary in this case.

Preparation

Fire up SkinEditor (found in All Programs/Developer Express v2009 vol 2/Components/Tools) and create a new skin based on iMaginary out of the box skin. For more info on creating new skins see this help topic. Save the new project and build the skin assembly. Create a new Visual Studio project, reference the skin assembly and code similar to this (substitute SKINPROJECTNAME and SKINNAME with your names):

DevExpress.Skins.SkinManager.Default.RegisterAssembly(typeof(SKINPROJECTNAME).Assembly);!
XtraForm f = new XtraForm();
f.LookAndFeel.SkinName = "SKINNAME";
f.LookAndFeel.UseDefaultLookAndFeel = false;
XtraTabControl ctl1 = new XtraTabControl();
ctl1.Dock = DockStyle.Fill;
XtraTabPage page = new XtraTabPage { Text = "One" };
ctl1.TabPages.Add(page);
Button b = new Button { Text = "Dock.Fill" };
b.Dock = DockStyle.Fill;
page.Controls.Add(b);
f.Controls.Add(ctl1);

Now you have a test project that should output the window above.

Step 1 – The drawing of XtraTabControl the border

DevExpress controls use template images that are properly resized for most of the resizable drawing including XtraTabControl’s borders.

Find the TabPane node in the tree view on the right

image

and you’ll see the border template image:

image

Note that the shadows are drawn within this template, not programmatically. Red lines are borders that determine what part of the image is copied to provide dynamically size final image. First, close SkinEditor. Then find the template image on the disk ([SKIN PROJECT]/[SKIN NAME]/Tab/TabPane.png) and use on of the paint applications to get ride of the shades (by copy paste the parts without shades) and expand the usable area to get a result like below, reopen SkinEditor and load the skin project (I did move borders to 2,2,2,2 as well – you can drag them with mouse or by setting proper values on the left).

image

If you run the test application it will show painted borders as expected but the button will remain on the original position regardless of this change. For now only the drawing changed but not the behavior.

image

We are half way now. Obviously the page content margins have to be adjusted as well.

Step 2 – adjust page content margins

First instinct was to adjust Tab’s parameters of my skin in the SkinEditor, it has to be one of these I thought:

image

Left and RightContentIndent were the obvious choices.  But no, they have no effect in our case. So I resorted to what every developer does: I looked at the sources of the XtraTabControl. It turns out that the solution is rather simple yet not supported by SkinEditor for some reason. Instead I had to manually modify the skin’s XML definition you’ll find in [SKIN PROJECT]/[SKIN NAME]/skin.xml file.

Open the skin.xml and find the line that contains this content: SkinProduct="Tab" SkinName="[SKIN NAME]". It should look like:

<Skin4 SkinProduct="Tab" SkinName="SKIN NAME">

(don’t ask me why there is a node named Skin4 and others numbered from 1 on). So, within this node find the node named TabPane. Within TabPane node adjust the attributes of ContentMargins node to values you want. I.e. try this:

<ContentMargins Bottom="1" Top="1" Left="1" Right="1" />
The result is the 2nd picture below – compare both original and modified skin to see which one you prefer.

imageimage

This would be a lot more straightforward if ContentMargins were available through SkinEditor’s UI. I hope that SkinEditor will get more treatment in the future as it lacks other features as well.

Adding features to Visual Studio 2008 SP1

While trying to compiling nVidia CUDA kernels on my Windows 7 x64 I realized that somehow I didn’t install the Visual Studio 2008 C++ x64 compilers and tools.

image

So I tried updating Visual Studio by going to Control Panel/Programs And Features bla bla only to get this error dialog showing up:

A selected drive is no longer valid.  Please review your installation path settings before continuing with setup.

Huh? I did have the ISO image mounted. Once more Google found Mike Eshva’s solution to the problem: uninstall SP1, add feature and reapply SP1. I am sure I’ve read this solution before but I never needed it. Later on I’ve found a bug report on Microsoft Connect with exact same motivation, the problem and the workaround as well.

The funny thing is that it didn’t work exactly like that for me. I’ve uninstalled SP1 and then I couldn’t get into uninstall/change dialog anymore. Ooops. But I wasn’t too worried because right before the process I’ve made a backup to my trusty Windows Home Server. Just in case. I didn’t need it though. Anyway I’ve reapplied SP1 and then it started working as it should – I was able to add the x64 feature just as it should be. Except for one additional obstacle during add process:

Setup is looking for file SQLSysClrTypes.msi.

Argh. This one I’ve solved with help from this blog post.

I guess one or more of the updates/hotfixes after SP1 was causing the original problem (and was uninstalled with SP1), which one I’ll never know.

Bottom line

I hope that Visual Studio 2010 will handle better the updates. The way Visual Studio 2008 handles the updates looks like one big mess and it is scary to change anything within updates, service packs and hotfixes.

Final Builder as a helper

Today I’ve tried to ILMerge a WinForms application that uses a bunch of DevExpress controls to produce a single executable in response to this thread. Just for testing purposes.

The thing is that ILMerge is a console application that requires a healthy amount of command line parameters. Not wanting to type them like crazy, I’ve opted to use ILMerge action within Final Builder that provides an UI for entering parameters (which are mostly long paths to assemblies involved in merging):

image

Instead of writing all those paths in command line and figuring out the command line parameters syntax I just clicked few “folder buttons” and navigated through open file dialogs.

The bottom line is that I’ve spent half a minute with Final Builder instead of many minutes in command prompt. The only drawback is that I’ve spent additional minutes writing this post.

Looks like I’ve found another use for Final Builder as well.