Recent Posts
38 and Grateful
It’s been a while since I’ve written an update – 2.5y! – and a long time since I wrote very frequently. On top of all the crazy ways the world has changed in the last five years, a bunch has changed for me personally in the last five years as well, along a bunch of different axes.
I think part of the reason it’s been hard to post is wanting to avoid coming across as bragging about the high points of this journey and also not really wanting to admit some of the low points, but I feel I’ve had a lot on my mind that doesn’t really make sense in blog form without the greater context; I’ve decided that I’d rather just share a lot of what’s been going on in the hopes that some part of it is relevant to someone out there or gives them some fortitude for whatever low spot they’re going through or can learn something from it.
Transacter and Intent/Result
At SQ, we had a family of Transacter
interfaces:
public interface Transacter {
void transaction(Function<Session, Void> session);
public interface Session {
DSLContext dsl();
}
}
where DSLContext
is a jOOQ concept & is the handle for doing work against the database.
Then this would be used in some class like
public class KvDao {
@Inject Transacter transacter;
void put(String ns, String k, String v) {
transacter.transaction(session -> {
KvRecord record = new KvRecord(ns, k, v);
session.dsl().insertInto(KV).set(record).execute();
});
}
}
The parameters ns
, k
, and v
are shorthand for namespace
, key
, and value
, respectively.
We’ll show how these might be used together shortly!
hype channels
When I was managing a small team, one of the coolest protips I came across was the idea of a “hype channel”. This builds on the idea of a “hype doc” by changing the medium: instead of writing into a document, you write blurbs on your own private Slack channel.
I’m not sure whether this would help anyone but me, but maybe it’ll help someone else drowning in Chrome tabs?