The answer is simple… only when the profiler tells you to. Optimizations often make code less reliable and often constrain implementations making them less flexible. Good software performance is not created by making lots of micro optimizations throughout your code. A good design from the architectural point of view is the critical key to success [...]
This ‘helpful’ (using this term loosely) post is for those you considering adding multi-threaded code to your application. The intended audience is developers with less than mastery-level (10+ years) multi-threading experience. The first question your up against is: Do I need multi-threading in my application? The answer is an emphatic NO you don’t. If you accept this [...]
I’ve seen many a question on stackoverflow and other places about running a process and capturing it’s output. Using the System.Diagnostics.Process correctly is not easy and most often it’s done wrong. Some common mistakes with System.Diagnostics.Process: Not capturing both output streams (error & output) Not redirecting input can cause applications to hang Not closing redirected [...]
After writing my last article I began to wonder what people ‘in-the-know’ thought the advantages of TDD vs integration testing were. So I quickly turned to my new favorite site stackoverflow. After reviewing several questions I came across this one entitled “Is Unit Testing worth the effort?“, and the accepted answer had 113 votes. So [...]
Changes in this version: Added a command-line interpreter and parser under Library.Commands Added a WinForms cross-threaded event delegate class that prevents deadlocking Added Library.Processes.ProcessRunner utility class for spawning a process and correctly collecting the Output Added a few FileUtils to allow searching the environment path and granting full access on a file for a well-known [...]
I recently posted a question about the use of readonly on stackoverflow. Follow the link to see the comments on Thoughts on the use of readonly for any/all instance members of a class? For some time now I’ve been using the readonly modifier for nearly all class fields. I use it for List members, IDisposeable [...]
Ok, I just found the best site I’ve stumbled across in a long time. http://www.antiifcampaign.com/ Excellent job guys and mad respect for giving this issue it’s very own online site/campaign. Join me and the many others to move the community in a positive direction. BTW, I found this indirectly on a great post about the [...]
I’ve just finalized version 1.0.723.126 and it is now available from google code. The majority of the update involves the introduction of a TortoiseSVN comment dialog. The dialog currently has only defect tracking implementation for Jira, but it allows you see a list of defects, check off the related ones, optionally resolve/assign the issue… All [...]
It’s been a while since I’ve posted, nothing of interest to say I guess. But then I ran across this article out on Planet TW RSS feed entitled “Resisting Dependency Injection“. Props to the author, I laughed so hard I slapped the desk… The funniest of course is the first comment “Use lots of static [...]
For those of you struggling to understand the different approaches to testing being heralded in by the TDD community I strongly encourage you read the following article: TDD Tests are not Unit Tests Stephen does an excellent job of detailing the general purpose behind the testing styles and really clarifies for my why I tend [...]