Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

attn roedy

Thread view: 
Monique Y. Mudama - 26 Nov 2005 00:59 GMT
A suggestion for http://mindprod.com/jgloss/unmain.html

Something like:

"Be sure to comment out unused code instead of deleting it.  In no way
document whether the remaining code was intended to supplement or
completely replace the old code, whether the old code worked at all,
what was wrong with it, etc.  Bonus points if the commented-out code
already followed the rules presented in other parts of this guide, so
that the maintenance programmer can't possibly simply read the
commented-out code and decide its relevance for themselves."

Signature

monique

Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

VisionSet - 26 Nov 2005 13:48 GMT
> "Be sure to comment out unused code instead of deleting it.  In no way
> document whether the remaining code was intended to supplement or
[quoted text clipped - 3 lines]
> that the maintenance programmer can't possibly simply read the
> commented-out code and decide its relevance for themselves."

Sounds like you've just been stung ;-)

--
Mike W
Monique Y. Mudama - 26 Nov 2005 17:51 GMT
>> "Be sure to comment out unused code instead of deleting it.  In no
>> way document whether the remaining code was intended to supplement
[quoted text clipped - 8 lines]
>
> -- Mike W

How could you tell????

*grin*

Signature

monique

Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

Roedy Green - 26 Nov 2005 21:22 GMT
On Sat, 26 Nov 2005 10:51:19 -0700, "Monique Y. Mudama"
<spam@bounceswoosh.org> wrote, quoted or indirectly quoted someone who
said :

>> Sounds like you've just been stung ;-)
>>
>> -- Mike W
>
>How could you tell????

I wrote that essay at http://mindprod.com/jgloss/unmain.html
as a sort of therapy, a way to get even with all those jerks that I
had to clean up after or had to work under who had not clue how to
write maintainable code..  I finally had a way to hold them up to
public ridicule.

The essay really hit a nerve.  It is by far the most popular essay I
have ever written.  I get extravagant praise fan mail from it from
people who giggled themselves silly recognising twits they too have
had to deal with.

It lets me reframe, when I come across some new idiocy. Instead of
getting mad, I get even, adding the outrage to the collection.

I have tons of submitted material I have to go through and add at some
point.

Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Monique Y. Mudama - 06 Dec 2005 20:00 GMT
> On Sat, 26 Nov 2005 10:51:19 -0700, "Monique Y. Mudama"
><spam@bounceswoosh.org> wrote, quoted or indirectly quoted someone
[quoted text clipped - 22 lines]
> I have tons of submitted material I have to go through and add at
> some point.

The good thing about using bad code as a source of inspiration is ...
you'll never run out of inspiration!

Signature

monique

Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html

Chris Uppal - 26 Nov 2005 14:42 GMT
> "Be sure to comment out unused code instead of deleting it.  In no way
> document whether the remaining code was intended to supplement or
> completely replace the old code, whether the old code worked at all,
> what was wrong with it, etc.  [...etc...]

Good sound advice.  It's also an effective technique for ensuring that a
puported [SC]*E is nether S nor C.

   -- chris
Donald Roby - 26 Nov 2005 19:53 GMT
> A suggestion for http://mindprod.com/jgloss/unmain.html
>
[quoted text clipped - 7 lines]
> that the maintenance programmer can't possibly simply read the
> commented-out code and decide its relevance for themselves."

For even more bonus points, add new code in the middle of the
commented-out section.
Steve Horsley - 02 Dec 2005 18:27 GMT
> For even more bonus points, add new code in the middle of the
> commented-out section.

LOL!
Roedy Green - 26 Nov 2005 21:31 GMT
On Fri, 25 Nov 2005 17:59:52 -0700, "Monique Y. Mudama"
<spam@bounceswoosh.org> wrote, quoted or indirectly quoted someone who
said :

>"Be sure to comment out unused code instead of deleting it.  In no way
>document whether the remaining code was intended to supplement or
[quoted text clipped - 3 lines]
>that the maintenance programmer can't possibly simply read the
>commented-out code and decide its relevance for themselves."

here is how I posted it at:

http://mindprod.com/jgloss/unmaindocumentation.html

Obsolete Code: Be sure to comment out unused code instead of deleting
it and relying on version control to bring it back if necessary. In no
way document whether the new code was intended to supplement or
completely replace the old code, or whether the old code worked at
all, what was wrong with it, why it was replaced etc. Comment it out
with a lead /* and trail */ rather than a // on each line. That way it
might more easily be mistaken for live code and partially maintained.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Daniel Dyer - 27 Nov 2005 21:29 GMT
> Comment it out with a lead /* and trail */ rather than a // on each
> line. That way it might more easily be mistaken for live code and
> partially maintained.

Syntax-highlighting seems like a luxury rather than a necessity, until you  
get stung by that one.

Dan.

Signature

Daniel Dyer
http://www.dandyer.co.uk

Oliver Wong - 01 Dec 2005 20:43 GMT
>> Comment it out with a lead /* and trail */ rather than a // on each
>> line. That way it might more easily be mistaken for live code and
[quoted text clipped - 4 lines]
>
> Dan.

   The best is when you work in an office where everyone uses the same IDE,
and you discover a bug in the syntax highlighting code (maybe nested
comments inside of nested strings, e.g.

String foo = "\"++\\\"\"//"+/*"+//**\\\"+"*/"\"+"/*+"

   and rather than reporting the bug, you use it to implement the above
unmaintanables.

   Alternatively, your company maintains their own IDE (or, more
realistically, you work with a language you've invented, so you had to write
your own syntax highlighting plugin for Eclipse) and intentionally inject
such bugs.

   - Oliver
Hendrik Maryns - 02 Dec 2005 13:25 GMT
Oliver Wong schreef:
>     The best is when you work in an office where everyone uses the same IDE,
> and you discover a bug in the syntax highlighting code (maybe nested
> comments inside of nested strings, e.g.
>
> String foo = "\"++\\\"\"//"+/*"+//**\\\"+"*/"\"+"/*+"

This really will not compile, right?  It ends with an open comment, and
there is no ;

Or am I way off here?

H.

Signature

Hendrik Maryns

==================
www.lieverleven.be
http://aouw.org

Stefan Ram - 02 Dec 2005 13:44 GMT
>This really will not compile, right?  It ends with an open
>comment

 I got the same impression, when I tried to understand it.
Oliver Wong - 02 Dec 2005 15:44 GMT
> Oliver Wong schreef:
>>     The best is when you work in an office where everyone uses the same
[quoted text clipped - 7 lines]
>
> Or am I way off here?

   Well, I didn't actually test it, but the fact that it ends with an open
comment is intentional. I didn't think of adding a ; to hide the fact that
it ends with an open comment (good idea!). The reason it ends with an open
comment becomes more obvious if you consider the context. Here's the part of
the post right before that:

>> Comment it out with a lead /* and trail */ rather than a // on each
>> line. That way it might more easily be mistaken for live code and
>> partially maintained.

   - Oliver
Monique Y. Mudama - 06 Dec 2005 19:59 GMT
> On Fri, 25 Nov 2005 17:59:52 -0700, "Monique Y. Mudama"
><spam@bounceswoosh.org> wrote, quoted or indirectly quoted someone
[quoted text clipped - 20 lines]
>  each line. That way it might more easily be mistaken for live code
>  and partially maintained.

Cool =)

Signature

monique

Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.