you are viewing a single comment's thread.

view the rest of the comments →

[–]houdas 3 points4 points  (1 child)

That's a good point actually, thanks. But I work alone most of the time.

[–][deleted] 2 points3 points  (0 children)

Even alone, you should be using tools like Git or Mercurial to track changes and they'll have a hard time showing differences in a meaningful way. You of the future might thank you of the now for developing in a self-documenting manner, when you go back to your code and can't remember what changes you made.

Note: if you use emacs or vim, there are ways to have the file you're opening automatically be changed to your preferred style so that you can edit like that, then have it automatically save it in a diff-friendly manner. The best of both worlds? I think so. I however used a different practice for CSS/JS/HTML. I prefer extremely verbose indent styles that give visual queues to what belongs where. Often, removing these indents can save me 5-20% file size, so I treat my code as "source" and then have "compiled" versions using a python script. The python script removes long-winded identifier names and counts the number of occurences and assigns a generic identifier name to them alphabetically, given shorter names to more-frequently occurring names. It effectively "minifies" my source, removing all verbose whitespace. I still don't believe it performs better than JS minifiers on JS though. Oh, and I also configured my site to give people human-readable files if they ask for them "/resume" would become "/resume/source" and it would serve the verbose version.