Load Testing Google Cloud PubSub

I wrote the following tool to do load test on Google Cloud PubSub. It’s a pretty simple but effective tool to generate a lot of data. This assumes user is using gcloud auth application-default login for credentials. In this particular examples: Every third request is adding a different attribute. Python dict as a payload that … Read more

How to Manually Add Phrases to Localize.js

Localize.js is a great service. Gone are the days of having to internationalize your websites by hand. That being said, existing UI has a pretty annoying in my opinion limitation – there is no way to add phrases manually. 99% of the time, Localize.js is able to automatically pick up all of the phrases on … Read more

Golang “Set” Data Structure Example

Golang does not have built it sets. Basic functionality can be mimicked using maps with empty struct{}. Another option is to use a Boolean value, but empty struct does not use any space and therefore more efficient. Another benefit of empty struct is that Boolean value can be set to true or false, which could … Read more

Work Hard and Advertise

I recently watched the following speech by Arnold Schwarzenegger: It had a lot of good points, but one quote by Ted Turner really stood out for me: Early to bed, early to rise, work like hell, and advertise Mr. Schwarzenegger then went on to explain the meaning of the second half of this quote. It’s … Read more

One Year Without Self-Promotion

One year ago I decided to stop self-promoting this blog. Previously I would spend a lot of time submitting my links to Social Media sites such as Hacker News and Reddit. It was taking up a lot of my time and attention. I even got a warning from Hacker News admin for repeatedly submitting links … Read more

Group Log Data by Timestamp in Python with Pandas

I often find myself with logs in the following format, exported in CSV. First column is timestamp in milliseconds, second column is timing for some request, also in milliseconds. Often I’d like to see the min, max and average request time, group by day and hour. Here is how to get this insight using Pandas … Read more

Attach Remote Debugger to Jar File and Scala REPL

I was investigating a bug that would only happen in production and wanted to attach a debugger to a particular workflow. I could have run the entire application and attached remotely, via: In my case, I wanted to invoke a specific method and see what happens via Scala REPL. Turns out it’s pretty easy to … Read more