News for hackers. Stuff that matters.
Re:Why we need a book about naming by viklove on Thursday February 13, 2020 @12:06PM (#22319324)
Naming a variable solely after its type is never particularly useful. A name like `currentChar` would probably enhance readability. Of course if your code is just 2 lines long, `c` works just fine (that's not usually the case though).

You should probably abstract away some of that logic though (and `string` isn't a great variable name either):

    boolean tabFound = includes(line, '\t');
Re:Why we need a book about naming by vbezhenar on Thursday February 13, 2020 @04:14PM (#22321492)
How would you name an abstract string without any implied meaning?
Re:Why we need a book about naming by viklove on Thursday February 13, 2020 @06:37PM (#22322489)
If the functionality you're writing is truly that abstract, an abstract variable name is fine. Your example didn't include the method signature though, so I assumed it was a part of some larger (concrete) code block.