code-comments

How to comment code in Rails views?

As I'm playing with Rails and developing views I often want to comment out code. Simple enough with classes & models but views are a bit more tricky. What's best way to comment code in a view so it's not interpreted by, well, anything... HTML gives us <!-- commented Rails code here --> though code enclosed here seems to get interprete...

Translating code comments written in another spoken language

I've just inherited some C code from a German programmer, and all of the comments are, naturally, in German. As I've forgotten most of my high school German, this is a slight problem. Does anyone know of any translation tools that are code-aware; meaning it will only translate language within comments? The project has many files, bein...

Is leaving comments on code a thing of past?

When i started my carreer i have been instructed to (properly) comment each and every module that i write. Instructing what a method does, how its parameters are used, and what to expect in return etc. Then with almost 2years of doing so i started visiting legacy codes with misleading and/or useless comments. And in the process i used t...

CSS - smarter code comments

Hi I read some time ago about a way to comment a css block in a such way that you only need to remove one end of the comment character set in case you want to uncomment the block later. But I can't remember how it was done :( Maybe someone here does know :) ...

Javascript comments for ajax calls

At the moment I use phpDoc style comments when documenting javascript functions, mainly because I am used to the syntax and I feel that phpDoc is a good, comprehensive commenting style to adopt. One thing it doesn't cover though is Ajax requests (obviously) and I was wondering if there was a set standard for commenting these? Or if any...