Culture Becoming a Better Programmer
General n-Tier without tears
Building n-Tier apps can be difficult. Instead of a single monolithic application that can easily hide its imperfections, a client-server model traditionally means making an API, choosing a transport, and sticking to it.
It’s like marriage, but with TCP/IP settings. Throw in a wireless client and it can be difficult to find a solution that fits. XML-RPC? SOAP? REST? Each way of communicating has benefits and drawbacks.
This is what we’re doing for client X, a niche healthcare business.
Continue Reading…Productivity Flickr and Versioning
We often maintain and deploy projects as a single HEAD version in a Subversion repository. We don’t, generally, tend to do a lot of forking. This is good, as forking can be undisciplined, but sometimes you might want to be able to add or change features and not have to worry about adding broken code to a project.
It turns out that Flickr does the same sort of thing. Their solution: flags and flippers. Interesting read.
General Visualizing CSS

Converting a Photoshop pitch to a static HTML/CSS layout is a fundamental part of client-oriented web development. It can be hard work, not least because it is difficult to simultaneously focus on the appearance of the site and its structural foundations.
The usual solution to this is to muddle through and keep tweaking a steadily expanding morass of CSS until the site resembles the original .psd. This way of working is unstructured, which makes it stressful and self-limiting.
Let’s look at a better way.
Open Source I <3 iTextSharp
I’ve just started using iTextSharp, a .NET port of the Java iText library. It’s surprisingly good.
The library can create files or streams of PDF. I’m caching my output, so this example uses files:
// create a document
Document document = new Document();
// associate it with a file
String filepath = Request.MapPath("/Pdfs/test.pdf");
FileStream file = new FileStream(filepath, FileMode.Create);
PdfWriter.GetInstance(document, file);
// write the pdf
document.Open();
document.Add(new Paragraph("OMG this thing works"));
document.Close();

