ALAN GIBSON

It's the job that's never started as takes longest to finish.

Category: Coding

Ruby, Ruby, Ruby, Ruby!

TL;DR This isn’t a post about The Kaiser Chiefs or even music in general – it’s actually a post about using Ruby as a scripting language, specifically for processing CSV files in bulk.

I wouldn’t call myself a Ruby programmer. I’d like to, but the reality is that Ruby is a language I use for side projects – mainly small Rails applications. But I’ve long been conscious that it’s also a pretty handy scripting tool to hang from your belt and recently I found myself using it in that manner.

Continue reading

Project statistics with git, awk & excel

I found myself wanting to get a picture of the history of a project at work yesterday – just general stuff like getting a feel for the growth of the codebase over time, the commit patterns of the developers during key phases etc, etc. I knew I could get a lot of information out of Git, but I’d never really done it before. Cue one late night hackathon!

Continue reading

Writing a church sign-in application with WPF

Two Sundays out of every five I provide technical support for the children’s ministry team at our church, setting up and looking after the laptops and label printers in the sign-in area. The church uses a third party, on-line application for this and when everything is running smoothly it’s a great solution. But sometimes we have problems with our internet access and then we have to revert to a paper-based process. If our church was small that wouldn’t be a big deal, but we’ve reached the kind of numbers where handwriting labels is really not OK any more – for example on Easter Sunday we signed in almost 400 under elevens across the two morning services, that’s 80 more than the same Sunday last year! So I decided we need an offline system that does just enough to keep the queues moving, and our fantastic volunteers smiling, when we need to resort to “Plan B”.

Continue reading

Styling forms with Twitter Bootstrap

Lets be honest, I’m a coder not a designer. And like many coders who are not designers, I use Twitter Bootstrap a lot. It’s a great framework that works really well, but sometimes I get frustrated by the amount of mark-up I end up adding to style my forms.

Take the following login form example:


<div class="container">

<h2>A simple login form</h2>

<form>

    <div class="form-group">
        <label for="username">Username</label>
        <input type="text" 
               class="form-control" 
               id="username"/>
        <p class="help-block">
            Hint: it might be your email address</p>
    </div>

    <div class="form-group">
        <label for="password">Password</label>
        <input type="password" 
               class="form-control" 
               id="password"/>
    </div>

    <div>
        <label><input type="checkbox"/> Remember me</label>
    </div>

    <button type="submit" 
            class="btn btn-default">Login</button>

</form>

</div>

Continue reading

© 2018 ALAN GIBSON

Theme by Anders NorenUp ↑