3 ms·
I guess they were right when they said that the cobbler's kids wear no shoes. It stumps me how one of the biggest, most powerful, and most resourceful software
by thebear 13y ago
I guess they were right when they said that the cobbler's kids wear no shoes. It stumps me how one of the biggest, most powerful, and most resourceful software companies in the world would have a bunch of humans write a document on how to format source code, then have all their programmers read that document and memorize it to the point where they can abide by it every second of their work day. Formatting code is the kind of thing that a computer can do. Write a program that formats the code the way you want it to be formatted, and invoke it in the appropriate place. Preferably, make it invokable in people's IDEs, so that they can go conformant whenever they wish.
- chimeracoder 13y ago> I guess they were right when they said that the cobbler's kids wear no shoes....Formatting code is the kind of thing that a computer can do. Given that Go does this far better than any other language that I can think of at the moment[0], maybe it's a case of the cobbler's kids making their own shoes. [0] http://golang.org/cmd/gofmt/ http://golang.org/cmd/gofmt/
- nostrademons 13y agoIt's better than many other companies, where nobody bothers to to write or read that document, let alone use a formatter. Anyway, this problem doesn't exist in Go (gofmt), C++ (clang-format), or at least 2 of the in-house languages. It still exists in Java, Python, and Javascript because of the lack of robust standalone parsers for those languages, but there are editor plugins for vim, emacs, Eclipse, and I think IntelliJ that automatically enforce the styleguide. (Google does not mandate a single editor the way it mandates languages.)
- bradleyjg 13y agoAt least if their sponsored open source projects are any indication, they use plenty of sophisticated tools to check and reformat java source code to conform to style guidelines. That doesn't obviate the need for a style definition in the first place, and I'm happy to see the canonical version of such a document embodied in human readable text rather than in source code or some kind of meta-language monstrosity (a la xsd).
- donniezazen 13y agoHave you taken time to think that we might not be at that stage to technological revolution?