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!
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 […]
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 […]
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 […]
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 […]
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. […]
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 […]
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 […]
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 […]
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 […]
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 […]
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 […]
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.
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.
With my current app, the main data is Subjects, where each Subject have multiple Reminders tied to it. For this purpose, I have a couple of tables in the database, which in its simplified form can be seen as below: Subject table with: Subject ID Subject title Reminder table with: Reminder ID Reminder timestamp Subject […]
Something went wrong. Please refresh the page and/or try again.