Advertisement
Membership
Login
ACCU Buttons
Browse in : | > Topics |
- ACCU magic
by Kevlin Henney
Category: [ Overload Journal #59 - Feb 2004 | Programming Topics ]
Description :
We have all seen comments in source files which look more like executable code than documentation.
The first line in the body of the for loop below is such a comment: you might expect to be able to remove the leading slashes and have code which compiles and runs, but functions slightly differently.
What did the author of this comment intend?
Example 0
for (Surfaces::iterator sf = surfaces.begin(); sf != surfaces.end(); ++sf) { // std::cout << "Drawing: " << *sf << "\n"; sf->draw(); }
OK, I’m being disingenuous. I’m aware that the comment isn’t really a comment, it’s commented-out code. And, like any tolerant and capable programmer, by examining the surrounding context I can guess why this code has been commented out.
This article examines how to comment out code, then describes various problems which lead to code being commented out, before finally arguing that there’s often a better solution to these problems.
by Thomas GuestSource : Hand entered.
Category: [ CVu Journal Vol 16, #1 - Feb 2004 | Programming Topics ]
Description :
The first step here in finding problems in the code is to identify the problem the code is trying to solve. The discussion in the C Vu article is basically about curiosities in the way in which the C++ standard library std::istream is defined, but I will make the perhaps unwarranted assumption that what the problem the code is really about is not the uses of std::istream, but rather, more generally, how to write a read routine that can effectively and safely capture data from an input stream. Actually as the first problem below illustrates neither of these issues can be effectively addressed without the other.
by Bill ClareCategory: [ CVu Journal Vol 16, #1 - Feb 2004 | Programming Topics ]
Description : This item is part of the Dialogue section of C Vu, which is intended to designate it as an item where reader interaction is particularly important. Readers’ comments and criticisms of published entries are always welcome. by Francis Glassborow
Category: [ CVu Journal Vol 16, #1 - Feb 2004 | Programming Topics | Student Code Critiques from CVu journal. ]
by Andy Nibbs
Category: [ CVu Journal Vol 15, #6 - Dec 2003 | Programming Topics ]
Description :
This article reports on an experimental study, performed during the 2003 ACCU conference, that attempted to measure one particular aspect of developer identifier meaning assignment behavior. The study investigated the extent to which belief in the applicable application domain affects the meaning assigned to identifier names.
by Derek JonesCategory: [ CVu Journal Vol 15, #6 - Dec 2003 | Design of applications and programs ]
by Kevlin Henney
Category: [ Overload Journal #58 - Dec 2003 | Programming Topics ]
by Raoul Gough
Category: [ Overload Journal #58 - Dec 2003 | Programming Topics ]
by Hubert Matthews
Category: [ Overload Journal #58 - Dec 2003 | Programming Topics ]
by Allan Kelly
Category: [ Overload Journal #58 - Dec 2003 | Project Management | Design of applications and programs ]
by Chris Hills
Category: [ Overload Journal #58 - Dec 2003 | Project Management ]
by Rich Sposato
Category: [ Overload Journal #58 - Dec 2003 | Programming Topics ]
Description :
During the development of a an internet based GIS system we came across the problem of maintaining session state on two separate server entities...
by John Morrison , Jonathan HeeleyCategory: [ CVu Journal Vol 15, #5 - Oct 2003 | Internet Topics ]
by Silas S Brown
Category: [ CVu Journal Vol 15, #5 - Oct 2003 | Internet Topics ]
by David Nash
Category: [ CVu Journal Vol 15, #5 - Oct 2003 | Programming Topics ]
by Ken Hagan
Category: [ Overload Journal #57 - Oct 2003 | Programming Topics ]