I’ve recently ordered a new computer and like with all things when they are new you gotta check them out for faults. Screens are always a worry, so with this in mind I’ve knocked together a little tool that simply allows you to check the display for various little things.

The tool is set out in two phases, the first phase consists of the tones white, black, light gray, gray, and dark gray. These will let you spot the easy pixels, gray is nice as you’ll be able to see if the panel is evenly lit. The second phase is just an RGB test, cycles red, green, blue, yellow and magenta. This will show any pixels that are stuck in those main colours.

It’s pretty simple and a tiny download written in Java so you’ll need Java installed. Mac OS X users have the Java system by default, Windows users will need it, thats if you don’t have it already, most people do. There is a Read Me included in the download with full instructions.

Any problems / help, or if you have something to say let me know.

Download

Download LCD Panel Tester v1.0.1
MD5: f1b6fdd846d81a49bd748c2f6ab6168e

Download LCD Panel Tester v1.0.1 Source
MD5: b8d6b907f521f3371274012efdd345e0

I really like the colours of the syntax highlighting in Apple’s XCode, I apply the colouring to all of the other code editing applications I use, these being Netbeans and BBEdit. For the 3.2.x versions there are only some small changes in the colours. With the advent of OS 10.6 Snow Leopard we get Apple’s new Menlo font which is very nice. Colour values were taken from XCode 3.2.3.

XCode Colours (RGB)
Selection: 167, 201, 255
Comments: 0, 116, 0
Documentation Comments: 0, 116, 0
Documentation Comments Keywords: 2, 61, 16
Strings: 196, 26, 22
Characters: 28, 0, 207
Numbers: 28, 0, 207
Keywords: 170, 13, 145
Pre-Processor Statements: 100, 56, 32
URLs: 14, 14, 225
Attributes: 131, 108, 40
Project Class Names: 63, 110, 116
Project Functions and Method Names: 38, 71, 75
Project Constants: 38, 71, 75
Project Type Names: 63, 110, 116
Project Instance Variables and Globals: 63, 110, 116

Default font: Menlo 11

On Mac OS X 10.5 the default compiler is GCC 4.0.1, Apple does provide GCC 4.2.1 as part of the XCode Developer Tools releases for 10.5 but it isn’t setup as the default.

The main tools are located in /usr/bin. In this folder you will find both gcc 4.0 and 4.2 along with g++ 4.0 and 4.2. The commands gcc, g++, cc, and gcov are all symbolic links to the default 4.0 versions. To make 4.2 the default we just need to modify the symbolic links.

To do this we need to go in to the Terminal and issue the following commands:

cd /usr/bin
sudo ln -Fs c++-4.2 c++
sudo ln -Fs gcc-4.2 cc
sudo ln -Fs g++-4.2 g++
sudo ln -Fs gcc-4.2 gcc
sudo ln -Fs gcov-4.2 gcov

Now you should have a complete working gcc 4.2.1 tool chain. If there is a problem you can verify the symbolic links are pointing at the correct targets by typing ls -l Hope this helps someone else.

I’ve been having some rather odd Safari problems today for the first time since I can remember. I really dig Safari, it’s everything I want in a browser and getting better with each release. I’ve been using Safari since the public beta back in January 2003 back when Mac OS X 10.2 was the main OS.

Anyway this afternoon I noticed that Safari kept using 100% CPU and becoming un responsive. I kept force quitting it but the problem kept coming back after about 10 mins. I tried the usual repair permissions, delete preferences and caches etc to no avail. I then thought I would try the Safari 4 Developer Preview, I downloaded it and installed it. It was perfectly stable and very fast, can’t wait for the finial release of that badboy! At this point I was still stumped as to why 3.2.1 was holding the CPU hostage but Safari 4 was fine. I uninstalled Safari 4 and reinstalled 3.2.1.. On restarting everything seemed fine but yet again it took all the CPU, back where I started. Just launching Safari and then closing the window and waiting would cause the CPU to be held hostage again.

I ran a filesystem trace to see what files Safari was touching, I basically sat and waited until the high CPU condition happened then took a look to see what files were accessed. After an hour of watching and timing the problem it seemed that Safari was continuously reading from the filesystem which is what was causing the massive CPU load. It was triggered by an unusual cache file hit, I did a check to see what network connections were established and saw some odd looking google server addresses, it then dawned on me that Safari 3.2 features anti-phishing protection that uses a blacklist provided by google.

This also explained why the the Safari 4 Developer Preview worked correctly as it doesn’t yet have the anti-phishing stuff. I turned off the anti-phishing stuff in Safari 3.2.1 and sure enough everything went back to normal. Me being me I was still bothered because why would it suddenly cause problems, it’s been working fine until today. I went back and took a look at the cache files it was using for the blacklists, I thought that corruption of some kind was most likely so I deleted them. I then re-enabled the anti-phishing mode in Safari 3.2.1, now been three hours and all is well again.

To kill the blacklist cache (which is rebuilt afterwards) first quit Safari then open the Terminal and type the following:

sudo rm -r /private/var/folders/*

Relaunch Safari and all should be well. I couldn’t find any references to this problem online so I though I would post something.

I thought I would check my old email account and got a nice total of 4124 messages! Every single one was junk. Apple Mail’s Junk mail filter caught 4122 of them so thats an accuracy of 99.95% very impressive! I thought I would dig a little deeper and ran a virus check on the emails, 37 were infected with various trojans, viruses, and general nasty spyware. Pretty interesting, I haven’t actively been using that account since about 2003 / early 2004, since then I haven’t sent anything from the account and have been looking now and then at what comes in, and from who. I think it’s time to forget that mailbox.

Was a bit bored so I made a nice little Wikipedia Bookmarlet. To use the bookmarklet just right click and bookmark This link

Any questions or praise let me know!

Not too sure about all this stuff, DRM Free is a good move, and also seeing the quality increase to 256K AAC is pretty good. Now the downside, the price hike from 79p to 99p for what they are calling premium versions. To start with they will be offering an upgrade option for the EMI tracks you already own, of course your gonna have to pay extra for that also.

The whole way through they kept mentioning that they are not offering anything that is not available already on CD. So lets look at the case for CD, you can get a CD cheaper from Amazon than buying the download, you get whatever quality you want to encode the tracks at, all the tracks are DRM free, you get a nice CD and case and art work. You can play your CD on your Hi-Fi car stereo etc… if your iPod or other player or computer gets stolen you can just re-encode from the CD.

CD is the clear winner, downloads only represent a small percentage of the market and the CD offers better quality and all the options you want. So why are they all going mad about advertising downloads? Well the record companies can make more money by getting rid of the overhead of physical media and distribution costs and keeping them for themselves, they can sell you a compressed format and a few years later offer you a better quality for a new price. The only store that had the right idea for downloads is Warp Records that have been offering all bitrate qualities including Lossless formats and all DRM free for the same price and a few pence more for the CD. They have been doing this for years and seems like the best thing to be doing. With the huge amounts of storage and large amounts of bandwidth we have lossless shouldn’t be a problem.

Buy the CD in the first place and you can have it anyway you want it for less!

Don’t get me wrong this is a great new step but CD is still king!

Thought this might be a useful addition to my other post “Installing MySQL on Mac OS X”

To start off go and get the latest version of MySQL. Hopefully you have downloaded a nice diskimage (.dmg) this should contain the startup item install package (.pkg) and the MySQL package (.pkg) there is normally also a control panel in the diskimage. I don’t use the startup item as I like to just turn on MySQL when I want it.

Ok make sure MySQL is off, if you have MySQL installed and the control pannel just go to ‘System Preferences’ and click the MySQL icon and hit the ‘Stop MySQL button. Ok Install the the MySQL package, this will install MySQL in the directory /usr/local/ . Sorry but this bit need the terminal people so open it up. Do the following :

  1. Goto to where it lives
    cd /usr/local
  2. Go to the old install so for example on my machine :
    cd mysql-standard-5.0.25-osx10.4-powerpc
  3. All you will see in here is a directory called “data”. Copy this to the new install. (The install package puts a symbolic link in the main dir to the latest MySQL install so this makes life easy.)
    cp -r data /usr/local/mysql/
    if you have problems use
    sudo cp -r data /usr/local/mysql/
    now your new version has all your databases and settings you need to set them up or you will just getting errors when starting MySQL.
  4. Ok navigate the current MySQL install
    cd /usr/local/mysql
    Now we need to set permissions for the data file for it to work. Type the following.
    sudo chown -R mysql data/
    Enter you password and you should be done.
  5. Now you start your new version and test all is well. If all is well you can now trash the old install directory and also the old install package receipt found in /Library/Receipts

I wrote this of the top of my head so let me know if you have a problem.

First download the right MySQL installer .pkg from the MySQL site. This should mount as a disk image on the desktop. Double click and install the package, then double click the Mysql.prefpane and it will offer you two choices : Install for all users or install for current user. Select which you want then load up the terminal.

In the terminal type the following :

cd /usr/local/mysql
sudo chown -R mysql data/
sudo echo
sudo ./bin/mysqld_safe &

At this stage you close the terminal window and open a new one and do the following :

/usr/local/mysql/bin/mysql test

You should get some thing like “Welcome to MySQL” type thing at this point, that means it’s all fine and working. Type q to quit the montior. Next we need to setup the root password for MySQL by doing the following:

/usr/local/mysql/bin/mysqladmin -u root password thepasswordyouwant

Thats it you should be done, to control the system and add users check the documentation or you can use things like the MySQL administrator app or phpMyAdmin, there is plenty of bits out there.

Tested using Mac OS X 10.4.5 and MySQL 5.0.18