Showing posts with label Computers. Show all posts
Showing posts with label Computers. Show all posts

Monday, 13 October 2008

Death to my Mac

rant on

I've finally had it with my Mac, I'm bootcamping XP MCE onto it again.

I originally setup my media center just before Christmas 2006. There was a lot on TV that we wanted to record and we were going to be away for a week. So I figured, "Hey Microsoft have some media centre doobery that can record TV, so let's install it from my MSDN subscription and see what it's like." I was sure that came under 'test and development' so I order a huge hard disk, setup my Shuttle XPC with MCE and bought a little USB TV tuner and the MCE remote.

The Shuttle was an old model, some Athlon variant, but it was quite a good PC - I used to use it to play two characters at the same time in SWG. But since I quit the game it was just gathering dust.

It all worked well to be honest, and soon we recorded pretty much everything we wanted to see over Christmas. MCE "just worked", it was Windows so adding it to the network was no problem, we could remote desktop if we needed to administer the machine, and we could SMB to the machine to copy to and from. And I took the opportunity to start ripping my CDs as MP3 so they could live on the media PC.

There were two downsides. Firstly the Shuttle XPC, at least my version, is noisy. Sure the fans are temperature controlled variable speed, but there are several in the PSU, case and graphics card. It's only really a gentle hum but it's a bit irritating. We lived with it for about a year anyway. The second problem was that the 'diversity' stick with two tuners could only actually record one program at a time. I couldn't get any support from the stick manufacturers because we were using MCE. They point blank refused to offer help because a) the card was recognised in Windows and b) we were not using their software. It was Pinnacle by the way. So for a long time I remained mystified as to why as soon as it attempted to record the second programme the first one stopped. I just put it down to the fact my Shuttle was slightly under spec and MCE can't encode two MPEG streams at the same time. It became a feature.

A few moths ago though my beloved Shuttle developed a bad case of fan rattle. Initially it was possible to just tap the case and it was stop, but eventually it became terminal. Time to replace the PC.

I looked around for fanless or quiet PC. There are many suitable PCs, but frankly some are grossly expensive. I wont say overpriced, but they are expensive none-the-less. So it was hard to find a suitable machine at an affordable price. Until I started to read about the Mac Mini. It was a pretty decent spec, by all accounts very quiet, and not too expensive. And bootcamp means one can run Windows. Perfect I thought.

So the Mac Mini arrived, I installed Vista onto it, and set it to look at my 1TB server with gigabytes of music, images and videos. For the first two days it was perfect. I never even touched Tiger or Leopard or whatever MacOS X is called, the machine was virtually silent and I it all just worked in shiny Vista goodness.

I want to say though Apple have really messed up with the Mac Mini in my opinion. In the version I'd bought, they had removed the dedicated graphics processor and replaced it with an on board GOU. Maybe this was to save money, I'm not sure, but at the end of the day it means to do cool graphic stuff, it needs to burn the CPU. Vista MCE contains a lot of moving graphics, and the Mac Mini turned from a "silent" PC to a hairdryer. It was an incredible noise. wtf?! Most of the time I wasn't even using the thing, I just had it at the MCE start screen. But notice the background colours change in Vista MCE? Yes, that is what was burning the CPU cycles and turning my little machine into a noisy behemoth. It took me several days of frigging in the registry to find the undocumented settings that let me turn off all the graphical crap and allow the machine to idle in peace. Playing movies still caused the problem, but at least when not using it, the machine was quite. Which I could live with.

Sadly my happiness was short lived. A few days later I started getting problems. Playing MP3s would randomly pause for about 30-60 seconds between songs. No that's not correct, it wasn't exactly between songs, it was more like 15 seconds after the next song had started. There was no reason for it I could determine. We had a 100 Mbps connection and the machine was just playing MP3s. Then weeks later the entire media library just disappeared. Network access was still good, and exiting Media Centre and going into Media Player showed the library was intact, but Media Center just didn't list any songs or images.

I managed to get the media library back, but the MP3 pause was still causing problems, it still could not record two channels at once and there was some other problem with the videos. Then I'd had enough. "Vista is rubbish. It must die. There must be a better way."

But do I go back to MCE 2005, or Mac OS?

Now Apple have a pretty good rep for graphics. People evangelise about how great it is and how they could never use a mouse with two buttons again. Freaks. But Apple do some things really well, so sure I'll at least investigate the possibilities. So what does Mac OSX offer?

Well to put it bluntly, frack all. Sure they have "Front Row" so it you want to try to work out how iPhoto works and import photos into the library without copying them into the machine, and you don't actually want to record TV, it works quite well. I mean it plays MP3s like a charm. But recording TV was kind of the reason I originally got a media centre.

Apple make AppleTV though, can this help? Well so long as you don't actually want TV then it works great. It's like Front Row in a box. Fantastic. But I can buy some TV shows after they've been broadcast apparently. I knew that aerial in the loft would come in handy. I'll pay for something the day after I could have watched it for free.

Lots of friends recommended I look at XBMC, and I did, right at the time they announced that Mac OS support was being dropped from the main project and branched into a different code base maintained seperatly. Because of organisational disagreements. Or, the developers on the two projects hate each other and can't get along. Meh, stupid GPL bedroom project.

But wait, there is a company called Elgato that make EyeTV, and it looks really cool. I mean this software looks like the dogs bollocks. Okay so there is no free electronic programme guide like MCE has, but everything else looks great. So I order a copy, restore the Mac Mini to its full OSX glory and prepare to rock and roll.

And how I loved it at first. The simple MacOS Front Row remote with like six buttons is cute. And it works well with EyeTV, just as soon as you realise that to stop watching TV to have to navigate the menus to the library, then recorded TV, then just play something, then open the menu again, go to the extra options and "stop" the playback - because for live TV the only option is to record it not stop it. Not really intuitive, but it worked. And it worked 100% of the time, not 20% like the Elgato remote with it more numerous but unlabelled buttons. And EyeTV doesn't play MP3s, so adding the Front Row option meant I had to VNC onto the machine and open a console window and type some voodoo magic to make the menu option appear. Fine, it's a Mac, there is no registry, they do things "differently", I can live with that.

So I had a PC that could play MP3s, couldn't display my pictures, I had no idea how to make it display any of my XVids or DivXs, I had no idea how to play APE or OGG music, but it could record TV. And the recording was really good, much better than MCE. The fan would spin up to half speed while recording, and half speed when playing back. Unlike MCE which would silently record but run the fan at full speed on playback. And the quality was brilliant.

But you know what EyeTV couldn't do? Programme guide! You'd think that was kind of important for a device that recorded the TV. In its defence it does comes with a 1 year free subscription to some service I have to start paying for next year. But about 5 of the channels it has completely the wrong listings for. Five US for example is some German film channel. BBC News doesn't exist despite the fact I can watch it etc. But worst, and which is intolerable, is that for reasons best known to itself it decides to stop recording some shows, record things I've never asked it to (even on different channels) and repeatedly starts recordings far too early or late missing the beginning or end of a show. I've now had to take to recoding the program before and after the one I want just to be sure I actually get something, then it's not guaranteed, I still occasionally get the odd random program it's decided to record for an unknown reason.

I suspect part of the problem is because I am not using the proper GUI, I'm trying to use the TV mode EyeTV menus. But you know why? Cos I'm using a fricking TV! I don't have a keyboard or mouse, I have a remote control with only 6 freaking buttons.

EyeTV is probably a lot better if you can use the main dialog. But I can't. And what else? The freaking dialog is larger than 800x600 anyway. I'm running my Mac onto a standard CRT television. It's not a computer monitor, it's not HD, it's just a TV. At 800x600 EyeTV looks reasonable, but the main GUI doesn't fit onto the screen. For weeks I was convinced there was no search function because the edit box is in the upper right hand corner, just off the edge of the screen. So to use that dialog I have to come upstairs, boot up my computer, run VNC and try to work out what the IP address has changed to, connect to the PC in super slow mode and drag the UI around the screen trying to access all the dialog buttons. In MCE you just search the free EPG from the sofa using their remote.

But what has put the nail in the coffin is the other day it told me there was an update, which I promptly downloaded, then came upstairs because it was asking for my password whihc I can't type using 6 buttons on the apple remote. But I forgot my password because it is different from the password VNC uses so after 3 attempts EyeTV crashed, and the machine is left with a broken EyeTV install because it could not cope with my not knowing my password. EyeTV is seemingly uninstalled in preparation for the new update which never installed. Great. I suppose I could find the CD and put it in the machine and use VNC to log on and reinstall the old version then redownload the latest version and get it to patch again. But I can't be bothered.

So I'm going back to MCE 2005. Vista MCE didn't work, for whatever reason. And Macs just are not designed for a headless media environment. Sure if you have a keyboard and mouse connected, and a resolution greater than 800x600 it probably works better. Or if you only use iTunes and don't need to watch or listen to anything in a non standard codec and actually record TV through an aerial it's probably good enough too. But for my specific needs it just doesn't work.

It's a pity because some things a Mac does, it does very well. But it's not fool proof, it's not necessarily user friendly, and sometimes it just doesn't work at all. I'm hoping MCE 2005 won't have the same problems Vista did on this PC. MCE 2005 on my old PC was great, it was just the PC that let it down. If it doesn't work then I don't know what to do. If only Virgin Media (cable) was available here.

/rant

Wednesday, 3 September 2008

Making Visual C++ 6 apps look cool

Visual C++ 6 is what, 10 years old now? But there are a lot of good reasons to still develop software in Visual Studio 6 because it lets you do things that Visual Studio 2005 et al. cannot do. Or perhaps you just have an existing project you do not want to convert.

But one of the drawbacks to VS6 is the programs frankly look ugly. Sure you can still add a manifest if you like, but the default dialog font is MS Sans Serif (at least on US/English systems) which is hideous and doesn't lend itself well to supporting wide character sets. See, this looks gash. It works well enough for standard English programs but won't work if you try to use a non Roman character set (e.g. Kanji or Chinese). Sadly to fix this you need to edit the resources manually.

There are three main things to check and possibly change. First you need to load your resource script (.rc file) into your favourite text editor. Notepad works fine. Find the dialog resources. They should read something like this:
IDD_DIALOG1 DIALOG DISCARDABLE  0, 0, 186, 90
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"

The first things you need to do is change the dialog font from MS Sans Serif to MS Shell Dlg. MS Shell Dlg isn't a font, it's a mapping to the system font which is probably Tahoma. Now this value will actually be ignored unless two other conditions are met. Firstly, the dialog template must be DIALOGEX instead of DIALOG. Secondly, the dialog must have two additional styles, so you should add DS_FIXEDSYS which will include them both. So you should end up with:
IDD_DIALOG1 DIALOGEX DISCARDABLE  0, 0, 186, 90
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_FIXEDSYS
CAPTION "Dialog"
FONT 8, "MS Shell Dlg"

Note that if you edit a dialog in the IDE it might lose the DIALOGEX template. It will keep the font and the styles, but you may need to re-edit the resources by hand then have the IDE reload them if you want to move controls about. Also the IDE won't render the font correctly so sometimes you have to "guess" how big a control needs to be to contain the text you need.

Then you can add your Common Control 6 manifest and your program will now look cool. Goodbye 1998, Hello 2008.

There are still sometimes that dialogs will look wrong, especially related to property sheets. Some types of MFC property sheets (and other MFC dialogs) use DIALOG templates so property pages may not always display correctly. And by using DIALOGEX you are effectively preventing your software from running on Win32s on Windows 3.x. But I think the benefits outweigh those limitations.

Monday, 28 July 2008

Designing user interfaces

Today I have mostly been designing a new user interface for a piece of software we have. I like doing this, and I think I am quite good at it. But designing an interface is not trivial, and the more one knows about computers the harder it can be to design a good interface. That is because the more familiar you are with how software works, how different applications are written, and what is going on behind the scenes in the operating system, the more you anticipate how software is going to work. You can know instinctively what will happen when you click a particular button, even if you have never used the software before.


This can pose a problem when one is designing software, because the developer may make assumptions that a user will be able to drive a piece of software because it seems obvious to them that if you click here then whis will happen. But this makes a huge assumption on the users' knowledge and skill level.


You may love them or hate them, and you may be a fan of Vista or not, but the trusth is Microsoft do know how to right software. Whether or not they succeed is another matter, but the do know how to do it. And they have studied it at great length. They have infact come up with guidlines on how to write a good interface, and the things you need to keep in mind.


Microsoft Inductive User Interface Guidelines