Setting up a cloned Yeoman app

Yeoman is amazing, and will do a great deal of very clever things for you when setting up an app. However one of the clever things it does is to avoid repo-bloat it adds several sections of the app to the .gitignore file. This means that when you clone the app from Github, it will not run out of the box, this is evidenced when you first try to run

grunt server

and you get an error back of the type:

grunt-cli: The grunt command line interface. (v0.1.9)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt hasn't been installed locally to your project. For more information about installing and configuring grunt, please see the Getting Started guide:

http://gruntjs.com/getting-started

Steps for setting up a Yeoman app cloned from Gihub

First of all we need to make sure we have Yeoman installed in NPM, see installing Yeoman on Ubuntu 12.04 for details.
Check for Grunt, Bower and Git
Next we need to check that Grunt and Bower have been installed by Yeoman:

:/path/to/my/app$ grunt --version
grunt-cli v0.1.11
grunt v0.4.2
:/path/to/my/app$ bower version
1.2.8

Providing that is OK, check that Git is installed and accessible from the command line:

:/path/to/my/app$ git --version
git version 1.7.9.5

Git is used by Bower to fetch the app components so will fail if it cannot find and use Git.
Re-initialise the app components
Yeoman will add node_modules and bower_components to .gitignore, so we need to regenerate both of these.
First in your app root recreate the node_modules directory from the package files:

npm install

Then change into your app directory and recreate bower_components:

cd app
bower update

Finally run the grunt server task to complete the build and check all is working:

grunt server

If all is well you should now be looking at your app in your default browser.

Install Yeoman on Ubuntu 12.04

Yeoman is a neat app dependency manager combined with a best practice app skeleton generator using Grunt and Bower.

Check you have your environment set up

No amount of cleverness will get your app to run if the requirements of Yeoman are not met. This is typically Node and NPM and optionally Ruby and Compass if you are wanting to use Compass and Sass to work with Bootstrap. Yeoman will typically install Grunt and Bower for you though as we’ll see that needs checking sometimes.

We’ll test that each of these is installed by changing to the root of your app and checking the executable for each is accessible.

First move to the root of your app, I’m running Ubuntu 12.04 so your method here may differ.

stuart@stuart-desktop:~$ cd path/to/my/app

Now check we can access the Node Package Manager:

stuart@stuart-desktop:~/path/to/my/app$ npm-v
1.3.21

Let’s see if we have Ruby and Compass installed:

stuart@stuart-desktop:~/path/to/my/app$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

If you do not get this you will need to install Ruby. The default Ruby package with Ubuntu 12.04 is based on Ruby 1.8.x which is a bit old, so to get Ruby 1.9.3 we will install the Ruby 1.9.1 package which actually installs the 1.9.3 version (go figure).

sudo apt-get install ruby1.9.1 ruby1.9.1-dev rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev

Now check for compass:

stuart@stuart-desktop:~/path/to/my/app$ compass version
Compass 0.12.2 (Alnilam)
Copyright (c) 2008-2014 Chris Eppstein
Released under the MIT License.
Compass is charityware.
Please make a tax deductable donation for a worthy cause: http://umdf.org/compass

Again if this is not what you see then install Compass which will bring Sass with it:

stuart@stuart-desktop:~/path/to/my/app$ gem install compass

Looking good so far, so we can install Yeoman.

stuart@stuart-desktop:~/path/to/my/app$ sudo npm install -g yo

At this point I would recommend you head over to Nettuts and read Building Apps with the Yeoman Workflow which explains how to set up a default web app and how to use the Backbone.js Yeoman generator to get started with Backbone.js

Asus EeePC 1005pe Hard Drive Recovery

My daughters Asus Eeepc 1005pe netbook seems to have developed some issues on the HDD 15 months after purchase (12 month warranty, bah). Before purchasing a new HDD, I thought I would look into the recovery procedure.

Most Asus EeePC come with a recovery CD, but not so the 1005pe, instead there is a recovery partition with the recovery image on it. Now I used to support Packard Bells et al with recovery partitions when I work for Dixons Store Group, so I know the downsides to such arrangements.

One of the most important things to do with a recovery partition is to get it off the HDD, as if your HDD fails you will need the recovery partition to set the new HDD up with, but (you can see where this is going right?) if it’s on the failed HDD then you are stuffed.

Recover a Asus EeePC 1005pe from the Recovery Partition

Disable Boot Booster in BIOS setup before you perform system recovery from USB flash disk, external optical drive or hidden partition.

Ensure to connect your Eee PC to the AC power adapter before using F9 recovery to avoid recovery failure.

1. Press <F9> during bootup.

Ensure to press <F9> only once during bootup.

2. Select the language you use and click to continue.

3. Click Recovery in the Recovery System dialog box to start the system recovery.

4. The system starts system recovery automatically and follow the onscreen instructions to complete the recovery process.

Backup the Recovery Partition on a Asus EeePC 1005pe

1. Repeat the step 1—2 in the previous section.

2. Connect a USB storage device to your Eee PC and click Backup in the Recovery System dialog box to start the recovery files backup.

• The size of the connected USB storage device should be larger than 16GB.

• Memory cards are not supported for this function.

• A dialog box appears as a reminder if you have not connected the USB storage device for system recovery backup to your Eee PC.

3. Select a desired USB storage device if more than one USB storage device is connected to your Eee PC and clickContinue.

4. All the data on the selected USB storage device will be cleared. Click Continue to start the backup or click Backto backup your important data.

You will lose all your data on the selected USB storage device. Ensure to back up your important data beforehand

5. The system backup starts and click OK when done.

Recover a Asus EeePC 1005pe from a USB storage device

1. Connect the USB storage device that you backup the system recovery files.

2. Press <ESC> on bootup and the Please select boot device screen appears. Select USB:XXXXXX to boot from the connected USB storage device.

Please select boot device:

HDD:SM-ASUS-PHISON SSDUSB:XXXXXXXX

↑ and ↓ to move selection

ENTER to select boot device

3. Select the language you use and click to continue.

4. Click Recovery to start system recovery.

5. Select a partition option and click Continue. Partition options:

• Recover system to a partition.

This option deletes all data on the system partition “C” and keeps the partition “D” unchanged.

• Recover system to entire HD.

This option deletes all partitions from your hard disk drive and creates a new system partition as drive “C” and a data partition as drive “D“.

6. Follow the onscreen instructions to complete the recovery process.

It must be an age thing

I think it must be because of my age, but almost everything about the internet still excites me. I still get fascinated by the immediate nature of the information on the web, just simply the fact that an event in the middle of another continent can be available for me to read about, view on video and comment upon within hours or even minutes is amazing.

I know at the moment we are all supposed to be up in arms about the loss of Public Libraries, but I would venture to say that over half of the hand-wringing liberal arts graduates that are currently bemoaning there loss haven’t been inside on for years.

I am old enough to remember the steps required to find out something in the pre-web world. Hard to believe that not too long ago (I’m not that old), if I wanted to discover a simple fact such as the capital city of Zambia, I would have had to get on the number 97 bus down Abbeydale Road into town to go to Sheffield library then flick through numbered cards arranged in an arcane manner to discover the book I wanted wasn’t on the shelf it was supposed to be because some bloke who borrowed it 7 months ago is currently using it to stand a pot plant on.

Not long ago I repaired my washing machine using information from the web, something I would have struggled to find pre-web. I would have been at the mercy of semi-skilled plumbers ( probably couldn’t have afforded a real one ) whose teeth sucking prefix to a stomach churning figure would have meant the abandonment of whatever plans I had for my spare cash that month.

So I love the empowerment the web brings. As a committed autodidact ( if you don’t know what it means look it up – recursive autodidact joke ) I also love the access to information that the web brings. Not fusty old out of date missing pages coffee stained waiting 3 months for it to come back in information, no, bang up to date breaking news written by inside experts reviewed by peers multimedia presented information.

Don’t get me wrong I don’t dislike libraries, they were the web of their day, and there are many people who owe their education to libraries – my grandfather for one, a self educated son of the soil who could quote and understand classical poetry, music and more thanks to an education carried out through public libraries. But we have found a better way to bring people and information together, rather than transporting the heavy and unwieldy person to the education, we move the agile and weightless information to the person.
Libraries as buildings should not be confused with the concepts for which they stand, self betterment and the universal access to information are the important matters, not the delivery mechanism. As I sat on the upper deck of the No. 97 bus going into town to visit the Central Library, I often noticed a quotation over the door of the Highfield Library on London Road in Sheffield which is as true when the doors of the library opened as it will be when they shut:

“That there should one man die ignorant who had capacity for knowledge, this I call a tragedy, where it to happen more than twenty times in the minute, as by some computations it does”

Guess where I checked up on that quotation?

Sitepoint Sale is worth a look – for the CSS alone

It’s December so it’s time for Sitepoints annual Countdown to Christmas Sale. Now this would be worth while for the excellent offers available each day alone, and I would highly recommend subscribing to the emails informing you of each days deal.

What makes it even more worth while is the beautiful CSS used on the sale page. At first glance it looks like a typical background image page, probably one large image used as a background to the wrapper Div.

No, in fact it is simply an UL, each one of it’s LI elements is a box, with a transparent png background, absolutely positioned and with it’s z-index set so that the effect of depth is correct. It’s just beautiful, so simple, so perfectly done and so POSH.

So the next time a client or a colleague mutters about semantic, accessible HTML being a hindrance to good, creative design, send them to the Sitepoint Christmas Countdown. Who knows they may even find a bargain.

Google algorithm changes are begining to surface

Well I’ve been thinking something was up for a while. It has felt like the tectonic plates in search engine land where once again on the move and one more indication of this has come to light.

List of 9 SEO tips by Google at Pubcon 2010

Courtesy of @VegasBill

Matt Cutts of Google gave a talk to Pubcon 2010 (one of the larger search professionals and affiliates conferences) where he outlined some of the do’s and don’ts from Googles perspective of ranking within their search results pages.

In a post on SearchEngineLand.com the main points from Matts spech were outlined and the one that struck with me was that Google is aware of the rise in search spam and is in the process of moving more resources that were directed temporarily elsewhere, back to help resolve the issue.

My feeling is that Google is focusing on link quality over link quantity recently, and the common practice of spam linking in comment fields and forums is being heavily leaned on. These days the emphasis seems to be on less but better quality links from semantically related resources that are seen to have merit within the topic.

They cannot make it any plainer than to write it in large illuminated letters in front of the largets gathering of the worlds search professionals:

“SEO: Chase Users not Algorithms”

Hear hear.