{"id":26786151,"url":"https://github.com/derekahn/ultimate-go","last_synced_at":"2025-04-19T18:24:11.281Z","repository":{"id":77593179,"uuid":"87369630","full_name":"derekahn/ultimate-go","owner":"derekahn","description":"Ardanlabs Go training with Bill Kennedy.","archived":false,"fork":false,"pushed_at":"2017-04-28T06:48:51.000Z","size":54,"stargazers_count":38,"open_issues_count":0,"forks_count":16,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T11:35:58.439Z","etag":null,"topics":["best-practices","go","golang","philosophy","tips"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derekahn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-06T00:45:41.000Z","updated_at":"2025-01-04T23:28:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"ecc68edd-9877-42e3-a5ce-082275ab2097","html_url":"https://github.com/derekahn/ultimate-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekahn%2Fultimate-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekahn%2Fultimate-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekahn%2Fultimate-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derekahn%2Fultimate-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derekahn","download_url":"https://codeload.github.com/derekahn/ultimate-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249762281,"owners_count":21321905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["best-practices","go","golang","philosophy","tips"],"created_at":"2025-03-29T11:35:44.346Z","updated_at":"2025-04-19T18:24:11.276Z","avatar_url":"https://github.com/derekahn.png","language":"Go","readme":"# 💥 Big Points 🎶\n\n- Remember LESS is MORE.\n\n- `readability` = not hiding the cost; `simplicity` = hide complexity\n\n- If you don't UNDERSTAND the `DATA`, you DON'T UNDERSTAND the PROBLEM you're working on.\n\n- Remember: `stack` (stay on stack) vs `heap` (share on heap)\n\n- Take command of `type` \u0026 Take command of `semantics`\n\n- Mantra: REDUCE, MINIMIZE, SIMPLIFY.\n\n- Never share a string or slice `unless` you're marshaling or unmarshaling.\n\n- Small is fast = because smaller data structures can stay within the cachelines.\n\n- Memory leak in go: a reference on the heap that `isn't garbage collected` AND `not being used`.\n\n- It's never a good reason to alter a data set after you pull it!\n\n- Know your length when getting a slice of a slice.\n\n- (Big NO NO) Don't mix `value semantics` WITH `pointer semantics`; vice versa.\n\n- When in doubt USE `pointer semantics`; except with time.\n\n- Method sets dictate interface compliance.\n\n- We do not use embedding to reuse state! We use embedding to reuse behavior. (WE EMBED BECAUSE WE NEED BEHAVIOR)\n\n- Group by behavior (by things that they do vs. what they are).\n\n- There is implicit conversion in go with interface types because they are valueless and same memory model.\n\n- Always `return` the `error` interface type\n\n- Don't use `pointer semantics` when dealing with `error` handling, because the addresses are always different.\n\n- You are not allowed to both: log an `error` \u0026\u0026 pass it up.\n\n- You are not allowed to create a `go routine` unless you can determine WHEN and HOW it will be terminated\n\n- Do not think of channels as queues, but as `signals`.\n\n- Don't use a buffer larger than 1; Anything more and it's unsafe.\n  - Using `\u003c=1` = somewhat of a garuntee.\n  - Easier to catch problems/bugs.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderekahn%2Fultimate-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderekahn%2Fultimate-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderekahn%2Fultimate-go/lists"}