How to write maintainable RecyclerView

Write maintainable RecyclerView in Android

6 minute read

Google is famous for making complicated things. RecyclerView is not an exception. It is more flexible than the previous ListView I understand, but that also means that us developers need to understand more and do more work. I have seen gigantic adapters that have very complicated logic especially when there are multiple types that the RecyclerView is trying to handle. I think I happen to know one way to organize things a bit better so one can easily find what he/she is looking for.

Use Enumset to Replace Bit Flag

How to use EnumSet to replace bit flags

2 minute read

I was reorganizing my bookshelf today and found my Thinking in Java lying there so I decided to skim through it. I was quite surprised how much basic stuff in Java I overlooked or forgot. So I decided to re-read the book and write short blog posts of the things that I think are useful but not too many people are talking about nowadays. Here is the first one. What is bit flag?

The Ultimate List of Youtube Programming Channels

A list of youtube channels that talks about programming

4 minute read

Here are the Youtube channels I subscribe and recommend. They are in no particular order. Computer History Museum I’m an old school programmer and this fits my taste perfectly well. Especially check out the Oral Histories section where they have in-depth interviews with the industry legends from top IT companies. Confreaks Mainly about Ruby conference videos recordings, even though I don’t know Ruby I still find some of their videos extremely helpful.

The Evolution of Command Pattern (III)

The Command Pattern Revisited and its implementation in Android Service

5 minute read

In this final part of the Command Pattern series, we will talk about yet another improvement on top of the Command Processor Pattern. It is described in the paper Command Revisited. From now on, we will just refer to it as the Command Revisited Pattern. The paper is short and sweet but you might not find it to be to the point after the first glimpse. The most beautiful part of the Command Revisited Pattern is that it provides a new perspective on the general Command Pattern.

The Evolution of Command Pattern (II)

How Command Pattern has evolved overtime

3 minute read

In Part I, we discussed the original Command Pattern from the GoF Design Patterns book. In Part II, let’s talk about the improved version from another less known book: Pattern-Oriented Software Architecture Vol.1 (POSA in short).

In this book, there is a Command Processor pattern, which is based on the Command Pattern in GoF book. The most important difference is the newly introduced CommandProcessor. In the original Command Pattern, it defines how to create Commands, and each Command has an execute and undo methods.