Archive for February, 2008
Humane theme for TextMate and Xcode
My Humane theme for Visual Studio is getting a fair bit of traffic today courtesy of Scott Hanselman. Given I have been messing with Mac development lately I thought it was worth porting to TextMate and Xcode 3.
Panic Sans coding font
My Envy Code R programming font isn’t great on the Mac yet so I have configured these to use the excellent but overlooked Panic Sans in 12 point which unlike Monaco is available in bold, italic and bold italic variants. (I love my comments to be italics)
To install this font you must:
- Download Panic Software’s Coda application
- Navigate to the Coda application and choose Show Package Contents
- Navigate to the Contents/Resources folder
- Double click on the Panic Sans.dfont and press Install Font
- Panic Sans is now available to other applications too
TextMate

Download Humane theme for TextMate (5 KB)
Launching the downloaded .tmTheme file will cause it to copy to ~/Library/Application Support/TextMate/Themes
Select Humane from the Preferences > Fonts & Colors pane in the drop-down list box
Xcode 3

Download Humane theme for Xcode (4 KB)
Copy to ~/Library/Application Support/Xcode/Color Themes
Select Humane from the Preferences > Fonts & Colors pane in the drop-down list box
Porting themes
Until somebody comes up with an IDE-independent theme format or cool converter we’ll have to do it by hand. The easiest way I have found is:
- Install Hex Color Picker on the Mac to allow entering hex into the standard color picker
- Open the Visual Studio theme .vssettings file in a text editor
- Open up the Fonts & Colors preferences pane up in your Mac IDE
- Go through each one and choose the nearest match in the .vssettings
- Transcribe each color by reading the VS colour pairs backward, e.g. 00631409 becomes #091463
[)amien
Web site vs web application in Visual Studio
Rob Conery got me thinking about web site maintenance and I put forward a brief comment on the two distinct types and how Visual Studio handles them which I have expanded upon here.
Web site
Primarily for working with ad-hoc web sites that have programmed elements. Easily identified by customer-specific content present in aspx files.
No solution or project files are required and the pages and source can reside locally (file system, IIS) or remotely (FTP, WebDev/FrontPage extensions) via the File > Open > Web Site… menu option.
Code-behind and classes are typically stored on the web server which compiles them in-memory on demand. Changes can be made to the files without restarting the application and losing sessions.
| For | Against |
|---|---|
| Quick edit, test, deploy cycle | Syntax errors at runtime |
| No need to compile or restart app | Can’t create an installer |
| Source always available | Source on server useful to hackers |
Web application
Web application projects were introduced as an add-on for Visual Studio 2005, later rolled in to VS 2005 SP1 and made a full first-class citizen with Visual Studio 2008.
Like the name implies these are primarily for web applications, those times when you have written a product or solution that happens to have a web interface.
Web application projects exist on your local drive and are treated like any other VS project type and can be added to existing solutions are subject to full compilation, validation and build steps.
Deployment is typically via MSI installers however you can also utilise the addition Web Deployment Projects add-in which allows you to deployment directly to servers which is useful for deploying to test environments.
| For | Against |
|---|---|
| Controlled build & deploy process | Deployment causes application restart |
| No class files on web server, dll only | Can’t deploy individual classes |
| Syntax errors at compile time |
Hybrid
Sander and I were discussing this article and thought an interesting solution might be to use the Web Application model for local development but to use the Publish option to publish all solution files to an intermediate directory.
Then in the intermediate directory just remove the bin/applicationname.dll file and copy to the target. This should prevent an application restart unless the web.config or global.asax/global.asax.vb files have been modified.
[)amien
Where developer is succinct
Radio 4 covered the The Six Word Memoir competition, inspired by Earnest Hemingway’s wager he could tell a complete story in just six words. He deliciously delivered “For sale: Baby shoes, never worn” earning him $10.
Expressing a life story in six words is just as tricky. Some of my favourite submissions include:
Found true love, married someone else.
B. Stromberg
Work smart. Love what you do.
Michael Scala
A limit on words means getting straight to the point – Twitter’s 140 character limit results in short useful extracts.
Short succinct messages require more thought, careful editing and of course time. Getting the balance right between losing important information and the laws of diminishing returns takes practice and is very dependent upon the mix and size of your audience.
As a developer I find these skills applicable to the following areas:
Blog posts
I’m not the world’s most prolific blogger but my posts tend to be short and to the point. If you didn’t find it interesting you should have realised quite quickly.
Being well-written and interesting gives a better chance of being added to StumbleUpon, Digg or other blogs.
Presentations
My latest presentation on LINQ consisted of around 20 logically-grouped slides with a few bullet points and tiny code samples.
I saved time by not writing a script and let the talk flow more naturally with interaction from the audience. This meant the audience chose the programming language and I broke into demos once they looked anxious to see it.
Code
My own projects change design dramatically during prototyping thanks to refactoring and the great tools available. It is for this reason I do not practice test-driven development.
I need my code and design to be as succinct as possible at this phase. Unused code, interfaces or stubs are wasted words. Verbosity. Declarations that are read and compiled but not used. Verbosity.
Once the overall design is settled the unit tests and fleshing out of functionality comes.
Where extensibility is needed I work with those who will consume it to ensure the interface does what is required and nothing more. Three consumers is quoted as the magic number.
This is also why I am so keen on extension methods and other simple expressions of intent.
Going forward
If anyone has any tips, informative articles or recommended books on succinct writing please leave them here.
Now if only I could get this post down to six words…
[)amien