This weekend, I attended the Global Windows Azure Deep Dive conference in the National College of Ireland, Dublin. Microsoft in conjunction This was a community organised event where Local & National IT Organisations, Educational Institutions & .NET Communities were running a series of events in parallel in a number of cities around the world. The purpose; …
Category Archive: Random
Permanent link to this article: http://trycatch.me/whens-a-deep-dive-not-a-deep-dive/
Dec 04 2012
Unexpected Variable Behaviour in DOS Batch and Delayed Expansion
What would you expect the following piece of Code to print. if the directory ‘A’ doesn’t exist @ECHO OFF IF ’1′==’1′ ( CD a ECHO %ERRORLEVEL% ) CD a ECHO %ERRORLEVEL% Not very intuitive right? This is because the DOS batch processor treats the whole if statement as one command, expanding the variables only once, before …
Permanent link to this article: http://trycatch.me/unexpected-variable-behaviour-in-dos-batch-and-delayed-expansion/
Sep 07 2012
Checking if a user account is enabled in .NET
Here’s a handy little code snippet to figure out if a local windows user account is enabled or not using the System.DirectoryServices namespace. private static bool IsUserAccountEnabled(string username) { try { var result = new DirectoryEntry { Path = “WinNT://” + Environment.MachineName + “,computer” } .Children .Cast<DirectoryEntry>() .Where(d => d.SchemaClassName == “User”) .First(d => …
Permanent link to this article: http://trycatch.me/checking-if-a-user-account-is-enabled-in-net/
Apr 07 2011
Is the “Joel Test” still relevant?
I ended up having an extremely brief chat with Joel Spolsky recently in one of the Stack Exchange chat rooms. We learned, among other things that he’ll only return to Dublin when “the heroin addicts promise not to yell at him for eating fish and chips in a park near Christchurch” and that he’d like …
Permanent link to this article: http://trycatch.me/is-the-joel-test-still-relevant/
Apr 06 2011
System.Threading.Tasks & Parallelism in .NET 4.0
Alas, all my hope & dreams & promises of a regular blog post, dashed… oh well, here’s one now. I’ve been playing with the System.Threading.Tasks namespace over the last few hours and it’s quite neat. We’ll be rolling out some new software in the next few months at work which Processes SMS messages from Customers. …
Permanent link to this article: http://trycatch.me/system-threading-tasks-parallelism-in-net-4-0/

