Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 8th, 2006, 3:13 AM   #11
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
yeah, too many comments, it made me not want to bother (i'm goin' to bed soon anyway)

if they're there b/c of a gay class requirement, then just delete them when you post.

//instantiates a primitive data type integer 'x' and sets that (x's) value to one
int x = 1;

is gonna earn you about 3.7 kicks to the nuts.

;-)

or just three if kicksToTheNuts is an int.
or i could templatize or typecast the code and get even more kicks to the nuts. your best bet is bool's (either one or zero).

wanna RO-SHAM-BO?

:p
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Sep 8th, 2006, 7:02 AM   #12
peace_of_mind
Professional Programmer
 
peace_of_mind's Avatar
 
Join Date: Sep 2004
Location: Hell if I know most of the time
Posts: 439
Rep Power: 4 peace_of_mind is on a distinguished road
Send a message via MSN to peace_of_mind Send a message via Yahoo to peace_of_mind
Much as I hate to detract from a thread, that's about the funniest shit I've read in a good while. :p
__________________
Amateurs built the ark
Professionals built the Titanic

peace_of_mind is offline   Reply With Quote
Old Sep 8th, 2006, 12:44 PM   #13
synchronized
Newbie
 
Join Date: Sep 2006
Posts: 5
Rep Power: 0 synchronized is on a distinguished road
What is up with all the comments.

If your teacher/professor tells you to comment like that then please ignore them when you write stuff that is not for your course. It makes to code much harder to read. The crap with the "/*if*/" and /*while */ is a real waste of time. I know that some professors like students to use them but that it is such a waste of typing and they never make the code any easier to understand. You might as well program in some basic dialect if you cant figure out proper code indentation and brace matching.

The best code is always self documenting. My view on commenting is to make all the identifier names as clear for their purpose as possible. Header comments are never good as you write them once, then later you might go back and update you code and then you forget to update the comment. So they are forever out of date. If you have good design documentation this sort of information should be in there and not cluttering up your code.

Comments should not be used to explain poorly written obscure code. If you find yourself writing long comments to explain what your code does then think about redesigning and rewriteing that code to make it more self explaitary. Comments are the lazy programmers excuse for obscurity.

The bottom line is that comments should never state what is happening but say why it is happening.
synchronized is offline   Reply With Quote
Old Sep 11th, 2006, 12:53 PM   #14
sixstringartist
Programmer
 
Join Date: Jun 2005
Posts: 68
Rep Power: 4 sixstringartist is on a distinguished road
thats a good mentality. I'll remember that.
sixstringartist is offline   Reply With Quote
Old Sep 11th, 2006, 2:06 PM   #15
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 374
Rep Power: 0 King is an unknown quantity at this point
bl00dninja, that is probably the funniest post I have seen on here.
__________________
I am Addicted to Linux!
King is offline   Reply With Quote
Old Sep 11th, 2006, 5:00 PM   #16
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
You obviously haven't seen BN's other posts.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 11th, 2006, 11:53 PM   #17
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
yeah, the first time i saw POM use that it said SPAMMER above (reference to some crappy job offer guy) so i thought people were offended by it. it wasn't until today that i realized he made it his sig.

thanks guys, i'm honored.

i have a weird sense of humor, especially when it comes to mixing high intellect with toilet humor. the contrast results in hilarity.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Old Sep 11th, 2006, 11:58 PM   #18
bl00dninja
Programming Guru
 
bl00dninja's Avatar
 
Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5 bl00dninja is on a distinguished road
oh, and to add something positive, yeah, explain what your functions do, pre/post, whatever. for long nested loops an
//end main while
can do wonders for matching braces and such. for class i overdo the comments too (a prof has to grade a lot of shit, he'll appreciate it). another good time for buku comments is if you're using a whole lot of these:

and remember, too few comments and even YOU won't remember what the fuck you were thinking at 2:00am on june 11th.
__________________
i put on my robe and wizard hat...

Have you ever heard of Plato, Aristotle, Socrates?...Morons.
bl00dninja is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Language display in program Prm753 C++ 3 May 30th, 2006 5:45 PM
Creating a program to test a program sixstringartist C 8 Jan 21st, 2006 1:15 PM
vb6 to vb.net bl00dninja Visual Basic .NET 2 Sep 24th, 2005 1:55 PM
Exception thrown on program exit in debug mode -- Win32 uman C++ 4 Jun 4th, 2005 4:28 AM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 4:12 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:19 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC