Daily Journal – Mar 31, 2017

Fifth day of the week. What did I do today?

In the morning, I went down again to the customer’s office at Paya Lebar to do performance tuning. The tuning involved me working with the JVM garbage collection. I did some testing and comparisons between using the default garbage collector as well as the new G1GC garbage collector. Played around with the values but the end result is still the same. The performance was still bad. Since I have no visibility to the environment, in particular the Virtual Machine, there’s nothing much I could do.

So at around 1pm, I went for lunch before making my way back to office. For lunch, I had Char Siew Rice at the Geylang Hawker Center and shared the same table with a cockroach. You see, I never like to eat at Hawker Centers because it’s unhygienic. No matter how much effort they put into cleaning up the place, pests as well as birds will be around. I actually prefer to eat in restaurants. Anyway, that’s not the main focus on this journal.

So after lunch, instead of taking the cab, I took the train back to office.

Upon reaching office, I settled down and had a shot of Expresso, made using the Nespresso machine. Then I got started to work on the other project I’m involved in. But before I could start, I got pulled aside to prepare an email to send out to the customer to kick-start the re-SIT. Then I went to help my colleague with something on the CA Identity Governance application. He had some trouble connecting to the Active Directory in our lab and so I helped out. Apparently, there was some SSL issue but it was quite some time ago when I did the setup. So it didn’t quite get resolved. But either way, he found another way to achieve what he wanted. That mark the end of my assistance.

So I went to try out and setup kong in my company’s lab. There was a CentOS6 instance setup for me to play around and I followed through the Get Started guide on the official kong’s website. I managed to reach the point where I enabled the authentication key and attempt to perform a GET operation. Along the way, I took screenshots and prepared a simple installation guide, which itself is also known as a journal. Well, journaling is very important in my company because it serve the foundation of knowledge transfer and ensuring that all of us maintain the same level of quality in terms of output.

Anyway, I also found myself opening a support case with the Product Vendor on an issue the customer raised, as well as making some light tweaks to the project schedule that my manager sent out earlier. At around 6.15pm, I left office with my other colleague. By the time we all left, only our boss is left in office. But I suspect he too left before 7.

Here I conclude my journal for today.

Daily Journal – Mar 30, 2017

It’s the fourth day of the week. This is my 14th journal. 2 weeks worth of journal just went by.

So what happened today? I’m gonna keep it short.

I spent most of my day working on the breakdown of SIT cases document. I also updated the new SIT test plan to include more test cases.

Other than that, I sent off several emails with regards to the SIT test as well as sending out the updated documents.

I also got started to work on something new and that was to install and configure Kong, an open-source API gateway.

At first, I attempted to install on my mac but I hit an error with regards to the crypto library. Wanted to dig deeper before I shifted focus to work on the SIT documents.

Then I also went to take a quick look at the support cases that I opened and I also created and updated some issues in JIRA. Those issues are related to the SIT too.

And today, I came to know that for UAT, my other colleague will be conducting it. A part of me realize that it’s because of the mistakes I made during SIT that I won’t be following it through with the UAT. From a company perspective, it make sense. It’s all about getting things done properly, on time and on target. There is no room for fumbling around. So let’s move on from that.

Oh, I made another mistakes today. I sent email using my personal gmail instead of my work email. That’s what happened when you don’t check and have setup so many email accounts on your Apple Mail.

Lastly, I went to buy Melatonin yesterday. Took a pill. The end result was, I woke up this morning feeling extremely groggy. Had to drink two shot of expresso at work to keep me awake. But then I started mentally crashing at around 4.30pm.

Seriously, Laydon, stop doing that. You suck.

This conclude my journal today.

Daily Journal – Mar 29, 2017

For today’s update, I will keep it short.

Yesterday, I didn’t sleep well again. I just don’t know why. Only manage to fall asleep at around 4am and had to wake up around 7. In between, I found myself waking up pretty often.

And below are what I have done or went through:

  1. Had coffee in office.
  2. Updated the SIT test case breakdowns to include test owner, comments provided by the testers during the meeting yesterday.
  3. Sent summary emails to the application owners on the meetings we had yesterday.
  4. Went for meeting for one of the application at the customer’s main office. Got back with a bunch of comments and feedback as well as potential change requests.
  5. Had an internal meeting to sync up on what’s happening in the company.
  6. Went to buy a Thunderbolt to VGA adapter for my MacBook Pro.
  7. Went to get a bunch of supplements to replenish my supplies.

In case you are wondering, for supplements, I tend to go with Ocean Health and Redoxon. For Redoxon, I have taking the Vitamin C supplements since I was 15 in my bid to speed up healing of my acne and prevent scarring.

Here I conclude my journal for today.

Daily Journal – Mar 28, 2017

My update for today would be rather short as I’m very tired.

So here it goes.

Today is a full day meeting with the customer. The purpose? To run through the SIT issues with the individual tester. Part of it was to update them on what was fixed, what will be retest, what won’t be fixed. It is also during this period where we discover more about what the tester want.

For me, I spent half the time talking to the tester, running through with them on the test cases and issues. There are situation where my manager, who’s there, would be the one handling the testers. After all, he has a better picture of what’s going on and would be in a better position to make certain decision and explain certain things.

After the first half of the meeting was done, my manager told me that I will be doing discovery work on another product. This time, instead of an Identity Manager, it’s API gateway. All I can say is, I’m excited about it. But naturally, it will be a concurrent thing with the project that I’m on and it will be up to me to properly manage the two different threads.

So, good luck to me. Will update again tomorrow.

Daily Journal – Mar 27, 2017

It is a brand new week.

But I didn’t sleep very well again last night. The caffeine from the rather big cup of Americano, which I drank at around 3.15pm, was still in my body. I drank it while I was having lunch before I made my way to Orchard Road. I wanted to get the book titled, “A Night Without Stars” by Peter F. Hamilton and I tend to go to the Kinokuniya bookstore.

As for how’s my day? Let me get started.

Since I didn’t sleep very well, I went to work as though I’m a zombie. My brain is functioning very slowly and memory tend to be very poor.

I went about my usual routine upon reaching Paya Lebar before making my way to the office. Once there, I drew the room key from the guard office and made my way in. I got my things out.

The first thing I did for the morning was to configure an additional Account Template and assign it to a Provisioning Role within the Identity Manager. It was meant for one of the additional test cases that the customer wanted. After I’m done, I went about configuring the target permission in the Identity Portal and that was all to it. Everything else was already preconfigured for the SIT and all I need to do is just add on more.

Next, I went about to try out configuring the Account Template through the LDAP client in my company’s lab. It was part of following up to the Product Support Case and I followed the instruction given to me. The intention was to see how I can allow different combination of Account Templates to be assigned to a user account in the Identity Manager such that the user will have different protocols that are enabled for their Exchange Mailbox. The end result was that it didn’t work. I took the necessary screenshots and sent it back, telling the person handling the case that it didn’t work as intended. With that, I moved on to the other task.

I went on to collect information about the server requested by the support person. I had also opened a support case with the Product Vendor regarding the slow performance and was handling since the beginning.

A side note: This is how you do it actually. If you know that you didn’t sleep very well the night before, your productivity drops but still you need to do your work. So, do one thing at a time. Ensure that you see it through. Somehow, you will find yourself completing tasks quickly.

Next, I went to take additional screenshots to prepare the powerpoint slides that I wanted to show the customer tomorrow on the proposed workflow of how user make a request through the Identity Portal such that the user can get an account and the necessary roles in the external application. Before I knew it, my boss was asking me about the training course that is scheduled for end of April.

I tend to get panicky when my boss ask me things. Not sure why, I just do. I will need to analyze why. My first guess would probably be because I have a very low confidence level and I fear making mistakes, especially with the boss. Anyway, I switched my focus to sending out a email to the course provider and asking for confirmation. I got a reply back later and I notified my boss about it.

Then my manager was asking me about the status of the bulk loading of users into the Identity Manager. I delegated it to my colleague. He did it, prepared some documentation, and as of last Friday, I got some basic status update from him already. With that, I updated my manager. After some back and forth, I went ahead to update my colleague about testing the functionality thoroughly. Reason is simple. We will need to do the same thing during UAT.

Before we knew it, it was lunch. So off we go.

After lunch, I went about to review and update the SIT test plan, bringing it to the next version. While updating, I made sure that the content matches what was implemented in the staging/SIT environment. I took the chance to also review the JIRA issues, closing or updating them as necessary. It was about 4.30 when I uploaded it to the company’s internal cloud storage. I told my manager about it and went on to clean up the powerpoint slide that I was doing earlier and then I sent it to my manager.

By the time it was about 5.15pm, I got started to read up on how to properly study and tune Java applications. I got myself familiarized with the JConsole and how to use it. Then I tried it out in various of the environment. I also went to read up on Java Garbage Collection and how it affects the performance of application servers. I left at about 6.25pm after packing up.

Ranting: I despise and hate smokers. The products they used are so toxic to the people around them. The smell and the fact that I breathed in the residues always make me sick. Yet, our PAP government isn’t doing anything about that. Even enforcement of no smoking in sheltered areas didn’t happen. The smokers themselves are so self-centered too.

This conclude my journal for today.

Applying Domain Driven Design to Java Swing Applications – Part 1

Upon seeing the title, seasoned application developers or software architects who has used Domain Driven Design in their work would probably go like, “who is this idiot?”

But please hear me out: my intention is to help people with similar experience as I did.


Domain Driven Design (DDD) as a development methodology was born out of the desire to solve the complexity of building software for organisations with evolving business needs. It put focus on the core domain and the domain logic. Whether DDD is successfully applied is highly dependent on developing the Ubiquitious Language which will be used throughout the whole project, ranging from the documentations to the actual code itself. Discipline when it comes to implementation details such as enforcing proper encapsulation and applying true object-orientation by the project team is also needed. DDD as a term was coined by Eric Evans who titled his book with the same name. That book is also known as the blue book.

Complex business software are generally web-based or cloud-based because of scalability, deployment, and volume reasons. Experts who have been in this long enough, do correct me if I’m wrong. Thick clients, which have their business logic and rules implemented in the same package or executable, typically ran on the same machine as where the user do his or her work. In most cases, these applications are not that complex. They tend to only run on a few users’ computers, and sometimes for the sake of synchronization or having common data, there will be one database running on-premise in some server room within the company. However, non-cloud based word processors, spreadsheets, etc are totally different beasts. I think companies like Microsoft, Apple can attest to that since they do built productivity suites for the desktop/laptops.

In the age of cloud-based solution, web-based stack don’t need any introduction. But when it comes to thick-clients, for those who didn’t know, there are also quite a few frameworks that developers can use. If you are using Java, you will probably use Java Swing and/or Java FX, which is newer and better in so many sense. Otherwise there is the Windows Form from .NET Framework. There are also other framework like QT for C++, and wxPython for Python. There are many more but I’m not going to mention them here as it is not the point of this entry. As per the title, I will be focusing on Java Swing only.


I started as a Internal Product Developer, as part of my Diploma internship. In the name of speed, I focused on delivering solutions in the form of thick clients. Web applications need a lot more work on the User Interface side and I’m just no good at that at the start. Furthermore, given that the company I was with had only a few users. So thick client applications seemed to be the best choice then.

I was introduced to DDD late 2014 when I was just starting out my actual career after graduating with a Degree in Engineering (Computer Science). At first, it was a painful process. I had to do lots of reading, discovery work and some hard thinking. Then over the next year or so, I kept practicing implementing DDD with various of the company’s products, which are using web-based stacks such as Javascript, JSF, JEE. By the time it was 2016, I felt I was ready to attempt to apply DDD to Java Swing.

Now you must be wondering where I get to work on Java Swing. Concurrently, I had a second job. It was a freelance job with another company. I worked for that company during my internship, and went back to them after I finished my National Service. It continued all the way through my Degree program. In fact, I’m still doing freelance for them until today. It’s been nearly 7 years, excluding my internship time. Throughout the years I worked for them, applications that I built and maintained have always been Java Swing. When it comes to the codes, I know them quite well since I almost single-handedly built them.

When it comes to Swing and DDD, there aren’t many resources — I dare say, none — to help me. I mean it’s pretty obvious right? It has “over-engineering” written all over. Anyway, I had to figure out some things on my own in order to achieve what I want to do.

Getting Started

In terms of implementing DDD, how a project is structured is entirely up to you, your project team, and/or your organization. Hexagonal architecture might be a better choice in many situations. In my case, I found myself liking the project structure of the Sample Cargo Project (dddsample). In my opinion, it’s clean but I do know it does not work in all cases. For this blog series, I will be using this structure. Feel free to experiment with other architecture style if you are up for it.

In the dddsample project source codes are arranged into four main packages: Interfaces, Applications, Domain, and Infrastructure.

Screen Shot 2017-03-26 at 22.15.22

The Interfaces package generally contains all the necessary codes and implementation to support rendering of information or data and receiving inputs such as file uploads. DTOs, remote service facades and assemblers typically reside in this package too.

The Application package contains all the necessary codes and implementations necessary to fulfill use-cases and are treated as APIs to be used by the Interfaces. It’s also where auditing, transaction and logging are done. This is also where your application services reside.

The Domain package is where all the core business rules (domain services), behaviors, entities, and value objects reside. Repository pattern also come into play here.

Lastly is the Infrastructure package. This is where you get technical. Codes here are generally the implementation of domain services. For example, the application needs to talk to some external systems through web services or RPC in order to fulfill the business request or compute business rules. It’s also where database implementation take place. As the word suggest, the things here are meant to support the execution of the application. Therefore, you should also put any other codes or configuration files in this package.

I will end part 1 here. In the next part, I will be talking on how I actually apply DDD to a Swing application. I will be creating the demo using NetBeans 8.2 and going with the default empty Java application option.

Daily Journal – Mar 24, 2017

It’s Friday again. Today, I planned to continue with the tuning of the staging environment. However, in actuality, I didn’t quite get to do much with it. Simultaneously, my colleagues were doing their respective bug fixings and using the staging server. I can’t just restart the server as and when I like. So I waited until 5 or so when my colleagues are done before I get started.

So did I do anything? Well I did. I stripped out many options that I applied as part of the tuning on the development server. I also toned down on the initial JDBC connection pool. I did some test with that and the performance seemed to be rather stable but still bad. I don’t think there was much I can do. I have the suspicion that it was the host server’s problem, not the application. I also attempt to follow up with my colleague on his discovery work on performing initial loading of users from applications and assigning them with the corresponding role that they already had.

I also helped my colleague to clean up the staging environment after it was found that the customer had placed the sanitized HR file into the ftp server. This sanitized file was also what I saw the day before during the meeting with the customer. The identity manager went to pick up the new file and processed it. End result? Thousands of users were created in the system and we had to manually clear them out. As some were stuck in workflows, we had to disable all the other rules that will run once the workflows complete to prevent unintended creation or accounts at the application side, especially the Active Directory. By the way, the customer only had one Active Directory and it is the production one. Therefore, we can’t just do whatever we like with it. After we cleared the users, I went to re-enable all the rules that we disabled earlier.

Then one of the application owner, the SAP one, contacted me later in the afternoon. He wanted to ask if one of the test case he asked for during SIT was included. I told yes and it was part of the new SIT test plan. Then he also mention about the email I sent him regarding a SAP account being created with additional roles during the SIT. He told me that he tried creating one SAP account and assign it with the system role and there are no other additional roles assigned. That’s when I realized I made a mistake. I didn’t check the configuration template that I used after he raised the issue as well as checking the template before I sent that email out. So I apologize, one verbally and the other via the email. There was no point to continue to hold my ground for this case. I also went to fix the issue.

So there is a lesson to learn here. Always double check or triple check your work before sending out anything. The end result is that it may put you in a bad position.

I left the office at around 6pm. My colleagues have all left by then. Well, I tend to be the last one in and usually, the first one in office. Not that it matters caused the amount of work I did is still less than my colleagues. I would seem that I’m just not very productive.

Then once I reached home, I switched off. Went to play Horizon Zero Dawn instead until it was time to write this blog. After I was done, I continued playing until about 1am.

Here I conclude my journal for today.

Daily Journal – Mar 23, 2017

Went back office again to collect the SIT documents so that I can return to the customer during the meeting in the afternoon. Had meeting from 1 to 4. During the meeting, I also help to ensure my colleagues know wheats the purpose of a the discovery work done on migrating existing accounts into the identity manager.

After the whole thing, went home earlier to meet my friend for dinner at the ramen store at Clarke Quay. Had ice cream after that and we went home. Throughout the whole dinner and way home, we shared our views on my current work and his work style, my company’s approach, etc.

I’m feeling tired and like to rest early.

Here I conclude my journal for today.

Daily Journal – Mar 22, 2017

I’m not really in the mood to write a full length journal. So I will just go with what I have done.

  1. Tuning the application server
  2. Getting my colleague to do regression testing
  3. Updating the SIT breakdown with more information based on what was requested.

Here I conclude my journal for today.

Daily Journal – Mar 21, 2017

I’m not really feeling the desire to write anything today but as part of my commitment to write at least something everyday, I shall write up the things that happened today. Short and sweet.

For the morning work session, I made my way back to my company, back to my assigned desk. The purpose? To prepare a breakdown of the SIT test cases that include their statuses and reason for certain status. That took me a while to finish before I moved on to trying out some stuff suggested by the Product Support Team in my company’s lab environment.

Then it was 1.30 or so and I went for lunch with my colleagues and boss. During lunch, I got to say, I felt awkward sitting beside my boss after the incident last week but still, those are just feelings. It’s not professional to let it show and so I just pretend nothing’s is wrong. I did attempt to make some conversation but still, I guess I’m not used to sharing a lot with someone who is obviously much higher ranking than me. But I have to note that I can converse with my colleague, especially the one seated beside me, as well as my juniors and my manager.

Then it is 2pm, and all of us went our separate way. My colleagues (2 of them) and boss, had a meeting with another customer. I went to the taxi stand where I took a cab down to the customer’s office in Paya Lebar. I had some stuff to do there and they are as follows:

  1. Test out suggestions, respond and close as many of the support cases that I have opened with the Product Vendor.
  2. Review the powerpoint slides containing workflows prepared by my manager for some of the change request to check for spelling errors and determine if there are any issues with the business flows.
  3. Attempt to generate reports again and to send them to my manager
  4. Try out a scenario where a user is scheduled to be deleted, the user has accounts with various applications, and there is a network issue during the deletion. Then we want to see if we can resubmit the deletion event.

I would say that for point 1 and 2 was done relatively smoothly. Point 3 have some issues and it could not be done. The reports just take very long to generate. Apparently, there is CPU throttling again. Point 4 was tested by me and I found out that you need to use another application to manually delete the user’s application accounts after the network is back online.

As you can see, today is another day where I consider it to be a lull period. Of couse, in a couple of weeks time, I will have another round of nightmare re-doing parts of the SIT as well as making preparation for and doing the actual UAT.

There is of course two more critical tasks that I need to do and they are as follows:

  1. Doing discovery work on how to migrate existing accounts into the identity manager
  2. Regression testing for the fixed SIT issues.

Here I conclude my journal for today.