If you change that function, do you re-write all of your documentation? ----- Original Message ----- From: "ryanm" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com> Sent: Wednesday, December 21, 2005 6:09 PM Subject: Re: [Flashcoders] Faster code?
> What I want to know is who is paying for #2? Very rarely do I ever get > time > to comment anything, and even if I did, the code I commented changes the > next day, rendering the whole endeavor fruitless. > > ...not to mention most service work is always a custom job/rewrite anyway. > Wow... that sucks. I hope they're small projects. Without good a reusable (and well-commented) code base, most of the larger projects I work on wouldn't even be possible. I have, at minimum, at least something like the following before every method (or sometimes groups of methods) in my classes: (spacing is jacked, but forms a box in the Flash IDE) // ######################################################################## // // ## Function: ShowMessage ## // // ## Parameters: ## // // ## Message msg ## // // ## ## // // ## This function determines how to display a message object. It ## // // ## accepts a single message object as a parameter and returns nothing.## // // ## ## // // ## Not all messages are displayed, certain types of system messages ## // // ## are used to close connections, accept or decline private chats, ## // // ## etc, and may or may not display any text to the user on receipt. ## // // ######################################################################## // I guess it really depends on the types of projects you are doing. But if there is even a chance that I'll have to come back and edit a class later, I leave myself comments next to *any* optimization so that I know when and why I put it there. At my current job, there are actually new entries in my comments, like this: // ## Modified:Ryan Mattes 12/20/05 Reviewed:Abraham Saldana 12/21/05 ## // Any code that goes into production has to follow a code standard, be reviewed by my peers, and have a record of when and why I went in and changed it. The upside being that if something breaks, everyone knows who broke it and when, making it very easy to find and fix, and if someone new comes in, they can easily figure out what the code does and how to use it (they're actually crosstraining some C# devs by having them read my source). What I want to know is who pays people to write code by the seat of their pants anymore, and why would you want to? ryanm _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders