I have, essentially, two sets of skills and experience.
One is as a political campaigner and communicator. I did well out of that for a while and more than that, did some things I am proud of and feel really privileged to have had a chance to be part of.
But it’s fair to say that road seems to have hit a dead end. If you want to run a serious, progressive, campaign then I am certainly still interested, but I am not sure there is much of that out there today.
So then there are the other skills – ones that I am told are in high demand.
Namely as a software designer/writer/developer.
I can do this and I am much better these days than I used to be: unlike, say, running I am still getting faster and sharper. C/C++/Embedded/Perl/Linux/Groovy/DSLs/R/Deep Learning – I can tick all those boxes.
But where to begin? The reputation of IT recruitment agencies is pretty grim, though I have no direct experience. I have registered with one, but I am being sent invitations to be a senior C++ engineer in Berlin on a salary of €150,000 per annum which even I think is probably a bit over-ambitious for someone with no commercial experience.
I recently had to fill in a form for the Computer Science Department at the University of York.
Like, I am sure, any computer science department in any major world university, York is a “Unix shop”: research servers all run Linux and I guess the academics who aren’t using that are – as I am now – are running the modified/derived BSD that is Mac OS X.
But the form was “optimised” (i.e., only able to operate properly on) Microsoft Word – not a piece of software found on many ‘nix machines.
Because the rest of the University – like almost all of Britain’s public sector – was totally reliant on Microsoft’s proprietary offerings.
Thirty years ago I worked in a public sector organisation that used a mixture of proprietary software for “mission critical” work – Netware, Word Perfect and MS Dos. But even that mixture has gone: it’s Microsoft for everything (on the desktop) these days.
And now the price of that false economy – because so often this reliance on Microsoft has been justified because it keeps training costs low (“everybody knows how to use it”) – has been revealed by a massive global ransomware attack.
If free/open source software (FOSS) had been more-widely used then, of course, the risk would not have disappeared: not least because the crackers would have turned their attention to FOSS and left Windows behind: but there are two pretty obvious advantages to FOSS in terms of security:
You can see how it works – you wouldn’t walk across a bridge with no visible means of support, yet every time you use proprietary closed-source software you do just that: the fact it hasn’t fallen down yet seems like a poor justification.
Everybody can fix it: if Microsoft’s software breaks or is seen to have a vulnerability you are essentially reliant on them to fix it. And if you are using an unsupported piece of software you may not even have that. Again there are no guarantees of invulnerability with FOSS – software is hard – but there is a guarantee that you or anyone you ask/pay can attempt to fix your problem.
It’s time we ended this dependency on proprietary software and invested in a FOSS future.
According to YouGov (the UK’s largest polling company) that is what typical lovers of Linux are – though it’s based on just 272 individual profiles (out of 200,000 or so members of YouGov’s panel). Oh, and they are blokes. More at https://yougov.co.uk/profiler#/Linux/demographics
(YouGov made at least some of their profiling data available online this morning and it has kept British internet users amused all day.)
Windows lovers are, apparently, somewhat more numerous – there are 744 of them – but also typically younger, less well off and even more right wing. And are also men. Apple pie is their favourite dish and perhaps unsurprisingly they are not as keen on programming. Yes, it’s true: Windows lovers are lusers through and through. See https://yougov.co.uk/profiler#/Microsoft_Windows/demographics
Admirers of the Microsoft brand, though, tend to be older (still male) and rather more centrist – and numerous. Perhaps this is the Bill Gates effect? People admire his creation in the abstract but there is little concrete love. See https://yougov.co.uk/profiler#/Microsoft/demographics
But what of your favourite hipster computer brand – Apple? Turns out they are centrist, female and middle class and like grilled halloumi cheese. It’s harder to make a direct comparison though as (surprise, surprise) Apple users don’t seem to identify their operating system. See https://yougov.co.uk/profiler#/Apple/demographics
There is lots more to look at – for instance Android users are seemingly very left wing while computer scientists are middle aged men who eat a lot of chicken.
I have had a frustrating few days trying to get to grips with two new pieces of the technology: the OVP simulator and the Microblaze processor.
Finally I think the fog is beginning to clear. But that also reveals just what a task I have in front of me: namely to write some kernel code that will boot the Microblaze, establish a virtual memory system and then hand over control to user code, which will have to trap memory faults and pass control back to the privileged kernel.
It is not quite writing an operating system, even a simple one, but it is actually undertaking to write what would be at the core of an OS.
Of course, there are lots of places to borrow ideas from – not least the Linux kernel – but it’s a bit daunting, if also reasonably exciting.
Preciously little books about to help – I shelled out to buy this (having borrowed it from the York Uni library and found it to be an excellent general introduction to the area) – but it’s not a guide to OVP never mind to the Microblaze. If anyone does know of a book that does either I’d be very grateful (maybe it’s my age but electronic books are very much second best to me – you just cannot flick from page to page looking for that key element you read the other day and so on.)
(If you don’t get a copy of The Art of Unix Programming – there is an awful lot of rubbish in that book but it does do one thing well: explain the deep connection between text and Unix.)
In a practical sense this means to get the best from your Unix system (and this includes you if you are a Mac OSX user) you need to boost your command line skills. The first thing to do is, of course, become familiar with a text editor – either vi or emacs (I am a vi user, but refuse to engage in a religious war on this matter.)
Sed comes from the 1970s, but as so often in computing, it feels to me that its time has come again – in the era of big data a program that allows you to edit a file one line at a time – as opposed to trying to read as much of a file as possible into your computer’s memory – has come round again.
If you are sufficiently long in the tooth to have messed about with Microsoft’s edlin or any other line editor you might be forgiven for giving a hollow laugh at this point – but sed is a tool that genuinely repays the effort you have to make to learn it.
In the last few weeks I have been messing about with 220GB XML files and even the University of York’s big iron compute server cannot handle a buffered edit of a file that size – sed is the only realistic alternative (actually I thought about using my own hex editor – hexxed – which is also essentially a line editor, but a hex editor is really for messing about with binary files and I wouldn’t recommend it.
Sed has allowed me to fix errors deep inside very large files with just a few commands – eg:
LANG=C sed ‘51815253s@^.*$@<instruction address=\’004cf024\’ size=’03’ />@’ infile.xml >outfile.xml
Fixes line 51,815,253 in my file (the line identified by an XML fatal error). Earlier I had executed another line of sed to see what was wrong with that line:
LANG=C sed -n ‘51815253p’ infile.xml
(The LANG=C prefix is because the breakage involved an alien locale seemingly being injected into my file.)
Sed allows you to do much more – for instance anything you can identify through a pattern can be altered. Let’s say you have (text) documents with your old email address – email@example.com – and you want to change that to your new address – firstname.lastname@example.org …
sed ‘s/me@oldaddress\.com/me@newaddress\.com/g’ mytext.txt > newtext.txt
Then check newtext.txt for correctness before using mv to replace the original.
But there is much, much more you can do with it.
Plus you get real cred as a Unix hacker if you know it.
Now, too many programs these days – especially anything from Redmond – go out of their way to suppress text formats. Text, after all, is resistant to the “embrace and extend” methodology – text wants to be free. But there is plenty of it out there still.
Books that teach you about sed are not so plentiful – I have been reading an old edition of sed & awk – which seems to be out of print – though you can buy a second hand copy for less than a quid excluding postage costs. Well worth the investment, I’d say.
Last time we met, my PhD supervisor told me to expect to spend a long time making things that didn’t work: it
certainly feels like that right now.
My current task is to build a logical model of a working memory allocation scheme for a NoC.
I started with some Groovy, then realised that was going nowhere – how could I test these Groovy classes? I could write a DSL, but that felt like I’d be putting all the effort into the wrong thing.
My next thought was – write some new system calls for an experimental Linux kernel. Well, that has proved to be a pain – writing system calls is a bit of a faff (and nowhere does it seem to be fully documented – for a current kernel as opposed to a 2.2 one! – presumably because nobody should really be writing new Linux system calls anyway and so its knowledge best confined to the high priests of the cult) and testing it is proving to be even more difficult: it’s inside a VM or nothing.
Then I thought this afternoon – why bother with the kernel anyway – if I wrote a userland replacement for malloc that allocated from a fixed pool that should work just as well – so that is what I am about to try.
Regular readers will know of my contempt for Ubuntu Linux‘s standard “Unity” interface. Sadly I could find no simple way to transition to the Mint distro (which keeps Ubuntu’s simplicity but ditches the abomination that is Unity) and so thought I had no choice but to live with it.
But, bluntly, Unity was making the computer I am typing this on all but unusable – it was like a trip back 15 or more years in computing performance – thrashing, long delays, the whole “run Windows 3.1 on a 640KB box” experience. Unity had to go or the laptop (a vintage and a long way from the top of the range machine – but with 2GB RAM and two Athlon TK-57 processors not quite ready for the scrap yard) had to go.
In desperation this morning I installed Xfce (Xubuntu-desktop) – I wish I had done that years ago. The computer is usable again and I get to work with a clean and entirely functional desktop.
At the end of John Le Carre’s Smiley’s People George Smiley is congratulated for having triumphed in his life’s struggle with Karla, the eminence grise of the KGB and told “George, you won”, to which the British spymaster, perhaps shamed by his need to adopt his opponent’s tactics of threat to the innocent replies “Did I?”
It feels a bit like that this weekend when I look back what is surely Microsoft’s humbling in the face of Android’s triumph. (I don’t claim to be any sort of central figure in this – I just mean I know we have won, but I don’t know what we have won given the compromises required to secure victory).
Free software made the victory possible – but the freedom that counted was the ‘as in beer’ one: Linux proved to be a cheaper platform for the hardware manufacturers to use. I do not detect any greater public understanding of the ideas of the free software movement than a decade ago – even if so many of the old arguments against its use have been killed by the onrushing Android juggernaut.
Indeed, the fact that Apple, whose business model is even more fundamentally hostile to free software than that of Microsoft, are doing so well suggests that no sort of ideological battle has been won at all – for so many consumers it is “shiny thing make it all better” (and Apple do do a fine line in shinnies).
And the site of the great battles of the past – the desktop – has become something hardly worth fighting over. Windows 8 stinks – I replaced it on one of my daughter’s computers with Ubuntu recently – but I suspect what has made it such a turkey for Microsoft is not the tiny numbers who, like me, are getting rid of it, but the falling sales of desktops and laptops in the developed world’s markets.