From: Erik V. <eri...@xs...> - 2010-01-30 23:04:34
|
Personally I do not care much about spacing standards at all, as long as the indentation looks right. I only manually format Java code (because Eclipses formatting does strange things when it thinks lines being too long), and I usually don't take notice of whether it's done with tabs or spaces. TileDesigner.xml is an intermediate file created by TileDesigner as a oneliner, and used to create Tiles.xml. Whenever I want to inspect a new version, I format it with XMLBuddy; if not, I don't. So I would say: feel free to format stuff in any way, and I will try to follow, but no guarantees. On line length: 80 is too short for my taste. 100 would be OK. Erik. -----Original Message----- From: Rick Westerman [mailto:wes...@pu...] Sent: Saturday 30 January 2010 22:24 To: Development list for Rails: an 18xx game Subject: Re: [Rails-devel] Tabs vs spaces in xml files On Jan 30, 2010, at 3:52 PM, Freek Dijkstra wrote: > I know the formatting standard for java code is 4 spaces in this > project, but how about XML files? That is currently mostly -but not > all- > tabs: > > 8543 lines with tabs only > 1715 lines with spaces only > 390 lines without spaces or tabs > 68 lines with both spaces and tabs > 33 empty lines > > Also, tiles/TileDictionary.xml is a 355 kiByte file without any > carriage > return, and 1830/CompanyManager.xml contains a spurious ` (backtick) > character. > > I like to clean the formatting. Preferences? tabs or spaces? > > Regards, I believe that TileDictionary was automatically generated and is not meant to be parsed by humans. Formatting is one of those issues that drives people crazy in shared projects. I find it very hard to get common formatting guidelines or directory structure guidelines enforced unless I make a total pain of myself. That is not to say that some sort of guide would be unwelcome. In addition to tabs vs. space and how much indent you need to think about: (1) Space before ending tag; e.g., <Game name="1830"/> or <Game name="1830" /> ... the stock market chart uses spaces at times and other times not. (2) Line size? 80 characters maximum? Or as long as is needed? (3) Multi-line comments: Does the end tag come on a separate line? How about the beginning tag? Should there be some requirement for comments (e.g., version or author) at the top of the XML files? Personally I do not care as long as there is some standard. -- Rick ---------------------------------------------------------------------------- -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |