3 ms·
Removing spaces from the end of lines, changing double spaces in HTML to one, and using tabs for indentation, these are a few of my favorite things.
by james-skemp 7y ago
Removing spaces from the end of lines, changing double spaces in HTML to one, and using tabs for indentation, these are a few of my favorite things.
- throwaway744678 7y agoAnd most importantly, use only one-letter variables. Mother Earth will thank you.
- PavlovsCat 7y agoI find myself doing the opposite, since I write stuff once (at most, since there is auto-complete and copy & paste), but read it a lot more often. I find reading long variable names takes exactly as long as reading short words, but with less mental overhead. So instead of something like srv_mem_max, I have stuff like "server__max_allocated_memory". It doesn't affect the output or the compiled result, after all.
- james-skemp 7y agoI think, and hope, the throwaway was being sarcastic. :)
- PavlovsCat 7y agoFor Sublime Text, you can add "trim_trailing_white_space_on_save" to the user settings and set it to true :)
- james-skemp 7y agoVS Code is very similar, with the additional support for .EditorConfig files. I do have a new line at the end of files now so that Git doesn't complain. That and new lines before some curly braces (either JS/TS/C#, can't recall which) is the only thing I've changed over the last decade+. The fact that I don't recall which I do where suggests I might want to reevaluate that, if it's not in a language that's going to compile it out.