Single Source Logging In Multiple Assemblies

I have what I believe to be a fairly simple problem in theory, yet in reality it proves to be a bit more hairy.  Below I present the problem and the requirements as I see them as well as a few possible solutions.  The solution I've settled on may or may not be correct, so I'm tossing out here to see what you guys think.  By all means please post some feedback.

Problem

To have a common, consistent logging...

Read the rest at: http://www.timbarcz.com/blog/SingleSourceLoggingInMultipleAssemblies.aspx

(Update your feed readers to point to new address http://feeds.feedburner.com/TimBarcz)

Rated Excellent [5 out of 5]. with 1 Comments

My Issues With Var

I posted earlier this year with the basic question, Is Var Better?  I'm not the only one to question the reintroduction of var.  Rhys Campbell went as far as to say some abuse the new keyword. I will say that my initial aversion to using var has softened a bit.  However there are at least two issues I have with them.

  1. Implicit conversions
  2. Intellisense

Read the rest at: http://www.timbarcz.com/blog/MyIssuesWithVar.aspx

(Update your feed readers to point to new address http://feeds.feedburner.com/TimBarcz)


with 0 Comments

MVC Framework - A Needle In a Haystack

This is the third in an ongoing series of articles about my team's transition to the Asp.NET MVC Framework.  In my last post I blogged a bit about how I haven't quite got comfortable enough with the new MVC framework to feel über productive.  What augments the feeling is the difficulty of finding quality information.  The data is few and far between and only sometimes relevant.

I was struggling yesterday to find information on the ComponentController class.  Things I was finding were from the Preview 2 release but finding something on the Preview 3 release was a bit more challenging.  Things are rapidly changing...

Read the rest at: http://www.timbarcz.com/blog/MVCFrameworkANeedleInAHaystack.aspx

(Update your feed readers to point to new address http://feeds.feedburner.com/TimBarcz)

with 0 Comments

Formatting Output with String.Format() Part 2 - Left and Right Alignment

I recently posted some code that could have taken advantage of format strings available when using the ToString() for integer output.  The other day I was building a report for a moonlighting gig where some of the text had to be right aligned and left aligned.  String.Format() does that as well.  I've seen some goofy attempts at formatting text, presumably not realizing...

Read the rest at: http://www.timbarcz.com/blog/FormattingOutputWithStringFormatPart2LeftAndRightAlignment.aspx

(Update your feed readers to point to new address http://feeds.feedburner.com/TimBarcz)

with 0 Comments

MVC Framework - Learning to Walk

A few days ago I posted that our team was making the transition from webforms to MVC.  Since then a few days have gone by and I wanted to post my some struggles and successes (however few) in recent days. First, it's been tough wrapping my head around the shift from web forms to MVC.  I would caution anyone making a similar shift or considering it, that...

Read the rest at: http://www.timbarcz.com/blog/MVCFrameworkLearningToWalk.aspx

(Update your feed readers to point to new address http://feeds.feedburner.com/TimBarcz)

with 0 Comments

Making Good On a Promise

Last week I blogged a about Unappreciated Open Source projects.  In the post I made a commitment:

From here on I've resolved to donate a dollar any time I download a free library or webcast where a donate link is presented.  Why $1?  In all honesty it is something I can commit to.

I'm thoroughly looking forward to watching the...

Read the rest at:  http://www.timbarcz.com/blog/MakingGoodOnAPromise.aspx

(Update your feed readers to point to new address http://feeds.feedburner.com/TimBarcz)

with 0 Comments

Using MVC Framework In the Wild, Our Transition to the ASP.NET MVC Framework

We recently decided that with the effort we're putting into our website and some changes that we're making that now would be as good of time as ever to make the switch to the new Asp.net MVC Framework.  We're no Google, but we're currently receiving around 18,000 unique visitors a day and 300,000 page views and hope to grow that number as we make our site easier to use for our customers.  I hope to rely heavily...

Read the rest at:  http://www.timbarcz.com/blog/UsingMVCFrameworkInTheWildOurTransitionToTheASPNETMVCFramework.aspx

(Update your feed readers to point to new address http://feeds.feedburner.com/TimBarcz)

with 0 Comments

Formatting Output with ToString()

A coworker ran across the following and shared with me.

   1: Dim strpage
   2: strpage = pageNumber.ToString()
   3: If Len(strpage) = 1 Then
   4:     strpage = "000" & strpage
   5: ElseIf Len(strpage) = 2 Then
   6:     strpage = "00" & strpage
   7: ElseIf Len(strpage) = 3 Then
   8:     strpage = "0" & strpage
   9: End If 

The programmer is trying to ensure that the page number, when printed out, is always four characters long.  This is not the best way to write this code.  I thought I'd keep this post to myself but unfortunately this isn't the first time I've seen code like this, it is quite common.

The better way to write the above is:

   1: Dim strpage
   2: strpage = pagenumber.ToString("0000")

It's shorter, more concise, and easier to read.  Further the second example is more extensible.  If the requirements change to say the page number should be five characters, the first example must recompile.  The second example must be recompiled as well in it's current state, however the string "0000" could be moved to a configuration file somewhere and then wouldn't need to be.

Originally Posted At:  http://www.timbarcz.com/blog/FormattingOutputWithToString.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

Underappreciated Open Source

Many people use open source tools, whether its NUnit, Nant, Rhino, or log4net in their professional lives.  If you use any of these tools, when was the last time you donated time and/or money to any of the open source tools you use?  That's what I thought. 

I was recently watching the Hibernating Rhinos from Ayende Rahien and I wanted to thank Oren....

Read the rest at:  http://www.timbarcz.com/blog/2008/07/10/UnappreciatedOpenSource.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

My "Building A Solid Core" Contest Entry

About a month ago Jean-Paul Boodhoo announced a contest that he was sponsoring.  The contest idea centered around the idea of developing passion in others around you.  I have an immense amount of respect for JP having met him at ALT.NET Seattle.  When the contest was announced I thought I'd put in an entry as I enjoy the journey passion for my craft has taken me on with others.  Here is my entry in its entirety:

Read the rest at:  http://www.timbarcz.com/blog/2008/07/08/MyQuotBuildingASolidCorequotContestEntry.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

Open Source - You Have The Source

"But you have the source!"

I heard that statement a little over a month ago at the Alt.Net Open Spaces event in Seattle.  It's no secret to those who know the community, that open source technologies are at the very least promoted and in many cases you'll find many open source project committers within the Alt.Net community.  Heck, David Laribee, a founding member if there is such a thing, in a post defined Alt.Net as...

Read the rest at:  http://www.timbarcz.com/blog/2008/06/10/OpenSourceYouHaveTheSource.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

Regular Expressions, Your Job Requires Them

I've thought about writing this post several times over the past two years.  Having had regular expressions come up three times last week, I thought it time to address the lack of programmers out there who understand regular expressions.  The sheer amount of fear surrounding regular expressions and the work that goes into avoiding them is astonishing...

Read the rest at:  http://www.timbarcz.com/blog/2008/02/25/RegularExpressionsYourJobRequiresThem.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

Missing TortoiseCVS Icon Overlays - How SVN is Just a Bit Smarter

TopicProvider.cs," the developer shouted, indicating someone in the room had committed an updated project file, but not the new file.  Humbled, I quickly went to my sandbox and added and committed the file.

"TopicProviderTests.cs," came another shout.  Again quickly I added the file.

Feeling embarrassed...

Read the rest at:  http://www.timbarcz.com/blog/2008/01/17/MissingTortoiseCVSIconOverlaysHowSVNIsJustABitSmarter.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

CRIneta Has a New President

While much of the political discussion last week surrounded Iowa and it's first in the nation caucus there was a small, yet important election that was rarely covered...

Read the rest at:  http://www.timbarcz.com/blog/2008/01/10/CRInetaHasANewPresident.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

LINQ To SQL Fails To Impress As An ORM

Over the past year or two I've really tried to improve coding abilities by thinking on objects.  By talking about, and programming, real-world objects you can reduce the impedance with clients when discussing

Read the rest at: http://www.timbarcz.com/blog/2008/01/09/LINQToSQLFailsToImpressAsAnORM.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)


with 0 Comments

Protect Your Inbox - Two Spam Management Tools

This is the second-edition of a post I made a long time ago on a different blog.  I'm posting it because of a post made by Eric Bowden about his new approach to personal email management....

Read the rest at: http://www.timbarcz.com/blog/2007/12/19/ProtectYourInboxTwoSpamManagementTools.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

What Makes A Post Great - AideRSS Analyzes Blogs For Quality

Scott Hanselmen posted this morning about aideRSS.  I decided to run aideRSS over my blog to see what would the results would be.  Apparently I have only one "Great Post"...

Read the rest at: http://www.timbarcz.com/blog/2007/12/19/WhatMakesAPostGreatAideRSSAnalyzesBlogsForQuality.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

Linux - A Desktop System It Is Not

Recently I was at lunch who two fellow developers.  The discussion focused on various technologies and the future of technology as it seemingly always does when a group of nerds gather.  The discussion somehow meandered it's way to Linux, where I admitted that I didn't understand or get it...

Read the rest at: http://www.timbarcz.com/blog/2007/12/18/LinuxADesktopSystemItIsNot.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

The Cahier Moleskine and Practical Note Taking

I've used a Moleskine Ruled Notebook for a little over a year.  In it, I keep track of blog ideas, meeting notes, phone numbers, to-do items, and...

Read the rest at: http://www.timbarcz.com/blog/2007/12/17/TheCahierMoleskineAndPracticalNoteTaking.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments

Visual Basic Try/Catch Oddities

I'm reacquainting myself with Visual Basic.  However at this point I'm seeing some strange behavior...

Read the rest at: http://www.timbarcz.com/blog/2007/12/15/VisualBasicTryCatchOddities.aspx

(Update your feed readers to point to new address http://www.timbarcz.com/blog/)

with 0 Comments