Category Archives: meaningful labor

NI Design Alliance: The Anatomy of Design #001

Post updated with video — 10.6.2013 

Last night I attended the Northern Ireland Design Alliance’s first lecture of 2013 and the first in a new series called “The Anatomy of Design.” As I often say I’m not a ‘designer’, but this event had much broader appeal than just to the pixel pusher or crayon merchant.

Stephen McCarthy, a native of Dublin and graphic/print designer by trade, spoke on the acclaimed work of the UK’s Government Digital Services. Focusing on the 10 design principles of the GDS and the launch of GOV.UK (or boring.com as everyone’s favourite doom merchants would have you believe).

NIDA GDS Stephen McCarthy GOV.UK
NIDA GDS Stephen McCarthy GOV.UK

The video is now live on youtube. For updates on upcoming Design Alliance events follow @gooddesignni. The next scheduled event is on June 20th and Matt Coyne will be speaking.

Thanks to Richard and Sarah from CC Skills for hosting it and having us along!

Showreel: Build 2012

Jeff Veen - Design for Disaster
The 2012 Build conference videos have been published today on the Build vimeo channel. My first fully HD video editing project, I think it’s come off quite nicely! It’s the fourth year I’ve been involved in the AV production at the conference and previously produced the video for year one, handing the reins over to Peter and box42av.com in the meantime.

My favourite talk was probably Jeff Veen’s, entitled “Design for Disaster”. You should file the album URL away for a rainy weekend. Like this one. Lots of good stuff in there.

Production credits:
Camera: Ross McCartan, Chris Ross,
Sound: Mark ‘Inferno’ Kernohan,
Graphics: Matt DiVito,
Music: Tycho,
Edit and production: me.

Sales pitch:
If you are in need of any web, video or event audio visual solution don’t hesitate to drop me a line.

 

Add automatic URL generation to your Rails App (+ a little about ActiveAdmin)

It’s easy to add a “url” or “slug” field to your rails app, and override the to_param function to report that field. A route can then look for an alphanumeric parameter, like this:

match "pages/:slug" => "purchases#show_by_slug"

But how to generate them without too much manual labour? [manual labour is a good thing, relying on well written gems is sometimes better] Continue reading Add automatic URL generation to your Rails App (+ a little about ActiveAdmin)

I'm going to move my blog…

I want to get away from this current site, it doesn’t show off anything of my professional work nor does the site itself actually resemble or build on anything I’ve made (apart, obviously, from WordPress site implementations).

How to go about this?

Well, I’ve identified the steps I need to go through to migrate the site from WordPress to a Ruby based site, either Rails or Sinatra (just to try my hand something a little different). Actually if heroku get it sorted in time I may throw together a Node.js application — they can be fun.

These aren’t necessarily in the right order at but I will approach them all independently and hope to blog through the process.

  1. Extract the current site’s data into a manageable format
  2. Design a data structure for a new site
  3. Migrate the data from Step 1
  4. Create or choose a blogging solution
  5. Implement Step 4

I’ve already made a start on a site design, I’ve got my data saved and have chosen a method of parsing it, which will form the next blog post.

Site Launch — Tales of the Unexpected

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!

Admit it, you’re one of them huff duffers aren’t you?

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.

Simple Thinking Sphinx on Dreamhost

*** Please note – this will probably not work (at all) (for more than a day of light use) without Cron use. And isn’t at all authorised by Dreamhost!! ***

For a recent client project I’ve used a Dreamhost unlimited account, which for value compared with the resources available and the fact that you don’t have to do any building or setting up of the server environment makes it an easy win for a site that’s not going to have a huge amount of traffic or a large amount of processing.

Post-launch I got to work putting together a basic search engine and here’s a quick run through of the steps it took to get a very simple Sphinx instance working on Dreamhost, and a few hurdles thrown in the way by various googled articles.

Development Environment

Using the guide from FG install Sphinx locally:

curl -O http://sphinxsearch.com/downloads/sphinx-0.9.8-rc2.tar.gz
tar zxvf sphinx-0.9.8-rc2.tar.gz
cd sphinx-0.9.8-rc2
./configure
make
sudo make install

then install the TS plugin into your application

script/plugin install git://github.com/freelancing-god/thinking-sphinx.git

Any problems with that, check out the FG page linked.

Getting a basic search going

Following tutorials such as the Sphinx Railscast will get you there pretty quick.

In your searchable model you need to define an index


class Page < ActiveRecord::Base
  define_index do
    indexes :title
    indexes :long
    indexes :short
  end ...

Run the indexer and start the Sphinx instance:


rake thinking_sphinx:index
rake thinking_sphinx:start

After this you'll be able to search on your object. So using script/console

@searched_pages = Page.search("query")

will return what you're looking for!

Setting up Dreamhost

First things first you need to install Sphinx in your local area, as posted by Hugh Evans:

cd ~/
mkdir -p local
wget http://sphinxsearch.com/downloads/sphinx-0.9.8.1.tar.gz
tar -xzf sphinx-0.9.8.1.tar.gz
cd sphinx-0.9.8.1/
./configure --prefix=$HOME/local/ --exec-prefix=$HOME/local/
make
make install

then set up the PATHs

echo "export PATH="$PATH:~/local/bin"" >> ~/.bash_profile
source ~/.bash_profile

You can choose to set up a CRON task at this point too, but I'm not going into that.

Also at this point in the there's talk of using Sphinx being anti TOS in DH's eyes... but we'll see does the process get killed or not!

Configuring Sphinx for DH

Create a file called sphinx.yml in the RAILS_ROOT/config/ folder.

Because Dreamhost uses an externally referenced MySQL server instead of localhost you need to set up the sql_* parameters:


  sql_host: "mysql.YOURDOMAIN"
  sql_port: 3306
  sql_user: "USER"
  sql_password: "PASSWORD"
  sql_database: "DATABASE"

And because you installed Sphinx in your local area:


  bin_path: '/home/YOURUSERNAME/local/bin'

Finally, after setting whatever memory/fine tuning settings you wish/require set up the locations for the Sphinx files:


  config_file: "/home/YOURUSERNAME/DOMAIN.co.uk/shared/production.sphinx.conf"
  searchd_log_file: "/home/YOURUSERNAME/DOMAIN.co.uk/shared/log/searchd.log"
  query_log_file: "/home/YOURUSERNAME/DOMAIN.co.uk/shared/log/searchd.query.log"
  pid_file: "/home/YOURUSERNAME/DOMAIN.co.uk/shared/log/searchd.production.pid"
  searchd_file_path: "/home/YOURUSERNAME/DOMAIN.co.uk/shared/db/sphinx"

That should be you ready to start deploying.

Deploying

Using Git + Capistrano for deployment (and Passenger for the http server) my deploy.rb's namespace area looks like this:


namespace :deploy do
  task :restart do
    after_symlink
    restart_sphinx
    run "touch #{deploy_to}/current/tmp/restart.txt"
  end
  
  task :start do 
    # nothing  (this avoids the 'spin' script issue)
  end
  
  desc "Re-establish symlinks"
  task :after_symlink do
    run <<-CMD
      rm -fr #{release_path}/db/sphinx &&
      ln -nfs #{shared_path}/db/sphinx #{release_path}/db/sphinx
    CMD
  end
  
  desc "Stop the sphinx server"
  task :stop_sphinx , :roles => :app do
    run "cd #{current_path} && rake thinking_sphinx:stop RAILS_ENV=production"
  end

  desc "Start the sphinx server" 
  task :start_sphinx, :roles => :app do
    run "cd #{current_path} && rake thinking_sphinx:configure RAILS_ENV=production && rake thinking_sphinx:index RAILS_ENV=production && rake thinking_sphinx:start RAILS_ENV=production"
  end

  desc "Restart the sphinx server"
  task :restart_sphinx, :roles => :app do
    stop_sphinx
    start_sphinx
  end

end

There's probably a neater way to do this, but basically this makes sure Sphinx's indexes and conf files live in the shared deployment folder.

I recommend you try all this in a staging area first, obviously... and you can use Dreamhost's control panel to set up a staging subdomain with a new database in whatever fashion you prefer.

Any problems with this script flag them up, please! This is as much for my future reference as you googlies out there.