Programmer’s Log Programmers Writing Stuff – Garry Bodsworth

11Jun/100

When your Mac boots slow…

I am sure I have been emitting an EM field for the past week. My router, my iPhone and my MacBook have all been playing up.

My MacBook has been booting really slow (I'm talking 20 to 40 minutes) and the graphics and general operation have been going downhill. I thought I would take a Windows inspired fix after trying everything else I could think of (blaming the processor, hard drive, graphics chip), and reinstall the operating system.

This failed numerous times. Something as simple as an install? Great. Eventually getting the install log shows this type of message:

Unable to set as boot disk: the bless tool was unable to set the current boot disk

This is on a completely clean install of Snow Leopard. The installer was also unable to unmount which inturn means repair the disk.

Somehow I stumbled on this fix on the Apple Support Site. Apparently you have to reset your parameter random access memory (PRAM) and nonvolatile RAM (NVRAM). This involves the incantation Command-Option-P-R keys and restarting. Now the install took first time, this has been a public service announcement.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Twitter
Tagged as: , , No Comments
1Jun/100

Long-Lived Processes

One of the things about developing a digital signage system is that the software running the display has to run for a long period of time. From what I have heard some people set their digital signage players (from other companies) to reboot every night which is an odd state of affairs, whereas we just say plug it in and switch it on. That does not mean we are infallible and I am constantly hunting down strange behaviours in the long-lived process.

What I have really found from the reality of having real operating systems out there in the big wide world is that you will always encounter that which you cannot predict. There is however a way to mitigate the risk. You need to take a leaf out of the server world. Your main process should be as simple as possible doing the absolute minimum, then spawn processes to do the donkey work.

The advantage of this is that if anything does go wrong in the real hard work then when the process is closed or is aggressively killed the resources are returned back to the system. In Linux this is particularly good because it is really good at starting processes efficiently. I saw evidence of this when git was spawning lots of perl processes, which in Windows was a lot slower, meaning that git in Linux on a VM in Windows was much faster than on plain Windows.

Even Python has a built-in multiprocessing library (which was really put in place to get around the GIL issues) but it gives a great framework for managing processes and inter-process-communication. This is available from 2.6 up and I must get around to porting more stuff to it rather than rolling my own.

Another great feature of the Linux graphics stack is texture from pixmap so that you can have out-of-process rendering and composite it all together in OpenGL.

Really the lesson I learnt by forgetting to not put something into a separate process is that the unimaginable will happen, from bizarre corruptions, to parsers that should fail but are just too robust, which then means you have memory hanging around forever.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Twitter
30May/100

Twitter Weekly Updates for 2010-05-30

  • @mdales Does the FT iPad app enable the accessibility features or is it completely locked down? in reply to mdales #
  • Loving the HTML5 watch keeping an eye on cool examples of using the tech http://html5watch.tumblr.com/ #
  • Software East talk in Cambridge June 24th about iPhone development http://software-east.net/events/iphone-development #
  • Got up at 5am for the last ever Lost - completely worth it. #
  • Adobe Flash constantly finds new ways to suck - don't read the monitor display resolution when the browser tells you the size to render at! #
  • Separate GUI from logic. Something simple in concept yet it seems developing in Qt encourages bad behaviour. #
  • So running a large (>500Mb) installer with UAC enabled on Windows causes a huuuuuge delay. Nice. #
  • Got 1000 pages of Doctor Who comics to read. Should be good as it's the 8th Doctor stuff before the whiff of success. All for under £20. #
  • Ooooh yeah and by tomorrow 1000 page of classic Stan Lee and Jack Kirby Fantastic Four in full colour in Panini Pocket Books. #
  • They are bringing out a proper Transformers Unicron? http://bit.ly/b3IL80 http://bit.ly/dBrPHn How on earth do I smuggle this past my wife? #
  • Didn't realise http://plugable.com/ was running with the mantle of DisplayLink chips on Linux. #
  • @mdales Network issues is an understatement - EPIC NETWORK FAIL in reply to mdales #
  • Windows 7 is hatefully bad. I even had to spend time making it more Vista-like which in turn recurses to more XP like. #
  • And Dell, for shaaaame, on the number of craplets and trials I had to uninstall. #
  • You have got to be kidding me. Why the hell do I have to search the Internet to make a printer work with Windows 7? #
  • And as for scanners there hasn't been working drivers for many years... I wonder if sane and cups work on Windows? #
  • And for those of you just tuning in this is Garry's descent into Windows powered madness. #

Powered by Twitter Tools

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Twitter
Tagged as: No Comments
23May/100

Twitter Weekly Updates for 2010-05-23

Powered by Twitter Tools

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Twitter
Tagged as: No Comments
19May/100

Google’s New Font Service

At Camvine I spent a small amount of time recently making sure TypeKit works, so we can use funky fonts in our WebKit based browser.

Now Google have announced the Google Web Font API and the Google Web Font Directory. The API webpage is here.

You can view the available fonts here. Not a huge amount or anything but f it catches on it could explode very quickly.

What with Google pushing 3D web, video, geolocation, fonts, app store, online collaboration (opening up Wave to all), and god knows what else I think they are heading towards completely closing the loop functionality-wise. As far as I can tell you can actually make commercial use of some of these APIs now whereas you were completely unable to do so legally before.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Twitter
19May/100

Video Codecs That Don’t Make You Go Grey

Great news today, Google are open-sourcing and more importantly free patent licensing the VP8 codec. As part of this they are creating the WebM project with a new container format that uses the open-source Vorbis audio codec.

As someone who has to deal with video codecs every day and the horrors they induce (not just from a technical standpoint but legal) this is a very good thing. Unfortunately it does have some way to go to depose the incumbent codecs, and to reach parity with respect to hardware acceleration, but I am sure it will happen swifter than we can imagine. The main reasons for this is that Youtube will be using it which is a large portion of the web's video, and th enames that are all on board to support it in both software and hardware.

I can tell you as soon as gstreamer gets support CODA will be getting WebM.

There is also now a technical analysis from an x264 developer which can be read here.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Twitter
16May/100

iPad Accessibility

So I took the company iPad on a weekend holiday to my parent's house. My ulterior motive was to find out whether it really was accessible, and by that I mean for people with audio and visual impairment.

My mother is registered as deafblind (contrary to what spell checkers will tell you it is all one word), this does not mean she is completely devoid of sight but it she has an extremely limited field of vision (for the specifics it is Usher Type 2 Retinitis Pigmentosa). Currently she uses a standard Windows PC with minimal changes from the default settings. There is also a big monitor, which is actually more of a detriment to someone who cannot see all of the monitor at once.

The first plus for her was the form factor. Most people moan it's too small or it isn't widescreen, but this was an item that could be viewed as a whole even taking into account a limited field of vision.

Most people say touchscreens don't work because of the lack of tactile feedback which some have said is required for blind people. This depends on your definition of blind, a person completely devoid of sight is actually a rare occurrence, most people who are registered blind have some degree of sight left and know how to make the most of it. She was able to type with ease on the keyboard. The limitations of the keyboard however though were the inability to set the contrast settings for it independently of the rest of the system (white on black is normally the choice for people with visual impairment). Also it would have been good if important items were highlighted in some way like "Go" or "Search" because otherwise you end up searching on the keyboard.

One of the most important aspects of a touchscreen is that it is not necessary for the cursor to be large, and also with visual impairment time is spent trying to find the cursor on the screen which is difficult with a large surface area.

The quality of the screen and its contrast was extremely good for someone with visual impairments. Clarity of viewing and also the viewing angles are extremely important in that respect.

And I haven't even got to the specific accessibility features available on the iPad which frankly knocks any competing product for six. You have the ability to view white on black, but this does a complete inversion meaning it looks like you are looking at a negative, but it's better than nothing.

The text-to-speech features are excellent with the quality of playback being listenable rather than annoying. You can use this on the ebooks, websites, the user interface. It does mean navigation is slightly more complex but being patient helps because the speech also gives you hints as to the action to perform next.

You also have the ability to switch the sound to mono, which will have every techie screaming, but it is very important for any auditory problems because then you get the same sound into both ears.

The ability to zoom in on pages is taken for granted by most phone users nowadays but this is another invaluable feature, and the ability to configure text size in iBooks is also as valuable.

Also the screen size would be great if only iPlayer worked on it yet (I realise we have a pre-ash cloud import so the official UK release is a little while away) with subtitles. In fact the content delivery would be extremely important, and I hope that providers will supply subtitles for their offerings.

With all the accessibility features it got me thinking that when it gets even more integrated you are talking about turn-by-turn navigation and general independence help thanks to location based APIs. A map would be a nightmare for someone with a narrow field of vision.

The most important aspect of all of this is that it is so well thought out and intuitive to use. It all clearly integrates with the system and creates a simple to use environment. The quality of the engineered components is second to none matching the quality of the software that will no doubt improve with subsequent revisions. As a developer I dread lock-in but there are simply no alternatives that are within five years of being close to competing, it does revolutionise computing for a swathe of the population.

When I saw how much the iPad was going to be in the UK I thought it was too rich for my blood and I would put off buying one for myself. But now I see how much it will be liberating for people with sensory impairment when configured correctly I have to put my thinking cap on again.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Twitter
16May/100

Twitter Weekly Updates for 2010-05-16

  • Now I realise I haven't used an autocompleting code editor for years. Trying to use one now is annoying, no, I don't want a closing bracket! #
  • Tried out Gnome-Shell and didn't feel it was for me. I like the stripped down look of Unity http://bit.ly/bOfHJ3 though. #
  • I'm tired of all this lukewarm evil. Peter Mandelson for Prime Minister - the king of all evil! #pm4pm #
  • Stunning sci-fi artwork http://alexandreev.livejournal.com/ #
  • gstreamer-vaapi open-source video acceleration in Linux. Brilliant news http://bit.ly/cFrYOT works with VA-API, VDPAU and XvBA. #
  • Mmmmm.... Mifi unlocked http://www.zibri.org/2010/05/e5830-free-unlock-released.html #
  • Steam for Mac installed http://bit.ly/d2hixF - but I still have to work my way through the Humble Bundle first. #
  • And Steam for Linux should be very interesting with nVidia ION computers laying around... #
  • Mmmmm.... the WebKit in Steam seems oddly slow.... #
  • Now Steam's browser is giving me (unknown error) -324. Methinks not a standard HTTP error code. #
  • Now I find out Steam is using the Chromium Embedded Framework. http://bit.ly/bBp1gk no wonder scrolling is slow (not optimised for that yet) #
  • Just ordered issues 6-12 of There's No Time Like The Present http://www.pbrainey.com/ after reading the first five I got from #unicomics #

Powered by Twitter Tools

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Twitter
Tagged as: No Comments
12May/100

Gaming For Linux

After the great games for Linux made easily available in the Humble Games Bundle, games for Linux are definitely looking up.

The good news today is that there has been an announcement in amongst the Mac articles that soon there will be a Steam client for Linux. A more in-depth article on Phoronix here.

If this works well on the nVidia 9400M (the ION platform) then it would be really interesting to see what this does for ION nettops. In theory for about £150 you could have a fully functioning Linux computer with gaming prowess (although obviously most people would prefer consoles for this).

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Twitter
Tagged as: No Comments
10May/100

Good news for video acceleration on Linux

Video acceleration has got a whole lot better on Linux. Splitted Desktop have released gstreamer plugins with VA-API support. gstreamer-vaapi was announced on the gstreamer-devel list here.

There are VA-API backends (in the project libva) for Intel chips, VDPAU for nvidia (and allegedly S3) chips and XvBA for AMD chips (have they ever officially released it?) So this acceleration framework will work on tons of hardware out there. Except for the Intel open-source drivers you do need to use the binary closed source drivers (also for Intel Poulsbo).

The gstreamer-vaapi plugin supplies MPEG-2, MPEG-4, H.264, VC-1, WMV3 acceleration (providing your hardware supports it). Also output is on OpenGL rendering through VA/GLX or GLX texture-from-pixmap + FBO.

Being gstreamer it should be relatively swift for many applications to pick up the acceleration.

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Twitter