Category: another snippet | code
-
KISS: Hand crafted JSON is NOT faster than ObjectMapper
Premature optimisations are evil. Apart from being buggy, they might actually be slower than the industry standard.
-
Taming a throttled API with Dynamic Proxies in Java
Recently, at CleverTap, we’ve begun migrating some of our largest clusters to a new protocol (for starters, think ~115 instances at a time). One of the most fun things I’ve had my hands on during this migration was the AWS Systems Manager API. When we scaled up our migrations gradually from a 10 node cluster,…
-
Sending OTA updates over WiFi to your ESP8266
This Christmas, I added a whole bunch of lights powered by 5V power sources. My goal was to switch them on at sunset, and switch them off on sunrise, by using a MOSFET for power control :) While I was doing this, I wanted to send OTA updates of my Lua files to the ESP8266…
-
Installing the Nginx Ingress Controller via Helm to a K8s cluster with RBAC enabled
A lot of posts describe how to do this, but are fairly outdated, and do not mention the last supported K8s version. Here’s a tried and tested way to do so via Helm. This has been tested on GKE, with the Kubernetes master version 1.9.7-gke.6: Create the service account for Tiller – the Helm server $…
-
IntelliJ on steroids with G1 GC
Lately, I noticed that IntelliJ started to pause for quite some time during it’s GC cycles, and that it was very frequent when I was editing three files (over 1.2k LOC each) split vertically. The current version of IntelliJ runs on a bundled version of Java 1.8, who’s default garbage collector is Parallel GC. While…
-
Contributing to Go in 54 days
With absolutely zero knowledge of Go 54 days ago, I decided to contribute to the Go project. Why? Put simply, I was bored. The thrill of learning something new, and contributing to a massive OSS project like Go caught my attention. How? Find an issue that’s tagged as HelpWanted. There’s a “HelpWanted” tag, which is applied to…
-
LetsTuneup: A music chart with Arjit Singh in the lead
LetsTuneup has grown tremendously, and with it, we’ve introduced new features too. We identified that a few of our users couldn’t use the app to it’s full extent because they didn’t have music on their devices. We’ve solved that. Users can now pick their favourite artists, powered by a location aware scoring algorithm, which recommends…
-
Why Matchbox, and how it connects people through music
There’s no doubt that music defines us. It influences our moods, for example, making us happy by releasing a chemical named dopamine. It can affect what we wear, what we eat, and perhaps even who we enjoy being together with. It affects our thought process too (it’s well known that ambient noise can improve productivity). In…
-
Mocking the HTTP/2 Apple push notification gateway in Go
At CleverTap, we had the need to mock the new HTTP/2 Apple push gateway API. After trying to do this in Java, and then in Python, I succeeded in getting it to work in Go. Go out of all languages! To me, Go has a completely strange syntax, compared to Java and C. This mock server…
-
Compile LESS on the fly for your exploded WAR in IntelliJ
At CleverTap, we’ve recently started using LESS for dynamic CSS. While it has it’s upsides, the biggest downside was that most of our developers couldn’t use the hot deploy feature for their local deployments. After an hour or so, we came up with a neat solution. There are two parts to this: Just before deploying…
-
Sending notifications via Apple’s new HTTP/2 API (using Jetty 9.3.6)
HTTP/2 is still very much new to Java, and as such, there are just two libraries who support it – Jetty (from 9.3), and Netty (in alpha). If you’re going the Jetty way (as I have), you’ll need to add their ALPN library to your boot classpath. Note: Jetty 9.3.x requires the use of Java…
-
openFrameworks and AppCode
Developing an openFrameworks app with AppCode is pretty easy. However, if you just open and run the project created by the project generator, you might see the following errors: Why doesn’t it just work? This is because openFrameworks doesn’t support 64 bit builds yet on the Mac, due to a dependency on the deprecated QT…
-
CLion 1.1.1 and openFrameworks 0.8.4
A basic template to start building oF projects using CMake within CLion. It’s here on GitHub! All credits go to kureta for the CMake files. I’ve just pieced it together as a project which can be imported.
-
OpenWRT won’t bring my WiFi interface up, unless the other is up
I recently bought a D-Link DIR 505 router. So far, I’ve got a DLNA server running on it, along with Transmission, a bit torrent client. Life is awesome so far. I set it up to repeat another WiFi router in my house, the one connected to the internet – using a bridge. It works really…
-
Discover – my second iOS app
iTunes Genius is a great feature. However, it lacks music discovery outside your own music library. Sure, you can always do a Google search for similar tunes, but let’s face it – who has time to do this anymore? There weren’t any great music discovery apps on the App Store either. All of them either…