Here’s another interesting piece of code I’ve just dug up in a C# application I’m reviewing. If you can come up with a bright idea about what those try/catch blocks are supposed to do, you’ve got more imagination than me… 😉 123456789101112131415161718192021222324252627282930class Foo { private int bar; // ...snip... …
Category: Software Development
Don’t code like this at home, kids
Sometimes when you’re reviewing someone else’s code, you find interesting pieces of “art“. Like the following loop construct in a C# application: 123456789101112 int i = anArray.Length - 1; while (true) { if (i < 0) break; …
Quote of the Day
I always assumed the designers of the Objective-C language and Cocoa frameworks trust me to know what I’m doing while I find very elegant ways to shoot myself in the foot. — from a mail sent to Cocoa-dev
PHP templates
When you design a complex application, it’s always useful to separate the presentation layer from the business logic. Usually, when dealing with web apps, this involves handing templates which are “filled” with data by your controller. The common rationale is that the template should contain as little logic as possible and that it should be …
Attributes, reflection and PHP
After a long exposure to .NET, when I get back to PHP I sometimes find myself missing some cool functionality (and a good IDE too… none of those I’ve tried so far can compete with the comfort of VisualStudio + ReSharper). Among these missing features, attributes are what I needed in order to solve a …