News for hackers. Stuff that matters.
Re:Better bash in 15 minutes by gmjosack on Wednesday April 16, 2014 @01:35AM (#7596292)
I call my for loop variables idx. I never use single letter variable names, though I won't call someone out for it in a small block. Being able to highlight a variable in my editor, even when it's only used in a 5 line block of code is useful. Highlighting all letter i's is not.
Re:Better bash in 15 minutes by Too on Wednesday April 16, 2014 @04:08PM (#7600246)
What kind of editor are you using?! Any decent ide will give you syntax aware highlighting of selected variable, not word, and even most simple text editors highlight words separated by spaces, commas etc. I've never seen an editor that highlights the exact selection. I have actually missed that feature once or twice but for coding the other behavior is usually much more preferable.
Re:Better bash in 15 minutes by gmjosack on Wednesday April 16, 2014 @05:01PM (#7600508)
I just use vim.
Re:Better bash in 15 minutes by dllthomas on Wednesday April 16, 2014 @02:50AM (#7596445)
\<i\>
Re:Better bash in 15 minutes by gmjosack on Wednesday April 16, 2014 @05:00PM (#7600504)
It's a lot easier for my fingers to type /idx than /\<i\> and it also easier to scan for idx than i. I'm not saying that everyone should do as I do but I find it frustrating dealing with single letter variables personally.
Re:Better bash in 15 minutes by dllthomas on Wednesday April 16, 2014 @05:13PM (#7600563)
I agree /\<i\> is a slight pain. Often the easiest way to get there is getting the cursor on one of the i's and hitting *.