A URL shortener written in ten minutes

Friday night, or more specifically, Friday February 26th 2016 at 19:45:57, I was having a group Skype call with Alexander Craggs, Miles Budden and Tom Emmerson when Alexander started complaining that all the URL shorteners out there were becoming too long. To clarify, URL shorteners were becoming bloated. He suddenly said, "Let's make a URL shortener". The situation escalated very rapidly and within 5 minutes, Miles had bought the domain subr.pw for an astronomical price of £0.60, I had setup Nginx on the server used for the majority of SubjectRefresh's projects and Alexander had setup the codebase and had a Node.js skeleton ready to go. We went with subr.pw for two reasons. The first continue...

Refresh - a revision tool with a difference!

During the YRS Festival of Code 2015, "SubjectRefresh" and I created a revision app called Refresh. It's built using Node.js and works by scraping the exam board website (currently only CIE) for the PDF for the syllabus the user has requested. The PDF is then converted to HTML using a PDF to HTML converter and is then shunted through Node's Cheerio library. We then find out where the relevant information in the HTML is and send that off to TextRazor. We then use the information about the text that TextRazor gives us to construct questions to ask the user. These are in gap fill format because keywords are removed. The reason we did this is because the answers are continue...

Real time PHP applications

I admit it, I've started writing all of my new projects in Node.js. Why? Because most of them are lightweight and I want them to be real time. PHP can be a real pain when it comes to doing anything remotely real time. First off, it's designed to execute as quickly as possible and send a response to the client, which is of course good. However, what is bad about that is that it doesn't stay alive - it does its stuff and then dies. Node.js on the other hand runs in a single process, which stays running all the time. This is perfect for real time applications because you can fire off an event to Node.js continue...

Creating an OS X Installer

I recently had to create an installer for an AppleScript app (I know but I couldn't be bothered to learn Swift and the craziness of Xcode) and it drove me round the twist looking for a decent tutorial that I could understand so that I could create my installer. This post is primarily a reference for me but as it will need to be pretty basic for me to understand, maybe someone else will be able to follow it too. To start with, you have to create a folder to house your application, resources and other things that need to be included on the installer disk. I named mine OS X Installer. Into this folder you will need to copy continue...

The problems with not developing for mobile

Mobile means a small device which therefore has a small screen. On these small screens, websites designed for larger devices can look unpleasing to the eye and are completely inappropriate for the device and by extension, the user. Some websites have brilliant mobile versions of their sites, but some don’t. If you go to these websites that aren’t designed for mobile on your phone then you will probably find it difficult to use the site. This is a big problem as it deters users from using the site and therefore potential revenue will be lost! It is incredibly easy to forget about making a mobile version of a website because you develop websites whilst using computers (mostly), not continue...

The Pi-Powered Hamster Hunter Part 4: Reflections

Reflections At the end of our project our initial objectives had now been added to and matured through the development process. Objectives at the start The objective of this project was to build an all terrain vehicle which could be used for various applications and controlled from anywhere in the world. We wanted it to be operational in all circumstances, which meant being able to operate in low light/pitch dark conditions and being able to traverse all terrain. It was essential for the user to be able to see from the ReCoRVVA’s point of view in real time. We also wanted the ReCoRVVA to be able to sense when it was about to crash and automatically stop to continue...

The Pi-Powered Hamster Hunter Part 3: Putting it all together

Assembling the components The first prototypes we put together used an Arduino, and it was with these first prototypes that we had many problems with the motors. The first thing we tried was to run each motor from one of the Arduino’s digital pins. They were 5v motors, and the digital pins on the Arduino supplied 5v each, so we assumed the motors would run. We wrote then uploaded a simple drive script to the Arduino. However, the motors didn’t turn. We debugged the code and found no errors, we checked the pins were supplying voltage and yet the motors still didn’t turn. Eventually, we realised that there was a limit on the amount of current able continue...

The Pi-Powered Hamster Hunter Part 2: Tech development

Technical development Hardware Core controller This was to be the brains of the ReCoRVVA. Its task was to control all the peripherals on the ReCoRVVA, to manage all communications with the client and, by extension, the user. It needed to be capable of handling multiple tasks at once and be able to use multiple electrical inputs/outputs to control the physical aspects of the ReCoRVVA. It also needed to be customisable, so that we could quickly and easily change things, e.g. software or, if we had a accident, interchangeable controllers. It needed to be able to support the data inflows/outflows shown in figures 4 and 5. Arduino The first option we explored was to use an Arduino (a continue...

The Pi-Powered Hamster Hunter Part 1: The Beginning

Last year, I and two of my friends, Ben James and Angus Ledesma, decided to create a Raspberry Pi powered robot for a Silver CREST project. I posted an overview of the project last July and have finally got around to converting the CREST report to a blog-friendly write-up! Background The ReCoRVVA will help and assist people in many different ways; as the name suggests, it is designed to be used for many purposes. At its simplest it is a vehicle designed to be controlled remotely by an operator with the aid of a live video stream from the robot. It could be used as a security patrol vehicle for surveillance, or to regularly check on an elderly relative remotely. continue...

Twilio Python Programming

Whilst coding in Cambridge with the Raspberry Pi Foundation for the YRS Festival of Code, I was lucky enough to be able to glean some knowledge from Paul Hallet, who introduced me to Flask & Twilio: We take care of the messy telecom hardware and expose a globally available cloud API that developers can interact with to build intelligent and complex communications systems. As your app's usage scales up or down, Twilio automatically scales with you. You only pay for what you use - no contracts, no shenanigans. from Twilio.com My team didn't actually use Twilio in the project, however, it did stick in my mind... Bit bored yesterday evening, was trying to think of something to do and continue...