Înapoi la articole →

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 194
  1. Evolution of a Get Endpoint

    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.

  2. loan trickery

    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.

  3. 38 and Grateful

    It’s been a while since I’ve written an update – 2.5y!

  4. 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…

  5. hype channels

    When I was managing a small team, one of the coolest protips I came across was the idea of a “hype channel”.

  6. interceptors

    INTERCEPTORS ARE SO COOL!

  7. Feeds Docs

    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

  8. Hugo

    I’ve decided to migrate the blog to Hugo, as you might have noticed from the new look.

  9. feeds justification

    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.

  10. macos log command

    My work laptop has been randomly shutting itself off.

  11. Suppose we have some data in a production OLTP database, and we need to send it to some OLAP database.

  12. smart arguments

    It’s easy to love the terseness one can get out of a command-line tool with a “pass by order” convention.

  13. feed sequences

    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.

  14. 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.

  15. I was searching Amazon Prime for some Earl Grey tea for my wife.

  16. more light, better pictures

    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.

  17. watching progress in mysql

    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 ....

  18. personal finance resources

    I wanted to say a tiny bit about personal finance stuff, as I feel like I have gotten a fairly good feel for it.

  19. espps are free money

    ESPPs give employees an opportunity to buy the company stock at a discount.

  20. tradeoffs

    Life is (just) a series of tradeoffs.

  21. sharded feeds

    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',…

  22. moar stupid jquery tricks

    Sometimes it’s useful to use tampermonkey on a site without nice ids for the elements you want to edit.

  23. skydive!

    For my 32nd birthday, my wife took me skydiving!

  24. killing all timeouts in js

    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…

  25. jquery selectors

    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.

  26. Naming is hard (so don't)

    A lot of times I just want to record something.

  27. 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.

  28. 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”).

  29. It’s been fun describing the feeds framework we use at Square.

  30. 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…

  31. mysql feeds

    At work, we use a pattern called feeds that gets an incredible amount of work done.

  32. 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…

  33. Some of my day job lately has been trying to get a better handle on threads in Java.

  34. big-ish personal storage

    I was curious what it would cost to have something like 5-30TB of storage space on hand.

  35. sfpark api

    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?

  36. regex in java

    I can never remember how to do java regexes with Pattern.

  37. guava RangeMap

    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…

  38. osquery

    I’ve known about [osquery][] for a while, but recently spent some time digging around in it.

  39. profitably wrong

    I’ve come to realize that my career so far has been built on being “profitably wrong.”

  40. todobackend.com

    TodoBackend.com defines a simple API and has a frontend that works given any backend URL.

  41. Dancing Bull is a great Korean BBQ restaurant that opened nearby recently.

  42. I was happily riding in to work this morning on my motorcycle.

  43. Once in a while, I get a prepaid gift card like this: They’re – like money – great!

  44. 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.

  45. I was catching up on Jesse Wilson’s blog this morning, and in particular his post URL Encoding Is Material.

  46. snack buying

    I got this text message from my father-in-law: Ok.

  47. Square is a fantastic place to work, and has been for my entire time here.

  48. 500 Million Dollars!

    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.

  49. Really interesting youtube talk: confident women are getting bypassed by overconfident men

  50. python attrs

    I came across a very interesting library in a HN thread: the python attrs library.