Experimenting

While writing these words, a python script of my own invention is slowly delivering the motherload of all blog backups to write.as – the blogging platform I have been experimenting for the last few days. Rather than hide the programming under a rock and forget all about it, I’ve made it available as open source code.

I used to be somebody in the open source world – a very, very long time ago. I’ve told the story on the blog many times in the past, so I won’t repeat myself, but it seems odd sharing code after so long not doing so. I used to share everything – how to do things, notes about how to do things, even fully-blown solutions to difficult problems. And then I stopped sharing much at all.

I suppose, cutting a long and boring story short, I started to realise that some of the things I solved were hard-won – they had commercial value. While it’s nice to donate experience and knowledge to the community, when you provide professional services in the same field it becomes a bit problematic. Here’s the paradox though – unless you share something, nobody knows about your skill set, or abilities – so nobody wants to buy those services.

I used to have this circular conversation with the sales and marketing guys at work quite regularly. Back when open source software really started to gain some traction in the early 2000s, I advocated giving everything away, and selling services instead of products. I was ignored. If I had been making the calls I would probably have ignored me too – it takes a certain amount of bravery and recklessness to fly in the face of accepted wisdom. It’s worth noting that accepted wisdom struggles to explain why Linux has swept all before it over the last 25 years.

If you didn’t know, both OSX and iOS are cousins of Linux – they have the same ideological parents. Where Apple cloaked their work in secrecy, Linux remained open and free, and through a roundabout route, that explains why Apple don’t make server operating systems any more. Windows has always been similarly closed-source (although that story is slowly changing) – which also explains why the vast majority of the internet runs on Linux, and not Windows. Every super-computer of note in the world runs Linux. The Raspberry Pi runs Linux. Android phones run Linux. Chromebooks run Linux. Did I mention that Linux is free ?

For the past several years I’ve played around with Linux at home – installing it on the old desktop computer from time to time, and on the laptop. While hardware compatibility can be a bit challenging, by-and-large the experience is a LOT less painful than Windows. I wonder if – given the move towards applications running in “the cloud” – we might see Linux eventually push Windows and OSX away from consumer desktops. The progress Chromebooks have made in schools is perhaps they biggest indicator going (read: they are everywhere already).

Anyway. Enough rambling about techie stuff. Time to go read a book, and kick back for the remainder of the evening.

Switching Universes

After a number of questionable corporate decisions recently, I’ve decided to quietly untangle myself from Google. This has meant walking away from their mail, calendar, and photo storage, and finding alternatives. It has also meant visiting the various places I frequent online, and changing my email address.

I must be mad. Or brave. I’m not sure which.

Back to Work

The clock is ticking towards midnight, and you find me sitting in the dark of the junk room after watching the latest chapter in the Game of Thrones saga. I’m still fighting a chest infection, but that hasn’t stopped me putting in a couple more hours of overtime – continuing to quietly construct a software leviathan of sorts. A leviathan that few will ever see, but that may impact more than most would guess.

The new laptop arrived today – I replaced the hardware, tripled it’s RAM, and installed Windows 10 on it this evening. It’s ridiculously fast compared to anything else in the house. The only remaining improvement will be a replacement battery – to double it’s life away from a power source. A slip case might not be a bad idea too.

While I write this, my other half is toiling away in the lounge – sewing dresses for a dance show at the weekend. Neither of us has much of a life at the moment.

Anyway. Time to go brush my teeth then fall fast asleep before doing it all again tomorrow. And again the day after.

Before you say it, I know the “too much work makes Jon a dull boy” story only too well. I’ve installed Scrivener on the new laptop. I’m writing this post in it, as it happens – when work slows down a little in a month or so, I’ll start thinking about writing a few stories.

A New Laptop

Well… when i say “new”, I really mean “new to me”. For the last couple of years I have been carrying around a hand-me-down laptop that used to belong to one of our children. I ended up running Linux on it, because it’s not really capable of running anything more than that.

Well that’s all about to change. Earlier this week one of my co-workers arrived in the office with a new toy – a second hand laptop he had bought from E-Bay. I have to admit I was hugely impressed. He had essentially bought a laptop that had cost £1200 six years ago for about 8% of it’s original price.

I’ve now done the same. I did my homework, compared ten or so of the same machine that had appeared on E-Bay, and chose one from a professional referbishment factory. I guess you could call it a “recycled” laptop. I’ve already ordered more memory, and a new solid state hard drive for it – it’s going to be fast. I also checked the price of replacement batteries, and was pleasantly surprised. Sure, it’s not going to run all day like modern laptops, but it will last for a good few hours away from the power supply. That’s good enough.

I almost forgot – it’s got a touch screen, that flips around to turn the laptop into a tablet. Now there’s a party-piece I’m never going to use. Perhaps more importantly, it has a VGA socket – so I’ll be able to plug it into the projectors we inherited from the school.

Anyway.

I guess it’s time to dig out the Scrivener license key.

Unfathomable

After a self-imposed seclusion from the internet for the majority of today – while attempting to shield myself from any and all spoilers about Game of Thrones – it’s finally safe to re-appear. We just finished watching it. I’m not going to write anything about it though, because the internet seems to be awash with it.

Why does everybody need to publish their opinion about something at the same time that everybody else is publishing their opinion? Surely after the first few voices speak up it all just becomes noise? Sometimes the behaviour of people on the internet reminds me of a saying I once heard – “it’s better to be on the train, pissing out the window, than on the platform, trying to piss in”.

Anyway.

I’ve been busy building software again – working on the hidden under-pinnings of the giant project I’m working on in the evenings. I suppose in laymans terms you might say I’m building the insides of the engine of a car – which will be covered with several layers of other stuff before the user interface is plastered on top. I sometimes wonder how much people really understand about what goes on when you use a web browser.

This might be fun.

You know when you’re typing into a new blog post at WordPress? You’re actually interacting with a piece of client-side software written in JavaScript that’s running within the browser to “look” like a word processor. Of course browsers are not word processors – they don’t even have scalable typefaces – it’s all smoke and mirrors. Every keypress causes code to run that draws a curvy shape onto the screen – the characters of the font you so carefully chose for your blog design. Behind the scenes, the actual words are also being recorded as HTML – simultaneously rendered in front of your eyes with a blinking line to look like a cursor – so it looks like you’re typing the characters onto the screen. You’re not.

All of this happens inside the browser’s artificial brain – holding the whole thing in short term memory. In WordPress case, while you’re typing yet more code runs periodically to communicate with the server – sending messages back and forth – saving what you have done so far. It does this silently for the most part.

The browser packages up each message to the server as a stream of characters – which are then sent to the networking part of the operating system with a destination address, and a reminder to let it know when each message has been successfully received.

The networking part of the operating system is really rather clever (or at least, I think so). It splits messages up into small chunks – “packets”. Each packet is sealed in a series of envelopes – each describing the place they need to go – the outer-most one addressed to the network, the next to a given computer, the next to a specific piece of software running on that computer, and so on. It’s worth pointing out that I’m generalising A LOT. Some networking professional will no doubt point out that I’ve missed this or that – and I won’t argue – I missed it on purpose.

So what happens once the pile of envelopes leaves your computer? It arrives at whichever switch your house is connected to on the internet, and a game of hot potato starts – which the internet is really good at – with each point of the network throwing millions of packets in all directions at once – each point of the network looking at each packet, checking a database of destinations, and sending them on. If an address is unknown, or a packet is lost, the system is self-healing to a certain extent – the packets can reach their destination in any order, and are re-assembled at the final destination. The “received your message OK” only goes back if the destination server knows it has all the pieces that were originally sent.

Once the WordPress servers receive your message (for this example at least), they are interpreted by the operating system on the server, given to the appropriate software application that deals with whatever the content was (web traffic goes to the web server, for example), and then other services might be programmed to get involved too – saving your words into a database for example. The server itself is simultaneously receiving requests from other people to READ your words – so the whole thing happens again in reverse for every person reading – they send a message asking for a page – which flies across the internet, arrives at the server and is processed – then the server constructs the page, and sends it back to each requester’s computer – flying back across the internet, being deconstructed by the operating system, handed to the browser to be interpreted, and turned back into a blog post within the browser window.

Think about that. Think about all the processing that goes on simultaneously all over the world – the millions of websites, millions of people looking at them, and billions of packets of information flying this way and that. And we complain when it takes more than a second or two for a page to appear in a browser.

I often laugh quietly to myself when I hear anybody say “my internet isn’t working”. It’s not “their internet”. It’s nobody’s internet. Nobody is really in control of it any more – it was designed to survive disruption. And yes, this is a huge headache for the world to deal with. People joke about the monolithic company in Terminator, and the “rise of the machines” – in many ways it happened thirty years ago – when the first true packet switching nodes on the internet connected to each other.