Portable Tough Computing
tl;dr I spent a long time establishing that OS and hardware doesn’t matter. It’s all about whether I can run my code and being productive. Luckily for me, my preferred tech stack runs pretty much consistently across most devices. I believe that Samsung Dex is the best option in the phone/desktop like environment category. Dex works pretty well but it’s hobbled by poor third-party software support and the fact you have to carry a giant puck-dock with you when a simple cable converter will do.
I have a very specific problem: I like to spend as much time as possible in the mountains and it’s tough lugging my delicate laptop round and keeping it protected. I take my laptop to most places (inc. basecamp of Lobuche East in Nepal ~5,000m) so that I can try and provide 24/7 support to my clients. My current solution is a rather bulky (Peli Case)[https://peliproducts.co.uk] and a 15.4" MacBook Pro. This is workable but that laptop isn’t protected at all when it’s out of the box and struggles to perform with the slightest bit of damp or bright sunlight.
I thought the solution was a Getac V110 11.6" convertible tablet/laptop. It is a fully ruggedised mil-spec laptop. The internals (2.5GHz dual-core i7, 512GB SSD, 8GB RAM) are worse than my mid 2012 MBPr (2.7GHz quad-core i7, 1TB SSD, 16GB RAM) and the operating system is Windows 10 vs. macOS but… that’s okay. I don’t need the same computing power that I once did. I run lightweight containers now rather than full virtual machines and I’ve shed most of my legacy projects, so don’t need anything too exotic. Win10 isn’t ideal for development when production environment are *nix but it has good virtualisation, Docker and Node.js support so is workable. Steatite the Getac UK distributer very kindly lent me a demo unit to play with for a couple of weeks. I was pretty impressed. It’s performance in sunlight and outside conditions was great. It was lighter and smaller than my MBPr+Pelicase situation. I was going to go for it except that I had some problems getting my desired specification and this made me reconsider some of my decisions.
I realised that I didn’t care about the OS/platform or the spec as long as it worked anywhere and I could be productive. What other more exotic solutions were there available?
Now that I accepted that Win10 was an option… possibly the Microsoft Surface Pro 4 was too. As long as the tablet was x86/Intel based, it should do all that I need. The only downside of the top end Surface Pro was the ventilation. It still had fans, so could never permanently be full enclosed in a waterproof case. So I therefore dismissed it but was intrigued with Windows Continuum.
Windows Continuum is an interesting product with great promise. The idea is that you have a Windows Phone or Tablet on the go and when you return to the office/home you plug it into a dock/screen and continue on a desktop environment. Sound familiar?. I explored the rather limited options of the HP Elite x3 and discovered a whole new segment of devices. The only problem (that I saw) with Windows Continuum was that support for ARM apps is non-existent and there is no such thing as an Intel phone. I was rather taken by the phone idea rather than the tablet.
Undeterred but impressed with the concept I continued to explore. I realised that if I wanted a decent phone option, due to chip design/performance, it was going to be an ARM device. Windows on ARM is too limited… but what about iOS or Android? I immediately discounted iOS. I have no interest in jailbreaking my phone and I’ve never been able to be properly productive on my current iPad/iPhone. I’m a geek but I draw the line somewhere. I don’t want to get too distracted with too many rabbit holes [tweaking a jailbreak], there’s enough of them anyway.
That leaves Android. After a little research I found out that there are a couple of projects aiming to solve this problem but they’re all either immature or require a jailbroken device. The [now defunct] Remix OS looked good but was too niche for me. The only option left standing was Samsung Dex, which requires either a S8 or S8+, as an external screen is not always available a phablet was the obvious candidate.
I’ve never seriously used Android before, so this was a big leap for me. Before committing to this solution I need to source an evaluation device. This was trickier than I expected. A few months earlier I tried to buy a Nokia N100 (a feature phone) but I couldn’t find a real one on available to play with no phone shop would even allow me to power one up in-store. I had to just buy it blind. Luckily it was only £25. This isn’t the case with the S8+. I headed into town and down to the Samsung Store on Oxford Street. They had a Dex demo on display [which curiously is no longer there]. I talked to them about possibly buying the rig but with the caveat that I can return it if I cannot get my apps to run (ie. get a “30 day refund”). The guy in the shop was not very helpful, first it transpires that Samsung Retail don’t allow you to return opened/powered on devices but futher the guy laughed at my for suggesting I could use Dex as my primary device. Disheartened I headed to the place that I should have headed to first: John Lewis. John Lewis have a fantastic refund policy; you can return any product within 30 days if it’s in resellable condition (plus they price match). I then purchased a S8+ but unfortunately I had to return to the Samsung Store to purchase a stand/case as JL was out of stock. They guy that mugged me off 30 mins prior looked bemused when I returned.
Unboxing the S8+ was great. Everything you expect; phone, cable, fast-charger and headphones and some you don’t; USB OTG adapter and USB-C/micro adapter. Setting up was a breeze too. I have G Suite for work (although I had just migrated to Office365 :-(, this was quickly reversed). Termux seemed like the obvious candidate for all the heavy lifting, installing vim, postgres, node (and php/mariadb) was easy. No root access required. Unfortunately PHP isn’t compiled with the mysql extensions but apart from that it’s all seamless. My next task was to find a good text editor. This was a little tricky because as I wasn’t rooting my device I was limited by the app sandbox. So if I store my project files within Termux, third party apps cannot easily access it. If I store my files in the shared space git, npm and permissions play up. Luckily there is something called Android File Sharing Framework and Turbo Editor Pro supports it. So Turbo Editor will be my editor.
This all happened on the Saturday and I was travelling to Turkey on the Sunday. I was adamant that I wasn’t going to take my laptop with me, so I needed an insurance policy: Windows 10 and Amazon Workspaces. This required Microsoft RD Client and/or Amazon Workspaces. Unfortunately due to Apple’s strict EULA macOS-aaS wasn’t really an option.
To complete my setup I (ironically) purchased a Microsoft Universal Folding keyboard (an amazing bit of kit) and used an existing bluetooth mouse (which is also MS but overheats in direct sunlight :-( ). Using the USB OTG adapter I copied some essential ssh private keys and config files from my MBP. I checked out my projects from GitHub and most node/postgres ones worked out of the box. The only one that failed used PhantomJS, which doesn’t compile on ARM but I can live with that. The PHP ones failed due to lack of mysql extensions — I’m yet to get them running.
Whilst in Turkey I managed to do a good amount of work. I got my react/node/postgres app working locally. Usually I would run it within a container but I was happy to compromise and run it on bare metal. All the packaging (testing, build, docker, deply, ecr and ecs) is done at CircleCI off a GitHub commit hook. Node dev is easy as you can debug in the terminal. Browser dev is a little trickier as non of the major browsers support local JS console. I used weinre (WEb INspector REmote) either as an included library or bookmarklet — this is workable but not ideal. I’m not totally happy with Turbo Editor and I often find myself in vim within Termux. I also had to login and do some maintenance on production ubuntu/php servers. SSH and my private keys worked well.
I’m currently off-games due to a ski accident, so I haven’t been able to test the rig in a “arduous/remote environment”. The S8+ is waterproof and limited shockproof anyway but encasing it in a OtterCase would be prudent. Peripherals (keyboard/mouse) are delicate but can be considered consumables as long as the phone itself is unscathed.
Whilst in hospital having a hip arthroscopy I tested the setup start-to-finish; building an as part of a job/contract application for a bank. I was sent a z7 archive that contained a frontend webpack base project and I was required to complete a series of tasks. I managed to find an app to extract and run the project and then develop out all the tasks and testing. It was an impressive and modern sight to be seen.
Conclusion: when under pressure, unfortunately, it is still more productive to revert to x86/macOS. This is primarily due to the lack of a decent editor and browser (js console). I don’t really have an excuse as I could solve these problems myself; Termux, Turbo Edit and Chromium are all open source. Development on Android is a very workable environment and can be used for finite periods of time when travelling etc. If these problems are resolved Dex (with a backup remote x86 box) will become my primary environment. Maybe a Intel NUC secreted somewhere?