How to handle spam efficiently

Opening messages to decide whether they must be read or be discarded works well with low volumes of email. However, with ever increasing messages and more sophisticated spam techniques, this filtering method becomes unsustainable. Spam filters based on statistics and heuristics are useful to cut down the number of unnecessary messages that we have to …

Better Software Faster

I rediscovered the website for the book Better Software Faster. Bizarrely, although very good, this book is hardly ever referenced. Describing similar modelling techniques as but written much earlier than Domain-Driven Design, it can be considered as the latter’s precursor. Unlike DDD, however, it includes practical examples and source code, which make the techniques more …

Domain-Driven Design, the quest for software perfection

I have been reading Domain-Driven Design by Eric Evans since last August. Although the book is interesting, it has been difficult to read—at least for me. The author explains the concepts of domain models in great detail but provides few practical examples. As a developer primarily interested in implementation, I am forced to pause frequently …

Copy/paste command-line utilities

Inspired by the programs pbcopy and pbpaste in Mac OS X, I created similar utilities in Windows. .NET Framework 1.1 is required for these programs to work. clipin.cs using System; using System.IO; using System.Windows.Forms; public class ClipboardCopy { public static void Main(string[] args) { string input = Console.In.ReadToEnd(); Clipboard.SetDataObject(input, true); Console.WriteLine(“Text copied to clipboard.”); } …

Reading files in Visual Basic, GW-Basic style

Recently I was asked how to read a file without using streams in Visual Basic. Of course, if you’ve done this once in GW-Basic, you never forget. Dim iFileNumber As Integer Dim sLine As String iFileNumber = FreeFile Open “C:\stats.log” For Input As iFileNumber Do While Not EOF(iFileNumber) Input #iFileNumber, sLine MsgBox sLine Loop