Archive for May, 2015

Adventures of Huckleberry Finn

Sunday, May 31st, 2015 | Books

Ah, The Great American Novel. Mark Twain chronicles the adventures of Huckleberry Finn and Jim, a runaway slave, as they raft down the Mississippi River. Some would see it as an epic tale of the people the two meet while travelling. I, with my in no way biased brain, saw it as the story of Finn deciding between being racially tolerant or following his religion.

Tom Sawyer is an odd character. He just does stupid stuff so that it can be like the movies. Or at least that is the term he would have used if movies had existed in 1884.

The Adventures of Huckleberry Finn

I didn’t have the manga edition. But it looks cool.

Cannery Row

Saturday, May 30th, 2015 | Books

John Steinbeck is better known for his serious and deeply-moving novels, notably The Grapes of Wrath. However, he did have a sense of humour too and wrote several darkly satirical novels, one of which was Cannery Row.

Set in a working sea-front town in the Great Depression, Cannery Row reminded me every much of Catch-22. Probably because both of the audiobooks I have had the same author. But Heller and Steinbeck display the same utterly dry sense of humour when it comes to writing about less-than-ideal conditions for humans to live in.

It’s fairly short, especially compared to some of his other works, and wanders around with a much more relaxed feel to the plot line.

cannery-row

I Shall Wear Midnight

Friday, May 29th, 2015 | Books

Boo, Tiffany Aching novels. They’re good, but they’re not adult Discworld good. The discussion of Tiffany’s life as the local witch was good but I wasn’t even really following the Cunning Man stuff. There was no drama as she was obviously going to beat him and did easily.

I_Shall_Wear_Midnight

Tabs section added to Lyrics Burger

Thursday, May 28th, 2015 | News

Last month I launched a new responsive version of Lyrics Burger. However, the updates have not stopped there! It now has a tabs section, too. This includes entries for guitar, bass, drums and keyboard. It is a rather small collection currently, but who doesn’t want to play Phantom Planet over and over again?

lyrics-burger-tabs

Troubleshooting xdebug profiler

Thursday, May 28th, 2015 | Tech

Xdebug can be used to profile your PHP applications. However, it can be difficult to configure and get working. There are a number of gotchas to look out for.

Enabling

To enable the profiler on every request you can use the setting:

xdebug.profiler_enable = 1

If you want to just enable it for certain requests you can use:

xdebug.profiler_enable_trigger_value

This will allow you to use ?XDEBUG_PROFILE=1 in your query string. However, if you are using mod_rewrite to rewrite your URLs in Apache, you need to make sure the rule has the [QSA] flag in it to pass the query string through or this will not work.

Output direcotry

You can set the output directory to whatever directory you wish using the output dir setting:

xdebug.profiler_output_dir = '/tmp/xdebug'

However, xdebug will not create this directory for you. You need to manually create the directory and give write permissions to the web server too.

Enable gzip compression in cPanel

Wednesday, May 27th, 2015 | Tech

Using gzip compression allows you to deliver website content faster as it can be gzipped on the server and uncompressed on the client, reducing the file size you need to transfer.

Unfortunately mod_deflate, the Apache module required to do this, is not enabled on all cPanel installs. However, if it is, or you have access to the server, you can easily enable it.

Enabling mod_deflate

If you do not have mod_deflate, you need to use EasyApache to add it. Log in to Web Host Manager and go to EasyApache (only server admins will be able to do this). Select build from the previous configuration and customise it until you get to the exhaustive options list.

Check the box next to mod_deflate and then re-build Apache.

Enabling compression

Once you have mod_deflate enabled, cPanel will have a new option. Under “software and services” in the x3 skin you fill find an option called “optimise website”. Click through to that page.

Compress content will probably be set to “disabled”.

Select “Compress the specified MIME types” instead. You could enable it for all content but I would not recommend this as some content you will not want to compress and much of it (images for example) is pretty pointless. The third option allows you to customise.

By default it should have the following options:

text/html text/plain text/xml

I recommend adding some more:

text/html text/plain text/xml text/css text/javascript

Hit “update settings” and you are done!

Tools for validating your website

Wednesday, May 27th, 2015 | Programming, Tech

There are some great online tools for validating that your website is looking and working well. Of course there are loads of these and many of them we’ve been using for years. Below though, I’ve listed a few I’ve been using the most in recent times or that are often overlooked.

W3C validator

An oldie but a goodie. The W3C validator ensures that your mark-up is valid. This is good for two reasons. One, it will find any problems, missing closing, tags, etc, that may be causing weird problems. Two, it will also point out stuff that you could be doing better like semantic tags and relevant meta tags.

http://validator.w3.org/

w3c-validator

Mobile friendly checker

Google are starting to crack down on websites that do not consider mobile users. Of course we all know we should be building mobile friendly websites, indeed, it should be mobile first these days! But it is hard to debug sometimes, especially given the fragmentation of devices.

Luckily Google now provides a tool that will give you a pass and fail, as well as showing you a preview of the site on an Android device. It’s not perfect, sometimes it fails to load assets and you have to come back later, but it is still an awesome tool.

https://www.google.co.uk/webmasters/tools/mobile-friendly/

Google Developers testing tool

Over on the Leeds Restaurant Guide we expose our reviews using the hreview schema. This means that sites like Google can see what ratings we give restaurants and put them directly in the search results. To check it is working correctly, you can use Google’s testing tool.

https://developers.google.com/structured-data/testing-tool/

Facebook Debugger

Recently I wrote about the Open Graph protocol which allows you to tell social networks (mostly Facebook) what titles, images and descriptions you want it to use when sharing a web page.

Facebook have a debugging tool to test your tags are working.

https://developers.facebook.com/tools/debug/

The Utopia Experiment

Tuesday, May 26th, 2015 | Books

Dylan Evans is an academic who works on robots with emotions. Or he was until he sold his house, moved himself and a group of volunteers to Scotland and tried to live out an experiment in whether he could survive the apocalypse. Turns out, he couldn’t.

This book really interested me. Unfortunately, there was not that much about the actual experiment in there. It doesn’t even begin until a third of the way into the book and most of the book is about the mental breakdown he had because of it and his subsequent time in hospital.

This in itself is interesting, though. The realisation of what he has done. In the novel, he talks about re-reading The Blank Slate and remembering that people are not the noble savage he hoped they would be when freed from society. That strong leadership is needed. He had even reviewed the book for a newspaper and yet still ignored it when starting his experiment. It is a sobering reminder into the mind’s power to compartmentalise.

He also realised that society is actually really good. You can lead The Good Life if you want to, but there is simply no reason you need to grow your own vegetables and make your toothpaste – the stuff you can get at the supermarket is fine. Better often.

Does this mean that any vision of utopia is dead? Yes. Deal with it.

The Utopia Experiment

Worfolk Online re-design

Monday, May 25th, 2015 | News

I’m pleased to announce the Worfolk Online network is now responsive. The sites now look great across desktop, tablet and mobile – and we’re even supporting IE8 as well!

I’ve previously blogged about Lyrics Burger and Star Trek: Random Sector, but we’ve also updated:

Check out our updated sites:

  • Branch Planet
  • Greg’s Movie Reviews
  • TV Forge
  • Hardware Tutorials
  • Celeb Linkage
  • Authority Forums
  • Jimmy Turtlehouse
  • Maze Finance
  • Song Meanings

branch-planet gregs-movie-reviews

hardware-tutorials tv-forge

The Varieties of Religious Experience

Sunday, May 24th, 2015 | Books

The Varieties of Religious Experience is a 1907 book by psychologist William James. I first came across James in Richard Wiseman’s book Rip It Up in which Wiseman talked about James’ beliefs in behaviourism, a subject which much evidence is now converging on.

James was also interested in religion as well and gave a series of lectures in 1901/1902, which formed this book. He focuses on direct experiences – that is to say the people who not only talked to god, but god talks back to them.

It was tough going. I didn’t find the language a problem but the subject matter is heavy and following the points made was at time difficult, even though each case was well illustrated by anecdotes.

It was interesting that he briefly mentioned the rise of atheist churches in the form of the flourishing Ethical Societies that were on the rise at the time. From Comte’s Religion of Humanist to the Sunday Assemblies currently sweeping the world, it’s interesting to see how the wheel turns.

the-varieties-of-religious-experience