Jeremiah Flaga My thoughts and experiences on programming, life, atbp.

Recollection of my journey with Business Rules - Part 1


There are lot’s of reasons why one writes blog posts. One of them is this: so that he will have something to laught at when he gets older.

This post might be one of those posts I will laugh at when I get older… It sound like I’m bragging about my old but insignificant work! :laughing: Who cares, right? It might be insignificant to others, but it was significant to me.

So here we go…

In my five years of experience working as a programmer I have come into a deeper appreciation of the importance of separating the business rules from the other parts of a software system.

How to create tests when you are using Sugar ORM (version 5) in an Android app


Let’s say that in your Android application, you are using Sugar ORM in your data source class, which does the CRUD to your local database.

import com.example.domain.MyDataSource;
import com.example.domain.MyEntity;

import io.reactivex.Completable;

public class MyRepository implements MyDataSource {

    public Completable save(MyEntity myEntity) {
        return Completable.fromAction(() -> {
            MyDbModel myDbModel = new MyDbModel(;

    public Single<MyEntity> get(UUID id) {
        return Single.fromCallable(() -> {
            // TODO: Select.from(MyDbModel.class)...


… And you want to make tests for you save() method (some call this integration tests, instead of unit tests, because these tests touch the database).

On maintainability and the separation of the business rules


“The value of another’s experience is to give us hope, not to tell us how or whether to proceed.”

— Peter Block (through Woody Zuill in his talk on mob programming.)

Story time!…

During college, I became interested about solving algorithmic problems. But because of lack of mentorship and my lack of knowledge in higher maths and algorithms, I decided to concentrate my energies into studying how to create line-of-business (LOB) applications (or what is called “representational-transactional systems” here).

I thought to myself that creating LOB applications is much easier to do — it does not require lots of knowledge in maths — and I thought that I can easily get jobs in the future if I concentrate on creating LOB apps rather than solving algorithmic problems.

During those times, I was curious about how people structure their code in real-world projects.

Testability and good systems


I recently read “The Tale of Three Kings: A study in brokeness” by Gene Edwards.

It is a small book of comfort for Christians who experienced pain and heartache caused by other Christians! — A very beautiful book, I would say.

It tells the story of the young David in the hands of a mad king, King Saul; and the old David and the rebellion of his son Absalom.

TDD and acknowledging imperfection


(Just a thought regarding the discipline of TDD — TDD from the perspective of a hopeful inexperienced TDD advocate:smile: This might help convince others to accept TDD)

When we do TDD, we are acknowledging that we are not perfect beings

— That we might be wrong… and that someone else (in the future perhaps) is able to correct that wrong (that someone might still be you — the better future you!). And that by doing TDD, we are just making a way to make the work of that someone (which could be you) much easier and faster.

So software developers can call themselves (ourselves) engineers!?


I do not call myself a software engineer, even though many other programmers call themselves software engineers, because the “real” :grin: engineers might become angry with me. :laughing: … because engineers study lots of maths, and it seems like programming do not really require mastery in lots of maths…

But I recently found someone who says that we, programmers, are engineers! — — Glenn Vanderburg, in his talk “Real Software Engineering”.

OFW Watch


Yesterday, January 2, 2018, was the launching of the OFW Watch app in Mynd Consulting’s office in Davao.

This app, which is available for the web, and iPhone and Android devices, was made by my coleagues at Mynd Consulting. It is part of the advocacy of Mynd Consulting’s founder and president, Ma’am Myrna Padilla, on helping OFW’s solve some of their problems. — An app that will help “empower OFWs” is what they call it. — Ma’am Myrna herself is a former OFW, so she has a big heart for her fellow OFWs, and that is the reason why this app was created.

Books I read in 2017


Following what John Sonmez is doing, I will start listing the books that I read at the end of each year…

“Growing Object-Oriented Software, Guided By Tests” (GOOS) by Steve Freeman and Nat Pryce

GOOS image

Learned about what they call Outside-In TDD (Or London School of TDD as what Emily Bache calls it) — writing both End-to-End tests (also called functional tests or acceptance tests by others) and writing unit tests at the same time.

(Secret: I skipped some chapters in Part III because there are lots of code already and I find it hard to follow. I only wanted to glean general ideas during the time that I read this. But this book is a classic, so I’m going to read this again… later…)

I was at the PSITS Intercampus Convention at Isulan, Sultan Kudarat...


Logo of first PSITS Intercampus Convention of SKSU - Jan 2018

My teacher in college, sir Elmer Buenavides, who is now the dean of the College of Computer Studies at Sultan Kudarat State University (Isulan Campus), invited me a few weeks ago to be one of their speakers (and judge of some contests) of their first PSITS intercampus convention. I first hesitated to respond positively to his invitation… because I’m not a very good speaker (I’m not an “in-born speaker” :laughing:, if there is such a thing), and because I needed to study or review something to prepare myself for a possible interview (which will not happen anymore because of some changes in plans). But he was able to persuade me, so…

The Principle of Priority


While browsing through my notes on The War of Art of Steven Pressfield, I found this:

I’m keenly aware of the Principle of Priority, which states (a) you must know the difference between what is urgent and what is important, and (b) you must do what’s important first.

I heard a similar statement from Uncle Bob in chapter two of Clean Architecture: A Craftsman’s Guide to Software Structure and Design.