Jiffle

RSS
Dec 2

A Complete Development Server in 5 Minutes

Years ago, Thoughtworks developed Buildix, a combined download for those who just wanted a quick way to install a standard development server stack. Their main reason for doing it was to provide a quick way to create a Continuous Integration server but, since it also bundled OS, SVN Server and bug tracking, it was also useful to the solo developer or small development team.

Unfortunately they discontinued it, reasoning that most people set up whole CI server farms or just install the CI parts on existing resources. So I had to look around for another resource to replace my existing, bespoke, development server. The ever-handy Stack Overflow pointed me to Coveros, and their SecureCI download.

SecureCI is single free download/install based on Ubuntu Server, and including the usual suspects (Apache/MySQL/Java/Tomcat), but adding Subversion and Hudson servers, together with Trac, Sonar and a host of testing and analysis tools.

Their product page is at http://www.coveros.com/research/research%5Fstack.php or you can go directly to their Sourceforge project page at http://sourceforge.net/projects/secureci/

I haven’t yet had a chance to install it, but look forward to giving it a try in the near future.

New MobileMe Calendar - Fixing Disappearing Calendars

Today, Apple released an upgrade to the MobileMe Calendar. The upgrade went fine and afterwards I could see all of my data when browsing to the MobileMe website directly. However it had all (apart from Birthdays!) disappeared from the iCal app on my Macs and from my iPhone calendar. This was despite having up-to-date software on all devices.

Investigating further, I found that the new version expects you to have a server account set up in iCal in order to pick up all of the rest of the data. So went to iCal Preferences, selected the Accounts Tab, and added a new account using my MobileMe account details.

All of my calendars then magically reappeared on that computer, and subsequently automatically appeared on other devices, including my phone, once they had sync’ed up. It seems that the calendars are now server-based, but the upgrade doesn’t always auto-create the server reference in the iCal settings.

Fixing JPG and PNG Colour Matching in Safari

When styling a website, one of the main techniques is to match the CSS colour codes to the colours in the images to blend sections together seamlessly. But on a couple of sites recently I have found that the sites looked perfect in IE and Firefox, but there were mismatches when viewed on Safari on my Mac.

The Problem

Investigating further, I found that if I changed the Monitor Colour Profile for my Mac from the default (which was the one for my monitor type) to Generic sRGB, miraculously the website fixed itself! However, that was of limited use, as I could hardly put a note on the website “If you want this site to look right on your Mac, please change your colour profile to sRGB”!

Initially, my problem was with PNGs, and Professor Google rapidly led me to The Sad Story of PNG Gamma Correction, and through that to Browser Gamma-Consistency Test and CSS/PNG Gamma Consistency Test Results. However, all these articles are (a) old, and only consider out-of-date browsers and (b) offer no simple solutions for the web developer.

Even when I had solved the PNG problem, I then found a similar problem with JPEG files! I found a good description at Color Rendering Difference: Firefox vs. Safari, and it also led me to the Browser ICC Profile Check which tests out browsers support for colour profiles. Turns out Safari 3 (both Win and Mac) fully support ICC profiles. And none of the others - Firefox 3, IE 8, Chrome 1 - have any ICC profile support. So, the reason that Safari looks ‘wrong’ is that is implements a feature that none of the other browsers have. (Note: I understand that Firefox 3 does support profiles, but it is turned off by default).

The problem is that colour and gamma profiles were designed to allow images to be displayed in the same colours on different systems - which is what photographers and other image content producers want. However it is absolutely not what a web designer wants. What a web designer wants is that any transformation applied to CSS/HTML colour codes is applied identically to the images used in the design. We don’t actually care (that much) about the precise shade that is displayed, just as long as all elements are the same shade.

Thus images used as part of a web design (as opposed to content) need to be stripped of any embedded colour profile or gamma information.

The Solution - What Works For Me

Both PNG and JPEG files: Remove the ICC Colour Profile from the image when you save it using your image editor. Note that Photoshop automatically adds a standard RGB ICC Profile when you use the ‘Save for Web’ option. This is not what you want if you want things to work consistently in Safari. I tried to use The Gimp to strip colour profiles, and could not find a way to do it, even with the Separate/Separate+ plugins.

PNG files only: Additionally strip both the sRGB and gAMA chunks from the file. The tool I used to do this for OS X was ImageOptim enabling just PNGCrush optimisation and setting to remove sRGB and gAMA chunks. gAMA chunk removal alone did not work. Note - running this multiple times on the same file is bad - it generated a file that completely corrupted rendering of the whole web page on several browsers, one of which could only be fixed by a restart!

Note: I have not delved deep into the complexities of colour management, and do not pretend to understand some of the niceties. Frankly, I just want a solution that works on contemporary browsers and OSes. If there are situations or details that I have missed or where this does not work, then please use the contact form at http://www.jiffle.net/contact to update me.

Resolving Eclipse’s “No Repository Found” Error

I have encountered a recurring problem with Eclipse 3.4. When performing an update of application components it fails during the download, and in the error it details “No Repository Found” for one or more (frequently a large number) of eclipse update site URLs.

I originally found the workaround solution several months ago, in the Eclipse bug tracker, and each time recurs I have to find it again (yes - a bookmark would be useful!) but, as it does not seem to be indexed by Google, each time it takes a lot of searching to (re)locate it. Hence I reference it here, primarily for my own benefit:

The solution is to be found in a comment by Lari Hotari to the ‘Lost Artifact Repositories’ bug 236437:

Here's a workaround:
1) Export the update site listing to bookmarks.xml file 
    (Software Updates->Manage sites->Export)
2) Stop eclipse
3) Remove configuration/.settings/org.eclipse.equinox.p2.*.prefs files
4) Start eclipse
5) Import the bookmarks.xml file (Software Updates->Manage sites->Import)
    that was exported in step 1

Note: This has worked every time that I have encountered the problem, but I have seem other causes of the error, including an issue with HTTP proxies.

Additionally, I noticed another issue last night, that, after applying the fix to a rogue Ganymede installation, the AJDT Tools continued to fail with the same error. Comparing the update site list with a working system I found that the update URL that worked ended in a trailing ‘/’, unlike that of the failing system.

Removing the problem update site and adding it back in, this time with the trailing slash, fixed the issue, but whether that was due was the addition of the slash or merely the act of removing/replacing the entry, I don’t know.