How did I improve latency by 700% using sync.Pool

We @media.net write superfast backends with at max 30-40ms turn-around time from web-service. We continuously try to reduce money spent per request. This blog enlists a few of our findings.


Golang: Returning errors with context

Usually in Golang, it is recommended that, while propagating errors outside, just return the error do not log it. This blog by Dave Cheney talks in length about how shall we handle logging and errors. But while returning/propagating errors, somtimes it becomes necessary to add the context of the error along with the actual error.


Shipping your Android SDK anytime on live devices

As per the new Play store guidelines, this method is categorized as an illegal way of executing any functionality on user’s device. I personally won’t recommend this method anymore.


How to use packages specifically for Debug/Release builds in Android

Preface


Docker + Golang web apps using Godep on AWS with Elastic Beanstalk using CodeShip

This post is pretty old, and I no longer use any of the tech mentioned in this post and won’t recommend anyone to use. (Except Go, which I still love the most, probably more)


map to struct in Golang

Recently I was working with a piece of code where I had to convert a JSON into a Golang struct. I faced hell lot of issues, and waster a bit of time in achieving that, so thought of documenting it.


Writing Android app with Kotlin

When I read about Kotlin, I thought of it as a functional port of Java which is (100% interoperable with Java). I have been playing with Scala for a bit. The biggest trouble I had with Scala is wide range of semantic alternatives. But it seems like, Kotlin has a decisive approach towards making Java more functional and more compact for developers.


Creating .keystore from .cert and .key

A quick not for creating .keystore using a set of certificates including root, intermediate and domain certs.


setOnItemClickListener() is not working…and its’ because your layout structure is wrong

This is gonna be a quick post. I spent like last 45 mins solving a very dumb issue, related to setOnItemClickListener of a custom class extending GridView.


Why BATTERY_STATS permission is not gonna work in KITKAT

I am working on an internal project which requires battery stats. A quick search would guide you to use android.permission.BATTERY_STATS, and you would be able to access battery stats directly. But you would notice that this code wont work in KITKAT.