![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
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. |
|
|
|
|
|
#12 |
|
Professional Programmer
|
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 |
|
|
|
|
|
#13 |
|
Newbie
Join Date: Sep 2006
Posts: 5
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#14 |
|
Programmer
Join Date: Jun 2005
Posts: 68
Rep Power: 4
![]() |
thats a good mentality. I'll remember that.
|
|
|
|
|
|
#15 |
|
Professional Programmer
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 374
Rep Power: 0
![]() |
bl00dninja, that is probably the funniest post I have seen on here.
__________________
I am Addicted to Linux! |
|
|
|
|
|
#16 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
You obviously haven't seen BN's other posts.
![]() |
|
|
|
|
|
#17 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
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. |
|
|
|
|
|
#18 |
|
Programming Guru
![]() Join Date: Oct 2004
Location: namespace std
Posts: 1,246
Rep Power: 5
![]() |
oh, and to add something positive, yeah, explain what your functions do, pre/post, whatever. for long nested loops an
//end main while -> 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. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |