Welcome to my studio.

My name is Hafiz Rahman, and this is the place where I write about my current interests.

At the moment, those interests are photography, writing, coffee, and coding. I also have a personal blog.

I am from Indonesia, and from time to time I write in Indonesian language here.

I call this website old.black studio, yet in reality it’s not a room anywhere and it has no physical address.

I like to imagine this place to be somewhere I can share my work and things I learned about, like an open studio where you can come and go without worrying about bothering anyone. I hope you have a nice stay!

Latest Articles

Understanding Dependency Injection A Tiny Bit More

Today I had a minor epiphany. I was working on a unit test on a class method, and had a rather annoying time with it because the class (a ViewModel) uses an instance of a different class (a repository) to do things. There is a coroutine involved, so things got a bit hairy until I […]

What is Declarative UI?

Jetpack Compose is the latest Android UI development framework from Google that nowadays piques my interest. Jumping from using Java to Kotlin was for the most part an enjoyable experience: I feel I can be expressive and more efficient with Kotlin. I get that same feeling whenever I’m digging further into Jetpack Compose, compared to […]

Building Custom TimePicker Dialog Preference in Android

In the spaced repetition app I’m building, I wanted to allow people to pick a time for the study reminder notifications to show up on. There is a built-in AndroidX Preference Library that is meant to help with this, however I found that there’s no built-in way to display a TimePicker dialog as part of […]

Fun with ViewModel and LiveData: Sending Informations between Fragments

In Android development, there are a few different ways to send informations between one fragment to another. As of September 2020, the recommended way to allow for this communication is to use LiveData exposed by a shared ViewModel. The steps are relatively simple. Suppose that we want to send data from Fragment A to Fragment […]

Resources for Learning about Jetpack Compose

Jetpack Compose is Google’s latest toolkit for building UI, at the moment generally aimed for Android development. Below is a list of what I think is a good, comprehensive approach on how to learn about it. At the moment, Jetpack Compose is under active development and currently released in Alpha version, so this list will […]

Getting to Know Hilt: Dependency Injection Library for Android

Artikel ini juga tersedia dalam Bahasa Indonesia. I’ve written about dependency injection (D.I) a couple of times on this blog. First about understanding Dagger (in Indonesian) and second about a simple way to understand D.I. and why it is needed. The latest development is that Google is now recommending a new library for implementing D.I. […]

Perkenalan dengan Hilt: Library Dependency Injection untuk Android

Saya sudah beberapa kali menulis soal dependency injection (D.I.) di blog ini. Masih yang basic-basic saja, pertama soal memahami Dagger dan kedua soal cara sederhana memahami D.I dan mengapa dia dibutuhkan. Berita terbaru, ada library baru dari Google untuk membantu mempermudah mengaplikasikan D.I. di app kita. Namanya Hilt: Sebenarnya video di atas sudah sangat cukup […]

“What Hacker News Says” Extension

Hacker News has been one of the places with high signal-to-noise ratio for discussions, for me. The majority of its contents is tech-related, although different topics do show up from time to time. The “What Hacker News Says” browser extension (available for Firefox and Chrome/Chromium browsers) is a pretty cool thing that helps with a […]

Beginner Series: Dependency Injection

Dependency Injection is a concept that did not immediately sound intuitive to my mind, especially as a non-native English speaker. I’ve read a bunch of different articles and resources about it, and found two that helped. First, Dependency Injection Demystified. The article is quite short and I highly recommend going through it: Dependency injection means […]

Common Software Metaphors

A confusing abundance of metaphors has grown up around software development. David Gries says writing software is a science (1981). Donald Knuth says it’s an art (1998). Watts Humphrey says it’s a process (1989). P. J. Plauger and Kent Beck say it’s like driving a car, although they draw nearly opposite conclusions (Plauger 1993, Beck […]

One Idea That Changes Your Life

There’s a recent Ask Hacker News thread about one idea that changes someone’s life. Here are some parts that I find illuminating. Interrogative-led questions: Favor interrogative-led questions over leading questions.A leading question attempts to get the listener to agree or disagree with a premise you feed to them. An interrogative-led question often begins with the […]

Setting Up Jetpack Navigation Component and Modal Navigation Drawer

On small screens like on mobile (setting aside how humongous smartphones tend to be nowadays), a very common pattern is to use a modal navigation drawer to allow users to navigate between one top-level destinations in the app. You’ve seen them: it’s usually the three horizontal lines on top left of an app, that can […]

General Mechanism for Scheduling Notification in Android

This article is more of a quick note about what’s involved when your Android app needs to create a notification and schedule it to appear at some time in the future. There’s a lot of articles out there that goes in details about the implementation. Think of this article as more of a summary.

Link: Adding Click Listener to RecyclerView using Kotlin

Recently I needed to figure out how to add click listeners to RecyclerView, in my app that’s using Kotlin as language. Kotlin supports higher-order functions, so the click listener solution can look more concise and elegant, avoiding the need to add interfaces like in Java. Andreas Jakl wrote a detailed tutorial about it here.


Something went wrong. Please refresh the page and/or try again.

Get Updates

Join 675 other followers

Topics So Far

@oldblackcamera on Instagram