// Enforce Method Contract
-
I once worked on an application where one of the developers fulfilled the requirement of commenting his code by putting at the top of each method:
// Enforce Method Contract
Well, thank you Captain Obvious! ;P
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
-
I once worked on an application where one of the developers fulfilled the requirement of commenting his code by putting at the top of each method:
// Enforce Method Contract
Well, thank you Captain Obvious! ;P
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
hahaha that sounds great, what comment system do you use, i have used doxygen with some sucess but it becomes a little tiresome after a while
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius and a lot of courage to move in the opposite direction." -Albert Einstein
-
I once worked on an application where one of the developers fulfilled the requirement of commenting his code by putting at the top of each method:
// Enforce Method Contract
Well, thank you Captain Obvious! ;P
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
Josh Smith wrote:
// Enforce Method Contract
Possibly a placeholder for later elaboration (never done, of course! :-D ) :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
I once worked on an application where one of the developers fulfilled the requirement of commenting his code by putting at the top of each method:
// Enforce Method Contract
Well, thank you Captain Obvious! ;P
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
That's good.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
I once worked on an application where one of the developers fulfilled the requirement of commenting his code by putting at the top of each method:
// Enforce Method Contract
Well, thank you Captain Obvious! ;P
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
That sounds reasonable to me. I'm pleased to see that he thinks the contract is so important. Or is this some form of bizarre Arnold Schwarzenegger motivational speaking type of thing. Try saying it in an Austrian accent, and it really works.
Deja View - the feeling that you've seen this post before.
-
That sounds reasonable to me. I'm pleased to see that he thinks the contract is so important. Or is this some form of bizarre Arnold Schwarzenegger motivational speaking type of thing. Try saying it in an Austrian accent, and it really works.
Deja View - the feeling that you've seen this post before.
Pete O'Hanlon wrote:
Try saying it in an Austrian accent, and it really works
:laugh:
:josh: My WPF Blog[^] All of life is just a big rambling blog post.
-
That sounds reasonable to me. I'm pleased to see that he thinks the contract is so important. Or is this some form of bizarre Arnold Schwarzenegger motivational speaking type of thing. Try saying it in an Austrian accent, and it really works.
Deja View - the feeling that you've seen this post before.
You've got a point there. One can imagine Arnie busting out the one-liner "contract enforced" after dispatching some poor sap.
Steve
-
Josh Smith wrote:
// Enforce Method Contract
Possibly a placeholder for later elaboration (never done, of course! :-D ) :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]I worked with a chap that did a retro fit of function headers on files where they'd largely been left out. The functions themselves were meaningfully named and internally well commented. Unfortunately he decided that he didn't have time to write descriptive text for all of them, so just put TODO: Add function comment. This was a real pain, all of our TODO: Fix nasty bug and TODO: Finish writing this important piece of code before release got buried beneath approximately a thousand worthless TODOs.
-
You've got a point there. One can imagine Arnie busting out the one-liner "contract enforced" after dispatching some poor sap.
Steve
Stephen Hewitt wrote:
One can imagine Arnie busting out the one-liner "contract enforced" after dispatching some poor sap.
That's how he runs California.
Faith is a fine invention For gentlemen who see; But microscopes are prudent In an emergency! -Emily Dickinson
-
I worked with a chap that did a retro fit of function headers on files where they'd largely been left out. The functions themselves were meaningfully named and internally well commented. Unfortunately he decided that he didn't have time to write descriptive text for all of them, so just put TODO: Add function comment. This was a real pain, all of our TODO: Fix nasty bug and TODO: Finish writing this important piece of code before release got buried beneath approximately a thousand worthless TODOs.
I have seen code where the standard practice was to leave in the // TODO: Add constructor logic here that the compiler puts in automatically. The folk that did it never saw a problem with doing that because they didn't use the Task list. I found it to be a problem as soon as I put in a useful TODO and it was overwhelmed my hundreds of pointless TODOs. Bill W