News for hackers. Stuff that matters.
Re:Space Monkey dumps Python for Go by to3m on Tuesday April 22, 2014 @07:24PM (#7631128)
If you use C# in Visual Studio, you can press Ctrl+K, Ctrl+D to have the entire document reformatted. Surprisingly few people seem to know about this, judging by how often I've found myself using this on other people's source files and had everything shift around. (Or maybe I'm just unusual and everybody else has just played with the settings.)

The reformatting is actually quite aggressive (it will add/remove blanks and move braces and bits of code around), and so does a good job of keeping everybody's code looking consistent. The Visual Studio text editing functionality only occasionally reaches even the lofty heights of "pretty good", but I do think the document reformatting actually even exceeds that.

(Shame the settings are are per-user rather than per-project, but there you go. It wouldn't be Visual Studio if they didn't manage to fuck something up at the last moment.)

Re:Space Monkey dumps Python for Go by dikei on Tuesday April 22, 2014 @10:57PM (#7631841)
Every decent IDEs have a code formater, but not everyone uses the same IDE so its usefulness is limited. On the other hand, gofmt comes with the platform and make it easy to enforce a common standard between developers.
Re:Space Monkey dumps Python for Go by ufo on Wednesday April 23, 2014 @12:14AM (#7632058)
That said, I think that in C#'s specific case most developers should be using Visual Studio.
Re:Space Monkey dumps Python for Go by sparkie on Wednesday April 23, 2014 @07:07AM (#7633201)
The default Visual Studio formatting sucks - wasted lines for opening braces when we have limited vertical real estate. Visual Studio should support per-project, or per-solution formatting configurations, which can be placed into the source code repository to ensure everyone on the team is using the same settings - MonoDevelop already does this and it's really useful for switching between projects which use different formats.