Suppose you want to create an application which you want to limit to a single running instance, like some image viewers do for example. Also, you need different users on a Terminal Server not to conflict with each other. Oh, and you’re coding in C#. A possible solution to the problem is the one described …
Category: IT & Technology
How much would it cost to rewrite it?
I’ve just added LogMiner to Ohloh, a site that offers an interesting feature: it can analyse a project source code and estimate how much it would cost to hire a development team to recreate the project from scratch. I think that it’s a simple way to estimate the effort you put over the time in …
A new way to collect email addresses to spam?
I’m starting to suspect that spammers try to collect and verify email addresses from PAD files using bogus sites as honeypots. In fact, lately I’ve received several mails which are all based on the same template: Hello, my name is John, and I am an associate of SITEURL Briefly, here is what we do. We …
If at first you don’t succeed… try, try again…
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... …
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; …