Monday 21 September 2009

Burnout (but not the PS2 game)

I've got burnout. I'm pretty surprised. I've always been a work 24/7 kind of chap, when I have a project I'm concentrating on I just do it. I work and work and work, sometimes with sleep and food, but mostly just work.

And I've never had a problem before. Except now.

Now. I. Just. Can't. Do. It.

Not only do I feel exhausted and surprisingly emotional, I also haven't got the driving ability to concentrate on the job at hand and just complete task after task. I need to do less work in my day, yet it's taking me longer to do the few things I am trying to achieve. Ironic.

I just did some work for a tutorial tomorrow on back pain, and noticed one of the causes of neck pain can be stress. Incredibly irritatingly, 5 minutes later, I just developed a burning, pinching pain in my right shoulder. And here's a shocker, now I'm more stressed. 

Anyway, so I did a test this morning: The Burnout Self-Test. I managed to score a fairly impressive "63 - You are at very severe risk of burnout - do something about this urgently.". Which is all very well, but I have a medical course to do, that I am not allowed to take holiday from. I have 2 websites to do in the next few weeks, which would mean losing money AND letting down friends. And I have a charity to help run. What gives?

My plan:
  • Take some more me time
  • More prayer
  • Don't take anything else on, but just slowly fulfill current commitments.
Your support is appreciated,
Bless,
Chris

Sunday 13 September 2009

Health, plugs and marriage

So I was ill for a few days, but happily I feel a lot better. Not much to say here today except to publicise two things:

Number one: MedRevise.co.uk. This is my medicine revision website, which I have been running since my very first year. We are about to launch into doing medical smartphone reviews - so please check that out. We are also hoping to see more people contributing to the site itself, so if you have any questions, please get in contact with me.

Number two: I've been really impressed with the following book: The Web Designer's Idea Book, a showcase of some of the best sites I've ever seen, with categorising and comments from the bloke behind designmeltdown.com. If you have a passion for web design, and you appreciate the art and logic behind good design, I think this book is for you.

That's about it - except check out the photos of Mark and Beth's wedding this weekend...

Ta ta, Chris

Wednesday 9 September 2009

Working too hard...?

For the first time ever, this week I have just crashed out from working too hard. Mostly from doing too much web design. So there you go, it's not a surprise, but there really is such a thing as too much php. A shock, I know.

The error probably lies in the fact that my programme for the last week or so has been: get up at 6, do an hours web development, cycle 6 miles to placement, work in clinic as a medical student from 8 until 5, cycle 6 miles up hill home, and work until 11 on websites. At weekends that can just read, get up at 8am, work until 12 at night. Burning the candle at both ends (queue sample illustration).

Anyway, I'm taking some time out, and did a search for relaxing websites. This one is surprisingly relaxing, humour aside. Something just great about clicking, and watching someone else go through stress!

The next one is cool. Pretty sure its not lifesize, but its a bit like swimming with a blue whale anyway. That said, not sure how relaxing actually being face to face with a whale would be.

Finally the cheesy God one. But it is so refreshing to be reminded there is a place of safety to escape to.

Gonna relax, eat some nice food and read Clive Cussler books. And maybe take life a little easier in future...

Monday 7 September 2009

A php twitter feed

I just made a new site - over at allaboutchris.co.uk (probably plugged that enough now), and I wanted to put on a personal twitter feed. But I didn't fancy using the javascript plug in straight from twitter, for three reasons.
  1. I don't like javascript.
  2. The javascript one has an annoying second or two pause whilst it searches for the feed, then suddenly appears, whereas my php has caching.
  3. The javascript one is invisible to search engines.
So, I got busy, and worked out how to do it. Then MaFt wanted to copy my code, so I thought, let's help the whole world! The tutorial begins below:

This is all possible due to the joys of SimplePie a sexy little php number for parsing and caching rss feeds. Download it here.

So, to incorporate the twitter rss feed, first visit your twitter page, scroll down and click the "rss feed of "name"'s tweets" link. Copy the address bar, which should read something like "http://twitter.com/statuses/user_timeline/18453541.rss". That's your personal RSS feed. Exciting, eh?

Now, at the start of your index.php page, put the following code:
<?php
include_once('php/simplepie.inc');
$twits = new SimplePie('http://punkonacross.blogspot.com/rss.xml'); 
include_once('php/twitter.php');
?> 
First line includes the simplepie gubbins.
Second line turns the feed into a variable
Third line is what we are going to write now.

Go create twitter.php, and put the following text in:
//change the 0 and 3 to select tweets. 
//This is the first three. If you wanted the second three, choose (3,6)
foreach ($twits->get_items(0,3) as $blogitem):

$blogcopy = $blogitem->get_description();
$blogdate = $blogitem->get_date('U');
$bloglink = $blogitem->get_link();

//sort out description

//lose the "bigonroad: " at the beginning - change to whatever your twitter username is
$lookfor = '/bigonroad: /';
$putback = '';
$blogcopy = preg_replace($lookfor, $putback, $blogcopy);


//make links links
$search = array('|(http://[^ ]+)|', '/(^|[^a-z0-9_])@([a-z0-9_]+)/i');
$replace = array('$1', '$1@$2');
$blogcopy = preg_replace($search, $replace, $blogcopy);

//make hashes links
$blogcopy = preg_replace('/(^|[^a-z0-9_])#([a-z0-9_]+)/i', '$1#$2', $blogcopy); 

//sort out date
date_default_timezone_set('UTC');
$timenow = date('U');

//change blogdate to text
$difference = ($timenow - $blogdate);
if ( $difference < 1200) {$blogdate = "a few minutes ago";} 
if ( ($difference < 2700) && ($difference >= 1200) ) {$blogdate = "about half an hour ago";}
if ( ($difference < 5400) && ($difference >= 2700)) {$blogdate = "an hourish ago";}
if ( ($difference < 86400) && ($difference >= 5400)) {$blogdate = "a few hours ago";}
if ( ($difference < 172800) && ($difference >= 86400)) {$blogdate = "some time yesterday";}
if ( ($difference < 604800) && ($difference >= 172800)) {$blogdate = "days ago";}
if ( ($difference >= 604800)) {$blogdate = "ages ago";}


//print blog
echo ''.$blogcopy.'
';
echo ''.$blogdate.'';

endforeach;

Not gonna explain it all - you have a brain. But basically, it gets the feed, works out what all the bits are, and adds s to the links - only "@link"s are automatically links in the rss feed, it doesn't change "http://link.com"s and "#link"s for some reason.


Then it turns 08:10:20.10 08/10/09 into "a few minutes ago". Feel free to delete that if you would rather have standard dates, or use other settings from the php date() function. If you want to add more stuff like "about 11 days ago", just work out how many seconds 11 days is (950400), and put that into the equations.

And there you go, voila! See it in action here (okay, just one more plug).

Any questions, just comment!

Ah, that's tweet!

The last few weeks, to my surprise, Facebook has no longer been my home. The thing I run to eagerly to check is Twitter. And when confronted by others, generally with the question "What's so good about twitter?", often quoting the 'fact' that 40% of tweets are mindless babble.

And I don't know how to answer them, it's kind of like asking what's so good about staying in contact with your wife all day through text. It's not so much that its good, but like texting, its soon as normal a part of your interactions as talking, or as writing a letter used to be.

That study probably achieves the opposite of your initial impression. First of all you think "Man, that's a lot of pointless babble!". And then you think, "How much of my normal everyday conversation probably comes under their definition of babble?". The study includes things like "having chips for tea" as mindless babbles. I know that the majority of my texts, calls and conversations follow a what-did-you-have-for-lunch/where-are-you? pattern, which means probably about 85% of my words in those avenues are 'babble'. After analysing the poorness of your own ability to converse, you are left thinking "Wow, twitter is actually considerably more succinct than ALL my other forms of communication!"

So there you go. Follow me on twitter, because I'm less likely to babble than if you meet, call, text or communicate in any other way with me!

Thursday 3 September 2009

Pretentious, moi?

I finally succumbed to that I'm-a-web-designer-and-I-have-a-personal-portfolio-site thing, and I've made a new site - its all about me, and found, unsurprisingly, at allaboutchris.co.uk. Shocking eh?

I would have liked chrislowry.com, but someone else already has that, and anyway, if I'm gonna have an ego site, I might as well make it blatant.

Give it a visit - feedback appreciated!