Martin Joiner's Blog Confessions of a binge thinker
5 July 2017

A pre-commit hook to block tab-indented code

Avoiding tab-indentation is the best way to ensure code looks the same on all code editors/viewers including Mac, Windows, Vim and the GitHub website. I made a Git pre-commit hook that lints your newly added lines for tab indentation and stops the commit if it finds any.… Read more »
Filed under: The Web Tagged as:
13 February 2017

Jade Templating Engine Renamed to Pug

Playing with the Express framework on a Node.js project I was encouraged by Express's documentation to bootstrap my new project with the Jade templating engine. I'd never used Jade before but I liked what came out the box! Diving deeper and hungry for official documentation I searched the term "jade templating" on duckduckgo.com and scanned my […]… Read more »
Filed under: The Web Tagged as:
2 February 2017

Utilising the GoodReads API on BookFetch

The biggest problem revealed after Saturdays test of the BookFetch scanner was the systems inability to lookup 60% of the scanned barcodes on the ISBNdb.com API. Owen, a friend in the local Bristol tech community suggested giving GoodReads.com's API a try. I added a fallback in the code that processes the scans so that if it should […]… Read more »
Filed under: The Web Tagged as:
28 January 2017
Martin using BookFetch scanner

BookFetch scanner tested in the wild

In the 2 shops that did let me test the system I was able to establish that all the books in a single shop could be scanned in about 20 minutes.… Read more »
Filed under: The Web Tagged as:
23 January 2017

Abandoning Drupal 8 to rebuild BookFetch in Laravel 5

Back in October I started building the BookFetch project from scratch and used it as an excuse to learn Drupal 8. My experience of developing in Drupal 8 has been utterly horrible, full of moments of horror, frowning at the raw results, resigned to a helpless moan of "Why are you doing it like that?!". […]… Read more »
Filed under: The Web Tagged as:
16 January 2017

Adventures in static site generation

Here's a fact: A static web page like 'about-me.html' is stored in a simple text file so when a browser requests it from the web server it just has to open the file and send the contents back. It's a pretty fast operation. But a dynamic page like 'about-me.php' contains code that needs to be pre-processed […]… Read more »
Filed under: The Web Tagged as:
27 October 2016

To style before testing?

I've built an early working version of both the scanner end of the BookFetch project and the public-facing website part, but at this stage the visual styling is just Drupal's default out-the-box theme. But that doesn't matter right? Just get it out there, MVP man, stop wasting time yeah?! No. Because the next stage will […]… Read more »
Filed under: The Web Tagged as:
21 October 2016

BookFetch Scanner working and ready to test

I have finished building the scanner end of the BookFetch project. This is the device that will be taken into shops and used to quickly and easily log their entire stock of books for publication on the BookFetch website. Here's a video of me demonstrating how the Raspberry Pi with the Python scripts running, is able […]… Read more »
14 October 2016

A noun for users who write in only uppercase letters

Recently, while administrating some user-generated content I had to twent some aggression at yet another user who had input their event details in all uppercase letters. It's ugly and inaccessible so as a responsible site owner I'm obligated to correct the casing which is an unnecessary waste of my time. You're wasting my time! Can we have […]… Read more »
Filed under: The Web Tagged as:
14 October 2016

Fun with Drupal 8 and RaspberryPi

I have recently been working on a project for a local charitable organisation. I am building them a user-generated content site (in Drupal 8) that will receive it's content from a hand-held scanner (running on a RaspberryPi). The user stories are this: The Consumer: Ethically minded, tech-savvy individual is about to buy a second hand book […]… Read more »
Filed under: The Web Tagged as: