Login to participate
Register   Lost ID/password?
Louis Kessler's Behold Blog » Blog Entry           prev Prev   Next next

Sometimes You’ve Got To Get It Wrong Before You Can Do It Right - Mon, 1 Feb 2010

When I virtualized the Everything Report, I created one routine to write out the various parts of the report. It could send the results various places: to the Report itself, to the HTML export, to the Rich Text File export, or into plain text for the purpose of simple searching.

So I figured I could reuse that routine and simply add a new option to write to the log file. The file information in the Everything Report was something that could then easily be sent also to the log file - so I thought.

It took about 2 hours to set up and then - yuk! It looked terrible.

The Everything Report, HTML and RTF are all nicely formatted and indented. Text for the search doesn’t matter since you don’t see it. But the log file is plain text with no formatting at all. The stuff was jammed together, not indented, had hugely long lines and basically was impossible to read. I spent another couple of hours trying my best to automate the formatting and make it look reasonable.

That wasn’t going anywhere. So I took it out, and in a half an hour, I added custom append to the logfile routine that now does it much nicer.

The sexier way is not always best, so it sometimes pays to take your lumps early and go on.

No Comments Yet

Leave a Comment

You must login to comment.

Login to participate
Register   Lost ID/password?