Friday 30 January 2015

Software and reproducibility

In my career I've seen two cases where errors in the processor hardware or support environment caused problems in reproducing results - one was a GFLOAT bug in Vax microcode, the other was Intel's infamous Pentium floating point bug.

So if someone asked me how likely a problem reproducing a set of results was due to a firmware or hardware problem, I'd say pretty unlikely.

Unfortunately I can't say the same about software. Libraries change, compilers have interesting features, and increasingly these days code is dependent on third party libraries and extensions, all of which conspire to make reproducing results a nightmare.

Through in powerful environments like R and python iBooks and one has a verification problem. It's also unrealistic to expect a researcher to document all the libraries and dependencies involved - it's not their core competence.

Just like one expects Word or Open Office to open the previously saved draft of a research paper one expects that R will open a previous notebook and run the job.

However, if a few years have elapsed and the dependencies and performance of a particular library have changed, or one's running ostensibly the same version in a different computing environment there's a risk that things might not work the same.

The risk is small, and for computationally light research, say botanical work on plant morphology, can be ignored. However the problem is rather more significant in the case on computationally heavy research such as genetics, or in rerunning complex models, such as are found in climate research.

In the case of less intensive work, the sort of work that can be run on a laptop, creating, saving and documenting a VirtualBox image might be a solution - we're assuming that VirtualBox images are future proofed, but at least we can guarantee that state of the machine, in terms of libraries and so on is identical to that run by the original researcher, and whats more saves anyone trying to reproduce the research the travail of building an identical environment.

This of course does not scale in the case of computationally intensive work. Cloud computing and Docker are perhaps our saviours here. Most 'big' computing jobs are run in the cloud these days, or at least in a cloud like environment. Likewise, Docker, which was designed to simplify application portability can be our friend by allowing us to save the stat of our computing environment - an idea recently put forward in an arxiv.org paper by Carl Boettiger.

This actually is quite a neat idea. As the Docker container is digital object we can archive it and manage it in the same way as we manage other digital objects using some form of data repository solution with all the capabilities such solutions have to guard against bitrot.

It also as a solution allows the archiving of valuable interactive resources such as websites particularly those driven out of a database such as a lot of language resources.

I like the idea of containerization as an archiving tool - it neatly sidesteps a lot of the problems associated with archiving software and interactive environments ...

Tuesday 27 January 2015

It's never actually over you know ...

A long time ago, early to mid nineties to be precise, I used to provide a file transfer service at the university I worked at.

5.25" floppies to 3.5", Mac system 7 to PC, Wordstar to Word, NotaBene to WordPertct, in fact just about anything to WordPerfect as we had a WordPerfect 5.1 service running on Vaxes as a student wordprocessing service. WordPerfect had this nice feature that the Vax file format was directly compatible with the PC file format. Macs were slightly more problematical and used their own format, but the Macs came bundled with a file export option to write files as PC format files.

However, this was before PC's were cheap and affordable. People used to turn up with weird machines and files in odd formats. Special dedicated word processors, little KayPro CP/M laptops and the rest. There was a hunger out there for cheap reliable worprocessing

King of the weird  was the Amstrad PCW. Wildly popular with graduate students due to its low cost, it used a non standard 3" disk format and came bundled with Locoscript, which was compatible with just about nothing.

To get the data off the machine we had a serial interface and used kermit to upload it to one of the vax machines and then convert it into a text file for the user to convert and restructure. Later on the uploads were to a Unix host but the data cleaning was still not much better than stripping off the top bit and filtering out control characters. Good enough for basic text but played hell with someone who'd discovered they could embed Byzantine Greek text in their document.

Due to the fact that the fastest we could reliably drive the serial interface was 9600 baud, files took forever to upload and were truly painful to do.

By about 1995 (I can't remember, but if I'm out it's only by a year) the PCW phenomenon had died and we stopped offering file upload/conversions.

And that was the last time I saw a 3" disk.

Until today - apparently our archives division have found some in a box of uncatalogued material ...

Sunday 11 January 2015

Focuswriter on the Eee

A couple of days ago I wrote about FocusWriter, a distraction free writing tool for a range of platforms. At the time I hadn't used it in  anger, but true to my word I installed it on my revived EEEpc 701 SD.

Installation was trivial - a minute or two at most, and in use the application was efficient and responsive, giving just the write amount of control to write fluently. I was sufficiently enthused to use it to knock out the first draft of a book review, some thing I'd normally do using AbiWord or ReText.

The writing experience was pretty good, and pretty fluid - I'm actually quietly impressed by FocusWriter and will certainly be using it alongside of my trinity of preferred Markdown writing tools 

Friday 9 January 2015

Phones ...

Despite being an utter geek as regards computer hardware I’ve never really done phones. As long as you can call people, and read and send email I’m happy. Twitter and skype are nice, but not essential.

In fact I’m a complete luddite - in pre smartphone days I kept the same basic tri-band Nokia for six years, and was reasonably pleased with my Nokia E63 with its QWERTY keypad - if it wasn’t for the fact it didn’t work properly in the US, and that my service provider of the time never provided a decent roaming service, I might have it yet.

I’ve also never liked Apple phones, not only are they shiny things par excellence you’re buying into an upgrade cycle whereby you have to replace your phone every couple of years to get the best out of the latest OS etc.

So three years ago, I ditched the Nokia and bought myself a Samsung Galaxy SII. And I’ve got to say it’s been a nice experience. Things have more or less worked, and being unlocked I’ve swapped the SIM overseas for a local one with no problem.

But recently it’s started running out of space. Application bloat and too many pictures I guess. So the pictures went - they were all backed up on Dropbox anyway - and some of the apps installed on a whim and never used. And all was well - for a bit.

A few more updates, a bit more bloat, and here we were back again, running out of storage, an this time email stopped syncing reliably, which was a major pain.

Looked like it might be time for a new phone. Now, my contract has quite a good deal on data, so staying on my current contract made sense, especially as, with an overseas trip planned, having an unlocked phone was useful. So I checked my service provider’s website and basically I was looking at six hundred bucks for a new phone and to stay on my existing contract - jumping ship and going elsewhere was going to be at least a couple of hundred bucks more, which made even less sense, even if it did mean I could spread the cost out over a twelve or twenty four month period.

I also took a look at buying a grey market XiaoMi phone - they’re not officially on sale here but you can buy them from importers who get them from overseas distributors and they’ve had very good reviews, and they’re dual sim which is a definite advantage for travel.

However, I’d still have been looking at around four hundred bucks, which is probably a fair enough price given cost of phones locally, but more than I wanted to spend, and at the same time I didn’t want to drop down to one of the no name $100 android phones you can find on ebay.

And then I had a revelation - my phone has an SD card slot. Check the phone specs on wikipedia and I found it would take a 32GB micro SD Card - and you can get these on ebay for under $20. Move some of the less used apps and pictures to the SD Card, and hey presto - email started syncing and the ‘you are running out of storage’ message disappeared.

Now this isn’t a permanent fix. Like upgrading the memory in an old computer it just gets you a bit more time. Time to wait and see if my (or another) provider comes up with a good offer, time to research some of the grey market and cheap phone options. I probably havn’t bought myself more than another twelve months, but on the other hand twelve months for twenty bucks is not a bad deal …

Written with StackEdit.

Focuswriter

Last year I posted about distraction free markdown editors and more recently about converting my old eepc netbook into a distraction free writing machine.

I’ve actually never quite bought the distraction-free meme. The idea is that you have an application that allows you to create and save text with the minimum of formatting, allowing you to focus on the text. Optionally it starts up full screen so that you’re not distracted by new email, tweets, or whatever.
Being sufficiently old to have written research papers and documentation on a typewriter, I can tell you that one could find plenty of sources of distraction if one worked at it. Switching to WordStar on a clunky CP/M machine with it’s monochrome character interface was not much better in the distraction minimisation stakes.

Also, any decent text editor, such as Kate, TextWrangler or Geany will let you create a text document with a reasonable degree of fluidity.

Now my life revolves around notes. It’s how I keep track of things. Lists are crucial to remembering what I need to keep track of. A large part of my life is in Evernote.

These notes however quite often require a degree of structuring that’s a little more than the capabilities of the inbuilt editor in evernote - code fragments for example, so I have evolved the habit of writing things in markdown (Texts.io on windows and the mac, Retext on linux, and Markdown on Android) saving them to Dropbox, and later tidying them (proof reading, sanity checking etc) and then saving them as a pdf document inside of Evernote.

None of the tools I use are perfect, and I’m always on the lookout for an alternative - one of my gripes being the way the tools interact, and while they all produce syntactically correct markdown, they’re all sightly different which makes editing a Texts.io document with either Retext or Markdrop a little more annoying than it should be.

Courtesy of a post on MyLinuxRig.com I came across FocusWriter.

Focuswriter takes a slightly different approach to my preferred Markdown editors - basically it opens with a blank screen on to which you type text. By default it creates an odt file, and you can add some minimal formatting, bold, italic and so on. It doesn't support Markdown, but that's not an issue for my use case.

It doesn’t do dot points which is a minor irritation. However you can simply just type text into the application as you can do with Kate or TextWrangler. The use of odt as a file format means that you can fix up the text later with libre/open office, or even AbiWord.

The real use I can see for it is in meetings and presos for writing one or two line notes with zero formatting where one ends up with a set of disjointed paragraphs that can be cleaned up on the train or while waiting for a flight. As yet, I’ve not used it in anger, but it looks sufficiently useful to be worth giving some diskspace on the eee …
Written with StackEdit.

Tuesday 6 January 2015

A standalone podcast player (not)

Sometimes, at home. I like to listen to the radio, classical music and intelligent talk radio mainly. I also like to have my hands free and not be tethered by a set of earbuds, which is why I have an internet radio.

It isn’t perfect, sometimes failing to connect, but you can usually find something - KBSU in Boise used to be a favourite for jazz, and I’m quite fond of Vermont public radio’s classical music service.
Now for music, the fact I’m UTC+10 doesn’t matter that much, in fact it’s a positive as it means I can listen to early morning programming, and if I’m listening to BBC Radio 3, get the early morning news as well.

Talk radio is a different problem. There are a few shows out there on NPR and the BBC I like to listen to, not to mention that the ABC has this really good space science and astronomy show that’s internet only.

The BBC and the NPR shows are broadcast at times that don’t work. Too late, too early and the rest. Even if they’re syndicated to the ABC you can guarantee they’re broadcast at some weird time like half past two on a Sunday afternoon.

Fortunately most of the shows I like to listen to are available as podcasts, so I thought it would be quite simple to build a podcast player that could sit on a bookshelf and play content on demand.
My initial thought was a Raspberry Pi (cheap, low power consumption etc) plus one of these basic $12 external powered speakers, and use gpodder as a podcast manager.

I wouldn’t need a monitor or keyboard, except to do the initial configuration, as gpodder has a command line interface meaning that I could always ssh into the box to play a podcast. Cost would be around $85 for the bits excluding the speaker. (Basically a ‘B’, a case, power supply, and wifi adapter, plus of course an SD card with raspian on it, and enough space to install gpodder and hold a dozen audio files.)

Having to ssh in to play something was kind of cool, but also a pain. Strange to imagine but sometimes I want to do stuff that doesn’t need a computer.

And then I realised that there’s now an android version of gpodder. Officeworks will sell you a noname tablet for $69, all you need do is install gpodder and plug in the external speaker, and you get a touch interface.

Yes it’s less cool than a Pi and firing up connectbot to play a podcast, but it’s more versatile and comes with a sensible interface.

In the event, I didn’t go and buy another tablet. I took J’s old Lenovo Ideapad (which came with this nifty stand that allows you to stand it on a desk or a bookshelf) and used that after resetting and reconfiguring it - basically returning it to factory defaults.

Being an Android tablet it also means we can run the ABC’s dedicated radio streaming app (and RTE’s - the BBC is geoblocked) which get’s round the problems of (a) Radio National not being on FM in Canberra and (b) NewsRadio being replaced by a live relay of Parliament on sitting days.
I feel kind of sad about this, I’d kind of liked to be able to use a Raspberry Pi, but the Android solution is infinitely more usable and hence more useful …

[and before anyone mentions Bluetooth, yes you're right, I could have used a basic Bluetooth speaker instead of a USB device - I just happened to have a USB speaker that can also play mp3's off of an SD card lying around]
Written with StackEdit.