New Site for Me!

After a long time with no site at all really I have finally got round to putting something together to put up here in on the web. The content is much the same (at the moment) as the old site, however I plan to develop this over the coming weeks, with new posts and a portfolio section.

I have come to the conclusion that it is really hard to maintain your own site when you are so busy working on other projects. In fact I wonder if a sign of a good developer (I don’t think I am that bad!) is that they have a less than great site? I am therefore going to be using this site as a testing ground for trying out new things.

The first of these is to try and use a Commercial theme and therefore I have opted for the Minimalizine theme. This is a child theme as I have made 1 or 2 modifications to the display of content, particularly for the different post formats.

So the experiment begins, I hope to have regular posts about the stuff I am working on at the moment in the near future.

Re-Installing Mac OS X Mountain Lion for Resale

I have recently sold my iMac on eBay. I have a MacBook Air and was not fully convinced when I purchased it that it would be good enough for a main machine. How wrong was I, which left me not really needing my iMac hence the reason for the sale. Therefore I needed to wipe it and then re-install the OS ready for sale. Here is how I went about this.

Previous to Mac OS X Lion all Macs shipped with Install discs containing the Operating System and any additional software that was installed on the machine. However starting with Lion and afterwards the Mac App store meant that Mac OS X was all done with digital downloads and therefore Apple stopped providing install discs with Macs. What Apple failed to announce in a prominent place was that all Macs then included a Mac OS X Recovery partition which could be used in order to restore your machine to a vanilla install.

With this in mind I took the steps below in order to wipe my Mac and re-install the OS ready to set the item after a sale.

  1. Backup all data from the Mac. I use Time Machine with a Time Capsule and therefore I just checked to make sure that the latest backup had run correctly (which it had) and therefore I knew all my stuff was safe.
  2. Deactivate the computer in iTunes (should you use this for your music etc. of course). Purchases from iTunes are only allowed to be played back on 5 computers and therefore you should remove this one as you will no longer need it again.
  3. Deactivate any other software that you may have installed that is only authorised for one machine. I was running Adobe CS5 and therefore I needed to deactivate this so that I could then activate this on another machine.
  4. Sign out of iCloud services and then turn them all off.
  5. Next you need to restart your Mac, holding down the Command + R keys which will restart your Mac into Mac OS X Recovery Mode. From the screen that appears you should select Disk Utility.
  6. Here select the main disc in your Mac with all your stuff on it (probably called Macintosh HD). On the right panel click on the Erase tab and then select security options below. I would not choose anything lower than to zero out the data but would recommend higher. The higher you choose the longer the erase will take (it could be anything from a couple of hours to 15 hours depending on the security level you choose and the size on your Mac’s hard disc).
  7. Once the disc has erased close Disk Utility and then click on the “Re-Install Mac OS X” option from the window. Follow the instructions here. One thing to note here is that it will ask you for your Apple ID at this point. I was worried that this would ’embed’ my Apple ID into the install – something I did not want as I was selling the Mac. However this is not the case as your Apple ID is only used to verify that the OS is legal.
  8. Once this is done your Mac will restart and then arrive at a screen for your to start setting up your Mac with a language and user etc. At this point press Command + Q in order to quite the installer as you want the person that has bought the machine to go through this.

Hopefully the purchaser will have no problems with setting the machine up from here as it will be as new for them when they turn it on. The one that I did wonder about was what happens if the disc fails? This would mean there is no recovery partition. Perhaps there is the option to build a bootable recovery thumb drive? More research needed!

DVD Editing Tool – myDVDEdit

For a while now I have used a DVD recorder to record things off the TV, mainly before the invention of Sky+ and the like. However one problem that I noticed was that the DVD recorders (and I did try more than one) would never save the aspect ratio of the recording correctly. Playback on the DVD recorder was always fine but another play and it looked either stretched or squashed. Then I found the solution, a little Mac App called myDVDEdit.

Once you have a copy of the DVD from the recorder (I just copy and paste the two folders from the DVD to my local machine), this App allows you to modify the DVD info file which contains all of the information about the DVD including the aspect ratio. The App allows you to change the aspect ratio of the menus and the main video which when I checked was always incorrectly set to 4:3 rather than 16:9 which was the native aspect ratio of the program as it was transmitted.

You can download myDVDEdit and read more about it here.

Reinstalling Mac OX 10.7 Lion

My 27″ iMac upon which I work on for all my development work is an amazing computer. I purchased my in spring 2011 and it was just over a year old. Most computers, particularly PCs based on the Windows operating system, need a rebuild from now and again to remove any ‘rubbish’ and clutter that every day use can add to the system. Therefore here is how I set about reinstalling the operative system and starting again.

Step 1 – Back Up

This sounds obvious but the first stage to rebuilding your machine is to backup all of your content and data that you want to keep. I am not really talking here about applications as you will want to install these from fresh, either through the Mac App store or the original downloads or install CD/DVDs provided. What I am talking about is the documents, presentation, images, video and all the other stuff that you will of course want to keep.

Although I use Time Machine to backup my Mac, which is an excellent fail safe, Time Machine backs up the whole system, including that ‘rubbish’ that builds up over time. Therefore it would be pointless to rebuild it using this backup. Therefore the night before I scoured my hard drive on the iMac for all the stuff that I wanted to keep and then copied this to an external hard drive.

Step 2 – Boot Your iMac in Lion Recovery Mode

In order to be able to delete all the files on the hard disc of your Mac you will need to restart your Mac. On restart (when you here the restart noise) hold down Command + R on the keyboard. A window will then pop-up with some options.

As we want to start from fresh I choose to use Disk Utility in order to delete the main hard drive in the Mac. Then I went through the steps of reinstalling Mac OS X, which is another options in the pop-up window.

This takes a while but puts a clean copy of OS X Lion onto your computer. Your computer will then restart and it will act as if it was the first time you turned on the computer.

Step 3 – Setup OS X

OS X now boots and it will take you through the setup process in the same way as when you first purchased the computer. You will have to connect it to your Apple ID, enter a username and password etc. and choose some Keyboard and time settings to use for the system.

Step 4 – Copy Over Your Documents and Applications

Now you can use the external hard drive you copied your files onto in order to copy them back to your Mac with its brand new installation of OS X. The approach I take here with applications is to only install an App, when you actually need it. This will speed up your system and you will be surprised at home many of them you never actually re-install.

So there you have it  a quick guide on reinstalling Mac OS X Lion to give yourself and clean factory settings install to freshen and speed up your Mac.

New Design for 2012

Its been a while since I last had a redesign on this site. In fact is was early in 2010 and the old design did come off the back of a previous web design I did which I liked rather than one that was designed for purpose. Design is not my strong point and therefore this time I have decided to get a little help from the experts – the guys over at themify.me.

I have previously purchased the Sidepane theme for a project a while ago (purchasing premium themes teaches you lots when you delve into the code) and very much liked the theme. However there were some things that I wanted to change. Like many premium themes these days there are endless theme options and settings and it needed stripping down to the minimum. Therefore I thought I would try my hand at a child theme.

Child theme are used so that you do not alter core theme code. This means when you come to update the theme, as most themes release updates on a regular basis, you won’t lose any of the customisations that you have made. The theory behind this is very true. However in order to get the desired functionality that I wanted, I have ended up with lots of template files and folders, all of which will not get updated and contain important functionality.

The other main thing that I needed to do was to add some more template files for my custom post types of bookmarks and code snippets. These, I suppose where inevitable.

All in all I am happy with the outcome – what do you think?

Transferring a Domain Away from namecheap.com

Recently I had the task of moving a .com domain away from NameCheap (a domain registrar) over to a 123-reg account that I was much more familiar with and would be able to help out the client. The process, although not particularly difficult, does involve quite a few steps and therefore I thought I would share how I managed to transfer a .com domain away from NameCheap.

To make this easier to follow I am going to outline the steps in a numbered list.

  1. Login to your NameCheap account and you need to request the EPP code. This is an authorisation code which allows the transfer to take place. The EPP code will be emailed to your account email address.
  2. In your NameCheap account make sure that the administrative contact email address for the domain you are transferring is correct as emails will be sent to this address about the transfer.
  3. Login to your 123-reg account and then search for the domain you want to transfer as though you are buying it. When 123-reg returns the list of domains available you should see a transfer link next to the domain. Click this and then add to basket. Follow the instructions to purchase the transfer. It is actually free because although you pay a transfer fee, 123-reg extend your domain by another year
  4. Once this is done, check your email account that is the admin contact for NameCheap. This email can take some time to come so do not worry if it doesn’t come straight away.
  5. Follow the instructions in this email. At some point there will be a link that asks you to enter the EPP code that was sent over. Do this and confirm.

That should now be all that is needed to make the transfer happen. It can take around 10 days in total for the transfer to work and therefore patience is the key!

iMac Replacement at Last!

Having bought my 27″ iMac in early May it developed a fault whereby the screen froze every now and then and filled with mosaic dots. During this time the mouse moved but all other functionality ceased. As the iMac was under warranty I booked an appointment at the Genius bar at an Apple store and returned it to explain the problem.

It was clear that the ‘Genius’ didn’t know what was wrong but recommended a video card replacement. During the consultation it was also clear that the screen had a dead pixel and therefore a new LCD screen was required as well as a replacement to fix this screen flaw. What surprised me was the cost of replacing the video card and LCD display which is outlined in the image below. I would have thought that at this price (plus extra repairs – see below) it would have been more economical to replace the computer and fix this machine in their own time.

A week went by without hearing from Apple regarding the problem. Today I received a call from the Apple store indicating that they had noticed further problems every time they had added a part to the machine including a new logic board. Due to the increasing amount of problems with the computer the ‘genius’ on the phone indicated that they would be replacing the computer under warranty for the equivalent current model. I am pretty sure that this is much better than the model that failed so I am quite pleased actually. Hopefully I should be able to pick the computer up tomorrow and they even said they would migrate the data from the old machine.

Photoblogging with WordPress

For a while now I have used Flickr to host all my photographs and I like the service that they provide with their relatively good value ‘Pro’ package. However for a while I have wanted to own my own data and therefore I wanted to move to a solution where I could host my own images which were more under my control. Therefore I decided to go about constructing a PhotoBlog theme using WordPress whilst maintaining some of the Flickr features we have come to know and love. Here is how I went about building my WordPress PhotoBlog theme.

The first thing to do was to think of a domain name that could be used in order to house the blog. I thought for a while about this as it is an important stage as it will be with you for a while. Looking at what I wanted and what was available meant I was limited although I finally settled on photomark.me. I quite like the .me top level domain (as you can tell from this blog) as it works well for anything relevant to a person in my opinion. Once I have purchased the domain I added it to my cPanel account and then installed the latest version of WordPress.

The next major decision which I faced was to decide on the different sizes of photos that I wanted to create for each photograph that I uploaded. This was something that I have always liked with Flickr in that when you upload a photo it creates a range of different sized photographs which you can use. I wanted to use this in this blog too. With WordPress already producing a Thumbnail, Medium and Large image alongside the image you upload it does a lot of this for you but I wanted to add a few more image sizes. Thankfully you can declare extra image sixes using the add_image_size() function in your themes functions.php file.

The next thing was that I wanted a way to display links to all the available image sizes next to each of the photos. A quick search around and I found Justin Tadlock’s solution of Linking to All Image Sizes in WordPress. This was great as it includes the images sizes you have added as well as the standard WordPress image sizes.

The next part was the design. I wanted to use a similar design to this blog to keep the same feel, but I wanted it a little more ‘arty’ Therefore I used some paint splurges here and there on the page titles and added an extra column to display detailed meta information about each post. I also wanted to make use of the WordPress attachment pages to display individual images on. The idea being that a featured image would display on the archive pages, then on the single post page the WordPress gallery feature would display a list of thumbnails and clicking on these would take you to a page which displayed that images larger with the links to the other sized images.

Lets take a look at the different page templates that where designed and how they were produced etc. We will start with the index.php template.

Index.php Template File

The image below show what the template looks like when displayed on screen. As you can see I wanted to include quite a bit of information about the post from this page including a sample image from the gallery.

By including both photos and video in the blog it allowed me to take advantage of the new WordPress 3.1 post formats feature. By adding the appropriate post format to a post, whether it be gallery, image or video this allowed me to use the template tag has_post_format() to check which post format a specific post had and then style the post accordingly. WordPress also assigns a class including the post format when using the post_class() tag.

The WordPress featured image function [the_post_thumbnail()] was used in order to display a selected image from the images uploaded to the post. This image can be called at any size by passing a specific WordPress size to the_post_thumbnail() or by passing one of the sizes defined when we used add_image_size() to declare our custom image sizes.

Single.php Template File

The purpose of this file was fairly straight forward. It needed to display the gallery, which just used the normal WordPress built in gallery functions and display the content of the post as well as providing standard commenting functionality.

Image.php Template File

This was the first time that I have really utilized the use of the this WordPress template file. It is used to display the individual image in your posts gallery. Therefore when clicking on an image thumbnail in the post gallery you are taken to a page template to display the image. The great thing is that you can style and design this as you wish. The design I have chosen is below:

The final thing that I wanted to do was to create shortlinks for each post using the new domain that I bought. I did this using Yourls as well as the associated plugin that goes with it. Find out how I did this in this earlier post that I wrote about setting up and integrating Yourls with your WordPress website.

Most other stuff on the site is standard WordPress theme stuff which is pretty straight forward. I am pleased with the outcome although I just wish I was more of a designer to make it look really cool. Still I suppose we all have our skills! I would love to know your thoughts so please leave a comment below.

Vist the new site at http://photomark.me

Why I’m Not Keen on WordPress Theme Frameworks

WordPress theme frameworks are a relatively new thing. In fact they seem to kick off when WordPress introduced the use of child themes back when WordPress 2.7. was released. However they have really caught on over the last couple of years, with many different frameworks now available for use. Here I want to talk about how theme frameworks are built to be used and my thoughts on their success.

As mentioned most theme frameworks rely on the parent and child themes process. You create a child theme based on the parents theme framework and therefore when the framework is update you changes are not lost. Most of the frameworks that I have seen out their including one I have used extensively, Thematic are essentially a parent theme. That is they are a WordPress theme that you add to your wp-content/themes/ folder. You then build a theme using this parent theme framework as your parent theme. This means you have access to all the frameworks functions and code.

So that all sounds great, but why therefore am I not that keen on using theme frameworks. Well I think it comes down to the fact that I believe that theme frameworks at the moment are going about this the wrong way. They way they are at the moment is more restrictive when they are supposed to add functionality rather than preventing theme authors from doing things in certain ways.

I created a number of child themes for a client recently using the Thematic theme framework. The idea of these child themes was that the parent theme (the framework) could be updated and this would not affect the child themes display at all. However in order to get the design and functionality elements that I wanted I ended up with child theme functions.php files that we a couple of 100kb each and about 5 or 6 theme template files that would overwrite the template files in the parent framework theme. Surely this cannot be right as child themes are supposed to be lightweight and really on contain a styles.css file and a functions.php file so that all the bulk is used from the parent theme.

To me a better way of doing things would be to make it so that the framework was not a theme at all. In fact is was simple a folder that could be added to your own parent theme and then activated with a line of code (like a PHP include) in your themes functions.php file. This seems to be the approach that themify.me have taken with their theme framework which works well.

I realise that this may well cause a great deal of debate. Maybe I am doing something wrong with the use of parent theme based frameworks. I would love to hear peoples thoughts on this.

Backup, Backup & Backup Again!

If you are like me then you have probably been using computers for many years and have accrued thousands of files on your computers hard disc, from things like photos and videos to documents and spreadsheets. Have you ever thought about backing these files up to keep them secure in case your computer fails? If not then this post is going to outline some of the options.

If you have never had a computer fail on your or a hard disc fail then you are a fortunate person, like me. They are rare events although they do seem to be having more and more. But there are many other reasons for you to make sure that you have a backup of all the files on your computer. For example if the worst should have and there is a fire in your house or a car crash, breaks your laptop, you need to have a backup copy of your work. I have at least 50gb of photos and videos on my computer that are irreplaceable should the worse happen. If they were lost those memories would never be able to be retrieved. For this reason along you need to backup.

Backup Options

So what are your options for backing up? Well as usual in my experience things get a whole lot easier here if you have a Mac rather than a PC running Windows. Macs come built in with backup software called Time Machine. Time Machine IconThis software works by backing up the entire contents of your computers hard disc (everything) to an external drive (either USB or over a network) every hour. It then keeps these backups and they grow over time. The software works without any input from the user (except a touch on initial setup to tell it which disc to use) and then it does all the work in the background. Seriously if you are not using Time Machine and you have a Mac, you need to start now and set it up to start backing up your computer.

With Windows there are backup software solutions out there. However in my experience they can often be expensive and moreover complicated solutions to a simple problem and then just never seem to be that good in my opinion. Therefore I have always resorted to the manual way on a Windows machine. The first step is to make sure that all of your files (photos, videos, documents, basically everything except your programs or applications) are stored in your User folder (what was My Documents and is now called Documents on Windows 7). I then entered a reminder into my calendar (either on your phone or Outlook etc) to remind me to backup every Sunday (or whatever day suits you). Then at that time I would simply take a copy of that folder to an external drive so that you have a weekly copy of all your files.

Remote Backup

I mentioned above about if the worst should happen. Most of us that do backup store our backup drives either in the same house as the machine you are backing up, or those with a laptop perhaps store the portable hard drive in the same laptop bag as the laptop drive. Therefore an accident should occur that involves the computer then it would mean that the backup drive suffers the same fate.

The solution to this of course is to have some sort of remote backup solution. The most basic form of this would be to take a backup and then take the drive and store it elsewhere. For example you could take it to work and store it there or to a friend or neighbours. You must however make sure that you continue to backup to this disc at regular intervals so that you have the latest up to date files.

The other alternative is a remote backup solution over the internet, where you files are stored ‘in the cloud’ on the net and therefore in a different locations. Many firms offer this solution. This is not something that I tried, although I have used Dropbox which is a very good service. It would be interesting to hear what everyone uses in terms of online backup.

My perfect solution would be a online service which you could use with Time Machine. Therefore when setting up Time Machine you could select your ‘cloud’ disc and backups are made to a remote location rather than on an external drive in the same location as the computer.

So if you take one thing from having read this then let it be to make you go and backup your files now!