VMWare startup time and flakiness

I don’t know why, but just recently VMWare has been performing rather badly for me. It used to start up to a saved session of Windows in a matter of seconds, but now takes minutes before I can start work. Selecting Unity mode takes another minute or so to get all set up.

Working on anything while VMWare is running is bad news - everything in the system slows down to a crawl, especially during the startup phase, but even whilst running. I used to be able to switch around with ease, and even though Inventor was sometimes a little laggy, it was quite responsive. Now, I need to wait seconds for every operation in Inventor to complete (which may be a Network licensing issue, since the same thing appears to be true of Windows machines on the network, too), and it affects my OS X software, too.

Finally, I had a crash today, where VMWare shut down. I think I’d saved all of my work, but I can’t be arsed waiting for it all to load up again to check. I’ve only got 20 mins to work on the stuff I need to use VMWare for, and I think I’ll just do something else instead of waiting for half of that for it to boot up.

I don’t know if it is an OS X issue, a VMWare installation issue, an Inventor issue or a VM image issue. I only need to keep using Inventor for a couple of weeks, and I have to use Access to write my last lot of school reports. After that, I may be able to remove VMWare and Parallels from my system entirely.

Actually, I think I’ll do a complete reinstall of OS X and all of my applications when I get Leopard. And perhaps I’ll have several partitions: OS, Applications and Data. That way I can have separate backups, that are restorable easily.

xkcd Success

Ah, I’ve been there. Mine was dual-booting OS X onto an unsupported Dell PC. I had a second Hard Disk that I was putting it onto, yet somehow I managed to screw up the Windows partition as well. Luckily I didn’t destroy the laptop. And I never got near the sharks…

And, yet another plug for xkcd.com - if you haven’t subscribed to his RSS feed, then you really should.

Ikea Masque

And yes, that is a Movember.

Savings & Loans - Internet Banking - Information

Internet Banking uses industry-standard encryption to help keep you safe online, while our Factor2 Personal Icons help protect you from unauthorised transfers from your account. The first time you transfer money to another financial institution or use BPAY, you will be asked to choose three secret icons that you’ll need to select every time you use these services.

(From Savings & Loans - Internet Banking - Information)

Okay, so let me get this straight. You have introduced a second set of paswords, right?

Each time you use BPAY or transfer funds to another financial institution, you will be prompted with nine icons, including your three chosen icons, in a random order. You will need to select your secret icons in the correct order before you can BPAY or transfer funds.

Okay, I have some issues with this.
Firstly, if someone already has access to my login details, they have breached security. They can look at personal details about me, including the address my credit union has on file. But not my date of birth. Which they might be able to get by google.
Okay, you are trying to do something nice and stop someone stealing all of my money if they happen to get my PCLink access details. And you give me a system where I need to click on three icons.
Surely shoulder-surfing is easier to do if you just have to see the three icons someone clicks on, rather than try to see what keys they have pressed on the keyboard.

If you forget your Factor2 Personal Icons, you will need to call our Member Contact Centre on 13 11 82 to have them reset.

Okay, so someone could get my login, pretend to forget my icons, and ring and get them reset. So the system can fairly easily be bypassed. But then I wouldn’t be able to get in myself. Granted, it is a level of security that didn’t exist before, but I don’t really see that it is any more secure. If they have gotten in, it stops them transferring all of my money out.
Until they ring, read off my address, google my date of birth, and then they can steal all of my money. Now, it happens I have been pretty good at keeping my date of birth private. I even use a faked D.O.B. for lots of online sites. Which I have to remember when I have used that fake.
It’s just lucky I don’t have much money in there…

Review: miglia TVmini2/equinox The Tube

I lashed out yesterday, and bought something that I’ve been wanting for a while.

A USB TV Tuner stick.

I went for the miglia TVmini2, as it was (I thought) fairly inexpensive. I’m not sure I made the right decision right now.

For starters, it doesn’t actually come with the software. Sure, it’s got a CD with some demo software of other stuff, but the actual software (which is actually written by another company, called equinox), The Tube, needs to be downloaded from the internet before installation.

Which wouldn’t be too bad, but it’s a 104Mb download. Which meant I couldn’t (a) start playing with it as soon as I bought it, since I was in town, and not near a free wireless point, and (b) start playing with it as soon as I got home, since it took about 30 minutes to grab.

It gets worse, though. Even though the software really requires a dongle (the USB tuner is really just a dongle, after all), the manufacturers insist that you register the software, using the included key string. And it only works on one machine without de-registration, apparently. Which kind of sucks, because I’d like to have it moved between more than one machine.

The hardware itself seems okay. I haven’t been able to make it work with any other software yet. I’ve tried a couple of downloads, but they wouldn’t recognise it.

System Profiler reports the device as looking like:

TVMini2:

Version: 1.00

Bus Power (mA): 500

Speed: Up to 480 Mb/sec

Manufacturer: Miglia

Product ID: 0x0069

Serial Number: 0000000001

Vendor ID: 0x18f3

The software, on the other hand, seems to have some good features, but quite a few flaws.

The manufacturers have decided to make the application scriptable. This is a very good thing, as it will allow me to, for instance, set up Salling Clicker to be able to control it. Which will be very good. I’d also be able to make a rudimentary controller for network or local remote control. Which I may do: more on that later.

Another good feature is the simplicity of the software. The basic window is shown below.

You basically have a video section, with a controller on the right. This appears to be fixed. Although you can hide the main video area, they resize together. Which is a bad thing, if you like to resize the video to a small size while you write a review of something, for instance. Like I’d like to do now. It means that the controller becomes fairly unusable fairly quickly:

This is as small as the remote area gets. Any further resizing just shrinks the video display in that window. You can hide the Details area (this is shown above), but you can’t hide the record area.

You can hide the remote, too. This makes shrinking the video a bit more usable:

I anticipate being able to build another controller that floats, and can be used in conjunction with the view shown above. More below on some issues that might appear with this, when I discuss the AppleScript interface in a bit of detail.

The controller itself is mostly okay. The main/default view has a list of channels. This is customisable. You can scan for channels, and then delete the ones you don’t watch, and rename the ones you do. Scanning takes a long time, and is probably worth re-doing every now and then, just in case a new station has been added.

The bottom area of the controller is the recording pane. You can pause live TV, record the current stream, and if you have been watching a channel for a little while, skip back through the already viewed stuff. I did a quick test where I watched for a while, then went back to try to record a section from the past. The program developed a spinning beach ball, and I had to Force Quit. I’ll continue to test it again later, as this is a nice feature.

There’s also a button link to their other software, MediaCentral, which totes itself as a total replacement for FrontRow. And, I’ve had a bit of a look at it. It looks pretty good, actually. May be worth investing in, and using this on the Mac Mini when I finally get it, and set it up as my Media Centre. (Typing Central reminds me to just let all of the yanks out there know the correct way to spell centre. Yank is a slang term Australians use to refer to Americans).

If you record live TV, it stores it in the recordings pane.

You can then export from here, in order to be able to view on another device, or in another program. It exports raw DV fairly quickly (almost real time, I think, perhaps even faster), but as expected exporting to m4v takes a bit longer. It appears that these are the only formats it will export: iPod, iPhone and AppleTV are all m4v, and iMovie is DV. I’m still going to record some stuff and see what the quality is like. Gotta wait for some decent content first.

Which brings me nicely to the next topic. Electronic Program Guide and Scheduled Recording. The interface is, again, fairly simple. All programs appear in the one list, there doesn’t appear to be a method of filtering so sort by channels. You can search or filter by title and description. To schedule a recording, simply click the black dot next to the program time.

Clicking on a title will show the details about that program. This is obtained from the digital TV data stream, although it is possible to add in an external TV guide, using the open XMLTV standard. Unfortunately, there doesn’t seem to be a way to subscribe to an XML feed. EPG via RSS, that would be awesome.

If you click on the “Show Recordings” button, it will filter to only display the programs you have scheduled to record. You can then de-select them by re-clicking the red dot. Fairly easy to understand. It also seems to have some smarts about overlapping programs, and will display a different coloured dot when they clash.

Okay, feature list is pretty much done. What doesn’t it do, or what does it do badly?

AppleScript support.

You can do quite a few things with AppleScript, such as pause, play, start recording and so on. It appears that you cannot get decent data from the EPG, for instance. So I can’t build a fully replacement EPG in another application, unless I access the data directly from the file. This file is stored as an SQLite database. So I should be able to grep data out of this using the relevant tools. This seems to be an oversight, since you can schedule recordings, and access the EPG data, but I can’t figure out how to get meaningful data from the EPG. This would be a necessity for a proper Salling Clicker interface, that allowed me to just run the program in full-screen mode and only use the phone for the remote, doing all of the programming with that instead.

You can also export from AppleScript. Not sure if you can choose to export DV, which I would probably want to do. So I can post-process the data and remove advertisements, for instance. But I cannot find a way to choose a channel by channel name. Which would be useful for a remote program, either on phone or computer.

Possibly the biggest annoyance: in every instance I have seen, this application is called The Tube. But to access it in AppleScript, you need to use TheTube. Why do this? You can have spaces in application names in AppleScript and it works fine.

Data file formats.

The channel data is stored as an XML/plist file. Which is a good thing. You can hand-tweak this file, which is much faster than, and less error-prone than deleting them inside the software. Especially since right-clicking to delete doesn’t actually select the channel, so the previously selected channel gets deleted instead.

Scheduled programs are also plist files. You could create these files with another piece of software, and just rely on The Tube to record them. I haven’t tried creating a file and seeing if it automatically records, or whether you need to start/re-start The Tube to get it to notice. Still on the TODO list.

The video data is stored in a package. There are a couple of TIFFs, for preview purposes, but these aren’t always the correct aspect ration. In fact, since most of my Digital TV seems to be broadcast in 16:9, with black bars on the sides, this is always the wrong aspect ratio as these TIFFs are all 4:3.

Bonus points if you can name the song and artist this preview is from!

Inside the package is a plist file with data about the recording. But the actual data is stored in two files, Media.tvi and Media.tvm. I’m still trying to find out what file format these are - VLC doesn’t seem to recognise them, although I suspect they are a standard file format, just hidden. I’d like to be able to get this data without necessarily having to use The Tube. According to one website, this data is just the raw MPEG stream. Changing the file extension to .mpg or .mpeg doesn’t allow for playback Might need more research.

num lock on MBP keyboard.

I obviously don’t use my MacBook Pro for much data entry. At least, not numerical data entry.

Like almost every laptop, MBP is lacking a dedicated numeric keypad. However, you can turn on the numeric keypad by using fn-F6.

What’s interesting is that there is actually a light under there to indicate when it is on:

When it is on, the remainder of the keys no longer operate - even those not associated with the numeric keypad. The only one I can find that doesn’t have a small ‘num-lock’ extra symbol on the key but still operates is the F6 key, which turns num lock back off.

NSTableView hassles

Well, I’m learning stacks about Cocoa/Objective C. Quite a bit of what I’m doing is trial and error, and I still haven’t got the hang of retain/release. But I do have a couple of working programs.

The first one is an RPN calculator. Typing in or pressing buttons enters numbers, and the right arrow pushes them onto the stack. The exchange button swaps the top two items in the stack, the roll button moves the top item to the bottom.

When you press one of the operator keys, then it operates on the current data and the top item in the stack, or the top two items if there is nothing in the current data.

And this is all working very well. The calculator functions work as expected, and as described. However, the stack display in the NSTableView does not work. For some reason, whilst the data is stored, it isn’t being displayed.

A little more detail about that. The data is being put into the table, and I can select the X number of items that are in the stack. But they do not display. It is like the data is there, but just not being painted! And it is annoying the hell out of me!

I’ve done a heap of testing, and I can kind of describe what is not happening. There are two functions that need to be implemented by a dataSource, both of which I have implemented.

1    - (int)numberOfRowsInTableView:(NSTableView *)aTable;
2    - (id)tableView:(NSTableView *)aTable 
3                 objectValueForColumn:(NSTableColumn *)aCol 
4                 row:(int)aRow;

These are the interface definitions. The implementations are simple - they just use the data stored in an NSMutableArray, and return the size of the array, and the (nth) item in the array.

But the problem is the second one does not appear to be actually being executed. The first one is, each time I call [stackView reloadData]. And I have no idea why the second one, which actually puts the data into the table, isn’t.

I’m giving up, for now. At least I have (mostly) implemented my 9-letter puzzle solver:

Although, it would be kind of nice to be able to use an NSTableView here, too. Although I might finish the implementation using an NSTextView, and style the 9-letter words differently. Just to totally make it the same as the wxPython version I wrote.

Nokia E65 Issues

There are just a few things I don’t like so much about the Nokia E65.

Firstly, and foremostly, there is a noticeable delay when doing particular actions. For instance, pressing the Address Book key and then typing a name in means you invariably miss the first couple of letters. And it only sorts by the start of the name, not text within the name.

Secondly, and at times more annoyingly, if I happen to close the slide at the same time as another action happens, like someone hanging up on the other end of the phone, it turns off.

That’s right, the phone goes dead. I then need to wait (minutes, it feels like) for the phone to finish starting up again.

The camera is badly placed, too. Not that I want to do video calls, but I can’t see the caller and them see me at the same time. because there is only one camera, and it is on the back.

Another annoyance is that address book entries don’t have a default number by default. And it takes ages to go through (delays each time) to setup the defaults. And these don’t sync properly with Apple’s Address Book, so if you reset your phone (for instance, to see if you can fix the shutdown bug), you lose all of the defaults you have carefully set up.

There is no autolock. It prompts you to lock when you close the slide. You can install software to automatically lock after a period of time, but if you close the slide at the same time as when the autolock kicks in, the phone turns off.

Bluetooth appears a bit dodgy at times. Sometimes it no longer connects to my computer, and I need to restart my phone. I think it is more to do with the phone than the computer, but I’m not sure.

Battery life is crap. I didn’t want to have to charge my phone every night, but if I use WiFi, then I do. If I just use Bluetooth, which I need to have for synching, then it’s every second day.

Salling Clicker is awesome. I have an addon script that synchs my phone every day, and it displays incoming and outgoing caller information via Growl. It also fades my system volume, and pauses iTunes when I am on the phone. This is the sort of thing that computers should do. All of the time.

Scheme/UC Berkeley

While I’m in the “learning a new language” mode, I thought I may as well start listening to the podcasts I’d downloaded from UC Berkeley, from the well-regarded CS61A course, and the associated textbook The Structure and Interpretation of Computer Programs.

The textbook is also freely available, including in a handy PDF version, and I’m working through that too.

The language used is Scheme, which is a Lisp derivative. It actually looks a bit like Objective-C in the way functions are called. Thus you see stuff a bit like:

(+ 5 6)

(solve 4 65 3)

That is, a prefix notation is used. The function (and operators, such as +-/* are also functions) comes first, followed by the argument(s). Compare this to Objective C:

[celsiusTextField setTextColor: [NSColor blueColor]];

In Objective C, the object comes first, then the method, then the argument(s). A different structure appears where there are multiple arguments:

[object methodName: argument1 secondArgName: argument2]];

I’m still struggling to think back to my C days, but there are lots of things about every language I’ve used since python that I don’t like. Memory management, pointers, static typing, there just doesn’t seem to be any reason to have to worry about this shit.

Probably the biggest thing for me is that it is exciting me about study next year. Even if it will be learning Java, and putting up with rubbish all over again…

Licorne

Back in 1970, the French Government tested a heap of Nuclear weapons on atolls in the pacific. This photograph is allegedly one test on the island of Licorne.

This photograph looks so much like a painting it is amazing.

(From Licorne (Monoscope))