Darshan Parajuli

@dparajuli.bsky.social

Former Android Engineer @ Square Opinions are my own.

To my former colleagues who have been treated so shockingly badly today and for the last few months: Square/Block was the best job I ever had, with many of the best people I ever worked with. None of you deserve to be dicked around like this. It's not you, it's Jack.

Casey Muratori pretty much sums up how I feel about LLMs for coding: "The AI will always be useless for me. I physically can't get what I want from programming when AI is involved, because what it is doing is robbing me of the experience that I wanted to have and the knowledge that I wanted to get"

I love Kotlin but please don't abuse its features. I regularly see code like in the first function when you can instead write a simple if statement: it's shorter, easier to read, and doesn't allocate an object! Thankfully both functions compile to the same assembly when R8 is turned on.


Two Kotlin functions that take 2 float parameters a and b. Each function returns a divided by b if b is not 0, or a constant called DefaultValue otherwise. The first function does so using takeIf, let, and the "elvis" operator. The second function uses a simple if/else statement.

I hate "index.lock file exists" error when running git commands, so wrote this tiny wrapper that automatically waits until index.lock file disappears. There are obviously many ways to do this, but writing in #rust seemed the most fun.

GitHub - darshanparajuli/git-wait: A simple git wrapper that waits until index.lock file is removed when present before running the command.

A simple git wrapper that waits until index.lock file is removed when present before running the command. - darshanparajuli/git-wait

github.com

@tornorbye.bsky.social and I were just discussing one of his new lint checks, and it reminded me that Kotlin lambdas can lead to boxing of primitive types if you're not careful. A non-inline function that takes a lambda will compile down to the generic Function* types and your primitives will box.

Colors can be a confusing for developers who haven't spent time understanding the (deep) topic of color management. The main misunderstanding is see is that the values of an RGB triplets are absolute. They are in fact *relative*.