Splitting a date range in Python
Jul 01, 2014
Dates are one of those annoying things that shouldn’t be, but are regularly difficult in web apps. I used the following two methods in a recent page to neatly break a date range into distinct segments as part of a analytics app I’m currently working on. Hopefully someone else will find them helpful.
import datetime, calendar # Find the delta between two dates based on a desired number of ranges def datedelta(startdate, enddate, no_of_ranges): start_epoch = calendar.
Tips for being a more Productive Freelancer
Jun 16, 2014
Having heard the question raised on @workingoutshow, I thought I’d take some time to share the things that I’ve found have really helped me be productive in my work. These may not work for everyone, but hopefully some points will help for others.
Find a Good Environment The single biggest change I’ve found which has had a major impact on my work is changing my environment. We’re lucky enough to have a small garden at our house and with the arrival of my daughter back in October, I was quick to realise that working in the open plan lounge in our house just wasn’t a viable option any more.
Porting a Wordpress blog to Jekyll: Part 2
Jun 02, 2014
In the second of my posts in porting a wordpress blog over to jekyll, I outline how I’ve replicated wordpress’s default permalink structure on my own blog.
Creating Category and Tag Pages Jekyll doesn’t create category or tag index pages for those categories listed in your _posts source. Instead, you’ll need to use a plugin to recreate them. I used the tutorial here as the basis for my category/tag generator, with my plugins/generate_cats_and_tags.
Porting a Wordpress blog to Jekyll: Part 1
May 20, 2014
As my last post indicated, I recently made the decision to leave wordpress for jekyll for my blogging software of choice. There were a number of hurdles I had to overcome in order to get to a state I was happy with, emulating my previous blog structure. This first post details a few of the setup problems and how I’ve overcome them.
Using Compass for a Jekyll theme The first problem I hit was my use of compass to create parts of the theme I intended to use for my blog.
Bye Bye Wordpress
May 18, 2014
I’ve finally made the move to jekyll for building this site. It is now hosted on github pages, comments are handled by disqus and my post source is written in markdown. My entire site is visible on github and revision control for post entries is handled there too.
What finally convinced me with the release of jekyll 2 was the introduction of native sass support. Originally, the prose theme I’m using for my site was using scss, which I later ported to a wordpress theme in order to blog with it.
Copyright Law Finally Aligns with Me
Apr 07, 2014
On June 1st 2014, some much needed changes are being made to exceptions to copyright law which amongst other things, will allow conversion of personal media between file formats.
Finally, we’ll able to make personal conversions of digital media (at least they will be now counted as legal copies). I’ve long made copies of my cd’s to listen to whilst coding (iTunes allows me to do so simply) – but it is not currently legal to move these files to another storage medium, such as an mp3 player.
Shipping in March: Weeks 2 & 3
Mar 23, 2014
So, anybody paying close attention may have noticed I’ve skipped a week on updating my progress on shipping in March. There wasn’t much to report in week 2 aside from I was busily updating my Nifty Digits site. This hasn’t yet gone live, mainly due to some restrictions on current client projects and publishing about my previous work. I hope to be able to publish it before the end of the month.
Shipping in March: Week 1
Mar 10, 2014
I promised a progress update on how my attempt to get 4 projects shipped this month was going. On my first week, I decided to focus on my time tracking tool, hourglass. I’ve had this in the works for sometime and unfortunately, it’s fallen by the wayside to client work.
I’ve failed on my first week in getting this released to the world, but I’m far happier with how it’s working now and the value it might give to any potential user than previously.
Scaling a Linear Domain to an Ordinal Range with d3
Mar 07, 2014
I’ve had the opportunity of using d3 quite a lot over the past few months for a number of clients. It offers some amazing flexibility for chart generation and much more.
Anyway, I thought I’d share a quick tip I developed for mapping a linear set of values onto an ordinal scale. For those who’re seasoned pros at d3, this probably seems trivial, but had me stumped for some time today.
Shipping in March
Mar 03, 2014
This month, I’ve decided to take some time out to ship projects.
I have a huge list of projects accumulating I’d like to push out of the door, but as a father and freelancer I have lack of a certain commodity in able to achieve them. That would be time.
Currently I don’t have any work booked in for a while, so along with Viv, we’ve decided I should try and get some of these projects released.