{"action":"created","issue":{"url":"https://api.github.com/repos/besimorhino/powercat/issues/8","labels_url":"https://api.github.com/repos/besimorhino/powercat/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/besimorhino/powercat/issues/8/comments","events_url":"https://api.github.com/repos/besimorhino/powercat/issues/8/events","html_url":"https://github.com/besimorhino/powercat/issues/8","id":99944267,"number":8,"title":"Recommendations Following PowerShell Best Practices","user":{"login":"darkoperator","id":521246,"avatar_url":"https://avatars.githubusercontent.com/u/521246?v=3","gravatar_id":"","url":"https://api.github.com/users/darkoperator","html_url":"https://github.com/darkoperator","followers_url":"https://api.github.com/users/darkoperator/followers","following_url":"https://api.github.com/users/darkoperator/following{/other_user}","gists_url":"https://api.github.com/users/darkoperator/gists{/gist_id}","starred_url":"https://api.github.com/users/darkoperator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darkoperator/subscriptions","organizations_url":"https://api.github.com/users/darkoperator/orgs","repos_url":"https://api.github.com/users/darkoperator/repos","events_url":"https://api.github.com/users/darkoperator/events{/privacy}","received_events_url":"https://api.github.com/users/darkoperator/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-10T00:42:17Z","updated_at":"2015-09-13T00:47:13Z","closed_at":null,"body":"Some recommendations in style and functionality\r\n\r\n* PS functions follow the convention of ver-noun, this could be Invoke-PowerCat in the main function\r\n* It is PS not Bash so help should be in comment based form so it is discoverable and parable by Get-Help and not use a -h/-help parameter (Run in a PowerShell console 'help about_Comment_Based_Help')\r\n* The main function should be an advanced function with cmdletbinding so as to manage parameters properly (help about_Functions_CmdletBindingAttribute and help about_Functions_Advanced_Parameters)\r\n* This is better suited as a module with a proper manifest where the main function is exported while the helper ones are hidden from the user so it can be used as a proper tool and allow for module autoloading, get-command discovery ..etc. (Look at help New-ModuleManifest -full)\r\n* Parameter should be full named parameters and not single letters or be aliased as single letters, PowerShell behaves like Cisco IOS where for example -UDP can be -U or -UD as long as it is unique enough vs the other parameters.\r\n\r\nThe community and MS are working on a Style Guide and Best Practices guide https://github.com/PoshCode/PowerShellPracticeAndStyle I know I made the recommendations to the original author but since I see it is being maintained by others now I thought I would repeat them :)  \r\n"},"comment":{"url":"https://api.github.com/repos/besimorhino/powercat/issues/comments/139832598","html_url":"https://github.com/besimorhino/powercat/issues/8#issuecomment-139832598","issue_url":"https://api.github.com/repos/besimorhino/powercat/issues/8","id":139832598,"user":{"login":"secabstraction","id":5590939,"avatar_url":"https://avatars.githubusercontent.com/u/5590939?v=3","gravatar_id":"","url":"https://api.github.com/users/secabstraction","html_url":"https://github.com/secabstraction","followers_url":"https://api.github.com/users/secabstraction/followers","following_url":"https://api.github.com/users/secabstraction/following{/other_user}","gists_url":"https://api.github.com/users/secabstraction/gists{/gist_id}","starred_url":"https://api.github.com/users/secabstraction/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/secabstraction/subscriptions","organizations_url":"https://api.github.com/users/secabstraction/orgs","repos_url":"https://api.github.com/users/secabstraction/repos","events_url":"https://api.github.com/users/secabstraction/events{/privacy}","received_events_url":"https://api.github.com/users/secabstraction/received_events","type":"User","site_admin":false},"created_at":"2015-09-13T00:47:13Z","updated_at":"2015-09-13T00:47:13Z","body":"I've started re-writing it, hopefully finish soon. Only made it through the first few lines, the netstat dependency and unnecessary parameter checking were the first things to go. Powershell has a lot of built-in features that are clearly unknown to the original author, no offense intended."}}