Tuesday, 14th February 2006A load of ballsWow! - Wish I could do that!
Sunday, 12th February 2006Tidying loose endsI still spent most of today programming, despite it being a Sunday and thinking I might take it easy today when I first got up at 6am this morning. However, it's been relatively productive as I've tidied up loads of little buglets and miscellaneous bits. I updated WordCalc to cater for preset 'Icon Flag' settings, which saves keep having to look up flag bits in the PRM. Version 1.05 all seems to be working quite nicely so I think I can leave it alone for a little while. I also updated my very old !Snoop application - no real bug fixes, but a few minor cosmetic changes and tweaks for internal efficiency.
However, I realised that ROTunes has a bit of a major problem which I'll have to devote some thought to, to prevent a major headache. Once you've started playing tracks and it's compiled it's internal 'tunedata' file which contains things like genre flags, user rating, number of times and date of last playing, it stores it as a flat-form database which gets loaded next time you load ROTunes. It's fairly efficient but of course, if you add some more MP3s to your collection and then rescan the library, everything gets out of sync, because tracks get inserted in the library, but not in the tunedata file. I need to think of an efficient way of inserting data into the tunedata file, but of course that has no concept of which track corresponds to which data block - other than the bit position in the file - subject to change! Whilst I ponder on the best way of solving this problem, I've temporarily disabled the 'Rescan library' function in v0.10 - unless of course I can solve the problem before I release v0.10, which was going to be today - but I might ponder for a bit longer.....
Saturday, 11th February 2006Programming MarathonPhew! Well, it's been quite a manic week on the programming front, with no less than five new releases.
It all started with a complex new development of ROTunes (mentioned previously) which then led to the creation, development and writing of a new installer application for it. Someone then pointed out a bug in ROTunes that I'd completely overlooked, which was that if you pause the music and then quit ROTunes, it left the MP3 file it was previously playing 'open'. To fix this bug I downloaded some of the available 'close files' utilities available for RISC OS. Unfortunately, all of them gave far too much information, when all I wanted was a quick summary of any files I may have left open myself - not loads of system files, which are likely to be open anyway! Hence the inspiration for !CloseFiles, which is my own utility for closing open files. In addition to having a clean and simple interface it also has various filters so that you can tell it to ignore font and system device files - leading to a nice uncluttered display.
The first release of !CloseFiles was made a few hours after I originally had the idea to write it in the first place. Of course, it was soon pointed out to me that some of the text was being truncated because I'd created the icons a bit on the small side. Doh! I thought. Of course, not everyone uses a 1600x1200 screen mode with a desktop font size of 7pt. I immediately set about expanding all the icons slightly so that they should be viewable using 12pt Homerton text (the default desktop size). This in turn led to be giving myself a severe headache trying to calculate the required width of variable text in a variable anti-aliased font size. Font_ScanString didn't seem to want to play ball - despite me using it extensively in ROTunes to calculate column widths for the main display. Anyone who's perused the PRM (vol.3, page 483) will see that this system call is not really for the faint-hearted, requiring the passing of data in seven registers as well as the setting of some 10 bits of one of them. All manner of combinations are possible, so what was needed was a decent 'Programmers Calculator' which would easily allow me to calculate bit patterns and binary/hexadecimal conversions without pulling too much hair out (what's left of it).
Cue, the inspiration to write !WordCalc..... Some four hours later and I make the first release, all working quite nicely and even doing a few more functions than I'd originally intended.
Now on a roll, I thought I'd better get around to updating a couple of other applications so I've also released new versions of my file checksum calculating utility !CRC and my Lottery analyser and guesser application.
And it's not even midnight yet! Yay!!
Sunday, 5th February 2006Universal InstallerDon't you just love it when you end up making work for yourself, right when you think you're overworked enough as it is? Well, such a scenario just happened to me whilst getting ROTunes v0.08 ready for release. It suddenly occurred to me that I've made so many changes and improvements to the code, it's probably easier for anyone upgrading just to delete their existing copy and install the new version afresh! Of course, that's 'just not cricket', apart from being against the whole RISC OS philosophy of being flexible enough to cater for all levels of user as well as being considerate to the end-users preferences and time.
Therefore, there was no solution other than to write an installer application for the new ROTunes update. This would ensure that new users would end up with a nice new install but also allow existing users to upgrade without having to reset or lose all their choices and preferences etc.
This brought me to thinking that I've actually been striving to come up with a nice and simple way of supplying upgrades to my software for a couple of years now. I've half-written (or bodged) installers in the past, even attempting to write a kind of multi-purpose installer, but everytime I end up with something that's only really suitable for the task in hand and not ideal for re-using the next time I release another upgrade to something!
So..... this morning I decided that I was going to crack it once and for all, and write a completely generic, easy-to-use, universal installer application for any software I may decide to upgrade in the future. As Apple always seems to have well thought out installers and user interfaces, I thought I'd write something along similar lines - but of course make it smaller, leaner and better! Thus, the completion of Paul's Universal Application Installer about 30 minutes ago (not bad going if I do say so myself - a new application from concept, design, planning and coding right through to finished, debugged release-ready version in under a day!)
I just need to finish bug testing ROTunes v0.08 and I can unleash both update and installer on the world!
Saturday, 4th February 2006ID3 tags and ROTunes revisited
I've spent the last couple of days trying to get my head around various ID3 tag madness. It started out as a relatively harmless exercise in adding better ID3 support to ROTunes mainly so that I could implement 'Genre management'. However, it soon became apparent that there are several different varieties of ID3 tags. AMPlayer (which ROTunes uses as the underlying player module) only seems happy with ID3v1 tags, although it does seem to cope with some ID3v2 headers. However, what caused the main headache was that 95% of my MP3 files were created using iTunes on the Apple Mac, which seems to use a completely different variety altogether. After extensive searching for technical documents on Google, I managed to find several sites which describe the inner header formats for the various ID3 versions, together with a definitive list of genre labels. It transpires that iTunes uses its own variation of ID3v2 tags, with a few custom headers added, so I decided to write my own ID3v2 interpreter for ROTunes. Of course, an hour or so later when I had completed it, I then discover that some of my MP3s were created by an earlier version of iTunes and that Apple, in their infinite wisdom, have changed the internal format of MP3 files between major upgrades of iTunes - so back to the drawing board and to reverse engineering the differences between formats. Another hour or so later and ROTunes could automatically detect from a large number of subtle variations - but that wasn't the end of the story.... Ooooh no!
It now turns out that iTunes allows you to add your own genres to the main database of default ones. This of course meant that half my MP3s came up as 'Blues', which puzzled me at first - until I realised that 'Blues' is genre 0 and that ROTunes was returning a value of 0 for 'unknown' genres. More head scratching, resulting in an expandable database of user-genres - on top of an extra list of 'WinAmp' genres which themselves were additions to the standard list of 80 genres listed on the ID3 site.
Having done this and feeling rather pleased that ROTunes was now comprehensively understanding pretty much any MP3 I could throw at it, I then found that it was mis-reading the track length of certain files..... Grrrr! This turns out to be yet another variation of tags, or possibly even a corrupted header on a few tracks, as the tag lengths didn't seem to be internally consistent. Cue improved error handling routines, multiple cups of coffee, extensive head-scratching and general pondering and a couple of hours later (we're now well into the 'early hours') and ROTunes v0.08 is nearing completion and ready for 'extensive' bug testing.
Not content with leaving it alone for five minutes, I now shuffle off to re-write the documentation in HTML format.....
Thursday, 2nd February 2006Jehovah!
Oooh, he said Jehovah!! Stone him!! Anyone over a certain age will no doubt remember the furoar that erupted when Monty Python released their "Life of Brian" movie back in 1979, but I'm glad to see that the House of Lords have dismissed the governments flawed 'Incitement to Religious Hatred' bill - although it now looks like the Danish have somehow upset those wacky Islamist fundamentalists by publishing some 'cartoons' in a national newspaper. Of couse, having viewed the cartoons, I can't see what all the fuss is about. Most of them aren't even that funny - but like all stories such as this, there's no such thing as bad publicity, so even mediocre drawings are now one of the hot search items on the internet. There have been religious cartoons and jokes all through the ages and I think that any religion must be built on pretty shaky foundations if its fans can't take a few harmless jokes. It's just a sad pity that people can't laugh at each other instead of shoot each other. Laughter is a good release valve for built-up resentment and anger. If free speech is restricted, there'll always be a simmering resentment beneath the surface which could explode at any time. Perhaps it's time to load Life of Brian into the video, and leave the Satanic Verses lying on the coffee table?
By the way, the camel comes courtesy of First Amendment Art Blog Paul
Footnote
Colophon
Disclaimer
|
Search Paul's Blog
About Paul
Contact
Linking to Paul's Blog
Paul's Archives
Random Thought
Current
Recent comments
On Sep 7th, 2010 6:38pm, location voiture marrakech commented on Heightened Terror State (26th August 2006)
On Sep 7th, 2010 10:05am, ugg boots cheap commented on Scary Wheelie Bins.... (31st August 2006)
On Sep 7th, 2010 4:38am, coach pureses commented on Heightened Terror State (26th August 2006)
On Sep 6th, 2010 1:47pm, ugg boots cheap commented on Scary Wheelie Bins.... (31st August 2006)
On Sep 6th, 2010 1:47pm, ugg boots cheap commented on Scary Wheelie Bins.... (31st August 2006)
On Sep 6th, 2010 11:01am, tag heuer watches commented on What's happened to monitor technology? (20th January 2007)
On Sep 6th, 2010 8:32am, watches longines commented on Saddam's cat up for adoption? (5th January 2007)
On Sep 6th, 2010 8:21am, watches longines commented on Saddam's cat up for adoption? (5th January 2007)
On Sep 6th, 2010 7:19am, christmas gift basket ideas commented on May Day (1st May 2006)
On Sep 6th, 2010 2:17am, Ang commented on Scary Wheelie Bins.... (31st August 2006)
On Sep 5th, 2010 8:45am, chanel necklace commented on May Day (1st May 2006)
On Sep 5th, 2010 8:43am, wc davinci commented on May Day (1st May 2006)
Tagged Categories
Miscellaneous
The Agitator - Miscellaneous links and comments
Aftermath News - Stuff you probably won't see in the popular media
Eolake Stobblehouse - I just love this guy's outlook on life!
JonnyB's private secret diary - Brilliant humour!
Celebrity Gossip - A balance to intellectual stimulation?
David Chess - Seems a pretty cool dude! - my favourite online blog.
Pak Alert Press - We tell you what they don't!
Steve's Media Blog - Politics, media and showbiz
Technology
Bruce Schneier - Crypto and security expert. His Crypto-Gram newsletter is essential reading.
Digital Inspiration - Amit Agarwal's excellent technology blog
Freedom to Tinker - Freedom to hack devices you own
MBoffin - Something witty this way comes
TechDirt - The Insight Company for the Information Age
Slashdot - News for Nerds, stuff that matters
Politics
Anti PC - My sister site to this one, focussing on eliminating political correctness in the world.
BlairWatch - Chronicling the Demise of the New Labour Project
Benedict Brogan's blog - Political blog in The Daily Mail.
CEP news Blog - Campaign for an English Parliament
Iain Dale's Diary - Mutterings of a right of centre political commentator.
Guido Fawkes - Title tattle, gossip and rumours about Westminster's Mother of Parliaments.
Frank Fisher - Comment is Free blog in The Guardian.
Boris Johnson - Journalist, columnist and MP for Henley on Thames.
Lenin's Tomb - Various contributions on protects and struggle by revolutionary socialists.
Nanny Knows Best - Dedicated to exposing and resisting the nanny state corroding freedom in Britain.
Spy Blog - Watching Them, Watching Us.
UK Liberty - A blog on issues relating to liberty in the UK.
![]() RISC OS people
Andrew Flegg - Author of WimpWorks and proprietor of Jaffa Software
Justin Fletcher - RISC OS guru and occasional diary updater. :-)
The Blog of Kev - Kevin appears to have views broadly similar to my own.
Chris Williams - Editor of drobe.co.uk
![]() |
||||||||||||||
|
Powered by ElectricType 1.05 (28th Dec 2008)
|
Visitors: 349251
|