Archive for May, 2008

Working days

Saturday, May 31st, 2008

I’m all for reusable code. Whenever I’m coding, I’m constantly wondering if there’s a way that I can further abstract what I’ve done so I can use it somewhere else. Because of this, I came across a problem yesterday that got the better of me a little.

I’m working on a project at the moment that requires me to have an awareness of “working” days. Specifically, when a product is sold, the customer has three working days to cancel their order. This would be all well and good if there was 365 working days in the year, and all companies were the same. I started out with this assumption, but was quickly confounded.

Before I explain how I solved (well, only partially - it would require a calendar app to fully solve it to my satisfaction!) it, I’ll explain a little about how some classes come to be in my workflow. (more…)

More Python and Twitter

Friday, May 30th, 2008

After spending 2 days wrestling with urllib2 and status updates, I couldn’t figure out what was wrong. It just wouldn’t post a tweet. Fortunately, on google code there’s a library for interfacing with twitter that makes it pretty easy. I quite like the idea of a Terminal client for twitter, so I’ll probably finish writing Twitterminal, but I won’t be half as proud of it as if I’d managed to get it working with urllib2. Oh well.

On a sidenote, Textmate is literally awesome. I’ve done a lot of customising it in the last day and the bundles are actually encouraging me to document my code (probably too) fully.

Twitterminal - A Terminal-based Twitter client in Python

Tuesday, May 27th, 2008

So, I’ve just started looking at Python, and I love it. Last night I was playing around with django, which is ridiculously cool, and tonight I started a Terminal twitter client - I’m dubbing it Twitterminal. Imaginitive, eh?

It’s crazy-simple, and I’m not bothered about people using it or ripping it off so go for your life! The Twitter class, twit.py: (more…)

Argh! Silly car!

Wednesday, May 21st, 2008

I love my car. It’s brilliant! For the last (at least) 12 months, it’s been reliable as hell. Sure, it failed its MOT but I was prepared for that and it wasn’t an inconvenience.

Last night, however, when I was supposed to be going go-karting with the guys from work was an inconvenient time for my car to break down. Being the impulsive guy I am I big-fat-went go-karting anyway and left my problem until 11pm last night. Irritatingly enough, my problem hadn’t vanished by 11pm; my car was still overheating, idling high and (seemingly) overfueling. Great. So I think “I’ll try to get it home, then use Charlotte’s car”. This didn’t work. I got to between junction 9 and 8 on the M27 by 11:15pm and that’s where I stayed til 12:15pm when the nice AA man arrived to give me a lift home.

This would be all well and good, I don’t mind spending out on my car because it costs me so little normally, but I really wanted to get a tattoo this month and now I can’t! I also need to look for cheap reasons to test why my car would be playing up, and this definitely doesn’t mean taking it to a garage - I always get the distinct impression someone is trying to steal from me when I go to the garage.

PHP, mail() and OSX Leopard

Tuesday, May 20th, 2008

So I couldn’t figure out any way of doing this, and I can’t stand stuff like this beating me so I’ve been messing about with it for the last hour and it’s finally working so I thought I’d share what I’ve done. Maybe this will get spidered, but mostly it’ll be here for my future reference!

The long and short of this situation is that OSX includes sendmail, but it seems to be some sort of alias for postfix, so you should actually be configuring postfix. Right now, I should probably clear up that I’m by no means an expert on any of this and it’s all been trial and error for me so far so if it doesn’t work for you, I can try and help but I can’t promise anything. (more…)

Out with the old

Monday, May 19th, 2008

So, I’ve been going on and on about all the cool stuff I’m going to do with this domain. By the time I actually get round to doing it, it’s already been done by people who are getting paid for it so there’s no point really. I spend all day making the Internet and, now that I’m working my ass off all day, I’m not really in the mood for big projects when I get through the door!

I’m not really too sure what I’m going to do with this blog, but I’m always reading things and thinking “I’ve got an opinion on that and the world needs to know about it”, so who knows? I can be found in some capacity all on loads of social sites, bookmarking, making videos, listening to music, telling you what I’m doing, tumbling or taking photos (but don’t get me started on flickr right now!) so if you use them, be my friend!

As you can see, the page is Wordpress’ default. My hopes are that Jordan is going to rectify this very soon using his elite skills, but I know he’s very busy so it could take a little while.


Bad Behavior has blocked 119 access attempts in the last 7 days.