Wednesday, May 11, 2005

Occasionally when you are programming and you see code that was auto-generated you see this message in the comments section of your code: “This Code was Generated by a Tool”.

The first time I saw that I laughed and I thought someone had changed the comments section from someone else's name to say “This Code was Generated by a Tool”. About 2 seconds later I noticed that it was generated by a development tool we were using.

Microsoft is coming out with a new version of it's main development platform and taking bug suggestions from users. I had to laugh when I saw this bug suggestion:

http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=deb33595-a59f-41ae-b73f-70a3b2e34cf3

 

For anyone to lazy to click the link I will summarize it, even though I recommend you click the link:

Autogenerated code in Visual studio is preceeded by the comment section that includes:
<autogenerated>This code was generated by a tool.</autogenerated>

The word "tool" may be used as an insult, describing someone who is being manipulated without their knowledge - implying they are na ve and ignorant. [http://en.wikipedia.org/wiki/Tool_(insult)]

I don't mind this showing up in code that others write and in fact when I first saw that phrase I started laughing. "What a tool!, I can't believe he(she) wrote that code - no wonder it doesn't work!!!". However, when it shows up in projects that I'm developing, it's kind of insulting. "Are you calling me a tool?"”

Further down:

Proposed Solution: I would change the line: "This code was generated by a tool" to:

1) "This code automagically appeared here" - automagically is a great word.

2) Or for a more serious solution: "This code was autogenerated" - Maybe move it underneath the runtime version and just above. "Changes to this file may cause incorrect behavior and will be lost if the code is regenerated." so it's not immediately underneath the tag.

3) Just remove the line - the comment is enclosed in an autogenerated section. - Note: I checked Faster Development below because I develop code faster when I'm not insulted.

So I guess I wasn't the only person who thought that way when I first saw that comment.

 

Tuesday, May 10, 2005 11:52:08 PM (GMT Standard Time, UTC+00:00)  #    Comments [0]  | 
Comments are closed.

Theme design by Jelle Druyts

Pick a theme: