April 2003 - Posts
on proper use of the app.config has been taking place on DevelopMentor's Win Forms list
. One of the ideas was to reconstitute objects directly from a section in the app.config, so I suggested Craig Andera's excellent story
on doing this very thing. I've used this technique a few times in the past and I find it to be an extremely palatable alternative to rolling your own classes that read configuration data from XML files using your own grammar.
The most important point in this whole article is this: You need to understand what's going on inside all your abstraction layers. Each abstraction presents an illusion, but the best decisions happen when you can see through the illusion.
A great article, and so is the follow-up. It seems many don't feel the need to learn about the underlying abstractions facilitated by their environments; however, I feel it should be a requirement. As Joel noted in The Law of Leaky Abstractions: All non-trivial abstractions, to some degree, are leaky. Indeed. I personally do not understand how one can operate on many levels of abstractions without the desire to learn more about them; learning is what satiates the intellectual appetite.
Jim Arnold and Jan Tielens have shown how to use a VS.NET macro to expand properties in C# and VB.NET, respectively. I'd like to add an alternative to VS.NET macros: QuickCode.NET. You can expand field definitions into properties simply by doing:
prop string test
Then hit ALT+Q, and it's expanded into the following:
/// Property Test (string)
public string Test
this.test = value;
Tweaking the expansion is easy to do in the editor. It's also extremely simple to accomodate C#, VB.NET, or any other language; you needn't create an entire macro for each respective language. There are plenty of useful default expansions (including one for try/catch/finally blocks), but I find that I add many of my own to accommodate my coding style.
I spent Friday, Saturday, and Sunday working almost non-stop moving my company's office to a new location. It was unanticipated, but necessary due to the fact that the movers rescinded their agreement after seeing some of our larger items. Needless to say, about 6 of us moved the entire office to its nicer, larger, and paradoxically, cheaper location. The experience is best summarized by the following (paraphrased) quote from the president of my company:
It's obvious we are paid to think.
Indeed; however, in the end, we were fairly impressed to see what a group of keyboard jockeys could do.
On another note, I'm posting to the newly improved ASPNetWeblogs via w.bloggar; I like it! At the risk of stating the obvious, great work Scott!
I read an interesting post on the ASPAdvice debate list, but rather than post the entire email here, I'll refer to Grant's post on the same article.
It seems like most doomsday references to .NET such as this still refer to it as a collective whole (i.e. .NET Server) instead of making the discernment between the .NET framework and everything else. It's quite obvious the marketing department all had a few too many lattes the day they decided to affix .NET to so many future product releases.
I'm not at all worried about my involvement with .NET as a developer, but a lot of this .NET doomsday talk has pervaded the type of media that corporate managers read, and it seems to have instilled an unfounded lack of confidence in .NET as a development platform for those that don't know any better.
I just hope the Microsoft marketing people switch to decaf during the next product release cycle.
At this moment in history, the most beautiful female voice in the world is probably that of Emma Kirkby, an Englishwoman who specializes in early music. Herein some fannish remarks and a stolen picture....
It's always nice to hear of another who is privy to the splendor that is Emma's voice. I purchase literally anything that has her name on it (it helps if it's from The Academy of Ancient Music and conducted by Christopher Hogwood). My absolute favorite to date is Pergolesi: Stabat Mater/Salve Regina. I can thank a fellow programmer at my last place of employment for the reference to that piece.
I love classical music, and I find it helps transfer me into a right-brain "zone" as I generally listen to it while coding/reading/etc.
The recent talk about ignorant programmers echoed a lot of my thoughts/experiences as well.
I actually think that Pinku is right, up to a point. The vast majority of the programmers in IT departments around the country are operating without even a modicum of understanding of CS theory. They have some tools they know how to use, some patterns they can employ, and only a passing interest in the actual application of their trade. There is a smaller set of passionate, knowledgeable and driven programmers who grok more than a single problem domain, and see tools as implements to help solve problems, not the solutions themselves.
I believe "passing interest" is the key issue, and in my experience this is the overwhelming majority. It seems there are endless passionate developers in blogspace, but I rarely meet such individuals in the wild. More often than not, the developers supporting a company's IT software infrastructure are task-oriented; get it done so long as "it works." Who has time for pedantic notions of quality/correctness?
In all fairness, I think tool manufacturers are largely to blame. Most .NET developers I've met didn't even know you could build .NET applications sans VS.NET. Couple that with questions such as, "does VB.NET support the DataSet" (from a .NET developer supporting a very large company's infrastructure that you most likely use), and I think the problem is not just disinterest, but apathy. Of course, VS.NET is the panacean solution to many developers' worlds, so one could argue that they had absolutely no need to step outside of their myopic perception of .NET. Go ahead, pass a DataSet around to every method; return it from every web service; VS.NET makes it easy! Be sure to also discard the notions of reuse by putting all your business logic in a web service, because all you have to do is "add reference" from VS.NET. I feel that, in many cases, overwhelmingly powerful tools such as VS.NET empower those who shouldn't be.
Of course, many (most?) reading this probably know the fundamentals and what incantations VS.NET performs on your behalf, but most in the wild simply do not. I feel this should largely be required knowledge, but expression of that opinion amongst friends has been dismissed as being arrogant.
I've been consulting on a fairly large C++/VB/SQL Server CTI application that had been entirely abandoned by its previous developers, largely due to the state of software entropy. I certainly can't permute all the refactoring I've had to do to get the codebase into a somewhat maintainable state, but I can say that I've been fighting this elusive bug for a long while that only manifested itself under extreme conditions.
The condition occurred normally in every request by the system, so I spent time analyzing countless verbose log/trace output in attempt to isolate an anomaly between ostensibly normal conditions. If testing CTI applications weren't such a laborious task, I would have isolated the issue many days ago. Unfortunately, as I said above, the bug only manifested itself under extreme conditions; when the system was under a heavy load. The occurrence of the bug was directly proportional to the active number of phonelines in the system. This meant I had to have active people manning the phonelines, which of course costs even more money in human resources.
It feels great to resolve such elusive bugs, and aside from issues like the above, CTI applications are actually quite fun to work with. Being reinjected into the C++ COM and VB "Win DNA" world certainly reasserts my appreciation for .NET.
There has been a long discussion on Win Tech Off Topic regarding quality books/resources on software design. Domain-Driven Design was one of the suggestions, and you can download the draft (4/15/2003) for free.
Free books are a good thing for bibliophiles indeed.
I never posted an obligatory "me too!" response to Chris Brumme's excellent content, but his recent post certainly doesn't disappoint. I've never encountered the issue he describes, but it's certainly a caveat I'll tuck away for future reference.
I read so many tips/ideas/caveats/etc on a daily basis that I often forget where I read them when I actually need to refer to them. Googling doesn't always produce results, but hopefully search engines like rssSearch can help supplement.
More Posts Next page »