21 December 2006

Multiple Core Madness

I was thinking about multiple cores, like you do. One thing that most people haven't realise is that they have been using multiple CPUs for years, one has been your CPU and the other is the GPU - your graphics card. The graphics card is a very specialised computational unit, but it was added in order to offload processing from your main processor to something else to allow the processor to not get bogged down with graphics processing.

Now with the advent of dual core machines and the upcoming (or released in small quantities) quad core machines, a lot of users will probably not know they are using only a fraction of their processing power most of the time. Maybe it is time for the GPU to become one of those cores on the CPU?

At the moment the most likely use for multiple CPUs on Windows is one core to run your antivirus and your antispyware software and the rest you can use normally... At least that is what an article I read said multiple cores would be used for when they come out.

As the programmable GPUs start to become more common in the next generation of graphics cards they are becoming more and more like a general CPU, so it must be possible for the CPU with multiple cores to have a core or two behave more like a GPU? Certainly when the 8 core processors come out it would probably be quite nice to use multiple cores as the "graphics card".

I imagine though that there are people in labs much smarter than me already working on something like that or better. It's nearly 2007 after all and we are living in the future (well at least it sounds like the future to me) but we still have all of these different things cobbled together making up the current PCs. It would be sort of nice to see lots of processing converge onto the single multiple core chip as now they are more than capable of doing the tasks whereas ten years ago we still had a processor that was only capable of multitasking in a single core.

20 December 2006

CAD File Formats

One of the biggest headaches in CAD/CAM is file formats. In fact it is a complete nightmare.

Every product out there tends to have its own proprietary format and they normally contain deliberate gotchas and obfuscation to try and prevent reverse engineering the formats. Also if they provide a DLL to read the format they will deliberate hobble it as well as making sure you have signed some sort of EULA agreement. That is if you can get to an agreement as if they know you have signed up with another competitor to read their format they might not be so forthcoming with their own.

All in all it is the dinosaur's way of doing things, especially in the day and age of open formats for things like Office Suites.

There are open formats, and most CAD packages allow you to export your data in one of these defined formats. But they rarely follow the formats correctly and throw away lots of information that would otherwise be useful, so you really want to use the original data. The most annoying part is having to extrapolate the intentional and unintentional errors that deviate from the specification.

Normally you will have to either reverse engineer the format yourself, manage to get a deal with the vendor of the product you want to be compatible with, or find someone who supplies the reverse engineering service as a library you can integrate.

It would be so nice if there was a format that could be used for interoperability, but I think most companies like tying people down to their programs and it would require a sea change like what happened with OpenOffice and the Open Document Format (ODF).

19 December 2006

Development - Testing

Testing is probably the first thing to go in commercial development as a preventative measure since it adds to development time and also adds to the cost of development. Lots of companies do testing at a later stage like QA or beta testing, but it would be nice to iron out more kinks before we get to that stage, after all it is much more different to retrofit the fixes rather than designing the functionality correctly.

One of the preventative ways of testing is unit testing. This is a great way to stop regressions of behaviour as well as ensuring correct code. Hopefully this would allow the developers to create well tested bulletproof base libraries that support the entire system with well documented behaviour.

There is a great article you should check out reviewing unit testing frameworks : go read it here.

Windows Presentation Foundation - 2D and 3D

The WPF team has just blogged about a new feature in WPF which is 2D controls on a 3D surface. Unfortunately the mapping happens within a standard window frame. When someone works out how to do without the encapsulating window it could look really very good.

Although I am worried what kind of insane and unusable user interfaces this will spawn...

You can read the post here.

18 December 2006

GUI Toolkits - JUCE

Just a quick one... A little while back I briefly posted about JUCE - a different type of GUI toolkit. The Register has just posted a small review of Juce - definitely worth having a quick read.

17 December 2006

C++ Development - MFC in the future

I never knew, but the Visual C++ Team has a blog.

One post piqued my interest - updates to MFC... In the new version of MFC they are planning to allow the use of Vista style file open dialogs. You can read the post here.

This is good that extra functionality is being added to MFC since so many projects are no doubt saddled with legacy code. It'll make it fairly easy to get an integrated look without too much hassle. This is apparently available through the Visual Studio Orcas builds.

IDE - Eclipse CDT

Eclipse is a popular development platform, kind of more than an IDE. It is based solely around plug-ins and provides a good development environment. At the moment most of its strength is the Java development and its use for embedded systems (see my previous article about SunSPOTs - that used the Eclipse IDE for remote debugging.

One of the projects within it I keep an eye on is the CDT project which is a plug-in for C/C++ aiming to be as strong as the Java development. At the moment it is used a lot for the embedded space, but they want to extend it even further and challenge the
Visual Studio IDEs.

The guy heading up the CDT project Doug Schaefer has been blogging about the progress of the project for a while. In the CDT 4.0 roadmap the plan is to use the Windows SDK and have integrated debugging and the suchlike. His most recent post "Migrating From Visual C++ to CDT" shows the progress the project is making. It is always great to have alternatives and Eclipse certainly could help along that route. Part of the plan is also to add C# support as well from the Windows SDK. At the moment I would not recommend using CDT in lieu of VS2005 for Windows application development but if your toolchain is make based you may find this a better alternative.

15 December 2006

Cambridge SPA Meeting - Seeing SunSPOTs

On the 13th December I attended the Cambridge SPA meeting. Cambridge SPA is an offshoot (or part of) of the BCS and they hold monthly meetings for varied presentations about lots of aspects of computing. I decided to throw caution to the wind and see what it was like (after all it was free) and it was hosted at Microsoft Research Cambridge who generously provided the rooms and laid on a buffet.

This presentation was about SunSPOTs which are small programmable Java devices. It is defined as Java On The Metal since there is no operating system and Java does all of the control. When you tell Java to sleep() the device also sleeps and it is extremely power efficient. It uses the Squawk Java VM which provides a version of Java ME functionality. The device also has sensors built in like tilt and light sensors. It communicates wirelessly or by USB.

I got the impression that it still hasn't found its true purpose yet, but is proving that Java is a good solution for the embedded environment space. It also provides much better debugging facilities than traditional embedded environments. Still, all very interesting.

It was most interesting that my old haunt Essex University is using these devices. And it was one of my favourite masters courses that was using it The Intelligent Buildings Group. It was bizarre to hear this since when I read about the presentation initially I thought this would have been ideal for Intelligent Buildings studies at Essex Uni. When I did my dissertation there I was looking at the TINI Java embedded board for that although it didn't amount to a great deal in the end.

Still, I had a good time, met some people, got informed about an interesting subject, so all in all it was a good use of an evening.

If anyone lives near Cambridge and is interested in computing in general, I can recommend you check it out.

14 December 2006

GUI Toolkits - wxWidgets 2.8 Released

The latest stable release of wxWidgets has been released. You can view the announcement here.

Version 2.8 is the latest stable branch of wxWidgets taking over from 2.6. The new features it offers includes:
  • wxAUI - an advanced user interface library for docking and toolbars and much more.
  • wxRichTextCtrl - a powerful rich edit control.
  • wxComboCtrl and wxOwnerDrawnComboBox - more combo box goodness.
  • wxTreebook - A property sheet dialog with a tree view to navigate.
  • Various picker controls such as wxColourPickerCtrl, wxHyperlinkCtrl.
  • Partial right-to-left language support.
  • Support for Core Graphics on Mac OS X.
  • TAR archive support.
  • Plus more.
More details are available from this thread on the wxWidgets Forum - click here to view the thread.

Platforms supported:
  • Windows 95/98/ME, NT, 2000, XP, Vista
  • Windows 64 on Itanium and x86-64 architectures
  • Windows CE, including Pocket PC 2003, Smartphone 2003, Mobile 5
  • Unix (Linux, *BSD, Solaris, AIX, HP-UX, IRIX, Tru64) and VMS with GTK+
  • Unix with Motif/Lesstif
  • Unix with X11 (beta)
  • Mac OS X using Carbon
  • Mac OS X using Cocoa (alpha)
  • MGL for Linux and DOS
  • OS/2 (beta)
  • Direct Frame Buffer (alpha)

13 December 2006

When You Are Under Pressure

Sometimes at work it just happens you are so under pressure non-stop that any hope for decent practices are out of the window and there is a constant flurry of mounting problems at your doorstep.

Joel On Software has a little test to see just how good your work environment is for good coding. You can see it here. Go ahead work out where your company lies on the scale, 10 or lower are defined as serious problems.

Sometimes these types of problems you can turn around with a bit of hard work. It is not always possible though - but you have to try. Joel also has another article about Getting Things Done When You Are A Grunt. This suggests it is possible to improve standards even if you are not overly experienced or not very high up. You can also view the related discussion here.

It is easy for the process to overtake the coding though - and you must always keep that in check somehow when you open this Pandora's Box - or you can spend your entire time only on that. This isn't good for you and not good for your colleagues. I think if you work at a 0 rated place then it must be simple to get a few points added to the rating.

More Vista Native API Examples

On the CodeProject there are a couple more articles about using the Vista Native API, which is actually accessing the base API through C++, bypassing the need for .NET.

The first article is Using the New Vista File Dialogs. This is actually written with WTL in mind, but the ideas are the same whatever you are using, so long as you can access the API. So you can now add the new Vista file dialogs to your current programs.

The second article is Showing Friendly Messages with Task Dialogs. This exposes the new TaskDialog API which Microsoft want people to use for displaying information to users. It's all fairly simple, so it is extra Vista in your program for not too much effort.

12 December 2006

Microsoft releases free game development kit

Microsoft have released XNA Game Studio Express 1.0. This is a platform for developing managed DirectX applications targeted at PCs and X-Box 360s. The development environment is based on the Visual C# Express edition that Microsoft released earlier this year.

In order to develop for the X-Box 360 you have to join the Creators's Club at $100 per year. You are not allowed to use it for commercial development on the X-Box 360, but you can for targeting Windows. For commercial development on X-Box 360 there will be an XNA Professional version released some point next year.

Currently Windows Vista and Server 2003 are unsupported, but then again Visual Studio 2005 is unsupported on Vista so it is no surprise.

Certainly the quality of Microsoft's development tools is pretty good of late, and they are giving a lot of applications away. All of the Express Editions of the Visual Studio.NET are definitely worth checking out for development and provide a fast way to get up and running.

OpenOffice.org 2.1 Released

The latest version of OpenOffice.org has been released. This is now version 2.1 with a host of new features. You can see all the release notes here.

The main thrust of this version is to help push the extension technologies (which originally appeared in 2.0.4). They are trying to encourage the same level of extensions as with Firefox, whether this succeeds or not only time will tell.

I've used OpenOffice.org since the betas of version 2 and it has always been solid and consistent, and I never fell into the trap I did with Microsoft Office where page formatting could change randomly. The features of OpenOffice are more than adequate for all the uses that I have had for it (and it has meant that I don't have to buy an MS Office licence). I've used it for generating PDFs for printing magazines and it does the job fantastically.

11 December 2006

Development - Meshes And Curvature

I've been racking my brains recently about triangle meshes and curvature. The problem with triangle meshes is that they don't really want to have decent normals defined for them, especially if your triangles have inflections between them from the generation.

Someone who is much better than me at geometry pointed me at a really good article about normals and curvature from arbitrary meshes. The article is Estimating Curvatures and Their Derivatives on Triangle Meshes.

There are implementations of the ideas in the article in trimesh2. It's worthwhile taking a look at the source code (it's in C/C++) and is fairly self-explanatory if not optimal.

Calculating the normal on an arbitrary mesh is fairly simple if you don't want to be accurate in the slightest. Just take the average of the triangles that share the point. This works fairly well if your triangles do not have inflections and they are divided into separate surfaces (or faces depending on your terminology). The idea behind this paper is to look at regions of points and to get the average of these, but weight them for their distance from the point you are attempting to calculate.

If you store this data it is only a one time calculation hit, so it will not slow down your program. This type of calculation is perfect for 3D rendering, although I need to see the overall quality in order to determine if it can be used for applications requiring more accurate results like CAD/CAM.

Java - Java SE 6 and NetBeans

Sun have released Java SE 6 the latest version of Java for use in developing desktop and server applications. This isn't the GPLed version just yet as the development of version 6 just missed the boat.

NetBeans is also available as a free IDE for development. It is an excellent quality IDE which now has a C/C++ plug-in. The C/C++ plugin is a bit new so it is not perfect by any means, but has just as much potential as the Eclipse CDT project.

I am going to try out more Java programming to see how far the GUI was away from looking platform native. Hopefully, it is not too far away right now.

More GUI - OLPC Human Interface Guidelines

One Laptop Per Child (OLPC) is an initiative to try and get information technology to those children in the world that do not have it. Some people think it is a great idea, others don't but the merits of this project I don't think can be measured until it is in full swing. Hopefully it will be of benefit, after all anything is better than nothing.

The Human Interface Guidelines have been available for a couple of weeks. This covers "Sugar" the laptop user interface and how to develop applications for it. There is a great blog post from Mike Hearn that extracts the essence of the guidelines. It looks like there could be some interesting UI features on the little laptop.

GUI Stuff - Mac OS X Leopard

Apple Gazette have posted a rumour that the OS X theme Aqua with something new codename Illuminous. Macs have always had a great looking user interface with a real feeling of weight and it always feels complete and finished. The rumour states that it is in response to Aero - the Vista UI theme, but I somehow doubt that is the case. Vista's UI feels confusing, lightweight, unfinished, and lacking consistency.

Apple have put up some developer technology posts for Leopard. There are currently three parts:I've got to say it Apple always do a good job with their development documentation, even the promotional fluff.

Update : More on Illuminous here.

C++ Development - Bjarne Stroustrup

There is a two part Q&A with the man responsible for C++:
He has a more academic viewpoint which means he has a more idealised view, but he has some interesting points.

A bit of hardcore programming

Last week Slashdot drew attention to an article about the origin of the fast approximation of the inverse square root in Quake 3. For anyone who likes obscure bits of code it is really quite interesting and I think really understanding the code does make you a better programmer even if you never use it.

float InvSqrt (float x) {
float xhalf = 0.5f*x;
int i = *(int*)&x;
i = 0x5f3759df - (i>>1);
x = *(float*)&i;
x = x*(1.5f - xhalf*x*x);
return x;
}
It computes the result using integer maths instead of floating point operations because back in the day that was faster. This function does the operation to an approximation which is fine when it is used in graphics where the human eye finds it impossible to differentiate small changes in colour. It is one of those functions where the more you iterate the more accurate the result it.

It works by reinterpreting the float bit pattern as an integer then using bit shifting to get at the mantissa. The "magic seed value" is an approximation of the result (it is easier to get a good approximation when the result is in a mostly predictable range).

Anyway a useful tome about this kind of trickery is HACKMEM, you can read it online here.

It would also be a good idea to check out Hacker's Delight.

07 December 2006

GUI Toolkits - In Defence Of MFC...

...Or you are stuck with legacy code.

I've already said that MFC isn't as bad as most diatribes make it sound. The macros although seen as antiquated do actually make the code pretty easy to read.

Well, a lot of large and mature applications use MFC as the basis of their user interface, and normally due to the time and number of developers on the application the blurring between UI and the rest of the code might be a bit fuzzy. Some products would have had a clear design from the start to abstract the UI behind a company designed layer of abstraction, but the scary thing is most of these MFC based applications probably started using the built-in app wizard.

With Microsoft trying to force everyone into .NET framework applications they start to avoid putting functionality in MFC and only allowing it through .NET. Fortunately it is still built on the Win32 API and means writing in standard C++ all the new features will be available so long as you roll your sleeves up and dig.

Since Vista will probably be the dominant Windows platform for the forseeable future if you can make your MFC application look good on that platform and look well integrated then you are good to go for another five years at least. It would certainly be worthwhile if you would never be allowed to port your app to another language or another GUI toolkit, be it from time or cost constraints or external pressures. The benefits would be not developing your own solution and also not having the headache of maintenance, which would be critical if the size of your team does not allow for UI type fun. It's certainly the path of least resistance.

With this in mind I decided to investigate MFC extension libraries. There are four I found that are commercially supported. Most of these offerings are simply a case of changing what classes you inherit from. These libraries typically come with source code when you buy a licence.

CodeJock XTreme ToolkitPro
This is the best out of all the ones I have had a look at. Simply it works the smoothest, it looks the nicest and most integrated, and it provides a rich wealth of components. Recent versions have added the Office 2007 style ribbon-bar. The upcoming version 10.4 fixes some outstanding issues with DWM on Vista although they certainly aren't critical. The demo version was certainly a breeze to get up and running.

Prof-UIS
This looks second best. It certainly renders as nice as the CodeJock offering and possibly is not so skinned so it can look more integrated, but when resizing the rendering can take a while to catch up and leaves black areas (this is on Vista). Overall the rendering speed does not seem fast enough. Still, it is a stylish toolkit.

BCGControlBarPro
I think this offering is on par with Prof-UIS, it runs okay and looks good. This one didn't look quite right on Vista but runs fine on XP.

ULTIMATE toolbox
This isn't quite as up to date with the latest features like the previous three but it seems to be well respected and seems to be the most mature.

06 December 2006

GUI Toolkits - MFC to Qt Migration

I haven't got round to actively trying out Qt yet, although I have heard more or less universally good stuff about it (if you discount the meta-object compiler which is simply a matter of taste, oh yeah, and the price, but we all want something for nothing...). One day I will find the time to try it out.

Qt is the premier cross-platform GUI toolkit. It has its foibles, but I'll leave that for when I review it.

One of the areas on their website details the migration to Qt from MFC. They actually provide lots of information about how to go about this process.

The main link is here - The Qt/MFC Migration Framework. The Walkthrough is the most practical application of the knowledge. The Q&A also provides interesting tidbits.

Honestly, there is no way to tell how successful this is without speaking to someone who has ported a moderately large and mature app from MFC to Qt, but it is interesting to see someone does provide some kind of migration path (if that is the way you want to go).

OpenGL - The OpenGL Window Framework

During numerous hours of websurfing I stumbled across the OpenGL Window Framework. This is a thin layer on top of OpenGL to make extra nice for C++ developers. Unfortunately it does not seem to be actively developed.

What it provides is a nice C++ interface for OpenGL with respect for making window contexts. It gives you access to extensions via the Glee library. It gives you an enumeration framework for modes and features, and also there are design considerations for multi-threaded programming which is important in this day and age.

It's a very tightly focussed library designed for making using OpenGL and creating the windows for it much easier, and it seems to do that pretty well.

OpenGL - Extensions for all the latest features

When a new graphics card (generation) is released they normally have lots of new shiny features. These are added to the OpenGL drivers by the extension mechanism until they are either forgotten about or become part of the standard.

Luckily there are two projects out there to try and make it easier, the OpenGL Extension Wrangler (Glew) and also the GL Easy Extension Library (Glee). These both provide the ability to enumerate and then use the extensions provided. They are also cross-platform which is always a bonus.

It is not the easiest way to maintain code as it requires specialist code depending on the graphics card's capabilities, but if you want to be on the bleeding edge they will allow you to code there. You will also have to be aware that the function names could change if they become part of the main OpenGL library.

OpenGL Libraries - OpenSceneGraph

Since I spend a fair amount of time working with OpenGL I always take an interest in libraries that use it. In fact a lot of game development libraries should really have applications outside of that domain, it is just that "professionals" see themselves as above using crude game development libraries.

One of the larger projects I have found really interesting is OpenSceneGraph. It is based on the idea of scene graphs which provides an object-oriented storage of the scene to aid rendering.

This library is quite a high level of abstraction away from the underlying rendering (although it will allow you access to it). It provides cross platform support as well as 64 bit platforms. It probably is seen not to have the shiny whizz-bang features that are more associated with the game dedicated libraries. Nevertheless it scales really well and can produce some stunning results. Most of the applications are more VR related but I am sure over time it will have more diverse applications. I always winder how something like scene graphs would work in the land of CAD, although they are not really designed for that purpose.

Because it is OpenGL based it is really quite easy to create a view in your GUI toolkit using OpenSceneGraph, as normally they are constructed via the window handles.

04 December 2006

Computer Societies - Cambridge

I got to thinking this week, surely there are some computer groups or societies in my area (hopefully filled with people I could learn from). So off to Google I went and started to search. I found a couple that looked interesting, although not completely limited to the Cambridge area.The problem with loads of the conferences is that they are normally very expensive (fine if your work is interested in sending you). But the SPA Cambridge meetings are free, so I will definitely have to go as there is no excuse (and it looks like I missed some interesting ones in the past year).

03 December 2006

GUI Architectures

There is an interesting article here about the design architecture for GUIs. This applies more to the rich clients with database backends, but I think it is more than relevant for designing an application as it would be able to scale in the future much more easily.

The obvious subject it covers is MVC (Model-View-Controller). The article is kept fairly up to date as well with an update the middle of this year.

CAM Development

This week I have been a bit light on the blogging. The main reason for this is that I was away in Germany with work. A little show called EuroMold, it is the biggest CAD/CAM/CAE (and more engineering type stuff) show in Europe, so all the vendors are there demonstrating and giving away free stuff.

I saw the guys behind FreeSteel, who have put together their own set of algorithms (with the main one being Adaptive Clearing) which they own and licence to anyone who wants to use them for a very reasonable price. Julian has put his write-up of EuroMold on his blog.

What you tend to notice about the engineering software industry, is that noone seems to excel, and it is very insular. Companies don't talk to eachother, developers don't talk to eachother (even though there isn't a huge number of CAM developers in the world), there are no libraries out there that really help when it comes to developing CAM software when it comes down to the nitty gritty of machining.

What I noticed about the software on display at EuroMold, is it all looked mostly the same. The OpenGL rendering looked excellent on some packages but the rest of the user interface was poor in comparison. Also some tended to make the same mistakes in the user interface (as the default behaviour of code generators tends to leave some holes). Most demonstrations were done with the standard Windows theme so it all looked like the 1990s running on Windows 95... A bit of a pity since I have sent a couple of weeks tweaking DEPOCAM for Windows Vista, so it looks good on that platform.

With most of the applications, they are getting more and more functionality, and doing more and more in one place. This tends to make for cluttered applications.

Source Control Madness At Microsoft

Joel On Software has an interesting little post about source control and how Microsoft does it (specifically with the Vista codebase).

You can see how it can all get out of control, and how it is easy to find yourself stuck as part of a process that doesn't scale, and how this can adversely effect an entire project. It also shows a lack of modularity since other projects of a large size do not necessarily have similar problems.

02 December 2006

Subversion - Merge Tracking

One deficiency we encounter with Subversion is merge tracking. This means when we merge branches or revisions we have to keep track in a manual or scripted process which has its own overhead.

I am pleased to see that Subversion now has its own merge tracking project, which is in its infancy but when it drops it will make it an even better and more powerful system. The page has additional links for external merge tracking scripts like svnmerge.

Code Reviews

At work we do code reviews as part of our development process. This means every commit has to have an additional set of eyes go over it and confirm the edits are good and adhere to the coding standards.

This can be an intrusive process, but also can be priceless. The creator of Python Guido van Rossum has developed a code review system whilst working for Google. The system is called Mondrian and there is some more information here on a blog interview. Currently it uses Perforce but in order for it to be released as open-source it will also work for Subversion and different database backends.

28 November 2006

More Vista - Menus

One thing I have been continually sidetracked from sorting out recently is menus for Windows Vista.

Currently we use DrawItem() and MeasureItem() to custom draw the menu items so that they have icons next to the items. Unfortunately on Vista the custom drawing of the base implementation of DrawItem() simply does not look right under Vista. It utilises the solid dark blue bar when you hover the mouse and the spacings look odd, and this is the default implementation. Also, the background colour is a little darker and the disabled text does not look very good. Without the custom draw functions it integrates much better in Vista, but I need to finish implementing some code for the associated icons.

So, I was using Windows Explorer under Vista and realised the context menus have EXACTLY the same problem. This is just completely insane, they obviously implemented the functionality in exactly the same way, but the underlying Windows API could not have been updated for this.

27 November 2006

Windows Vista - The Start Menu

A few days ago I mentioned the href="http://garrys-brain.blogspot.com/2006/11/windows-vista-new-start-menu.html">Windows Start Menu mess. I simply wasn't impressed by it (you can also see the link to the Joel on Software blog post about it).

Apparently 24 developers got their hands dirty working on this, and it still turned out the way it has. I still look at the menu that pops up with the restart, etc. and wonder who let it out the door as it is a simple pop-up menu, not really revolutionary, and it doesn't even have associated icons.

All I can say about the turning off scenario is most people know what to do with a TV or DVD player, why is not that simple?

CAM Development

In my job I develop CAM (Computer Aided Machining) software. To be honest there are very few decent resources on the web for it and it is a very closed development arena.

There are some people out there trying to change this. There are two developers (who I used to work with) called Julian Todd and Martin Dunschen who believe in open-ness in development. They have a great little blog here. You can also try out the online version of their machining algorithm.

GUI Programming

It's not often a thread on GUI programming comes up on Slashdot but there is one here. There are probably some useful links in the comments if you dig enough.

I dunno, it strikes me there is a lack of discussion about GUIs in general compared to other programming subjects, possibly due to entrenched positions about what everyone personally sees as "best".

24 November 2006

More Vista and OpenGL

I finally got to the bottom of my outstanding OpenGL problem on Vista. It seems that the drivers were throwing floating point exceptions in random places, I tidied up the code as much as possible but it still happened. The only way to get around this problem was to not unmask the floating point exceptions in the thread performing the OpenGL rendering (although most applications seem not to unmask floating point exceptions as I have discovered).

I imagine when the drivers are as mature as the XP drivers these will be but a distant memory, as in the olden days the way the OpenGL drivers handled exceptions was pretty random.

One thing I want to reiterate is that OpenGL works seamlessly on Vista with the dwm Aero experience. People still think they have to migrate away from OpenGL to DirectX/Direct3D, I cannot emphasise enough this is not the case. I know some companies still haven't managed to filter through that information, but it is the case and the computer I am using is evidence of that.

So spread the word OpenGL is fully compatible and runs natively with Windows Vista!

23 November 2006

OpenGL - The Future Looks Rosey

In the recent past the perceived as slow-moving OpenGL ARB (Architecture Review Board) handed over the guidance of OpenGL to the Kronos Group. The Kronos Group were responsible for the very popular OpenGL ES standard for embedded devices.

Something that had completely bypassed me on the OpenGL website was a new Pipeline Newsletter for the latest goings on in OpenGL land. There are currently two volumes:In the first volume we are introduced to the OpenGL Ecosystem Working Group which was formed in March 2006. This group is going to do all the work as developers we will probably find most useful - examples, documentation, testing, etc. Most interesting though is the thought of the OpenGL SDK which I will come back to.

According to the second newsletter there will be two OpenGL specification releases in 2007, with a substantial restructuring of the object model. Also there is some information about the work for OpenGL on other platforms. Just the communication from these newsletters makes OpenGL seem much faster moving.

But back to the OpenGL SDK. As the Ecosystem Working Group put it, developers want a single SDK for OpenGL that is ratified by the ARB. This would also contain the documentation and examples and more. In the newsletter article "One SDK To Rule Them All" more detail is revealed. If all goes to plan then this should be a very impressive start. One part of particular interest is the suggestion there will be more to the SDK, with layers that abstract away platform specifics. THis can only be a good thing - no need to reinvent the wheel.

OpenGL and Vista

Well, that was easy. OpenGL works seamlessly on a composited desktop with DWM. I am using the nVidia QuadroFX drivers and it seems okay.

Kind of anyway. Performance is a little off, especially in debug, but this could be related to any number of things. Also I am getting lots some weird crashes setting OpenGL colours, but that requires more investigation.

Anyway, it was far from worst case scenario.

22 November 2006

Office 2007 UI

Microsoft have announced the licensing behind the Office 2007 "ribbon-style" UI. The weirdest thing is you are not licensing the source code, you are licensing the "ideas". It seems related to their current intellectual property surge (with their recent deal with Novell).

The details are available from Jensen Harris's blog. The press release is here. The details for the license are here.

What it amounts to is this:
  • You are allowed to copy the UI style.
  • No source code is supplied.
  • You are not allowed to use the style if the application is in direct competition to a Microsoft product already using it (ie, a word processor).
  • Essentially Microsoft have to sign off on your version.
Here is a quote:
For those that want to build their own UI that takes advantage of our design guidelines, they will need a license.
I'm not entirely sure how you would show that you did not follow their guidelines which are available in order to implement a similar interface. And since the guidelines are available on the Internet it is impossible for it not to be found in Google searches and the suchlike.

I'm sorry, but this is a backdoor way to legitimise the idea of software patents, where they are identified with some sort of fuzzy or not so fuzzy description of something that most probably has prior art. I believe in the sharing of knowledge (this is not the same as sharing sourcecode necessarily).

21 November 2006

Windows Vista - The new start menu

Joel on Software has a little post about "Choices = Headaches" about UI design.

It looks at the start menu and the number of choices to shut down a computer. I personally was even more concerned about the bad design presenting it to the user (and to a lesser degree there were far too many options), in fact XP did it better. I realise that there are lots of options, but initially I missed where Restart was.

Simply cutting down the number of options is not enough I feel, someone should have sat down and actually used the design that they have foisted on the user.

20 November 2006

Windows Vista and MDI Applications

If you have an MDI application and you are going to run it under Windows Vista you could be in trouble. I mean the MDI applications that have multiple windows and are not tabbed. The child windows you will notice are rendered with Windows Basic even in a fully composited theme.

Probably where I should start is the "Desktop Window Manager" or in your Task Manager dwm.exe. This is what does the Window effects, so it is not a massive re-architecture but another application providing the extra rendering effects. This applies the effects to the main window of your application via your graphics card.

Now this leads into the MDI problem. An MDI application hosts multiple windows inside one main window. The dwm.exe provides the rendering capabilities for your main Windows, not your child windows. This is where the problem lies, your child windows will be rendered with Aero Basic and hence look out of place in a full Aero desktop.

Unfortunately this will make your application look a bit messy and inconsistent. There is no solution as far as I can tell so far, although I am dedicated to finding an answer. By far the simplest answer would be to make it a tabbed user interface, although this may not suit some applications.

Hopefully I can find some sort of answer soon.

Windows Vista - The User Interface

The user interface in Windows Vista simply doesn't feel finished. The technology seems like it is there, but the user interface lacks consistency and the final finishing touches, an subsequently feels a bit pre-release - not the final release.

Windows Explorer doesn't have toolbars any more, no problem I suppose until you want to go up one folder. This is beyond me, you have backwards and forwards (but it isn't a web-browser), and no toolbar of common functionality.

Most applications haven't even been touched from their earliest incarnations, see Notepad, Task Manager, Paint, and loads of others. These are bizarrely much easier to use, but also help to confuse you more due to the lack of overall consistency.

In most applications the menu bar is hidden until you hit tab then it magically appears. If Microsoft don't like it then they should have simply excised it from all of the default Vista applications. I imagine lots of applications with custom drawn menus look pretty weird now.

Tabbed property sheets and toolbars look really weird when you let Windows Vista perform the rendering. The colours aren't quite right and this makes it look unprofessional.

Firefox looks great in Windows Vista though - much better than it does under XP, and I was pretty happy with it there.

Windows Vista - User Access Control - UAC

User Access Control (UAC) is the crux of Windows Vista's improved security. Unfortunately it is cumbersome and intrusive, to the point that I already have it disabled.

When something tries to alter the registry expect at least three confirmation dialogs to get this to happen.

Directory permissions are very odd, mainly due to the restructuring of how everything is stored on the main hard drive. In order to provide a level of backward compatibility of directories symlinks are used (which aren't apparently as good as Microsoft were promising), but unfortunately it is completely impossible to follow them as access is always denied. This is a pain when you want to access your program data.

Finding where the data is actually stored, you'll end up using the search functionality.

Also, Microsoft have you hiding system files by default, which has been the case for years, but you always end up having to switch it on to perform basic tasks. Unfortunately with the symlinks and the sheer amount of files it is an attempt to make it unusable. This is trying to make people use the default because the option is so hideous rather than trying to make the option so good you simply must hide the files, which I feel is the wrong way to approach just about anything.

Windows Vista and Visual Studio 2005

This is the most important aspect of my Windows Vista installation. You have to confirm that you want to run the installation - par-for-the-course - but you have to run it as administrator.

Once installed I knew there were issues with Visual Studio 2005 and Windows Vista after the numerous warning dialogs that Windows Vista pops up. So you use this to look at the Microsoft website like it suggests, but all you get is a place-holder. Not really a lot of good for the developer trying to confirm all is well in Vista-Land.

Well, I loaded the C++ project up and built it. Incremental rebuilds seem completely broken for some reason, somehow the pch (pre-compiled header) gets corrupted. Then the next problem is you can't compile individual C++ files.

What I have tried doing is increasing the access by running the devenv.exe as administrator, that didn't seem to help.

So I thought I would try out the Visual Studio 2005 SP1 Beta since it was available for download and after all couldn't make it that much more useless. This was a nightmare to install, make sure that you run it as administrator by using the right-click context menu. Be aware that this took an hour and a half to install, and I won't know until tomorrow whether it was successful or not. I hope this fixes the problems with the C++ elements in VS2005.

Installing software on Windows Vista

I should be grateful for Vista giving so many headaches - it has given me a mountain of blog-fodder, and has also taught me some stuff I did not realise.

I can say from experience installing software is quite a pain as you have to confirm everything. When you start to run an installer, it locks up your session until you confirm or deny. And it actually requires a secondary click on another confirmation dialog...

I realise they are trying to make Windows more secure with these extra confirmations, but it can actually become counter-productive. Once you have seen a similar looking dialog millions of times with more or less the same text you just click automatically without reading it, simply mentally blanking it out. This is even more dangerous, you could then be confirming anything.

Most installers work fine on Vista though, which is a relief even if you have to confirm everything. If you have an installation created wit Inno Setup, it looks fantastic.

Beware though - anything using Windows Installer runs terribly slow. I guess it must be doing more work somehow. Just be aware installing stuff requires lots of coffee breaks(!)

Fingers crossed the problems can be fixed with a point release of some sort.

Installing Vista - Part 2 - UPDATE YOUR BIOS!

Well, I now have Vista installed after swapping computers. Something catastrophic happened with my own computer's motherboard whilst installing Vista. After a day trying to get the computer to play ball a new BIOS was installed and Vista could also work properly on that computer.

So - a word of warning for installing Vista - upgrade your BIOS beforehand. I have no idea why the BIOS is incompatible as the computer is only 18 months old, but at least it now works, and I hope this post stops people heading down the same blind alley.

The boot process is definitely taking much longer than Windows XP. Installing most software is also mostly successful. The ubiquitous TortoiseSVN works seamlessly.

17 November 2006

Installing Vista

So Windows Vista was released on MSDN Subscriber Downloads today. I offered to be the Vista guinea pig and install it to make sure everything works before it hits general release.

Two identical computers one I spent all afternoon trying to get to work which could only amount to 4-bit colour 640x480... I tried swapping graphics cards - no luck. The other identical twin computer, pop the disc in and bosh it is installed and looking all Aero-ey. Even swapping the graphics cards between the two computers seems not to have helped. This is a bizarre turn of events, especially as XP seems to have run and installed no problem. It was not a driver problem either since it seems to have installed and understands the cards, but it seems to be an IRQ conflict of some sort, I haven't seen one of them since the old DOS days :D

Also, you still have to use an external source for your RAID drivers. I was hoping that was not still the case. Hopefully, it will all be solved by a clear head on Monday.

GUI - Enlightened Widget Library (EWL) - Enlightenment

The Enlightenment project has been a cutting edge desktop environment for many years. Although it is not seen as cutting edge any more due mainly to 3D accelerated eye candy, it is still very powerful and interesting, also it is really very efficient.

Currently the entire product is in heavy development but it is relatively stable (see eLive to try it out with a Live CD). The system is designed around a series of libraries some of which are more complete than others. Recently it was also revealed that Yellow Dog Linux was putting together a Linux for PS3 and it was using Enlightenment as the default desktop manager. This also will help provide funding for the project.

Anyway, on to the point of this post... A series of tutorials have just become available for the Enlightened Widget Library (EWL) portion of Enlightenment. This provides the widget toolkit for the environment. These are introductory tutorials and can be seen here:
Part 1
Part 2
Part 3

The main development community can be accessed here. The way that Enlightenment has been put together shows obvious care and thought, after all you don't have to necessarily have the full desktop environment to use just some of the libraries.

16 November 2006

Office 2007 UI Bible

On my Internet travels I walk randomly through following links until I find something interesting. That is what I have done:
The Office 2007 UI Bible

This is a series of many blog posts that look into the reasoning behind the new Office 2007 UI. It covers the history of office GUIs, the new design, and how to extend that design. There are lots of interesting points but it will take a long while to get through!

15 November 2006

GUI Toolkits - F3 - Form Follows Function

F3 is actually a declarative Java scripting language with static typing for good IDE support and compile-time error reporting (unlike JavaScript...), type-inference, declarative syntax, and automatic data-binding with full support for 2d graphics and standard Swing components as well as declarative animation. You can also import java classes, create new Java objects, call their methods, and implement Java interfaces.
The blog of the lead developer is available here. This looks like another interesting Java project, which is developed by Sun, so it will be open-sourced very soon.

There are lots of demos available on the blog, so you can see the work first-hand. It kind of reminds me of Win32GUI Generics. It looks pretty interesting and something new for Java, so it would be something to keep an eye on.

Java - Exciting Time Ahead

It's only a couple of days since the news that Java is going GPL. The kind of initial flurry has died down but the substance is starting to come along.

The OpenJDK project is off and running. There are two parts - the Java Compiler and the Java Hotspot VM.

The GlassFish Project is for the goal of building open-source, production quality, enterprise software. This project is already a year old.

I've downloaded some of the code already to take a look at it. It's quite nicely written and as such is pretty understandable for such a complex project.

GUI Toolkits - XULRunner platform

You can't have escaped this platform, you might not have heard about it, but it provides the basis for Firefox, Thunderbird, Democracy Player, and SongBird (which I mentioned before and it's continuing apace). A good place to start is the Wikipedia article on XULRunner, it provides the links you need to get started.

XULRunner is not simply a user interface but probably could be described as a platform like Microsoft's XAML/.NET or like Java's virtual machine (very loosely) or Boxely from AOL. Essentially it provides a layer of abstraction from the underlying architecture in order to allow the developer to work on the actual coding. XULRunner is the framework to allow standalone applications to be developed using the XUL language used for Firefox extensions.

Currently XULRunner is in beta with version 1.8, but with version 1.9 next year they recommend that for production releases. Along with the 1.9 release the Gecko rendering engine is also getting updated with some additional nice vector rendering.

The framework provides a myriad of features. There is built-in spell-checking, networking, the aforementioned Gecko engine, web services, storage/SQLie interfaces, UI, the ability to embed in another application, and also the Python bindings (full version forthcoming). I think the reason that I find this quite interesting is the two applications I have used most at home and work in the past couple of years have been based on this. I just wonder how far it can all be pushed for heavyweight desktop application development.

You can view a list of applications based on XULRunner here. When the final proper release of 1.9 is out I imagine there will be more people willing to use it as it won't be all belt and braces, there can be solid tutorials and the suchlike.

With so many of these types of projects around at the moment, I am wondering when the "survival of the fittest" will start to kick in. Admittedly, XULRunner has a very strong chance since it is a platform for Thunderbird and Firefox.

14 November 2006

User Interfaces - Vector Icons and Toolbars

I'm sitting here wondering if there is anything out there to use vector based graphics to render some icons or toolbars. I've been Googling for something like that out of curiosity - and I seem to have come up dry.

The only one I have found that seems to do what I am expecting is the Juce Library. In fact in most libraries creating and maintaining toolbars and icons is pretty laborious (especially in MFC), so you tend to write your own wrappers for functionality. Myself, I have written code to automatically generate hot and disabled image lists in MFC so only one bitmap needs to be edited (I have also written this code more than once - problems of proprietary code).

I know there is talk that Vista wants everyone to use vector icons (which is a problem for all those people who currently use bitmaps), but there seems to be very little information out there about it.

I realise most people try to write fully featured GUI toolkits, but there must be smaller implementations of specialised functionality out there? Kind of like common building blocks? I suppose one would be a rendering engine using system theming, another being resource management, another rendering those resources...

13 November 2006

More Java

Here are a couple more articles to do with the open-sourcing of Java with a bit more substance. One from InfoQ and another from eWeek.

But that isn't what this post is about. I've discovered an XP look and feel style for Java called WinLAF as it was felt the native look was not sufficient. Reading about Java 6.0 though suggests that a big leap forward for native Windows look and feel is being made for this version called Mustang, also taking into account Windows Vista.

There are a myriad of enhancements for the new version of Java here including lots of alterations for Swing here. It links to all the related bug/enhancement reports. An outline from The Register is also available. The new rendering engine uses the Windows UxTheme DLL.

There is an article with plenty of screenshots of Java 6.0 aesthetics.

Java - A Gift To Free Software

After a few weeks/months of build up the the press are now reporting on Sun open-sourcing Java under the GPL license. This is free as in freedom. This is great news, especially in the current climate brought about by Microsoft in recent weeks (with the Samba team now pubic in their opposition to the deal). Overall, this is great news and I imagine this could push Java from strength to strength. Pair this up with the Adobe's EMCAScript donation to the Mozilla Foundation, I think this could be a very exciting time for the Java family of products.

This has also got me thinking about Java user interfaces. The last time I looked at them many years ago they were more of a Motif style of user-interface, certainly not the native look'n'feel. I wondered how far they have got now. I am a user of Azureus the fantastic BitTorrent client written in Java, the interface is not quite native, but has been getting closer and closer in each subsequent version. Apparently it is also possible to build Azureus with the GNU Classpath library supplied with the GCC.

There is some documentation about Swing look'n'feel available here about some default theming. There is also a look'n'feel Java website here. There certainly seems to be a lot out there that runs pretty close to being native looking, but it seems to fall short in some places, I think this warrants some more investigation...

11 November 2006

Free Anti-Virus

UPDATED

Damn, I wake up this morning and switch on the computer to discover that AVG are discontinuing the free edition of their anti-virus suite as of January 2007.

START UPDATE
Well, the message as it turns out was a bit misleading. They are discontinuing 7.1 free edition and are advising the users to update to 7.5 which is still free. Click the link in the first paragraph to download - incidentally it uses wxWidgets for its user interface.
END UPDATE

It has been a fairly decent product, especially for the price, and has meant that I don't have to install one of the myriad of Norton Security packages that I own (normally given away free with computer parts). I suppose I could go and install those, but I am not really pleased with the software when I have used it. Mainly due to Firefox AVG Free Edition has only spotted one virus attempting to get on my PC in the past few years - and this is definitely not from being a poor anti-virus.

Anyway here is a list of free alternatives for all of you in the same position:
  • It seems Avast is the most fully featured and professional program you could choose.
  • Avira AntiVir is also a well respected free anti-virus alternative.
  • And now an open-source alternative:
  • Clamwin - A free open-source anti-virus engine. It is a static scanner... but pair it up with...
  • WinPooch is a dynamic monitoring engine that you can use with ClamWin which gives you all the benefits of dynamic monitoring.

Well, that is at least a list to be getting on with. Or you could believe Microsoft's Jim Allchin that you do not need Anti-virus in Windows Vista...

09 November 2006

Code Jenga

Imagine a game of Jenga except every fourth piece is booby-trapped.

Anyone who has worked on a suitably mature commercial codebase knows exactly what I am on about. You are severely restricted in what you can change and you are always having to look for unforeseen consequences.

That is why it is like a game of Jenga, you remove one piece or replace it but you run the risk of it all toppling down. I guess that is why clean slates are probably so appealing to programmers, as you reach a state of coding entropy where it is collapsing under its own weight.

How many times have you tried to rewrite and replace something that was badly engineered and found that there were numerous side-effects. Regression and unit testing are great things, but marketing and sales don't care about that, and it all costs money after all.

So next time you are banging your head up against a brick wall with what you are working on, it is just Code Jenga.

08 November 2006

Multi-Core Programming

An interesting article that passed my eyes in the past couple of days was this one. It is about Valve's approach to multithreaded applications, and it seems that they fought against it for as long as they could. Since I've worked in industry I've worked entirely on mutithreaded applications and this probably is under the coarse grained model, but it looks like the fine grained model is going to get more important in the next few years and it is something we are all going to have to work out.

Visual Studio 2005 and TortoiseSVN Subversion Integration - Update

See the update here.

Hi there everyone,

Here is an update to the TortoiseSVN integration into Visual Studio 2005. This update is a fairly major change since this will only have the changes to external tools, menus and toolbars. This means when you import these settings you get a new menu at the top of the screen (with icons), a new toolbar with proper TortoiseSVN icons, and context menus for solutions and files.

You can download the new settings file here (it is 9k in size compressed). All you need to do is go to your Tools menu and choose "Import and Export Settings" and follow the instructions. Ensure the tick box for which settings to import are all ticked.

Here are the original posts from the Subversion integration (and old files are still available).

DOWNLOAD SETTINGS FILE

Edit: Now there is a yet another update - this is now 7k. This makes a minimum of changes to your IDE as humanly (or inhumanly) possible. There is still a deficiency in the .vssettings that messes up the build toolbar comboboxes, but this seems unfixable in the current format.

Oh, and don't forget to leave some comments as to whether this new stuff is all working for you (along with the new "Add Solution To Repository" functionality.

Helpful Libraries - ModAssert

Anyone who has programmed in MFC and ATL will have encountered the ASSERT macro. Due to it being rather simplistic and essentially a one-size-fits-all.

I was pleased to see someone has developed a very comprehensive assertion library which makes it into a really useful debugging tool. I first encountered the project with this article on CodeProject. It allows compile time disabling/compiling out, and also run time diabling. It also provides levels to give a granularity to your debug output. Also you can use it to output log information which can be invaluable for debugging (with lots of useful information like threads and so on).

The library is fairly large and comprehensive, but since you should compile it out for your final release build it isn't really a problem at all. It certainly should be useful for C++ developers.

The Sourceforge Project is here.

06 November 2006

50 With A Bullet

I didn't even realise until just now, 50 posts down and still no idea what I should be concentrating on. Obviously this blog has a real GUI flavour, but I can't help writing about random computer subjects like media PCs and interesting new things.

I still haven't finished my trek through the new world of Vista. Not only the guidelines, but also getting a more in-depth look at the C API headers and getting some documentation together about it.

There are also some GUI toolkits I haven't got round to looking at like the Adobe Open-Source Libraries and SmartWin++. Also, I still feeel like I need to look at lots of the others in more depth. And most importantly I want to get some source code out there rather than just talking about it all the time ;)

Anyway, here is to the next 50 posts.

GUI Toolkits - Boxely

My discovery of this toolkit was from the article posted about the Firefox Kid. At the end it linked to the blogs of the two Parakey developers Blake Ross and Joe Hewitt. The article was abou Blake Ross but it turns out Joe Hewitt's blog was really the more interesting.

This is how I discovered Boxely. Joe Hewitt's posts about it are here:
His post about the release of Boxely.
Boxely - Part 1.
Boxely - Part 2.
Boxely - Part 3.

Boxely was envisioned as a lighter weight more powerful XUL type UI toolkit. It is an XML and Javascript toolkit for creating desktop applications in the same family as XUL and XAML. It was initially put together for the AIM client, and to allow extensibility. Reading the articles it seems that Boxely's existence is a lucky break. Due to being integrated with more AOL services over time it seems that it is more bloated than it started with.

It seems to be capable of some really nice graphics and also integrated animations. I don't know how much XUL/XULRunner has improved to close the gap on the features that Boxely has. It's almost a shame that the earlier versions were not released without the COM stuff as it all sounded pretty good.

Boxely is available for download now and seems pretty capable. I, however, don't know if it is worth investigating further as XULRunner seems to do a pretty good job with stuff like SongBird. In fact I think the sentiments and vision behind the initial design is more more interesting than perhaps the final product.

05 November 2006

Home Theatre PCs - MythTV

MythTV is a Linux-based media centre program, but it also gives you so much more than that. I have to say that this is better than any other media centre software out there. Why is this?

It has been designed from the outset to provide a client/server architecture. This probably doesn't mean much to many people at the moment, but it is certainly the way forward. What you have is a back-end that provides the media content, then you have front-ends that allow you to access that content.

The simplest install is to have the back-end and front-end on the same computer, providing the same functionality as any other media system. If you plan to have more than one front-end you have have the back-end on another computer, but both will be able to access it. The back-end is also responsible for recording the TV and cataloguing the data, so you can stick a few TV cards in there and make simultaneous viewing and recordings. And for your front-end you can make it as powerful or lightweight and silent as you want as you can limit the moving parts when the brute force (apart from decoding) is provided by the server.

The real power comes from the client/server architecture, as the front-ends can be implemented in anything that you can connect to the MythTV protocol. This is most apparent because it easily has a front-end for web access (meaning you can schedule your recordings remotely), there are also other smaller front-ends to the default and even a small one for Windows which is functional. The back-end server software is pretty much rock solid because it builds on the foundations of Apache and MySQL.

Recently version 0.20 was released with a whole raft of new functionality including OpenGL UI rendering and a more library based architecture. You can see the rather long changelog here.

If you want to try this out you can also do this without installing it thanks to the wonders of KnoppMyth. This is a Knoppix based distribution on a CD/DVD with MythTV set up so you can try it out and if you like it install it.

There is also MythDora a Fedora-based MythTV distribution. This is based on Fedora Core 4, a little out of date.

There is an excellent resource for getting MythTV installed for Fedora here. This is highly recommended and comprehensive.

Also, for the Ubuntu people out there, you can use this resource to get the information you need.

Lets not forget the excellent documentation and the Wiki. You can see some themes here and some screenshots here. Also there are thriving communities including the forums and mailing lists at MythTV itself and KnoppMyth, and there is also MythTV Talk.

And here is a screenshot for the curious:

Home Theatre PCs - MediaPortal

And now for a complete change of pace...

One thing I particularly like doing it fiddling about with home-made HTPCs (Home Theatre PCs). I've built myself a little system for a little over £200 involving an AOpen XC-Cube. This became necessary when we moved house and the main computer was moved away from the TV.

I decided to use Windows for the OS for expediency's sake and as the graphics chipset on the motherboard was not well supported in Linux. I could have gone for Windows XP MCE Edition, but I already knew of an alternative I preferred.

Check out MediaPortal for a fully featured media centre system that is fully open-source. This project actually grew out of the well respected XBox Media Centre (XBMC). It looks and feels great and has full compatibility with things like MCE remotes. They've recently updated to an unstable build of 0.2.1.0 which I have found completely stable for my own uses, but I tend to only watch TV/TV programs on it. Also, more excitingly they have started work on the TV Server project so that the TV cards and content can be hosted on a back-end server and the actual media PC can be as trimmed down as you can make it.

There are also a variety of skins to make it look really good, a lot of which broke with version 0.2.1.0 as there were some substantial changes to the XML format. Here is a list of some working ones:
  • MCE is currently missing (the one that looks very similar to Windows Media Centre Edition) but will be reinstated to the release very soon (it is probably already accessible under solution).
  • MePo skins - These are fantastic featuring the new mascot type character MePo.
  • Simplify - A bit of an understated skin.
  • Replicant
  • SimpleMP
  • Vista Style MCE
  • KIS - Looks incredibly impressive but I have not had a chance to download and play with it yet. There is KIS, KIS Dark, and the KIS SDK for plug-in pages.
MediaPortal has coverage for emulators (I had a lot of fun with this and my arcade joystick), built-in games, weather, music, DVDs, TV, radio, films, and numerous plug-ins. Since it is also simply an application you can install and use it on any supported PC. It may not be the most technologically advanced or have the best architecture, but it does the job more than admirably and more importantly it is as easy to use as running the installer and following the setup wizard.

03 November 2006

Windows Vista - User Interface Solutions



I remember reading online when Apple first released their new remote with the new Intel iMacs/MacBooks/MacMinis that people said it would be no good because it didn't have enough buttons, and after all their Windows Media Centre remotes had 46 buttons, so it must be better. But when people start using these user interfaces (after all that is what they are) I somehow doubt the 46 button monster is the winner.

So you are going to write something for Windows Vista? I suppose you can jump in with both feet and see what you end up with, you might get lucky. Or I suppose planning could be the best way forward. When developing for any platform you need to follow the human computer interface (HCI) guidelines that give you the general rules.

In my previous guidelines post I provided links to various guides that are available. In most cases it varies from company to company as to the UI design guidelines and if you are really unlucky it comes down to you.

The problem with Windows Vista is a lack of consistency when trying to come up with design guidelines for your own project. For such a new platform you have to look at the existing applications in order to decide what is best practice.

With Windows XP you can see the problems already. Look at the differences between Windows Media Player, Office 2003, Visual Studio .NET, and now IE7. They all follow different looks, different usage paradigms, and are simply inconsistent. For IE7 they have done away with default menu usage which is completely different to what is expected for a Windows application. Even the way toolbars and buttons look and feel is not quite the same. I suppose that this can be seen as paving the way for the Vista UI transition, but we are using XP not Vista. It almost suggests there is no transition path satisfactory for both platforms.

One of the eye openers when you first start using Windows Vista is a complete lack of coherency and consistency. I know people would prefer to let their imagination run away unfettered, but guidelines are there to bring the worst applications up to the minimum standard, not drag the best ones down.

The lack of consistency is shown at its best in this blog post by Dave Vronay. In the past we have had the simple yet powerful design paradigms of menus, toolbars, and recently the more extended multifunction type toolbar (like with the search bar). Looking at the various programs available built-in to Vista they all seem to be pulling in different directions with their usage. Sure, not every program will be shoehorned into a limited and strict user interface.

Lets have a look at three of the main applications that people will see in Windows Vista.

Internet Explorer 7
This will be the one most people see. There seems to be odd behaviour where a new toolbar row can be inserted with just one item on it which seems to appear when there is only one tab (apparently a PDF bar I don't remember installing). Whereas the tabs row seems to have loads of options and information crammed onto it. The help is accessed via a chevron on the right hand side. Menus still drop down when you select an item which has a triangle next to it. I am finding the only thing that has really changed is the position of the menus, and they still exist but they do not have text - they use icons, and they have randomly grouped stuff together in an overcrowded tab row.



Windows Media Player 11
This has always been the odd application out for years, looking completely different to standard window apps, with random sporadic dynamic changes to display a proper window frame or something equally as useless. It has no toolbar as such, although it could probably be described as at the bottom of the screen... The menu tabs across the top switch you into different views for different operations and the proper menus are hidden away on the right click if you do not choose the standard window frame. I think it really is a case of one application trying to perform too many tasks.

Office 2007
Now enter the ribbon as a menu and toolbar replacement. This could be really good or really bad, I can't make a judgement to decide what is more productive, it might turn out to be good. But again it is another different way of controlling your application. If these were the way forward, surely the default Microsoft developed applications would also be going down the same route?


In summary, you can (or maybe not) have menu bars and/or toolbars, use tabs to switch functionality, do away with menu bars, mix up toolbars with tab bars, have icons instead of text for menu bars, or allow menu bars to pop up randomly, or use a ribbon which is kind of like a menu bar and a toolbar except more dynamic. Confused? You should be! And that is only three applications!

So the developers making the applications have to make a decision, what is the best course forward for their program taking into consideration the bountiful supply of ideas from Microsoft? I can guarantee not one of them will come up with the exact same answer. I've always followed the K.I.S.S. (Keep It Simple, Stupid) philosophy, and I am not entirely sure how to apply it to this situation.

Over my next series of posts I will be digging my way through the UI guidelines of Vista and trying to navigate and at least get clear in my head the way forward.

02 November 2006

What to do after being ludicrously successful?

Read the article: The Firefox Kid
Blake Ross helped make Firefox one of the biggest open-source success stories ever. Just wait until you see what he's up to now.

One of the founders and perhaps they should be called visionaries of the Firefox project has revealed what he is working on now. It is that integration of network and personal computer into something more useful, sometimes referred to as the web-based OS.

He is one fo the founders of the Mozilla Firefox project (if you think about it, IE completely dominated and there was noone left to fight), a self-taught programmer, a believer in open-source, and he is only 20 years old. Kind of depressing (if you are older than him) but uplifting (something good for the future). I recommend reading the article which kind of reveals where he is coming from and where he wants to go.

Anyway, the idea he has is called Parakey (no website yet), and it is supposed to be integrated and synchronised storage for offline and online work, as well as sharing information over the Internet. It is supposed to take the headaches for getting content from whatever device and storing that content for use. It wants to be as simple as possible for managing media and allow non-technologically minded people to use those sharing services that are otherwise out of their reach. Then the content would be accessible from the same interface whether you are on your home computer or any other around the world.

It seems like a decent idea providing it can come to fruition, but these things don't always live up to the grand dreams. It's an interesting interview anyway.

01 November 2006

Open-Source wxWidgets IDE - wxDevC++

In a previous post I have mentioned the splendid free IDE Code::Blocks, but in the dark old days of a few years ago, before Microsoft gave stuff away for free and development was quite an expensive endevour, there existed DevC++. It was a free IDE written in Delphi that provided good library management and also was an IDE for GCC in Windows.

Over the years other IDEs have sprung up and essentially overtaken Dev-C++ in terms of features and quality. Then someone decided to make a branch, one that was going to have integrated GUI editing. This project eventually became wxDevC++.

A new version has just been released with even more features from wxWidgets integrated into the GUI editor. Most importantly it now has support for Visual C++ compilers (v6, 2003, and 2005) which is interesting. I need to go and check out this IDE in more detail, but it is good to see it is more than alive and kicking. If you are a wxWidgets developer it is one of the most comprehensive integrated IDEs for developing and looks like it will be going from strength to strength judging from the changelog for this version.

And here is a little screenshot with the GUI editor up from their website:

31 October 2006

User Interface Guidelines

Another stop on the way to a fuller look at the Vista User Interface Guidelines. This will be the last one I promise...

WINDOWS XP

For designing any user interface in Windows XP (and generally Windows) you need to know Design Specifications and Guidelines - Visual Design. This specifies how you are supposed to lay out your user interface and how allthe elements should fit together. I use this to hand code my resources for MFC user interfaces, when it is all consistent you will be surprised how much better and more professional it looks. One thing I can't remember if it is covered is make sure your tab order is correct as when working with resources it is possible to get it wrong.

VISTA

The Windows Vista User Experience Guidelines have been available for a while. By available I mean exist as a placeholder that someone will eventually be forced to write.

The most substantive part of the Vista UI Guidelines is the Top Rules for the Windows Vista User Experience which are extremely shallow and a bit of a red herring for good UI design. It even asks for things that the applications provided with Windows Vista are unable to follow.

All of the Vista guideline are so shallow that even the most obvious things like what will be the user interface differences between Basic and other Vista versions are not covered. For those of you that haven't heard the standard home version of Vista will be supplied with the "Aero Basic" theme that does not have the bells and whistles. It makes no mention of how to lay out controls consistently and intuitively. Also it says use Vista style icons and so on, unfortunately the icon guidelines hve not been published yet.

APPLE

Trust Apple to show you how it is done. They have comrehensive developer documentation on how to supply a well integrated consistent interface for OS X. They can be read here.

The human interface guidelines are available here. This covers all you need to know for a professional looking OS X application. The documents keep evolving and get better like with the recent icon addition.

Gnome

The Gnome desktop has a well know human interface guidelines. It is really quite in-depth and puts Microsoft to shame.

KDE

The popular Linux desktop environment also has a set of user interface guidelines.


You can read a previous post about icon guidelines for various platforms here.

Windows Vista GUI - Gotta start thinking about it

Windows Vista is just around the corner. As a developer you worry about what a new OS version is going to do to the program you work on, most incremental cases are pretty trivial, XP introduced a virtually undocumented theming API (and it still pretty much is), SP2 opened up a whole can of pain, Vista has even bigger problems on the horizon.

But this post isn't about those migration problems, I'll be covering them as I tear my hair out at work, much like my migrations to Visual Studio 2005.

From this GUI developer's point of view I'll cover my thought process:
  • "Does my UI work under this upgraded platform?"
    Ignoring the platform issues, does the user interface work on the new platform. This means does it render without causing corruption and does it crash? It's a simple case of running the executable.
  • "Does it look good?"
    Now the user interface is usable, does it look integrated with the rest of the system? This means checking custom draw items work and match the system theme. Once you've made sure you have made no glaring errors the program is probably usable on the new platform.
  • "Does it look consistent with other programs on that platform?"
    Now this is where the realy hard work start. Some platforms actually provide user interface (HCI) guidelines that are worth the virtual paper they are written on like the Apple ones, some are not like Vista. My next post will cover this point in greater detail.
  • "Has the migration made our user's lives better or easier?"
    Has the shiny new look cheered our user's lives up? Has it made the user's lives easier, say for instance the new common controls provide even more functionality as standard?
  • "What can be added incrementally?"
    Are there new features available to the developers that can be added in an incremental fashion, either phasing out old items or introducing new paradigms. This will also be the implementation of features seen as extras by the HCI guidelines.
  • "Can you separate yourself from the crowd?"
    This is the lowest priority item. Are there things you can do that look good, but also serve to separate you from the rest of the crowd (but please keep them within the HCI guidelines, PLEASE!)
Well, I will end this random ramble though my thought processes, but I am expending valuable brain power on this knowing I have to sort this out in the near future. Since Vista is going to manufacturers very soon it all seems tangible now.

28 October 2006

GUI Toolkits - qooxdoo

No, I haven't lost all typing skills, it is really called qooxdoo.

qooxdoo (see also Wikipedia) is an AJAX targetted Javascript user interface toolkit. It is surprisingly fully featured and shows how far along web-based toolkits have come. Well, when I say surprising, I mean shocking.

The toolkit is LGPL licensed and has a large set of widgets available. I think the best way to describe it is to send you to the demo page here and I would recommend you look at this example in particular. There is no point in looking at the screenshots as playing round with the demos demonstrates its depth of features and how polished they are.

The advantages of this kit for web development include the abstraction away of web browser specifics and automatic browser detection. It has things that are normally only seen in fully fledged desktop environments like drag-n-drop support. Like I said earlier though I think the demos speak for themselves.