What Did They Expect?

I first came across this article “Speed of Apple Intel dev systems impress developers” yesterday on the CNET site, talking about how impressed some software developers were with the speed of Mac OS on Intel platforms that Apple is making available to help with their transition to the new hardware platform. Two thoughts came to mind, almost immediately (given that I was still on my first cup of coffee when I saw it):

  1. Given the reported specs for the box (quoted as 3.6 GHz Intel Pentium 4 processor with 2 MB L2 Cache, 800MHz front-side bus, 1GB of 533MHz DDR2 Dual Channel SDRAM, and an Intel Graphics Media Accelerator 900), wouldn’t almost anything be fast?
  2. 10 seconds from Apple logo to desktop? OK, maybe that is fast…

Conviction: A Novel

Richard North Patterson, Random House, 2005

I just finished it. Patterson happens to be in the upper half of my list of favorite authors, and this one didn’t disappoint me. On the surface, it’s a story about the defense of a man convicted and sentenced to death for his role in a murder. More importantly (at least in my opinion), it’s an eye-opening, thought-provoking work that looks at the risks associated with (and to a lesser extent, the constitutionality of) capital punishment in the US, the workings of the US legal system (even as Patterson admits that he had to significantly simplify aspects of it to make the book accessible to readers), and how easy it is for our justice system to lose sight of the fact the system itself exists to protect individual people (both victims and people accused of crimes). This isn’t the first time that he has taken on a potentially difficult subject (the death penalty), but he does it in a manner that will (should?) have make people stop and think about their own views on the subject.

CFEclipse Installation Notes

After attending CFUnited-05 in Washington, DC last week, and particularly in light of Macromedia’s announcement that they were going to be officially involved in supporting the CFEclipse project, I decided I needed to take a look at the use of CFEclipse for CF development. Having gone through a couple of iterations in setting up Eclipse and CFEclipse, I decided that some installation notes might come in handy. Most of these instructions are based on installing and configuring the platform on Windows box, but steps on other platforms should be pretty much identical.

Installing Eclipse

CFEclipse is a plugin for the Eclipse environment, and the easiest way to install CFEclipse is via Eclipse itself, so the first step is to install Eclipse.

  1. You will need the Java JRE v. 1.4.1 or later installed on your system for the current version of Eclipse to work. Install or update, as (or if) needed.
  2. Download the Eclipse package from the main Eclipse site. I don’t do any Java development at present, so I just pulled down the Platform Runtime Binary for the Win32 environment, and saved it to my hard drive. Make sure you also get a copy of the user documentation — it is a good overview of how Eclipse works and how to use it.
  3. Unzip the downloaded archive, and extract all of the files to a location where Eclipse will be installed (e.g., c:\program files\eclipse), making sure that the folder names in the ZIP archive are retained.
  4. Create a shortcut to the Eclipse executable.

Installing CFEclipse

There are good instructions on installing CFEclipse on both the CFEclipse project page, and on Nathan Strutz’s CFEclipse resource page, but I am going to summarize them here as part of this process.

  1. Start Eclipse (if it is not already running).
  2. Select “Help |Software Updates | Find and Install…”.
  3. Select “Search for new features to install” and click “Next >”.
  4. Click “New Remote Site…”.
  5. Enter “CFEclipse” in the Name field, and “http://cfeclipse.tigris.org” in the URL field (both without the enclosing quotes). Click “OK”.
  6. Make sure the CFEclipse node is checked and that Eclipse is unchecked. Click “Finish”.
  7. On the Search Results dialog, check the CFEclipse node. Click “Next >”.
  8. Read through and accept the terms of the CFEclipse license agreement. Click “Next >”.
  9. Click “Finish”.
  10. If you get prompted about installing an “unsigned feature”, click “Install”.
  11. When the installation has finished, Eclipse will want to restart itself. Allow it to do so.

Installing Plugins

There are lots of different plugins that extend Eclipse and work well with CFEclipse. I will touch on those that I find most valuable here. For each of these, exit Eclipse prior to installing the plugin files; when you restart Eclipse, it will find the newly-installed plugin.

  1. CSS Editor: Download the most recent build for this from Nathan Strutz’s CFEclipse Resource page (you are looking for http://www.dopefly.com/pages/net.sourceforge.csseditor_0.0.3_rc2.zip, as of this writing). Save it to disk. Open the archive and extract the contents to the “plugins” folder within the Eclipse folder, paying particular attention to the embedded folders in the ZIP archive so that the files end up in the right place.
  2. JavaScript/ActionScript Editor: Download the most recent build for this plugin from Nathan Strutz’s CFEclipse Resource page (you are looking for http://www.dopefly.com/pages/net.sourceforge.jseditor_0.0.5.zip, as of this writing). Save it to disk. Open the archive and extract the contents to the “plugins” folder within the Eclipse folder, paying particular attention to the embedded folders in the ZIP archive so that the files end up in the right place.
  3. XMLBuddy: Download the “standard” version (as opposed to their “pro” version) from http://xmlbuddy.com. Save it to disk. Open the archive and extract the contents to the “plugins” folder within the Eclipse folder, paying particular attention to the embedded folders in the ZIP archive so that the files end up in the right place.
  4. Quantum DB: Download the current version from the Quantum DB project page on SourceForge. Save it to disk. Open the archive and extract the contents to the appropriate directories under Eclipse (everything should end up under plugins/ or features/). Start/re-start Eclipse. To open the Quantum DB perspective, select “Window | Open Perspective | Other…” and then select “Quantum DB”. If you are using Quantum DB to talk to MS SQL Server, you should probably also look at using the jTDS JDBC driver rather than the default JDBC-ODBC bridge. I will post some additional notes on that one in the next couple of days.
  5. More to come…

Installing Code Snippets

The CFEclipse project has made available a basic set of code snippets that can be edited and supplemented as you need. To install those snippets:

  1. Download the “snips” archive from the CFEclipse project page; as of this writing, the file can be found at http://cfeclipse.tigris.org/releases/snips_1.1.9.zip.
  2. Extract the contents of the downloaded archive to a folder of your choice. I use the “plugins” folder under my Eclipse installation (e.g., c:\program files\eclipse\plugins). This will create a folder named “snippets” there.
  3. To point CFEclipse at these snippets, select “Window | Preferences…” and select “CFEclipse”.
  4. In the “File Paths” block on the Preferences dialog, specify the appropriate folder for the “Paths to snippets directory”. Select “OK” to save the preferences change and close the Preferences dialog.
  5. You will need to re-start Eclipse to get it to see the snippets.
  6. To open the Snip Tree view, select “Window | Show View | Other…”, expand the “CFML” branch, and select “Snip Tree View”.

Setting Common Preferences

At first, the breadth and depth of the user preferences that can be set in Eclipse and all of its plugins can be pretty overwhelming. Here are a few that I typically tweak when I install and configure Eclipse/CFEclipse on new machine.

  1. General appearance and editor preferences:
    1. General | Appearance | Colors and Fonts | Basic | Text Font: Bitstream Vera Sans Mono, 8 pt.
    2. General | Editors | Text Editors | Displayed Tab Width: 2
    3. General | Editors | Text Editors | Undo History Size: 255
    4. General | Editors | Text Editors | Check “Show Line Numbers”
  2. I like the current line to be highlighted in the CFEclipse editor, which it doesn’t seem to be by default. To turn this on, and make it look like the other editors, do the following:
    1. Select “Window | Preferences…”
    2. CFEclipse | Editor | Check “Highlight current line”
    3. CFEclipse | Editor | Appearance color options | Current line highlight: rgb(232, 242, 254)
  3. Other CFEclipse preferences:
    1. Editor | Undo Steps: 255
    2. Editor | Check “Trim trailing spaces before saving”
    3. Editor | Check “Show line numbers”
    4. Editor | Line numbers color: rgb(128, 128, 128)
    5. Editor | Displayed tab width: 2
    6. Code Folding | Turn off the initial collapse on CFML and HTML comments

Problems/Issues

  1. There is something wrong with the handling of preferences for the CSS editor plugin. Whenever I attempt to open it, it generates a warning message “The currently displayed page contains invalid values.” and it won’t let me save or update the preferences under “CSS | Editor”. It seems to be related to the line “FAKE=true” that is getting stuffed into file .metadata/.plugins/org.eclipse.core.runtime/net.sourceforge.csseditor.prefs (in your default workspace folder) whenever the preferences for this plugin get updated. I manually removed that line and added the line “lineNumberRuler=true” to this file to turn on line numbers in the CSS editor.
  2. If the Browser view is open, the workbench throws an error on exit. The error doesn’t seem to cause any problems, but it is annoying.