Last week saw the launch of TOTU: Tales of the Unexpected, a Summer Madness and Exodus project. The site was developed by me with visual identity design by Connie & Craig, the super-talented folks over at beautiful end product.

“TOTU is an opportunity for everyday people to express a part of their lives, a snapshot of faith, or quite simply, an encounter of God – and that’s always worth talking about”

I hope you enjoy watching the videos and maybe feel inspired to share.

So, the site is now live. Enjoy!

Several months ago I blogged about using Textpattern as the CMS for the Harry Ferguson Memorial website. It was while I was implementing that site I realised how Txp should really be used, and that it wasn’t really necessarily the best fit for a site of this nature, as it’s main use is for “publishing” with really no provision at all for page based content management. WordPress does a much better job of this, but still is very much aimed at publishing over curating content.

Perch

I came across the Perch cms and almost instantly knew it would be the right fit for the job. Perch is pretty simple: it has quite a small functionality set, a very clear and linear management console, a fantastic support channel manned by Drew McLellan himself, providing helpful and very prompt responses. At £35 it’s not too expensive for use on a cheap web development job.

Wishes

It would be great if the Solutions section on their website was to be beefed up a little with more code examples and tutorials as I’m sure there’s more that has been and can be done with the perch engine.

Usage

Basic usage is simple. Instead of (like WordPress) creating a series of templates, specifying which content goes to which type of page, and then creating the content with Perch you write each page as a file.php and specify content fields for it. Insert the perch runtime script in the header of each page, and then visit the page:


<?php include('perch/runtime.php'); ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

In your body create some content fields as such, and fill them with the Perch content tags.

<body>
<h1><?php perch_content(‘Harry heading’); ?></h1>
<?php perch_content(‘Harry intro’); ?>
</body>
Go into your perch management console and you will now find two fields available to select, choose their content type and fill in the content.

As the admin user, once you have filled in all the fields your “editors” (the name for all other users) can come in and make adjustments to the headings and the content.

No css, no html, no breaking. Perfect.

ps.. ruby ftw!

“Your password must be less than 10 characters long.”
“Your password must start with a letter.”
“Your password must contain a number.”
“Your password is too insecure!!”

*You’re doing it wrong*

—-
edit: and after all that “We’re experiencing difficulties…” Lame.

So you’re coding along to your favourite type of productivity music [this week mine is country/folk/bluegrass] and turn shuffle off.

You listen to lovely stuff like this .

What’s the problem with listening to Nickel Creek? Without fail Nickleback comes on after and it takes about three tracks to realise what’s going on..

Today I huffduffed for the first time. I’ve planned to for a while…

The word Huffduffer derives from a technology called Huff-Duff [HF/DF] that was used to triangulate the position of radio transmissions. Huffduffing on the web is a way of pin-pointing interesting MP3 files.

Jeremy Keith spoke to Refresh Belfast in December and while I gave up on producing the video because it was so dark in the venue I simply forgot that I’d taken a HQ line out of the sound desk with the recording.

So here in all it’s glory is “Jeremy Keith talking about Huffduffer on Huffduffer about Huffduffer.”

Enjoy.

Seriously excited to hear recently (announced eight months ago) that HBO have been filming a follow-up mini series to Band of Brothers based in the Far East, the Pacific theatre, apparently Sky have bought the UK rights.

Can’t wait to see this:

I’ve always said that if I ever lost one of my B.O.B DVDs I would replace the set, and now that Blu-ray has come along… I probably will!

—- edit 8.6.2011 —-
I did buy the Band of Brothers Blu-ray. It’s epic. And it’s £16 on amazon

In early November O2 iPhone and BSkyB announced that they were releasing a limited free trial of the Sky News & Sports Mobile App [iTMS link] for the iPhone.

Pretty cool? Yes, three months of free small-screen Premiership Football, NHL Ice Hockey and…. wrestling. Pretty lame? Well, craning your neck to watch a three inch screen while sitting or in bed really there isn’t a comfortable way to do it without some form of scaffolding in front of your face. Regardless you can’t look a gift horse in the mouth, and so I enjoyed the ability to flick on or off during a big game to see the score and maybe a highlight or two.

The service costs £6 per month and auto subscribes after the trial ends and I believe it’s on a rolling monthly basis.

I signed up on 11 November, the week the offer was released with an iCal event scheduled for the week before the free offer expired, so that Mr Mastercard didn’t come into play.

According to the offer’s FAQs page you can cancel by going to this SkyID website – I didn’t see that before I cancelled my subscription, so I can’t vouch for whether it works or not.

How to cancel

The MySky site claims that as a non residential Sky Subscriber I’m a ‘guest user’ and not able to view or manipulate my account – so [unless the above link works] you need to call Sky Mobile enquires, the number for which is 08442 411 531 in the UK (& ROI it seems). All you need to do is enter your home number, then confirm your username and email address and tell them you wish to cancel the contract. Quite easy.

Verdict

Good application well executed, but without a TV-out (does the iPhone have one?) or some form of phone stand to relieve your neck muscles it’s a bit of a pain to use.

Every year since I was very young I’ve been coerced into giving up something for Lent. If you don’t know what that is check out the Wikipedia article for loads of information — perhaps more than you need.

Basically Lent is a Christian festival bookended by Shrove Tuesday & Ash Wednesday (that’s Today) on the Winter side and Palm Sunday / Holy Week / Easter Sunday on the other. The period of forty days reflects the forty days that Jesus spent in the desert being tempted, before his final journey to Jerusalem before being tried, sentenced and crucified.

We are told in the Bible that after being baptised by John (the Baptist), Jesus fasted for forty days in the desert. During this time, the devil appeared to Jesus and tempted him. Jesus having refused each temptation, the devil departed and angels came and brought nourishment to Jesus. [source]

Any lenten sacrifice we make is a pale imitation of Jesus’ trials in the desert, but it is part of the journey of a Christian to become more like Christ and as long as what you “give up” isn’t genuinely trivial it can be of benefit.

When I was younger it was chocolate, or sweets, or both which from the perspective of a child was difficult; this year I’ve decided to forsake my Facebook and Twitter accounts from Today until Easter. This is neither equivalent to fasting forty nor a single day, but I do believe it will improve my lifestyle, productivity in work, and encourage me to just turn off the computer instead of wasting time. I’ve decided that instead of consuming so much social media I will instead read more, and write more, hence this first personal blog post in well over a year.

Hopefully I’ll have something to write about.

Are you giving up something/anything for lent?

My old friend Chris has just launched a tennis related blog at http://lovetennisblog.com/

If that’s your sort of thing, check it out!

EDIT AGAIN: Much better..

To get a ‘num_reqd’ array of random objects, you can use something like this.

  named_scope :large, :conditions => ['image_file_name IS NOT ?', nil]
  named_scope :small, :conditions => ['small_image_file_name IS NOT ?', nil] 

  def self.get(num_reqd,features_arr=[],size="large")
    if size=="small"
      collection = Feature.small
    elsif size=="large"
      collection = Feature.large
    end

    return collection if collection.size <= num_reqd

    # num_reqd.times{feature=self.random(collection); features_arr.push(feature) unless features_arr.include?(feature)}
    features_arr = collection.find(:all, :limit => num_reqd, :o rder => 'rand()')

    if features_arr.size < num_reqd
      return Feature.get(num_reqd, features_arr, size)
    else
      return features_arr
    end
  end

EDIT: It's much cleaner and easier to use something in the form below, though the following is probably useful in some cases and is possibly interesting as a code snippet.

User.find(:all, :o rder => 'rand()')


---- end edit.

Working from a baseline of the code found here at almosteffortless.com I've extended a 'random record grabber' to get a specific number of unique records from a Rails data table.

Basically - the random method makes a database call to get the ids of a table, and sends back a random entry. self.get is a recursive method which provides a 'total number required' and a base array to start from (if you wish to specify entries to appear in the otherwise 'random' list). First year computer science should help get your head around the rest!

def self.random
    ids = connection.select_all("SELECT id FROM features")
    find(ids[rand(ids.length)]["id"].to_i) unless ids.blank?
  end

  def self.get(num_reqd,features_arr=[])
    num_reqd.times{feature=self.random; features_arr.push(feature) unless features_arr.include?(feature)}

    if features_arr.size < num_reqd
      return Feature.get(num_reqd, features_arr)
    else
      return features_arr
    end
  end

Be aware, there is more efficiency to be found in the database call (i.e. it should be cached). Also, you'll want to be sure there are at least 'num_reqd' items in the database.