Img_1302-edit-edit_large

Eli Sarver

Boolean alias

glog.V is neat-o

glog implements log levels with a nice boolean alias. Starting at line #983, the Verbose, when wrapping the boolean true causes its various functions to invoke the logger. So if you pass in -v 3 on the command line and use glog.V(2).Info("hello") in code, your logger will write the message. This allows glog to have far fewer log . . .

Read More

March 16, 2018

One cool thing about testing in go

*_test.go files aren't compiled or lexed until you run go test. You change them without breaking your non-test code compiles. They stay out of the way until they are needed, which is a nice trick.

Read More

March 15, 2018

Intel Build for Gaming 2017Q1

i7-7700k 4.2GHz, z270, DDR4 2400, M.2 PCI 3.0 x4; yes please.

This is my purchased i7-7700K gaming build. Presented after a lot of fitness to purpose and aesthetic consideration. PCPP spread these prices over 5 vendors, I picked three because I didn't like some of the timelines on parts. The EVO 960 is the most delayed part here.

(output is raw output from PCPP, Adjusted prices and vendors for . . .

Read More

March 05, 2017

Decomposition

When I come up against a problem of any non-trivial nature, I spend a lot of time on the decomposition of that problem into smaller problems. One such example is the work I'm doing with my team's API gateway.

We have a 4-tier system:

  1. CMS (Database to XML)
  2. API gateway (multiple protocols to protobuf)
  3. Web/Mobile API (pb to JSON)
  4. . . .

Read More

February 23, 2017

Layers

Don't mix business logic with service logic

Go kit has a pretty opinionated view about how a Go-based micro-service should work:

  1. You start with core business logic
  2. Then wrap it in flexible layers adding
  3. Handlers
  4. Endpoints
  5. Transports

Though it seems tedious at first, I found myself feeling a certain clarity while working on a small experiment in it. The stringsvc shows the flow from . . .

Read More

Posted in: golanggokit.iogo

February 21, 2017

My Languages

Herein I list my current programming languages.

Go

I use go the most and enjoy it the most. It provides a few features I haven't used elsewhere with as much success, such as compositional inheritance, automatic interfaces, and useful concurrency primitives. While I admittedly don't use the last one as often, when I have used the go . . .

Read More

February 19, 2017

Another Week of Accomplishment

Levers in the right places

This week started with a failed release.

Something we held for about three weeks was deployed, causing de-serialization issues coming back from memcached. We rolled back to the previous release and regrouped the next day to examine causes.

I spent the next morning learning about memcached, but I couldn't put a finger on the root cause. We . . .

Read More

September 04, 2015

Archive

All Categories: golang(1) go(1) gokit.io(1) home