Smarty Blog - 2018

2018-11-13 Incident Post-Mortem ReportArrow Icon
At approximately 3:30 PM Eastern on November 13, 2018, we observed a significant latency spike from our external monitoring tools...
November 16, 2018 - At approximately 1:30 PM Mountain Time (3:30 PM Eastern) on November 13, 2018, we observed a significant latency spike from our external monitoring tools that we configured to access our load balancing tier of our cloud-based APIs. These monitoring tools provide full, end-to-end testing and are meant to simulate a complete user experience with our application. By design our systems can easily process in excess of 25x the usual amount of traffic we receive. We do this because of our customer usage patterns wherein we may observe a 10-fold increase in traffic within a short period of time—usually a few minutes or even a few seconds.
Go Naming ConventionsArrow Icon
The style guide tutorial you never knew you didn't need
October 18, 2018 - It's been said that naming is one of the two hardest problems in computer science along with cache invalidation and 'off-by-one' errors. (See what I did there?) Do you ever find yourself wondering what policies and practices you could adopt to make your life easier when reading code you wrote months ago? Or maybe you're up at night wishing you know how to write code in such a way as to maximize adoption and convenience for your users? Well, look no further because we've anticipated the need, solved the problem, and now we're sharing our knowledge and wisdom at no charge, all out of the goodness of our hearts in this comprehensive, totally no-nonsense (nudge, nudge, wink, wink) style guide of Go naming conventions.
Cloning Private Dependencies in Docker and GoArrow Icon
One topic that seems to come up repeatedly on Stack Overflow or other online forums is the topic of how to GO GET private dependencies. We can help.
September 13, 2018 - One topic that seems to come up repeatedly on Stack Overflow or other online forums is the topic of how to go get private dependencies. Specifically, if I have a private Git repository on Github or Bitbucket, how do I bring that code locally via the go get tool such that automated builds can produce a clean, consistent build without interaction from a user? This problem is largely solved for public Github dependencies but continues to be a challenge for private dependencies. To reiterate, if you're only cloning publicly available dependencies, you probably won't be reading this post.
Let's build an xUnit-style test runner for Go!Arrow Icon
Why? What do you mean 'why'? Because we can! What's wrong with you?
July 2, 2018 - Writing test functions in Go is easy: go package stuff import "testing" func TestStuff(t testing. T) { t. Log("Hello, World!") } Running test functions is also easy: $ go test -v === RUN TestStuff --- PASS: TestStuff (0. 00s) stuff_test. go:6: Hello, World! PASS ok github. com/smartystreets/stuff 0. 006s Preparing shared state for multiple test functions is problematic. The usual recommendation is to use table-drive tests. But this approach has its limits. For us, xUnit is the ideal solution.
A History of Testing in Go at SmartyArrow Icon
A response to the question: Should I follow Smarty and leave GoConvey for gunit?
March 28, 2018 - I was recently asked two interesting questions: 1. Why did you move from GoConvey to gunit? 2. Are you recommending folks do the same? These are great questions, and since I'm a co-creator of GoConvey and principle author of gunit I feel responsible to give a thorough answer. For the impatient, here's the TL;DR: Question 1: Why did you move to gunit? > After using GoConvey and feeling consistent friction with that approach, we came up with an alternate approach that was more aligned with what we value in a testing library and which eliminated said friction.
GO: With IntensityArrow Icon
Smarty has partnered with to create a Go programming video series.
January 12, 2018 - TODO: - link to Jonathan's posts on why we left . Net and why we embraced Go and linux - Explain cleancoderse. com - Explain how the case studies work - Introduce the Go case study - Include small blurb from each episode's intro.
Scanning CSV in GoArrow Icon
Wouldn't it be nice if csv.Reader was more like bufio.Scanner?
January 5, 2018 - For the purpose of this article, consider the following CSV data, slightly modified from the docs for encoding/csv: go csvData := strings. NewReader(strings. Join([]string{ first_name,last_name,username, "Rob","Pike",rob, Ken,Thompson,ken, "Robert","Griesemer","gri", }, "\n")) Here's how you read the data, line by line, using the Reader provided in that package: go reader := csv. NewReader(csvData) for { record, err := reader. Read() if err == io. EOF { break } if err != nil { // handle the error.
View Blog Tags

The leader in location data intelligence

Ready to get started?