Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
My work project started pretty simple: there was a simple GetXyz endpoint that just looked up the xyz record in the database by a unique key & returned it.
-
I have this “American Express Blueprint Business Loan” product to have a line of credit for the rentals if I’m ever in a pinch.
-
It’s been a while since I’ve written an update – 2.5y!
-
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 w…
-
When I was managing a small team, one of the coolest protips I came across was the idea of a “hype channel”.
-
INTERCEPTORS ARE SO COOL!
-
I post my blog posts about feeds around work a bit, so it’s convenient to link one place to grab them all: mysql feeds cross-dc sync with feed-published kv feeds as cache invalidation mechanism sharded feeds feed sequences feeds justification
-
I’ve decided to migrate the blog to Hugo, as you might have noticed from the new look.
-
I realized I’ve left out a major part from my sequence of previous feed-related posts: a justification for why we should bother with a separate feed_sync_id.
-
My work laptop has been randomly shutting itself off.
-
Suppose we have some data in a production OLTP database, and we need to send it to some OLAP database.
-
It’s easy to love the terseness one can get out of a command-line tool with a “pass by order” convention.
-
In the mysql feeds post, I mentioned that the publisher could do SELECT MAX(feed_sync_id)+1 FROM kv to find the next feed_sync_id during the publishing process, but this is actually a really bad idea.
-
I’ve come to really like the pattern of extracting local or instance variables into their own State class, and writing an algorithm in terms of that State.
-
I was searching Amazon Prime for some Earl Grey tea for my wife.
-
We were trying to take some Christmas pictures but feeling a bit unsatisfied with the way the pictures were coming out: I wanted some flash or something, but the batteries on all the “better” cameras were already dead, so I went looking for an alternative.
-
Pretty frequently at work, I end up polling a database with some command like SELECT MAX(id) FROM my_tbl; SELECT MAX(id) FROM my_tbl; SELECT MAX(id) FROM my_tbl; SELECT MAX(id) FROM my_tbl; -- .... ad nauseam ....
-
I wanted to say a tiny bit about personal finance stuff, as I feel like I have gotten a fairly good feel for it.
-
ESPPs give employees an opportunity to buy the company stock at a discount.
-
Life is (just) a series of tradeoffs.
-
Suppose that: our humble KV feed sees a lot of traffic. someone needs to consume our KV feed with multiple threads. data The first step is to introduce a notion of “shards” into our data model: ALTER TABLE `kv` ADD COLUMN `shard` INT(11) DEFAULT '0',…
-
Sometimes it’s useful to use tampermonkey on a site without nice ids for the elements you want to edit.
-
For my 32nd birthday, my wife took me skydiving!
-
this article has a nice trick for killing all javascript timeouts: function stopAllTimeouts() { var id = window.setTimeout(null, 0); while (id--) { window.clearTimeout(id); } } which can be entered on the javascript console and then r…
-
This is silly, but I always forget this: I also learned you can specify things like // @require https://code.jquery.com/jquery-2.1.4.min.js in a Tampermonkey script, even when a given site doesn’t already have jquery.
-
A lot of times I just want to record something.
-
One really cool use of feeds we’ve realized is that it gives a very efficient mechanism for application code to load the most recent versions of a table into memory.
-
The Robustness Principle (or Postel’s Law) states Be conservative in what you do, be liberal in what you accept from others (often reworded as “Be conservative in what you send, be liberal in what you accept”).
-
It’s been fun describing the feeds framework we use at Square.
-
Start with a super simple data model: CREATE TABLE kv ( id BIGINT(22) NOT NULL AUTO_INCREMENT, k VARCHAR(255) NOT NULL, v LONGBLOB NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY u_k (`k`) ) Engine=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin Suppose…
-
At work, we use a pattern called feeds that gets an incredible amount of work done.
-
I had some test code that looked something like @Test public void a() { db.insert(0, "a"); assertThat(db.query(1).getKey()).isEqualTo("a"); } @Test public void b() { db.insert(0, "a"); db.insert(1, "b"); assertThat(db.query(2).getKey()).isEqual…
-
Some of my day job lately has been trying to get a better handle on threads in Java.
-
I was curious what it would cost to have something like 5-30TB of storage space on hand.
-
I recently came to learn of the SFpark API, which lets one make queries like: LAT=37.787702 LONG=-122.407796 curl "http://api.sfpark.org/sfpark/rest/availabilityservice?
-
I can never remember how to do java regexes with Pattern.
-
We had some code like this: NavigableMap<Double, Integer> PRIORITY_MULTIPLIERS = new TreeMap<Double, Integer>() {{ "{{ " }} put(LOW_THRESHOLD, 1); // (20k..40k) => 1 put(MEDIUM_THRESHOLD, 2); // [40k..100k) => 2 put(HIGH_THRESHOLD, 3); // [100…
-
I’ve known about [osquery][] for a while, but recently spent some time digging around in it.
-
I’ve come to realize that my career so far has been built on being “profitably wrong.”
-
TodoBackend.com defines a simple API and has a frontend that works given any backend URL.
-
Dancing Bull is a great Korean BBQ restaurant that opened nearby recently.
-
I was happily riding in to work this morning on my motorcycle.
-
Once in a while, I get a prepaid gift card like this: They’re – like money – great!
-
oncall exists. the data is never available how you need it. unit tests matter. pushing code after 3pm is risky if you’re not willing to work all night.
-
I was catching up on Jesse Wilson’s blog this morning, and in particular his post URL Encoding Is Material.
-
I got this text message from my father-in-law: Ok.
-
Square is a fantastic place to work, and has been for my entire time here.
-
I watched Destin’s $500 Million Dollars video: and had a few thoughts: my highschool CS education My highschool had computer teachers, but no computer science teachers.
-
Really interesting youtube talk: confident women are getting bypassed by overconfident men
-
I came across a very interesting library in a HN thread: the python attrs library.