03 Jan 2017
I’m back working on an another Android app for the next few weeks, so I thought I’d treat myself to a new phone for development.
Now I didn’t want to spend a massive amount (seeing as I’ll won’t be using it as my main phone), and I found just what I was looking for at Argos - a Sim Free Alba 5 Inch 3G Mobile Phone in Black for just £44.95 (about $55 at the current awful exchange rate)
After playing with it for a couple of hours it’s surprisingly fast (in relative terms), with a nice bright screen that’s not bad to use at all. I’m really missing Touch ID to login, and the cameras are very average (or is it I’m just spoilt by my iPhone 7 Plus?), but other than that it’s definitely usable for most things I’ve tried so far.
Clearly I’m not going to switch away from iOS and my iPhone right now, but am I really getting value for money from a top of the range iPhone compared to a very run of the mill but completely adequate basic Android device?
02 Jan 2017
I’m starting 2017 returning to Android development (which I’m really looking forward to!), and for reasons now escaping me I decided I should do this on either my Windows desktop or laptop.
I hadn’t turned on either machine for a few weeks, and therefore was hit by a barrage of updates, fixes and other processes absolutely caning the hard disks.
In combination with having to update Android Studio x2, it basically took all morning to get nowhere fast.
With lots of discussion recently about Steve Jobs’s ‘Cars vs Trucks’ metaphor for mobile OSes vs traditional PCs this felt like being run down by the demonic truck in Steven Spielberg’s very early movie Duel - watch it if you haven’t seen it.
I’m almost certainly going back to installing Android Studio on my MacBook Pro this afternoon. No idea what I was thinking before!
01 Jan 2017
Why do this?
Like most people who are trying the ‘iPad Work Lifestyle’, half the fun of trying it is the challenge to doing work a in different way. At times, working on the iPad certainly makes you think about how to solve problems to do the ‘simplest things’. Tasks that are natural on PCs may involve lateral thinking to complete on iOS.
It’s not all bad though. Single focus apps (or at most 2 in split screen view) do make it easier to concentrate on the task in hand. Also many apps are exceedingly well designed to do a few things very well rather than more general purpose PC apps.
Most of all, it somehow feels much more fun to write this on my iPad that it ever would on either my Mac or my Windows PC. I can’t really define why (novelty perhaps?), but it just does.
Right now, for me it’s all an experiment for 2017, so we’ll see how I feel later in the year if I keep this up.
My iPad is a 2016 9.7 inch Pro model, and I love it. The display is truly outstanding, and it’s a really nice mix of relative power and portability.
I’m currently using an Amazon Basic Bluetooth Keyboard that I’ve had for a while (not sure it’s still available). It’s really light and easy to toss in my bag if I’m going out and about.
The keyboard does the job, but am seriously considering investing in either an Apple or Logitech Smart Keyboard Cover at some point, mainly for convenience. They’re not cheap though, so not sure right now if they’re worth it.
Jekyll static site
I run quite a few of my sites on Jekyll, a static site generator popularised by GitHub. It’s pretty powerful (runs on Ruby), fully customisable, cross-platform, and is great for blogging in Markdown.
I like Jekyll anyway, but it makes it a good fit for this blog as it means I can write posts in Markdown and not have to worry too much about running some sort of web server on the iPad.
I’ve been using Digital Ocean for a year or so, and are really liking the simplicity of their setup and excellent documentation and support.
My virtual server is running Ubuntu 16.04, and I’m using NGINX as the web server pointing to the static site.
You need to be happy with the UNIX command line to setup the server, but I’m reasonably proficient and it’s much better (for me) to have full control over my server rather than being on a cheap shared host somewhere.
The code for the site is all held in GitHub, and actually could be hosted from there as GitHub repositories can natively serve Jekyll sites.
This is really useful as I can test any changes after checking them in (via https://bravelocation.github.io/writingontablets.com/ if you are interested too!). This is really handy to check everything works before making the changes go live, as the preview of images etc. doesn’t work great in Textastic (see below)
I wanted to make this site HTTPS from the start - for both security and for Google ranking - and on my setup it’s easy to do this through Let’s Encrypt.
Let’s Encrypt offer free certificates for your web server, and can be kept up to date through automation. It’s a great service, and no-one has any excuse nowadays for not offering a secure site to thier customers.
Working Copy (for Git)
As mentioned above, using GitHub is central to how my blogging setup works. Working Copy is a really nice (and highly recommended) Git client for iOS.
As well as the obvious Git functions, it also works as a document provider making it easy to open files in your repository in other programs.
Textastic (for text editing)
Textastic is a powerful multi-language code editor for iOS.
It has syntax highlighting for multiple languages (useful for me as I will not just be writing this blog on my iPad), and has a well thought out extended keyboard perfect for coding.
The built-in markdown preview is also pretty decent too, which helps a lot during the initial editing of posts.
I’m still working on the best solution for cropping and editing images ready for the site.
Right now I’m using screenshots direct from the iPad, or photos taken on my iPhone and cropping them using the built-in editing features in Photos.app, but that means the images are too large for the web site (even though the CSS handles the resizing well).
I suspect I’ll build some Workflows (see below) to handle the resizing part, but I haven’t done that yet.
I think most people who use their iPad for more than just content consumption will know about Workflow,
the indepensible app for iOS automation.
I’m sure I’ll write more about how I’m using Workflow to simplify many tasks I need to do, but right now I have a script I use for releasing any changes to the site.
My process for publishing a new post is as follows:
- Write the new post in markdown
- Check the changes into Git, and push them up to GitHub
- Check the post looks OK on the GitHub-hosted site
- Log into the production server (via SSH), pull the latest changes from GitHub and then
jekyll build the updated static site to generate the latest changes.
I have a nice Workflow that utilises the SSH action, which means I can automate the final point without having to actually use an SSH client
(I can use Prompt 2 if I actually need full SSH access).
The code in the ‘Run Script over SSH’ action loooks like this:
/usr/local/rvm/gems/ruby-2.2.1/wrappers/bundle exec jekyll build
Note [Directory] is a variable I set earlier in the workflow from a multiple choice list, so I can reuse this script for my other sites hosted on my server.
I had to add in the
source .bash_profile (and the full path to the ruby bundle command) to get this to work reliably, but it’s a really quick way of pushing changes out with very little work.
So far, using the above process is working pretty well, and other than optimising the images I haven’t had to revert to using my Macbook Pro to do anything yet. Hopefully I’ll find an efficient way of handling images too soon.
It also means I can work on the site from anywhere, as it’s almost inconceivable I’ll be somewhere without either my iPad or my iPhone. That would be weird!
If you have any comments, improvements or suggestions, let me know on Twitter at @yeltzland
11 Dec 2016
I bought a Raspberry Pi 3 last week, mainly because I wanted to setup a small AirPrint server (so I could move my seldom used printer to somewhere away from my desk), but also
because they are cool!
Setting up the AirPrint server was pretty easy, and there are plenty of guides already on how to do this
(basically install and configure CUPS to get the printer working, and then the
to expose as to Airprint.)
I’ve also been thinking of other things I can do now I have a low-powered but always-on Linux server in the house,
and my first project was a simple web site checker that will periodically ping my web sites and send a Slack message
if any are down.
Now I wouldn’t use this for commercial websites, but for my Digital Ocean hosted sites - which are very reliable to be honest -
it’s nice to have a little bit of monitoring for free just in case they are having problems.
04 Dec 2016
In my last post, I mentioned how the one missing piece in my slightly crazy Alexa->Todoist->IFTTT->Notification Shopping List System
was being able to open the specific ‘Alexa Shopping List’ project in Todoist when I’m near the local supermarkets.
Looking through the Todoist API, I realised I can generate a link that will open a specific Todoist project
e.g. “todoist://project?id=183977037” where the id parameter is the specific project id.
As far as I can tell the only way of finding the project id is my calling the API to get my project details and inspecting the JSON e.g.
$ curl https://todoist.com/API/v7/sync \
-d token=0123456789abcdef0123456789abcdef01234567 \
-d sync_token='*' \
So now, rather than send an iOS notification from IFTTT, I send a message to Slack containing the Todoist link.
Obviously that means when I get the Slack notification on my phone, I can simply click on the link in the message and go straight to where I want in Todoist.
The idea of using Slack as a universal notification system is really powerful. There are so many easy ways of hooking up applications into Slack (and it’s easy to write your own)
and I’ve already got lots of ideas on how I can use this pattern in different ways to send relevant alerts from different services.