{"action":"created","issue":{"url":"https://api.github.com/repos/Medisapiens/coffeescript-style-guide/issues/2","repository_url":"https://api.github.com/repos/Medisapiens/coffeescript-style-guide","labels_url":"https://api.github.com/repos/Medisapiens/coffeescript-style-guide/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/Medisapiens/coffeescript-style-guide/issues/2/comments","events_url":"https://api.github.com/repos/Medisapiens/coffeescript-style-guide/issues/2/events","html_url":"https://github.com/Medisapiens/coffeescript-style-guide/pull/2","id":140675258,"number":2,"title":"Seed of Code Structure: Call for discussions!","user":{"login":"maximzavadskiy","id":1636678,"avatar_url":"https://avatars.githubusercontent.com/u/1636678?v=3","gravatar_id":"","url":"https://api.github.com/users/maximzavadskiy","html_url":"https://github.com/maximzavadskiy","followers_url":"https://api.github.com/users/maximzavadskiy/followers","following_url":"https://api.github.com/users/maximzavadskiy/following{/other_user}","gists_url":"https://api.github.com/users/maximzavadskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/maximzavadskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximzavadskiy/subscriptions","organizations_url":"https://api.github.com/users/maximzavadskiy/orgs","repos_url":"https://api.github.com/users/maximzavadskiy/repos","events_url":"https://api.github.com/users/maximzavadskiy/events{/privacy}","received_events_url":"https://api.github.com/users/maximzavadskiy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-14T13:37:16Z","updated_at":"2016-04-21T11:40:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Medisapiens/coffeescript-style-guide/pulls/2","html_url":"https://github.com/Medisapiens/coffeescript-style-guide/pull/2","diff_url":"https://github.com/Medisapiens/coffeescript-style-guide/pull/2.diff","patch_url":"https://github.com/Medisapiens/coffeescript-style-guide/pull/2.patch"},"body":"Some thoughts on order of method definitions in Classes"},"comment":{"url":"https://api.github.com/repos/Medisapiens/coffeescript-style-guide/issues/comments/212876725","html_url":"https://github.com/Medisapiens/coffeescript-style-guide/pull/2#issuecomment-212876725","issue_url":"https://api.github.com/repos/Medisapiens/coffeescript-style-guide/issues/2","id":212876725,"user":{"login":"maximzavadskiy","id":1636678,"avatar_url":"https://avatars.githubusercontent.com/u/1636678?v=3","gravatar_id":"","url":"https://api.github.com/users/maximzavadskiy","html_url":"https://github.com/maximzavadskiy","followers_url":"https://api.github.com/users/maximzavadskiy/followers","following_url":"https://api.github.com/users/maximzavadskiy/following{/other_user}","gists_url":"https://api.github.com/users/maximzavadskiy/gists{/gist_id}","starred_url":"https://api.github.com/users/maximzavadskiy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maximzavadskiy/subscriptions","organizations_url":"https://api.github.com/users/maximzavadskiy/orgs","repos_url":"https://api.github.com/users/maximzavadskiy/repos","events_url":"https://api.github.com/users/maximzavadskiy/events{/privacy}","received_events_url":"https://api.github.com/users/maximzavadskiy/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T11:40:46Z","updated_at":"2016-04-21T11:40:46Z","body":"@AnteroMediSapiens  Thanks for the link! I understand that it seems safer to declare helper functions first. However would be nice to add to the guide, that this should not make code obfustaced. For example in  update_shrinkwrap_dependencies.coffee in the mentioned MR it was a bit confusing to read the code, as function declaration and root level instructions were mixed like:\r\n```coffeescript\r\nfoo = 5\r\ncallExternalMethod()\r\n\r\nhelperFoo1 = - >\r\n  return \"foo1\"\r\n\r\n#other helers function\r\n\r\n#main code\r\nhelperFoo1()\r\nhelperFoo2()\r\nx = 5\r\n```\r\n\r\nIn that case it would be easier for me to understand the code, if all root level instructions were not spread between functions defitinions, e.g. refactor it this way at least:\r\n```coffeescript\r\nhelperFoo1 = - >\r\n  return \"foo1\"\r\n#other helers function\r\n\r\n#main code\r\nfoo = 5\r\ncallExternalMethod()\r\nhelperFoo1()\r\nhelperFoo2()\r\nx = 5```"}}