April 2013
2 posts
Prove you can program... Fizz-Buzz!
After reading “Imran on Tech > Using Fizz-Buzz to Find Developers who Grok Coding” I felt the urge to quickly doodle a Fizz-Buzz program or two.
For those who haven’t jumped on that link I’ll redact the article:
People with Computer Science degrees fail at simple Programming tests - which makes it a bitch to hire someone decent.
Separate the wheat from the chaff by...
My new Office, thanks to Ignite100
Working at home is a mix of awesome and loathsome.
On the plus side there is no commute, I can cook anything I like for lunch (a massive bonus for me), I have peace and quiet, my office toys (projector, sound-system, whiteboard etc) get to be my cinema and party-fodder and my actual toys (mostly nerf guns and puzzles) get to be my distraction while “compiling”…
Negatively...
March 2013
4 posts
My weekend project - Molecule Match
I like games, but I rarely get the chance to play them. My favourite are games that are hard, like reeaally hard, that make you think, that make you hurt. In business terms it’s a terrible idea to ostracise your target audience to any degree, as such these games are a rare beast.
At the start of the year I found myself yearning to get back to my codey roots and have a tinker with games, I...
OOP - Method Bubbling in PHP
Contrary to my online handle “Object-Oriented David” I use Object-Oriented Programming very sparingly. I do however try to use the right tool for the job and take on as many of the concepts that I love about frameworks and libraries I admire.
In creating a “query builder” for the NexGen platform I ended up wanting to use syntax that I would associate with jQuery; chained...
A Server Monitor that Doesn't Suck - End Result
To follow on from the last post - on Friday I quickly cobbled together a simple server monitor that I’m proud to show off, it:
Looks good full-screen
Shows a single metric at a time
Slowly fades between metrics
Highlights the severity in a way I can see in my peripheral
Works on mobile devices
While I’ve only 7 metrics up and running the basics are in place so I’ll slowly...
A Server Monitor that doesn't explode your...
I’ve been looking forward to the final item on my weekly todo, so much so that all other items have been completed with gusto! Time to:
“Write a server monitor that looks effing awesome”
The rationale behind this tangential quest is that while playing with nagios I can’t help but think that, while functionally useful it’s visually unappealing - viz. I will never...
February 2013
1 post
When you *have* to install all the Internet...
You know how it is, you make something awesome for a company, they all use modern browsers, but their customers? Oh, they’re still rocking IE6 and 7. I quite honestly thought those days were long behind us.
Well, they may seem like dark dark days, but at least we’re not alone - with the advent and growing popularity of github and general open-sourcery I managed to find this GEM of a...
October 2012
1 post
Inspired by MailChimp: No more social Logins
We’d been A-B testing a new “login with Facebook” and “login with Twitter” links alongside the regular email and password form.
Group A - Half of our users see the normal register and login with email option
Group B - This half also see the extra login / registration options
We noticed that Group B (those with three login choices) were having increased login...
August 2012
1 post
One awesome personal finances spreadsheet
Having been involved with a number of “bootstraps” (4 in a row!) I found myself struggling a little with my personal cashflow… cashflaw might be a more appropriate name TBH.
So anyhow; last year after a joyous debacle I decided that it was pertinent that I took the bull by the horns and really get to know just how these things work. Today I find myself more than comfortable with...
July 2012
1 post
1DayLater is evolving...
For the past year or so we have been working on building a new 1DayLater from the ground and I’m letting myself get excited about it; this blog post is clearly premature, but what the hey, I want to write a little about what we’re doing.
http://new.1daylater.com/ - our holding page, isn’t it nice?
your 1DayLater is evolving…
Technology Wise
The easiest changes to...
June 2012
1 post
I'm delighted to announce...
For the past 8 months I have been working on a contract with one of the country’s finest Asbestos Surveying companies Lucion Environmental, developing “NexGen”; an online platform to service their entire company from quoting to site-work, report generation and finally invoices… and then some in-between.
Just last week I managed to “upgrade” my contract to the...
May 2012
2 posts
Who's a Git?
8 months ago I didn’t really *do* branching
today it’s all I do
Linux Screencasting with recordmydesktop
I have today encountered an item on my todo list (the list is so long I can’t actually remember writing this item… madness!) - which is to record a set of tutorial screencasts for a SaaS that I am developing - quicker than writing help-documents and probably a bit more fun. Something I’ve been meaning to try my hand at for a long time!
So there was a little chinstroking and...
April 2012
1 post
1 tag
Redshift your computer monitor. For the Zzzz...
I have recently discovered a neat little package for linux called “Redshift”; so simple and elegant and very worthy of a mention on the blog.
http://jonls.dk/redshift/ - cheers Jon Lund Steffensen!
Once installed and running at startup, redshift adjusts your monitor(s) colour “temperature” to match the time of day / year and local weather conditions. With all these...
March 2012
2 posts
Automatically backup MySQL to Amazon S3 (and a...
I’ve been revisiting my backup scripts today and I decided to publish my notes on how to backup your MySQL databases to Amazon S3 - I forgot just how simple it was:
Install s3cmd
Write a bash script that…
lists your databases
dumps them to a temporary file
uploads them to s3
deletes the temporary file
Run it with cron every night
The full instructions are here:
...
Refactoring an old database for multilang support
I’ve recently had the opportunity to revisit and re-factor a database that I wrote designed a decade ago; it’s still up-and-running with heavy traffic however it’s become difficult for the current developer to maintain (hey Dad) and the client is looking to add a multi-language slant.
the old, non-relational database
the new relational database + multilang translations
...
February 2012
2 posts
A nice search solution and interface :-)
You’ll probably get lost in this post. I should doodle a diagram… Apologies.
So today I’ve tasked myself with improving the search feature on the NexGen project (itself a post for another day), the scenario is this:
A Company has Contracts
Contracts are linked to Accounts and Primary Contacts
Contracts are made up of Jobs There may be hundreds or thousands of Jobs in the case...
1 tag
Deploying with Git(HUB)
The last post about deployment was good, but I ran into a few problems to do with submodules. I am developing 3 web-apps in parallel that all use common code, so in keeping with DRY methodology the apps simply link to submodules in order to share code. With the technique outlined in the previous post submodules were not automatically updated; making it all but useless for my needs.
So today I...
January 2012
16 posts
Deploying with Git > handy hints
With regards to deploying your site with git, there’s some potentially confusing posts out there; a quick google for “git deployment” will turn up a few (seemingly) outdated posts (I’m using git version 1.7.4.1 at the time of writing), ie:
http://ryanflorence.com/simple-git-deployment/ I had a few problems with this one when I got to the push stage, apparently this occurs...
The best programmers CV I could think of
The curse of the creative type: “my blog needs a new skin” or “my business cards aren’t moo enough” or in my case “my CV is no longer appropriate”.
You’ve guessed it, I’m looking for full-time employment. Not freelance contracts, more projects or exciting startups (they’re good and all) but I’ve become keen to learn from a the kind...
2 tags
Mentoring - day 1 - the plan
Today was the first proper meeting between myself and Ben “Presentation Player” Cooper, we decided last week that an ideal and productive way to teach / learn JavaScript concepts would be with a real-world project. So we planned:
Tweakr
A javascript plugin for tumblr themes
that tallies up the tags used by the blogger
or uses cached data from localstorage (for speed)
and renders...
2 tags
designer tricks - test many fonts on your site
When designing font-orientated sites like my very own oodavid.com it’s wise to test different fonts to make sure you’ve found just the right match for the job. Using modern techniques it’s pretty straightforward to just include a new font from google fonts or another font repository then tweak your CSS to fit the match. Pretty simple stuff really.
But what about when you want to...
1 tag
Psuedocode - How to rapidly plan your work
At some point in my coding life I got into the habit of writing a sort of comment-soup-pseudocode as a way of planning the work ahead of me. Depending on the language and environment I often end up with a mix of basic programming structures (functions, objects etc) flooded with notes about the work I need to do.
For example I am (right now) writing a sites manager for a client, they need to be...
How to write a blog post in a jiffy
Write it shoddily, then post it instanty. Theres nothing like fearing your peers think you’re a moron to to speed up the proofing and editing process.
Same as delivering prosucts really.
PS - This post was left unedited. Apart from this line. Which is an edit.
3 tags
Meet my protégé > Ben Cooper
Having worked a little with Ben last year, I was pleasantly surprised to receive an email asking if I’d be willing do some tutoring in the ways of javascript; what a major compliment! I’ve just returned from our first meeting at the Settle Down Cafe (notice the pointing dude behind Ben? Legend of a gent, another story), it has indeed been settled, we’re to meet every Tuesday in...
2 tags
My Chrome Extension > Tweakr
No time to blog properly, but I quickly knocked up a chrome plugin that modifies the tumblr interface for extra blogging power!
The main feature is a new “quicktags” section that helps you maintain a consistency in the way you tag your posts, hurrah!
Tweakr extension
Tweakr on GitHub (of course it’s open source you sillies!)
More on this later, suggestions welcome!
1 tag
CSS / jQuery how to toggle scrollbars for a...
A few months back I was reverse engineering the Facebook photo overlay and noticed that they have employed a very neat trick with-regard-to scrolling; when the photo “popup” is active, the body underneath does not scroll.
It’s a very subtle UI feature but fixes a thoroughly annoying “bug” for many people. Normally when you view scrollable content in a...
Anyone up for a 24-hour hack?
All of life’s best bits happen in brief but intense passages of time:
birth
falling in love
earthquakes
godzilla attack
24 hour nerd a’hack
beautiful, just lovely
So if you’re a nerd, designer, animator in Newcastle (or with a railpass) or just like coffee and pizzas you could do worse than sign up to The Culture Code Initiative megahacks and whatnot (a codeworks...
1 tag
Terrible Tumbling
You we’re going to get a post titled “scope is spaghetti” but instead I’m going to try my best at being angry that my blog was hacked by a tumblr theme (you saw the posts, let’s not be sheepish).
You ready? Here goes…
Ah well, I might get mad another day!
For now, I’m going to use this ill-fitting theme while I have a scour of the internets for...
1 tag
Recipe > Mushroom Pâté
Take a peek at tomorrows menu:
Tasty or what? So yes, I have been charged with the main course of “Boeuf Wellington” aka steak, pâté and pastry. In the fridge there is some most excellent mushroom and liver pâté chilling for tomorrow. It tastes sublime.
wedge of butter (70g at a guess)
3 rashers of bacon, (probably not necessary)
5 shallots, finely chopped (or a regular onion)
...
1 tag
node.js - a static file server
Previously: Hello world… of node.js
Serving up a plaintext “Hello world” for every file (see previous) isn’t exactly that useful, but it exposed the basic mechanisms we need to make a file server. Today we will update the code to serve any file requested, there’s no validation, it’s stupid like that.
Open up (or create) server.node.js and dump this into it:
/**
*...
1 tag
Princess of Milk and Honey
I’ll resume the usual code and food and productivity gubbins shortly, but I feel it is my duty to introduce you to the Princess of Milk and Honey
lush
2 tags
New Years Resolutions
I’ve had such a lovely time this festive season; lots of food, lovely people and a few odd party-games. I hope you’ve all had a great one too!
At the stroke of midnight I made 3 resolutions*
Bendy
Handy
Teeth
I bet you’re thinking “what a weirdo, they’re not resolutions”, but there’s wisdom in the brevity and I assure you they will serve me well!
...
1 tag
Hello world... of node.js
Previously: How to install node.js on Linux
Today we learn how to create a simple webserver with node, it’ll take you about 3 minutes :-)
Create a file called server.node.js and dump this into it:
/**
* Hello world server
* every request to the ip gets the same response
*/
// Require the http library
var http = require('http');
// Create the server
var server =...
December 2011
2 posts
1 tag
How to install node.js on Linux
How to install node.js on Debian-based Linux distros (Debian, Ubuntu, Mint etc)
1 - Install the dependencies (chances are you’ve already got most of these)
sudo apt-get install g++ curl libssl-dev apache2-utils
2 - Then install git (you may already have that too)
sudo apt-get install git-core
3 - Clone the node git repo…
git clone git://github.com/ry/node.git
4 - Then install
cd...
1 tag
Dad's Cart!
It’s been a while since I’ve blogged, but my word have I been a busy boy! I’ve decided to quickly take the opportunity to blog about one of my simpler (ie, quicker to write about) projects; a small jQuery script that adds shopping cart functionality to a website. I wrote it as a small favour for my Dad and is aptly titled “Dad’s Cart!”, we’ve already added...
November 2011
5 posts
2 tags
Social Media Revolution
Another great video by Socialnomics; pretty thought provoking stuff!
1 tag
CultureHackNorth - poke that!
So I’m at the arse-end of the Culture Hack North in Leeds; I’ve been awake for about 30 hours and I thought it’d be nice to write a blog and introduce my project and walk through the process…
Khakaure!!! < get yer click on
after settling on an idea, I drafted the original plan. Like a fool I made it in portrait…
new plan in a more webby sensible layout
At this...
1 tag
CSS a tip for printing :-)
Super quick tip today, if you want to style your pages for printing then you really must add this to your arsenal of snippets:
.selector {page-break-inside: avoid; page-break-after: auto;}
which stops elements from being sliced in half when they get printed.
before and after
1 tag
GF Buckwheat parcels, they're flippin' awesome!...
I’m excited with this mornings breakfast photos so the recipe will have to wait till the end…
Fry up a buckwheat crêpe till the edges start to curl
…once curly, flip the pancake and crack an egg onto the cooked side
…add cooked bacon and mushrooms, cherry toms, spinach, cheese, salt & pepper
…fold in the edges to make a parcel, this can be a bit fiddly - I...
1 tag
Weekend app - the votes are in!
Well that was exciting! For a moment Nelson de Craab was in the lead only to be pipped by OOSubs after a dinner party and some in-person votes were cast - crazy times. They could have Tweeted me from the other end of the room… some people eh?
So on the 12th and 13th of November I shall be doing a power session (possibly at the Leeds Culture Hack) working on the OOSubs project! I’ll...
October 2011
6 posts
2 tags
How to write a perfect daily task list
I’ll announce the winner of the “weekend project” poll in the next post ;-)
These are the rules that I give myself when drafting my daily task list. Your task list MUST…
be the first thing you do every day I write mine after breakfast before brushing my teeth / showering etc
use yesterdays list as a startpoint in case there’s anything incompleted or left-over
...
1 tag
Vote for a weekend app!
It’s been decided that on the weekend of the 12th of Nov I shall “scratch the itch” and create something using my nerdy skills - after skimming my Ideas Bucket (a big, daft google doc full of ideas) I have rounded up a few non-too consuming ideas; write me a comment, tweet, wall-post, carrier pigeon etc and let me know what you think I should do!
1 - Revisit oosubs
...
1 tag
Now *that's* a whiteboard!
So you saw the raw projector mount I rigged up on Saturday right? Well I spent some time on Sunday painting the “screen” with whiteboard paint; now I have a home cinema and somewhere to brainstorm my ideas - huzzah!
[I was going to upload a picture of a white wall, but I’m confident you can imagine a large white square in a sea of magnolia… you’re an intelligent...
1 tag
Today I made... a projector ceiling mount!
Try and buy a “non poop” ceiling mount for a projector and you’ll be lucky to get one for under £40, so I did the logical thing and made one for about £2.50 - and it’s perfect for my needs! Hurray for wood :-)
the low-rez photo hides all manner of sins
To finish the job I am applying Rust-Oleum Dry-Erase paint onto the surface opposite to act as a dual purpose...
1 tag
on working with your Dad :-)
At the tender age of 13, as my friends were picking up paper-rounds I found myself picking up tomes of programming books - for the fun. My favourite hobby was trying to grasp something firmly outside of the normal school experience, programming and physics were the most exciting - there’s just so many boggling ideas to transcend!
Going back it makes a lot of sense; my Dad had recently...
1 tag
Unripe chillis? 'ave a banana!
A little factoid:
Fruits pump out the Ethylene hormone when ripening
Ethylene stimulates the ripening of fruit
Fruits pump out the Ethylene hormone when ripening
Ethylene stimulates the ripening of fruit
Fruits pump out the Ethylene hormone when ripening
Ethylene stimulates the ripening of fruit
…and so on!
Armed with this knowledge I decided to turn to the humble banana, a...
September 2011
14 posts
4 tags
Ignite Newcastle, subtitle love and sushi
I love Thursdays, I love all days really; there’s always something happening to make you smile! Yesterday was no exception, after a good day’s graft (I must blog about this contract soon) I popped over to the Codeworks Ignite event to have my neurons tickled and tickled they were!
The first speaker Tristan Watson (a beautiful soul) talked about how an idea is only important once...
2 tags
2 tags
Self portrait...
Turns out I am not much more than a squiggle…
Might use something like this for my business card - I don’t have one yet y’see. Needs text though, how abooouuut:
oodavid! what a nice business card you have… aka “the classic”
David King - create problem solver - full service web development aka “what it says on my website”
David King - STRAIGHT...