Category Archives: Programming

Duplicating data can save money

I have lots of records in my database. One application writes these records, many applications read these records. So I put them all in one database, and have all the applications access that database. Simple. But then I run into some problems. Dependencies There are times I need to change the schema. If I change… Read More »

Clean Code

The Clean Code Talks concentrating on writing testable code. In his talk, Unit Testing, Miško Hevery explains unit testing and makes a case for unit tests. … In his talk, Don’t look for things, Miško Hevery provides a practical guide to the Principle of Least Knowledge (aka Law of Demeter, aka Don’t Ask, Tell) …… Read More » publishes talks from software conferences.  I like seeing high-quality slides alongside video of the speaker.  Paryleys’ podcast is an audio only version of the talks you can watch on their site. Two of my favorite talks are: Flow of Change which discusses managing change in source control systems Speaker: Tony Smith, European Technical Services… Read More »

Creative use of closures in testing.

Having moved to Java, I do miss closures. has a creative use of closures in their unit testing framework: 1 2 3 4 5 6 7 8 9 [Test] public void DivideByZeroThrowsException() {   Assert.Throws<System.DivideByZeroException>(   delegate   {   DivideNumbers(5, 0);   }); } This code snippet was taken from’s documentation. Previously,… Read More »

Phishing and other scams.

I always find these security talks entertaining. In his talk, Searching for Evil, Professor Ross Anderson discusses research done by himself, Dr. Richard Clayton, Tyler Moore, Steven Murdoch, and Shishir Nagaraja. Related links: Security Engineering: A Guide to Building Dependable Distributed Systems by Ross J. Anderson – book on Amazon

Design by Contract

I would like to see design by contract become mainstream. JSR-305, Annotations for Software Defect Detection, is a step in the right direction. The applicability of this standard is broader than the name suggests. Here’s a talk about the JSR by Bill Pugh: I would like to see compile-time and full IDE support for design… Read More »

Favorite JavaOne Videos

I’ve moved over to Java. Here are my favorite sessions from JavaOne. Videos require free registration. You only need to register once for all the videos. Language: Languag-Oriented Programming and Language Workbenches Scala is a functional and object-ortiented language that runs on the JVM, it’s similar to F# (F sharp) Closures for Java Fast x86… Read More »

Automated Testing – Model-Based Testing

In his talk, Model-Based Testing: Black or White?, Mark Utting discusses the difference between black-box and white-box models and their affect on the ability to automate testing. Related links: Practical Model-Based Testing: A Tools Approach by Mark Utting and Bruno Legeard – book on Amazon

Closures for Java

In his talk, Closures for Java, Neal Gafter provides a description of and an argument for closures in Java.

Using @ infront of literal strings

Using @ infront of literal strings lets you do: instead of: “C:\\directory\\file.xml” or “SELECT field FROM table where field=var” you can do: @”C:\directory\file.xml” and @”SELECT field FROM table WHERE field = var”

FTP with streams in .net c#

There needs to be a good opensource ftp library for .net.  I want to be able to write to the FTP stream, not pass a byte array or even a pointer to a file.  Why can’t I get a Stream Upload(string filename) closing the stream would just end the file upload, not the network connection. … Read More »

Screen scraping poker web sites

Screen scraping is very brittle. It will require continual maintenance and will never be complete. A good screen scraper is like writing a parser. Extracting semantic meaning from text with a poor signal to noise ratio is non-trivial. Ideally, you would access the data via an API or a feed. Google, Amazon, Flickr and many… Read More »

Faster first byte.

override render(HtmlWriter) HtmlWriter.Flush DoSomeExpensiveOperation // or join with a thread that’s loading state base.Render(HtmlWriter) This way, you can send the headers and navigation to the client so they’ll see something while you’re waiting for something to finish. Perhaps the client won’t even finish downloading the headers when the render completes, you’ve gotten the first byte… Read More »

Should you be persisting more state?

Lost state is state that has been destroyed, deleted, garbage collected or otherwise removed from storage not because of some domain specified reason.  In the best case because of limited storage capabilities, but because the value of the state is underestimated. Microsoft Word has autosave.  By default, every ten minutes the document you’re editing is… Read More »