NOTE: TWIL (This Week I Learned) is a collection of interesting findings I discover on a week-by-week basis. Hosted and curated entirely on GitHub.


Programming

Java

GitHub Projects

jbloch/effective-java-3e-source-code

The source code from the third edition of Effective Java, with minor additions as necessary to make it runnable.

Android Development

CURL Logging Interceptor for OKHttp

For one project of mine, I was looking for a way to streamline the communication between Android and backend engineers, by letting Android export the requests the app makes, using the CURL format. Having the request laid out in CURL, makes it easier to pass it around to a backend engineer, execute directly in the command line, or import into tools like Postman. In my search, I found this gist, which seems to be pretty relevant back in 2016, but I am not really sure, if it still is. Need to double-check. I would love to know, if one knows of a better solution.

iOS Development

GitHub Projects

ra1028/DifferenceKit

A fast and flexible O(n) difference algorithm framework for Swift collection. https://ra1028.github.io/DifferenceKit/

How to easily find unused Swift code in Xcode

This is an easy to integrate Ruby script that can be added as part of XCode’s Build Phases. It will use some basic heuristics to check if and which places around your Swift code have been unused.

Misc

Pretty-printing JSON directly in Postman

I found this tip here, which saves me a lot of time going back and forth between Postman and IntelliJ. By selecting the JSON input and pressing CMD+B (or Ctrl for the non-Mac users), Postman will pretty-print the JSON for you directly in the app:

Misc

Betteridge’s law of headlines

an adage that states: “Any headline that ends in a question mark can be answered by the word no.”

A funny law, a-la Murphy’s Law, which could help explain well over 90% of the clickbaity titles on media nowadays.

Leave a comment