4 ms·
The world's two worst variable names
- vanattab 9y agoI think this is a little off the mark. I use the variable name data all the time but it's almost always in a relativity simple function where the context is well understood. I used to make sure the names contained in a function were very specific to the context in which I was first using the function but would later find that I wanted to use the same function but in a slightly different context and those "very good" variable names became "very confusing" variable names. (i.e. a parameter named "data" might be better then "spectralData" if the function your writing might be conceivable used for some type of data other then just spectrometer readings). The more general your functions possible use cases are the more general your parameter names should be.