DEV Community


Discussion on: Stop Using "data" as a Variable Name

vishnuharidas profile image
Vishnu Haridas • Edited

Giving meaningful names are important. Suddenly a few incidents popped up in my mind.

Once I was going through a legacy code, which had a variable like this: bool isWasStarted. I still don't know what it was used for!

The same project was having a function writeLog(text), and I expected the function to write the text to the output stream. The function body looks like this:

function writeLog(text){
Enter fullscreen mode Exit fullscreen mode

Seriously, why people do this?!