{"action":"created","issue":{"url":"https://api.github.com/repos/TEdit/Terraria-Map-Editor/issues/595","labels_url":"https://api.github.com/repos/TEdit/Terraria-Map-Editor/issues/595/labels{/name}","comments_url":"https://api.github.com/repos/TEdit/Terraria-Map-Editor/issues/595/comments","events_url":"https://api.github.com/repos/TEdit/Terraria-Map-Editor/issues/595/events","html_url":"https://github.com/TEdit/Terraria-Map-Editor/pull/595","id":87761568,"number":595,"title":"Misc. cleanup WorldRenderXna.xaml.cs for readability","user":{"login":"Michaelangel007","id":7876796,"avatar_url":"https://avatars.githubusercontent.com/u/7876796?v=3","gravatar_id":"","url":"https://api.github.com/users/Michaelangel007","html_url":"https://github.com/Michaelangel007","followers_url":"https://api.github.com/users/Michaelangel007/followers","following_url":"https://api.github.com/users/Michaelangel007/following{/other_user}","gists_url":"https://api.github.com/users/Michaelangel007/gists{/gist_id}","starred_url":"https://api.github.com/users/Michaelangel007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michaelangel007/subscriptions","organizations_url":"https://api.github.com/users/Michaelangel007/orgs","repos_url":"https://api.github.com/users/Michaelangel007/repos","events_url":"https://api.github.com/users/Michaelangel007/events{/privacy}","received_events_url":"https://api.github.com/users/Michaelangel007/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-12T15:25:43Z","updated_at":"2015-06-29T13:14:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/TEdit/Terraria-Map-Editor/pulls/595","html_url":"https://github.com/TEdit/Terraria-Map-Editor/pull/595","diff_url":"https://github.com/TEdit/Terraria-Map-Editor/pull/595.diff","patch_url":"https://github.com/TEdit/Terraria-Map-Editor/pull/595.patch"},"body":"A little bit of whitespace goes a long way towards readability.\r\n\r\nMiscellaneous clean up in `LoadResourceTextures()` and `DrawSprites()`"},"comment":{"url":"https://api.github.com/repos/TEdit/Terraria-Map-Editor/issues/comments/116654797","html_url":"https://github.com/TEdit/Terraria-Map-Editor/pull/595#issuecomment-116654797","issue_url":"https://api.github.com/repos/TEdit/Terraria-Map-Editor/issues/595","id":116654797,"user":{"login":"Michaelangel007","id":7876796,"avatar_url":"https://avatars.githubusercontent.com/u/7876796?v=3","gravatar_id":"","url":"https://api.github.com/users/Michaelangel007","html_url":"https://github.com/Michaelangel007","followers_url":"https://api.github.com/users/Michaelangel007/followers","following_url":"https://api.github.com/users/Michaelangel007/following{/other_user}","gists_url":"https://api.github.com/users/Michaelangel007/gists{/gist_id}","starred_url":"https://api.github.com/users/Michaelangel007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michaelangel007/subscriptions","organizations_url":"https://api.github.com/users/Michaelangel007/orgs","repos_url":"https://api.github.com/users/Michaelangel007/repos","events_url":"https://api.github.com/users/Michaelangel007/events{/privacy}","received_events_url":"https://api.github.com/users/Michaelangel007/received_events","type":"User","site_admin":false},"created_at":"2015-06-29T13:14:24Z","updated_at":"2015-06-29T13:14:24Z","body":"The person who wrote that rule for Stylecop failed to understand 2 things:\r\n\r\n* There are **always** exceptions for every rule, and\r\n* the importance of whitespace and alignment for readability.\r\n\r\nPart of the problem of not including whitespace before a comma is that the comma (signal) can be lost in the filename (noise).  The comma is not part of the filename -- it distinguishes where it ends. Why make it harder to read?\r\n\r\nWhen you include whitespace before the comma and align all the commas vertically it becomes trivial to tell if a comma is missing.  The comma remains signal, along with the filename before it. Yeah, the compiler will tell you the same thing if you missed it but why wait? :-)\r\n\r\nPersonally I hate editors that reformat code and turn all that nonsense off.  These automatic tools don't understand the bigger **context** for **why** code is formatted the way it is; they have no sense of what readability or beautiful code is -- they are just blindingly following (dumb) rules written by someone else who usually  doesn't understand alignment. It is why we have Allman Style, K&R Style, and all the other flavors of \"Indent Style.\"\r\n\r\nI thought I would share my reasons for why the comma on the left of the whitespace is my 2nd choice.  If you are using tools that reformat code that sometimes you might not have a choice.\r\n\r\nI'd just be happy if `WriteableBitmapEx.ResourceToTexture2D` was aligned. :-)\r\n\r\n"}}