This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
a lot of the time, you want to separate your regular output from your error output.
Say your program is processing a million records, and generating output that will be fed to another program. some of the records will fail. You don't want 20k lines of good data, a bunch of error messages, then 30k more good data, then more error messages...
if you separate your standard out from your error out, you can generate a file with all the good data, and feed it straight into your next program. You can then check your error file for the records that failed, and decide how to handle those later.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors