First some necessary context. DREAD is a system of scoring security threads. The letters stand for: Damage Reproducibility Exploitability Affected Users Discoverability We score each of these metrics on a numeric scale with lower numbers indicating lower severity. A scale of 1 to 10 for each metric is common, though there is no set requirement other than for a given scoring, all metrics should be scored on the same scale, because we average the metrics to provide a final, overall, DREAD score.
OK, so the title leaves a bit out. Coding style absolutely does matter. What I really want to tell you is that your coding style, specifically, doesn’t matter. I don’t care if you prefer spaces to tabs, like your braces on the same line or the next line, or prefer underscores vs camelCase. When you work as part of a team, the purpose of coding style is to create a uniformity to the code, such that any member of the team not only knows what to expect, but knows what is expected of them.
Disclaimer: though I am not unique, I should acknowledge that I receive free hosting from both netlify.com and github.com for my publicly available content. /disclaimer I don’t write much, that’s pretty obivous from the sparse number of posts on this site, even less since I moved hosting and pruned some I didn’t care about keeping. I’ve had three writing/publishing setups prior to this current iteration, and it’s mainly the publishing side that gets in my way whenever I think about doing more writing.
Just over a year ago, having accepted an offer to work at Docker and on a short break before starting, Jess Frazelle wrote this awesome post on running your applications out of Docker containers. Jess talks about the benefits of the Apple App Sandbox and it sounds cool (it is), but Apple doesn’t give you the controls on Mac OS that they do on iOS, so an app can broadly define the permissions it requires, not to mention people still install software from all over the internet.
A pattern for jobs that need a worker pool. Rule 1 of good concurrency in Go: thou shalt use channels and don’t even think about sending a pointer down it! OK, so being totally rigid about this rule is basically impossible (but seriously, don’t sent pointers down channels, that bit is set in stone) and will actually increase the complexity of your code for those tasks where a simple mutex suffices, especially when Go’s defer enables you to write the lock and unlock on consecutive lines, making it easy to see if you omitted something (you could even write a simple tool to check it for you as part of your CI).
Interfaces are an incredibly powerful feature in Go, and JSON is one of the most ubiquitous serialization formats in use today. If you’re reasonably new to Go you may not have tried to mash the two together yet, but if you have, you may have seen an error that looks like json: cannot unmarshal string into Go value of type Foo. Clearly the Go creators must have given us a way to leverage interfaces when unmarshalling JSON!