comments

Code Commenting: Do you put your code comments on Interfaces or on Concrete classes, or both?

What is the best practice in documenting classes and interfaces. Say if you have a concrete class called Foo, that derives from an interface called IFoo. Where do you put your comments for your methods? Do you duplicate your comments on the Interface as well as the concrete class? Here is an example where comments are duplicated: pu...

Is it ok to put comments about bug fixes in the source code?

And if so, where do you draw the line? My coworkers and I disagree on this subject. I have seen such things as // fixes bug # 22 to // fixed bug: shouldnt be decrementing i++; Is it ok if the change is fairly significant, and radically changes what the method was written to do? Or do you simply change the summary text of the metho...

Anonymous comments not saved in Drupal

For some reason I can no longer post a comment as an Anonymous user in my Drupal installation. I haven't tried in a while, so I'm not quite sure when this functionality was broken. I have Services installed, and I can post anonymous comments using comment.save. I have altered the Input Formats if that could break something. I have en...

Standard change comments

I am looking for some direction as to a standard format for commenting changes in PHP. Continually while working with an assortment of developers on large scale projects, comments run wild and in most cases changes are either poorly commented or not commented at all. Here is an example, please feel free to expand on it: /** * Author...

General - Preferred commenting objective

Hello, I highly like to comment my code for my own reference, and also since i keep (most) of my projects open-source. I current comment as if I'm the narrator: // Check if y is higher than x. Should i comment as if im talking to a group of people?: // Now we check if y is higher than x. This isn't much of a question, i just want...

Importing text files with comments in MATLAB

Is there any character or character combination that MATLAB interprets as comments, when importing data from text files? Being that when it detects it at the beginning of a line, will know all the line is to ignore? I have a set of points in a file that look like this: And as you can see he doesn't seem to understand them very well. Is...

R code examples/best practices

I'm new to R and having a hard time piecing together information from various sources online related to what is considered a "good" practice with writing R code. I've read basic guides but I've been having a hard time finding information that is definitely up to date. What are some examples of well written/documented S3 classes? How a...

ANTLR parse problem

I need to be able to match a certain string ('[' then any number of equals signs or none then '['), then i need to match a matching close bracket (']' then the same number of equals signs then ']') after some other match rules. ((options{greedy=false;}:.)* if you must know). I have no clue how to do this in ANTLR, how can i do it? An ex...

C++ Automatic Comment Documentation

When I work on C# projects, I can use Microsoft's SandCastle application to generate nice, easy to read and use documentation for my entire code base. I'm curious: Does such an automagic documentation method exist for native C++ applications? ...

Collecting additional parameter Ruby on Rails...

I am building a project management app and need some help with how to pass a parameter (I think that is how you say it). Here is what I have going on. I have a table called "proposals" and "proposals" allow you to create multiple concepts per proposal. I have a table called "concepts" and on each "concept" the user can "comment". The w...

Add Comment and Reaction Count in Wordpress with Disqus plugin

Okay I'm trying to add comments and reactions count just like what you would normally see on some wordpress blogs like http://johntwang.com/blog/ where on the left top of each post there is ** comment and * reactions* My problem is I can't find the disqus's documentation, where hopefully there is some method I can call to return me t...

Text editor with comment wrapping

I usually use Geany or Hi-Tide under Debian (GNU/Linux) for firmware development, mainly C (but also reading old assembler). I document code using single-line comments, and it really annoys me when I retype something and have to manually re-break every following line to keep it in the 80-character margin. Is there a text editor that can...

Comment out FBML

Using <!-- fbml --> isn't working. Is there some special way to comment out FBML? ...

Storing comments in memcache. Any known strategies?

Hello, do you have any ideas of how to store comments in memcache? Let's imagine that I'm having image with a lot of comments for it. All comments are separated in pages. User can define number of comments per page in his profile. How should I store comments in memecache? Should I store all comment's IDs in one memcache key or should ...

How do thumbs up in comments work?

I don't even know what questions I should ask. Well, I want to create a thumbs up for my comments, but not sure how or what's the best way. Do I just create a new field for thumbs up? ...

Access or Display comments left by users abt the application.

Hi, i am new to android domain . Can u please let me know . is it possible to access or display comments left by users about the application using the api given in the sdk if 'yes' please fwd link where i can study further .. thanks regards Sheik ...

Hideable Comments box

Hi Gurus, I have a time tracking sheet application. In this I will display dates in a week on X axis (on top) and Tasks on Y-axis (downwards). As shown below, I will give a @ icon after every text box for entering comments against each entry. **************************************************** # | Sun | Mon | Tue | Wed | Thu | ...

ExpressionEngine comments import to Disqus

Has anyone tackled importing default ExpressionEngine comments to Disqus? I found this on github but I'm not sure how to use it, or if it will work. http://gist.github.com/202802 ...

Are Python docstrings and comments stored in memory when module is loaded?

Are Python docstrings and comments stored in memory when module is loaded? I've wondered if this is true, because I usually document my code well; may this affect memory usage? Usually every Python object has a __doc__ method. Are those docstrings read from the file, or processed otherwise? I've done searches here in the forums, G...

How To Retrieve Comments From Within An XML Document

I want to extract all comments below a specific node within an XML document, using PHP. I have tried both the SimpleXML and DOMDocument methods, but I keep getting blank outputs. Is there a way to retrieve comments from within a document without having to resort to Regex? ...