I generally don't use commenting for anything other than cutting out sections of code during testing. I usually just name variables and procs to things that make sense, so it doesn't take me long to put it all back together. I'd know because Maeva has been a stop and go project for years now. Maybe my code just isn't as complex as others, but I usually haven't needed to comment anything.
In response to Jon88
In two months when you look at it again, you'll actually know what it does right off the bat(for the most part anyways). If your code is not commented, you'll have to spend time figuring out how it works if you want to change something. Also, if you ever plan on working with another programmer, commenting helps so that they also get a general idea of what stuff does.

Heh I don't see how people can so easily forget their work :P. I just recently picked up a project that I haven't touched since January of last year and it didn't take me much time to get back in. DM itself is such a well structured, slick lanaguage that unless you go out of your way to make it unreadable or misleading it's generally very obvious what you were doing without needing comments.
depends if you're working with other people or if you're the only person who's going to be loking at the code.

Commenting is general used in business practice to allow another coder to tell what you were doing.
In response to Foomer
I comment my code like the first style you mentioned. I take a line of two to explain the following block of code. If I return to an old project, it might be hard to tell what a bit of code does at first glance, so having a short description before it can help.

var += 7 //add 7 to var

I think I'll be able to tell that the code adds 7 to var without the comment. I don't like comments after the line of code like that, and also, I think its better for the comment to explain why you are adding 7 instead of stating that you are adding 7.
In response to Fint
Actually, there is one particular project that I'm working on at home right now. It ought to be quite fun. :D But, I'm not going to say anything all that important, because if I do I know I'll just get bored with it.
In response to OneFishDown
I think I'll be able to tell that the code adds 7 to var without the comment. I don't like comments after the line of code like that, and also, I think its better for the comment to explain why you are adding 7 instead of stating that you are adding 7.

That's not what comments are for, anyway. I comment on about a two-lines-to-one-comment ratio, but all of my comments explain motive, not actions.
In response to Crispy
I -didn't- say it. I'm still, by a lot of standards, a newbie.

At any rate, personally I feel that I'm rather lazy with my commenting. I don't feel need to comment things that are very plain, or self-explanatory. He was a good IT teacher, but I never had him for an actual programming course. That one I'm doing via open-learning... and it's not really shaping up to be any good. If anything, it's teaching me how to use the Microsoft Visual Studio 6.x program... and that's it.

-sigh-
In response to Slipknight
That one I'm doing via open-learning... and it's not really shaping up to be any good. If anything, it's teaching me how to use the Microsoft Visual Studio 6.x program... and that's it.

Then, believe it or not, they're actually doing their job. The primary purpose of Information Technology is to familiarise people with the programs that exist today and how to use those programs. If you want to learn software development, you'd be better off with a computer science, database management, artificial intelligence, or whatnot course.
In response to Spuzzum
Yeah. Figures. Sometimes I don't know why those big eastern state colleges advertise those sorts of courses when they're just not what they say they are. I think I'll head off somewhere more intelligent once I've finished school, but that could take a little while.
In response to Slipknight
Slipknight wrote:
I -didn't- say it. I'm still, by a lot of standards, a newbie.

I know you didn't say it, it wasn't really directed at you personally. =) And everyone was a newbie once!

At any rate, personally I feel that I'm rather lazy with my commenting. I don't feel need to comment things that are very plain, or self-explanatory.

That's not lazy, that's sensible! Heh.

He was a good IT teacher

Um... I'll take your word for it, despite his earlier quoted comments!
Page: 1 2