Category Archives: IT

IT related posts, technical stuff

From Ivy Bridge to Threadripper Part 1 – A Water Cooling Retrospective

Some of the links in this article are Amazon affiliate links, which pay me a commission if you make a purchase.

I could have brought a plain old Ryzen, a Core i7 or even another Core i5. But with Intel sitting on its hands the past 5 years in the face of no competition, I decided it was time to splash out and reward AMD for not only investing in CPUs again, but making an interesting high-end desktop product while not nickel & diming its customers over PCI-E lanes.

And so, I brought a 1920X.

I don’t really need 12 cores. Other than general browsing, my PC is used for work, (coding) plus a bit of gaming, and a gaming CPU this is not. Running multiple VMs and M.2 devices without slowing down will be nice, but this build is mostly overkill for my needs. And that’s really the point! Continue reading

Vimperator, Vimium and the switch to Qutebrowser

Much to the chagrin of anyone that uses a web browser on my PC, with particular apologies to my girlfriend, I’ve been an enthusiastic user of Vimperator for several years. Vimperator is a Firefox extension that turns it into a keyboard-driven browser, one that behaves much like the text editor Vim. Unfortunately, Mozilla has deprecated the XUL extension API that vimperator and many legacy extensions depend on, in favour of the web extension standard pioneered by Google with Chrome.

I can understand why they made this change. Legacy extensions are a large source of pain, can pose a security risk to host systems, and make invasive, sometimes unstable changes to the behaviour of the web browser. Mozilla often took flak from users for poor performance caused by poorly-written extensions, which were sometimes installed without the users’ knowledge or consent (Skype click to call extension, I’m looking at you).

What’s more, XUL extensions are partly responsible for the slow roll-out of their multiprocess implementation, called Electrolysys.

All this probably explains why Mozilla decided to adopt Google’s extension standard, and drop XUL. Unfortunately, Vimperator, a volunteer project, looks as though it will be a casualty of this decision, and it is highly likely that it never work after the legacy extension APIs are removed in Firefox 57.

So with Vimperator effectively dead, what’s a Vim user to do?

Vimium

There’s a Firefox port of the Chrome Vimium extension to Firefox, called vimium-ff. I’ve installed it, and it works, most of the time. However, there are some significant problems with Vimium that are inherent to using web extensions for UI plugins. Specifically, that they can’t really do a lot to alter the user interface!

Vimium works by injecting keyboard shortcuts and its UI elements into the web page. For some functions, such as navigating links (by typing a capital F), this works great. The problems become clear when you try to do something before the page has loaded; the shortcuts aren’t active yet.

Other problems include:

  1. UI elements such as the command bar appear within the web page rather than surrounding it; everything has to happen within the content frame.
  2. Some parts of the user interface, such as the new tab page and preference pages, aren’t modifiable by extensions (in the case of the new tab page you can work around this with a separate plugin to change it to about:blank, and then the Vimium shortcuts will work).
  3. Related to (2), relying on the traditional UI at some points means you can’t hide traditional UI elements such as the address bar.

The authors of a potential Vimperator reimplementation called tridactyl have documented the problems in much more depth than I ever could here, but overall the web extension standard doesn’t seem sufficient to support plugins that significantly alter the user interface. Given the inherent conflict between permissive APIs and security, I doubt this will change any time soon.

Qutebrowser

Qutebrowser sidesteps the above issues, because it’s a totally separate web browser which defines its own user interface, but it does come with its own set of trade-offs.

  1. You can’t use other Firefox/Chrome/Web extensions, in fact there is no support for plugins (although support for Python-based plugins is planned).
  2. As a result of (1) there is no ad or tracking blocker, other than a rudimentary built-in hosts-file based blocker, which isn’t very effective.
  3. It lacks much of the polish and easy configurability of mainstream browsers (for people who like text-based configuration files, this can actually be a plus).

The main difference that I’ve noticed from Vimperator is that it more strictly adheres to the idea of a modal browser. Vimperator would automatically enter insert mode on opening a new page. With Qutebrowser, on opening a new tab with google.com you’re still in command mode, despite the blinking cursor in the search box. If you press any keys you’ll be entering commands, not typing letters, so you have to enter insert mode first. This is more like Vim, and thus exactly how it should be, but less like a web browser, and thus could be jarring for new users. Emacs or non-vim users looking for a keyboard-driven browser should probably look elsewhere.

I’ve used it for about a week, and it’s become my main browser. It’s not perfect, and I’ve noticed the occasional glitch, but it does at least seem to support process separation – I can see a new QtWebEngineProcess start-up for each tab. This is more than could be said for Vimperator on Firefox! It also seems to use less memory than Chrome for the same page (not a high bar to clear, granted).

Overall, I’m impressed so far. If you’re a Vimperator or Pentadactyl user I highly recommend giving Qutebrowser a try. If you’re a happy Vimium user, also give it a go, but you may find it takes things too far.

Building and Packaging a Python command-line tool for Debian

python-logo-notext-svgPython packaging has a chequered past.

Distutils was and still is the original tool included with the standard library. But then setuptools was created to overcome the limitations of distutils, gained wide adoption, subsequently stagnated, and a fork called distribute was created to address some of the issues. Distutils2 was an attempt to take the best of previous tools to support Python 3, but it failed. Then distribute grew to support Python 3, was merged back in to setuptools, and everything else became moot!

Unfortunately, it’s hard to find reliable information on python packaging, because many articles you might find in a Duckduckgo search were created before setuptools was reinvigorated. Many reflect practices that are sub-optimal today, and I would disregard anything written before the distribute merge, which happened in March 2013. Continue reading

Mechanical Keyboards – Stop reading if you like your money

filco_tenkeyless_ninja_uk_largeAs a Sysadmin who works on a keyboard all day, I was enamoured by Jeff Atwood’s post about his CODE Keyboard, that he developed in partnership with WASD Keyboards. Essentially, the CODE Keyboard is a pre-spec’d standard WASD keyboard, with Cherry MX Clear switches.

If you have no idea what I’m talking about, you should read WASD’s Mechanical Keyboard Guide, which covers the different types of switches and their characteristics.

I’ll admit I didn’t do a lot of research. After a quick read on the site about the switches, I figured brown would probably suit me best, as I didn’t want to annoy my neighbours too much, and I chose the smaller Ten-Key-Less layout to keep the mouse closer (rarely am I entering large numbers in sequence, so the numeric keypad simply wastes space most of the time).

The problem: I can’t go back. Continue reading

Ubuntu Home Server 14.04

I had grand intentions.

This home server article was to be a detailed masterpiece, a complete documentation of my home server setup.

It hasn’t turned out that way, and many pieces are missing. Turns out, that writing a detailed article on setting up a server is much harder than just doing it! So what you see here is what I finally managed to publish, 5 months after actually building it. I hope you find it useful, and I don’t rule out the possibility that I may update parts of it in future. Continue reading

Ubuntu Home Server 14.04 – A DIY NAS

It’s been more than 4 years since I wrote about home servers, but my Ubuntu Home Server article was, for a while, the most popular post on this blog. Since moving to the UK though, I’ve taken a more appliance-based approach to my home network. For the last few years I’ve been using a Boxee Box for media playback, and a 4-bay Netgear ReadyNAS duo NV2+ for storage, mainly to keep the bulk of my possessions to a minimum.

The appliance approach does have advantages. It is power efficient, easy to setup, and very low maintenance. But after getting an internet connection with decent upload speed, I wanted to run CrashPlan on the NAS without having to have another PC running. I managed to get it running by following directions I found here.

There’s just one problem:

3.3 months to upload 350GB is a little too long

3.3 months to upload 350GB is a little too long

Performance is abysmal, and I’ve only selected the most important data – my photos. I’m limited not by my internet connection, but by the NAS’s anaemic CPU and lack of ram (just 256Mb). Furthermore, it’s always had very slow read and write speeds – generally around 2Mb/sec, and loading a large directory via its Samba shares can take a while.

So I started to look for a replacement. My requirements:

  • Minimum 2GB ram
  • Strong CPU, preferably x86
  • 4+ drive bays
  • Linux based OS
  • Root access to said OS

The best pre-built option I could find which meets those requirements is the Thecus N5550, but at £383 it is a long way from cheap. And it barely meets the specs; an Atom CPU is strong for a NAS but not by modern x86 standards.

While the customised software shipped with a NAS does offer some conveniences, it also gets in the way of using newer Linux features such as BTFS RAID 5/6 (which is currently not considered stable but should be within the next 12 months). You’re also reliant on the vendor for distribution upgrades, and the priority is going to be shiny features which consumers will appreciate, not keeping the foundation OS up to date. The ReadyNAS NV2+ is currently running Debian Squeeze, and will be until the day support ends.

At this point I realised that a pre-made NAS with the level of power and flexibility I wanted doesn’t exist at a realistic price point. And with the end of Boxee support its days as a useful device are numbered, so a HTPC could be on the cards as well. It’s time to build my own server again.

Continue reading

Google commits privacy seppuku at BT’s request

Update – Since this was posted, Max Allan and Damion Yates have investigated further and found that BT are intercepting DNS queries and replying with doctored DNS results, which I didn’t notice when originally researching this article. The title is therefore not entirely accurate, and BT are most probably doing this without any special treatment from Google, but the point that Google is facilitating this (by performing http redirects) stands. Please keep this in mind as you read :)

–Alex 25/11/2014

As I’m currently in temporary accommodation I have found myself without a permanent internet connection. 3G service in the area is pretty spotty, so I bit the bullet and ended up purchasing a single month BT Wifi pass, effectively piggy-backing a neighbours connection. I’m guessing they see very little of the £39 I paid.

It is well-known that BT has filtering in place, supposedly for the protection of children, as required by the UK government. I don’t agree with this policy, but accept that many do.

However when it starts to affect privacy, I feel that BT’s meddling of my internet connection has gone too far.

Case in point, when using Google on BT Wifi I happened to notice a new message on the side:

SSL search is off

This network has turned off SSL search, so you cannot see personalised results.

The security features of SSL search are not available. Content filtering may be in place.

Learn More | Dismiss

After digging into it, I’ve found that statement to be demonstrably false. In actual fact what it should say is; “We have disabled SSL search on behalf of your network provider.”

To which I say, thank you for giving me another reason to use duckduckgo.

Continue reading

Safely running bulk operations on Redis with lua scripts

This article was also posted on the Gumtree devteam blog

If there was one golden rule when working with redis in production, it would be

“Don’t use KEYS”

The reason for this is that it blocks the redis event loop until it completes, i.e. while it’s busy scanning its entire keyspace, it can’t serve any other clients.

Recently, we had a situation where code was storing keys in redis without setting an expiry time, with the result that our keyspace started to grow:
Continue reading

13″ Retina Macbook Pro (late 2013) – Buyer Review

As with all my reviews, this is a totally subjective personal view and not an in-depth technical analysis. For more mainstream reviews, check out Engadet, Pocket Lint, Expert Reviews, and Casey Johnston’s Air vs Pro comparison on Arstechnica if you’re also considering an Air.

Retina vs Dell

My old faithful Dell E4300 has done its dash. Actually it still works; it runs Ubuntu well, it has an SSD and 4GB of ram which makes it pretty nippy for web browsing and lightweight tasks, but what sealed its fate was my work laptop – a 15″ Retina Macbook Pro. After getting used to that gorgeous 2880×1800 screen, I found I just couldn’t go back to the Dell any more with its 1280×800 TN LCD (ugh), horrible touchpad and 2009-era performance.

Continue reading