Jake Hall

Software Developer and Infrastructure Guy. Always looking for ways to improve everything. Views are my own!

Page 2


Thoughts on a Hackathon

santander hackathon

So I took part in my first Hackathon at the weekend, I wasn’t sure what to expect but I thoroughly enjoyed it - enough to write down a few thoughts.

The whole event started on Friday, where we were reintroduced to the challenges and have an opportunity to do a fire pitch. I drew the short straw on our already formed small team of three, so I threw our idea into the fray.

It turned out that another team had a very similar idea to ours, and they approached us to perform the fastest hackathon team merger (or was it an acquisition?) of all time.

IMG-20180321-WA0001.jpg

Friday night, myself on stage doing the fire pitch

We were given access to an Open Banking sandbox to use the new Open Banking APIs which are being made part of UK Regulations this year. This basically allows a banking customer to give access to their data to a third party.

So we’ve got some data, and we’ve got a challenge: fix credit...

Continue reading →


Why do a code review?

Code reviews are an integral part of the teams that I work on, and recently I was asked what value they added versus the time they took. Here are a few thoughts about why they are absolutely vital to any software development project.

What do I mean by a code review

To us, a code review is the final check by the team that the change being delivered has the following attributes, before being merged into the main branch:

  • there are no obvious issues with logic
  • follows agreed best practice, and coding standards
  • code is understandable, maintainable and clean
  • all automated tests are written, and have the necessary coverage
  • the acceptance criteria on the ticket have been met

How do we do code reviews?

In order to gain the most from our code reviews, we try and stick the following…

  • Two other people to review each pull request (PR)
  • Picking reviewers that will have the most impact
  • Adding...

Continue reading →


Getting REST Right

It seems everyone is building a REST API these days - this is great! It’s not easy, but there are a few key things you can do to make it easy for your consumers of your API.

URLs represent a resource

Try to think carefully about your URL structure before you dive in, this will save a poor REST API later on.

Decide what resources you are dealing with. For these examples I’ll be looking at articles, attachments and users. In my setup, articles can have attachments, but users can’t, so for me it makes sense to have something similar to the following:

  • GET /article List articles
  • GET /article/<id> Get a specific article
  • GET /article/<id>/attachment List attachments on a specific article
  • GET /article/<id>/attachment/<attId> Download a specific attachment
  • GET /user List users
  • GET /user/<id> Get a specific user

You may have noticed from the above URL schema that I have gone for...

Continue reading →


Instant Slack Feedback

How do you get instant feedback from your colleagues on Slack? Perhaps it’s just a simple question, where shall we go for lunch? Or when shall we organise an event for.

There are a few poll Slack Apps available on the directory, but I wanted to see how easy or otherwise it would be to use the Slack API, to build my own our team. Slack also recently released Message Buttons and these new message attachments seemed like the perfect way to user responses to a poll.

Turns out you can easily put something together over the course of a day.


So what’s in a Slack App? You currently can have incoming webhooks for specific channels, this allows you to post messages from an external server into that channel using the specific hook URL you’re given.

You can also have commands, these are things like /poll or /invite jake. Slack will send you a HTTPS POST command with the command and the...

Continue reading →


Importance of Networking

I love talking to new people. Finding out what they do, where they do it, what they find interesting and the two most important things - if there’s anything in there that I can take away to improve my life or projects with or vice versa (if I can help them with anything).

Regularly I draw on my network in order to help others achieve their goals. Most recently I was presented with the most ambitious goal I had yet to take.

Canadian Flag

One of my closest friends and colleagues at work would like to move to Canada within our company. It’s well known that it’s hard enough to move ones base office, but to move a base office to one that’s located in a different continent?

A quick flick through my network presented me with a very senior HR manager, who may just be able to help. One quick email later, and we’ve been asked for a CV and a preferred location in Canada.


One other such example is...

Continue reading →


Encouraging big business to adopt development best practice

Myself and a colleague at work have managed it.

Well we are on the first step of a long road to adoption but I’m pretty happy so far! We’ve managed to persuade our part of business to pilot a Gerrit & Jenkins Continuous Integration environment. The director of this section has already said he will mandating it once we prove that it’s battle ready.

This means that all projects within our section will have to give us a good reason why they cannot:

  • move from SVN to GIT.
  • implement mandatory peer-code reviews.
  • use an AOSP style Verified+1 flag from Jenkins, thus changeset cannot be merged if it cannot be built.

Or they will be force to take up best practice (it’s best for a reason right!).

So the next steps are to set up our first project on the system, it’s a very distributed project with developers from three countries involved - which makes the peer-code reviewing even more...

Continue reading →


Mondo Event Webhook - Transaction.Created

I’m one of the lucky few to have a Mondo Card. At the time of writing it’s in open BETA, so anyone can apply but the waiting list is huge (80k+ last time I looked) and only 11k cards are in circulation.

Mondo

I’m not going to go into detail about why Mondo is so great (it’s widely documented…) - but what I will do is delve into one of the components of their API. Yes a sorta-bank* with an API - I’m so excited to see what they (and other developers) can do with it! Mondo are maintaining an awesome-mondo github listing - check it out for inspiration.

For me - one of the most powerful parts of their API is the webhook feature. Head over to developers.getmondo.co.uk and you can register your own webhook to receive events.

At the moment the only event is the transaction.created event documented.

I’ve thrown together a quick PHP script that accepts the JSON POST value, parses this data, then...

Continue reading →


Today is International Backup Awareness Day

Of course, that’s the joke. Everyday is International Backup Awareness Day. You should go and check your backups now. It’s OK - I can wait… I should probably go and check mine too.


You have backups right? As I mentioned in a previous post Zero to development of an idea, I have a little dev box that I love to use for my little side projects. Now there’s no point in setting up a separate backup strategy for each of these as they are all so small it would be infeasible to maintain.

Instead I go for a multi-faceted approach.

  1. Use Git repositories to store the code in BitBucket. That way they’re on my development workstation and on a cloud host (and one would hope they backup).
  2. Use Amazon Web Services - Simple Storage Service to save my entire /var/www/html directory to a bucket for safe keeping.

Here’s how I make it work:

   s3cmd sync -r /var/www/html/ s3://bucketname/backupwww/
...

Continue reading →


Zero to development of an idea

One of the places I have identified as a blocker to me starting on a project is the bootstrapping of a project.

Laravel Code

By this I mean going from ‘I’ve got an idea’ stage to writing the first line of code and getting it uploaded to a web server with a database connection set-up. (Most of my personal side projects are web based!)

I’ve found the faster I can get an idea off the ground, the more likely I am to continue it. So what have I done to reduce the bootstrap time?

Most of my projects end up getting hosted on my FlorxLabs server, it has wildcard subdomain DNS setup, with a simple Apache rewrite.

<VirtualHost *:80>   
    ServerName chaos.florxlabs.com:80
    VirtualDocumentRoot /var/www/html/%2.0/%1.0/
</VirtualHost>

So if I would like a project under the URL project.florxlabs.com, I simply create the folder /var/www/html/florxlabs/project and I’m ready to go. No more config...

Continue reading →


cPanel .Trash Emails

So it turns out that cPanel keeps emails in the Trash forever.
Disk Usage
I was woken up at 8am this morning to find my cPanel server had died due to running out of disk space. Rookie error! I have processes in place to prevent this from happening like automatically clearing the backups once they have been safely offloaded to S3. However for some reason this hadn’t happened last night and the disk space was 100%. It was resolved pretty quickly and no harm was done, I reran the backups and all was well.

I decided to do a quick audit of the server to see if there was anything obviously taking up an abnormal amount of space. A logs directory from an CodeIgniter application was one source (full of irrelevant warnings). Another source were the .Trash folders in each Mail directory.

I had assumed that like Gmail it would delete after 30 days but no. So I did a quick search and came a cross Tom Yates...

Continue reading →