Recently I have been learning the programming language Objective-C with the view to creating native Mac OS X programs. I bought the book “Cocoa Programming for Mac OS X” which was a brilliant read and had excellent examples to work through - I’d certainly recommend it to anyone thinking about learning about Cocoa.

I found it hard to get into the mindset of programming using objects (which are all pointers) rather than the usual C/C++ way where you work primarily with data types. But it’s all started to fall into place and I think I have got to grips with it now.

My next step is to create a program which is actually useful! Not sure what I’ll create yet, so keep an eye out!

Posted by Matt, filed under Cocoa, Mac, Programming, Uncategorized. Date: October 20, 2008, 10:10 am | Comments Off

Last week I decided to give iPhone programming a try after having download the iPhone SDK a while back. I started to get frustrated with Objective-C because it’s quite a lot different to my old friend, C++ and so I had problems getting into it. In order to learn, I decided to set a challenge of creating an IP calculator program (something which there are only non-free ones of in the App Store).

I managed to get quite far with the programming and had the software displaying a reasonable GUI which seemed to be pretty good, but I was struggling to work out where to put code and exactly what I should be doing about calling functions on objects (quite different in Objective-C compared to C/C++). Feeling a bit depressed by not being able to understand the code I decided to buy Cocoa Programming for Mac OS X which had very good reviews.

The book arrived today, and I read a few chapters and managed to actually finish the first version of my software! Woo! So, I am now an iPhone application developer… apparently… Hopefully I’ll keep creating better things and improving on this very crude first version.

(Unfortunately I can’t test on my iPod Touch yet as I don’t have a license to install on real devices - it costs $99!)

Posted by Matt, filed under Mac, Programming, Uncategorized, iPhone. Date: October 13, 2008, 8:33 pm | Comments Off

Ever since I upgraded to the latest Leopard release the other week, my MacBook has had random wireless dropouts. It’s been an intermittent issue and has only affected my MacBook and not the iBook (PowerPC) or Mac Mini (Intel) in the house.

I’d been trying various things to get it fixed like changing the security settings on the wireless router, but the only thing which seemed to fix it was changing the “Beacon Interval” on the router from 100 to 50.

So far, so good… just a little tip incase anyone else is having the same issue!

Posted by Matt, filed under Leopard, Mac, Uncategorized, Wireless. Date: September 28, 2008, 7:24 pm | Comments Off

I’ve been meaning to get a proper backup system going for a while now and I’ve finally done so with Leopard’s built in “Time Machine” feature. The one thing I hate about thinking about backups is that you don’t want to test your method thoroughly, as that would require you to simulate a catastrophy (i.e. throwing your computer at a wall, or such like) and so it’s very hard to know what’s going to work. This is why I opted for a backup solution which has been written (and presumably tested) by a major IT expert - in this case Apple. I trust Apple a lot - their software is usually flawless and their hardware even more so. And when there are problems, they fix them quickly (e.g. MobileMe problems).

After upgrading my MacBook hard drive, my overflow external drive was spare and so I’ve commissioned it into being a dedicated Time Machine backup drive. Currently it’s whirring away doing the initial backup (some 145.8GB of data…) and when that’s done it will do incremental backups every time I plug the drive in and click “Backup Now”.

I’ve never had to restore anything from backups, ever (*touches wood*), and I’m hoping I never will. But having a good backup plan is critical to modern day life because we hold so much information on our drives. I’d hate to lose all my data, it would really be so annoying.

So once this initial backup is complete, I’ll be a backed up man, ready to roll.

Posted by Matt, filed under Leopard, Mac, Technology, Uncategorized. Date: September 3, 2008, 9:40 pm | Comments Off

Today I embarked upon upgrading the hard drive in my MacBook because it shipped with 80gb (upgraded at the time from 60gb!) and it was becoming fuller and fuller. I had already moved my iTunes and iPhoto libraries over to an external USB drive because of lack of space, so I thought it would be time to upgrade the drive, seeing that MacBooks are supposed to have user serviceable RAM and hard drives.

I decided to go with a 250GB Western Digital 2.5″ SATA drive and I also decided to get an external caddy for the drive (which you’ll see why when I explain how I upgraded). The external caddy I got was a nice Akasa Integral IDE/SATA to USB/eSATA external enclosure. The whole lot set me back a mere £60 which I think is pretty decent considering a stand alone external one is at best £50.

After some Googling I found two links which were of particular interest; one by MacInstruct and one by a blogger Where is Hawkins?. These gave me the ideas and advice needed to go about doing this upgrade.

So, this is how I did it…

First I took the new 250GB hard drive and put that into the external enclosure. This was an easy job, following the instructions that came with the enclosure. Then I hooked this up to my MacBook and found that it was detected - good job.

Now is the bit where you have to make sure things go right… We need the new drive to be bootable so that means setting the partitioning options correctly. I opened Disk Utility and noticed that my new USB drive was being displayed so I clicked on that in the selection box on the left. Then I selected Partition from the tabs and clicked Options… and selected GUID Partition Table - this will make the hard drive bootable by any Intel Mac :-). Next I selected 1 Partition from the Volume Scheme dropdown and entered a suitable name for it. I left the Format selection at Mac OS Extended (Journaled).

Then I used the funky tool SuperDuper to copy the entire contents of my hard drive to the new drive. This was simple. I selected the source as my original hard drive and the target as my new hard drive. Then I selected the Backup - All Files script and started it. This finished in about 2 and a half hours - not bad for 60gb of data I thought.

Now comes the tricky bit… installing the new hard drive into the MacBook…

I started by taking the new drive out of the external enclosure so that it would be ready to go straight in. Next I took the battery out and found myself looking at this:

So I used my Phillips head screwdriver to take out the three screws and away came the L-shaped bracket, exposing the RAM slots and the hard drive with a nice, white pull tab on it - which I pulled and out came the drive!

Now that the drive was out, I had to take off the lovely electrostatic shield from the drive and put this onto the new drive. This required taking out four Torx T8 screws from the original hard drive. After doing this, I was ready to put the new drive, encased with said electrostatic shield, back into my MacBook. This was simple - I just pushed it back in, click, and then the drive was sitting neatly in place. Then I replaced the L-shaped bracket and battery and fired it up.

Needless to say, it worked great and now all my files which I had offloaded onto an external drive are being copied back onto my nice, new, mostly empty hard drive. Although I think that it won’t be long before this one is filled up!!!

Here’s a picture of my original drive with the electrostatic shield on and the new one ready to be dealt with:

Next mission: Time Machine - using the 300GB external drive I now have as spare (It was being used for an overflow, as mentioned).

Posted by Matt, filed under Mac, Technology, Uncategorized. Date: September 3, 2008, 8:35 pm | Comments Off

During the process of upgrading my MacBook hard drive I needed some software to copy my original drive over to my new hard drive. This is no easy task because the new drive needs to be bootable and if possible, a complete replica of my original drive (otherwise it would take hours if not days to restore my system to how I like it).

So in came SuperDuper which is a nifty piece of software which will do just what I wanted. It’s free for the trial version which will let you do most things (no time limit) but if you pay $27.95 then you can unlock the extra features like incremental backups. This might be something I’ll look into soon as I do need a decent backup system (I’m going to look at Time Machine first).

It really was so easy to use SuperDuper though - copying from my original drive to my new drive took about 2.5 hours for 60gb of data - not bad considering it’s doing a thorough job of making sure all metadata is intact (something which just copy and paste definitely wouldn’t achieve). Also, SuperDuper is fully Leopard compatible which is definitely nice to hear.

I’d certainly recommend the use of SuperDuper to anyone :-).

Posted by Matt, filed under Leopard, Mac, Technology, Uncategorized. Date: September 3, 2008, 4:15 pm | Comments Off

So today I’m in Stafford because Helen has an assessment day for the police which is being held at Stafford University. I dropped her off there about 30 minutes ago and then decided to pop into the town centre to see what’s around. It was 8:30 so all the shops were pretty much shut apart from the coffee shops, some discount shops and McDonalds. I was quite hungry and really needed a coffee so I thought I’d grab a McDonalds breakfast!

Anyway, whilst ordering I noticed a sign saying free WiFi, so I got my laptop out and here I am, on free WiFi in McDonalds! It reminds me of Canada where there was free WiFI EVERYWHERE - and I do mean everywhere. It’s a good sign of things to come in the UK.

So this is the first time I’ve ever written a blog post whilst eating a fast-food breakfast! Needless to say, the breakfast certainly hit the spot!

Breakfast in McDonalds

Posted by Matt, filed under Mac, McDonalds, Technology, Uncategorized, food. Date: August 23, 2008, 8:58 am | Comments Off

I’ve been doing some work recently on a couple of websites (one being for Riverdale) and in order to test the sites I set up virtual hosting on the copy of Apache which came with Leopard. There’s a few tweaks/issues with Leopard’s Apache which I thought I’d write down incase it helps anyone else, or helps me in the future when I forget what I did!

So to setup the virtual hosting you need to first change some details in /private/etc/apache2/httpd.conf. You should make sure that the line for the virtual host module is not commented out:
LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so

Then, at the bottom of the file, add in the following:
Include /Users/username/Sites/vhost.d/*.conf
Where username is your own username.

Then you should create the directory /Users/username/Sites/vhost.d and into it, put these two files:
00_default.conf:
NameVirtualHost *:80
<VirtualHost *:80>
   DocumentRoot /Users/username/Sites/
</VirtualHost>

01_virtualsite.conf:
<VirtualHost *:80>
   ServerName virtualhost1
   DocumentRoot /Users/username/Sites/virtualhost1/
   <Directory "/Users/username/Sites/virtualhost1">
      Options +ExecCGI +Includes +FollowSymLinks
      AllowOverride All
   </Directory>
</VirtualHost>

Again, where username is your username.

Then, in /private/etc/hosts you need to add:
127.0.0.1 virtualhost1

Restart apache and check out http://virtualhost1/ - it should work!

The big problem with Leopard is that you can ONLY share websites from your ~/Sites directory. It works though if you put a symlink in there to another directory (such as in ~/Documents), but keeping your vhost pointing to the directory in ~/Sites.

Posted by Matt, filed under Leopard, Mac, Uncategorized. Date: August 22, 2008, 11:52 pm | Comments Off

21  Aug
MacBook Fixed!

A couple of days ago I took my MacBook in to be fixed as it had a crack on the front case where the lid closes on the case. They took it in and said they’d order the part in and that it would take 24 hours. I picked it up, 24 hours later and it looked like a good fix. But when I got it home I noticed that they’d put on a US keyboard!!!

So I took it back in today and they managed to find a UK keyboard (already assigned to someone else, hehe) and they took just 30 minutes to fit it and now I’m sitting here typing on my brand new UNITED KINGDOM keyboard!

Posted by Matt, filed under Mac, Uncategorized. Date: August 21, 2008, 1:46 pm | Comments Off

Since the release of MobileMe by Apple, I’ve been wondering about what I’m going to do with my galloway.me.uk domain now that there’s options like this out there. I looked into MobileMe but it doesn’t allow you to have email addresses like @galloway.me.uk - only @me.com. This is a bit pointless for a domain hosting service!

So I looked into Google Apps which is essentially a free equivalent of MobileMe. I’ve found that it’s absolutely amazing. Quick & easy to setup and very easy to use. I’ve had a GMail account for a while, but now I have one setup with my matt at galloway dot me dot uk account. This gives me all the benefits of GMail along with IMAP access, Google Docs, Google Calender, etc, etc, etc.

The dashboard for our new family Google Apps is at http://partnerpage.google.com/galloway.me.uk so check that out. I’ve not quite finished porting everything over, but that should happen sometime this week.

Anyway, thanks Google - very pleased!

Google Apps

Posted by Matt, filed under Mac, Technology, Uncategorized. Date: August 16, 2008, 1:45 pm | Comments Off

« Previous Entries