Welcome to Han-Sulu.com

Hi, welcome to Han-Sulu.com. The web site has been completely renovated. When this site was first launched, I've never found a focus on what I should be writing. As a result, it was soon abandoned. The abandonment was also partially caused by the fact that I was re-designing this site. To re-design this web site from ground up again, I was putting 2-3 hours a day for almost another 18 months. I hardly had the time to think about what I want to write for my blog. Eventually, I stopped updating it. Now, the new site is up, I am determined to make this blog site better than before.

What is/would be available for this blog? At this point, there is not much. The previous version of this blog is a disappointment. There is not much of a focus. Two years ago, I thought without a focus was probably the best idea I had for this blog. Now I realize it isn't. This time, my focus will be something which I can do best. The focus of this site will be technology, software engineering, and solving problem with practical solutions. To prevent losing my focus, I will use a new approach. I will be documenting the projects I am doing. When doing projects, problems will naturally occur. Solving the problems, and document the solutions, this will be the focus of this blog. I have diverse interests, it would be interesting to see what will be covered here.

Aside from the "boring" stuff, I will spent some of the blog posts to show the fun stuff I do. These posts will also be related to problem solving. Other than problem solving, there will be reviews of video games, photos I have taken (photography as amusement), posts on photography (on concepts and techniques I have learned). I know, I am probably going off track here. This time, I will remain focused. This blog site is about solving problems. Anything related to a technical problem, there is a solution, and I like to document it here. So if you the readers saw a post that is somewhat not related to IT technology, you might think I am off the track a bit, I won't go far. If I publish a post here, it will be somewhat related to problem solving, and it will be interesting, hence worthy to be shared here.

If you like to know more about me, please go here. You can find all the information regarding this site. If you need to contact me directly, you can either post comments on the blog posts or articles. Or you can go to this page, and send a private message to me. I like to get feedback on what posts are good, and what not; or ideas and request of future posts. If you like, you can also subscribe to the site mailing list to get regular updates. Thank you for visiting.

All My Recent Updates

I post updates for this site regularly. Here are some of the most recent ones I have posted...


I learned a few things recently while using Linux. First, I was able to get my old Huawei phone to capture videos and pictures using network connections. That was very easy. Next, I installed DropBox plugin with Thunar File Explorer. This was a bit tricky to setup because I have already 3 devices all interconnected. This Linux computer was the 4th and was unable to connect. I had to drop an old PC from the pool so that my current PC will connected. And the performance between my phone and this Linux PC was very good. The files are appearing on all devices seemingly immediate.

I tried to install Virtual Box for running CyberOS, but the repository and install was just not working. I tried several times and didn't work. I switched to Qemu-KVM, and the installation process is just two commands, one for QEmu-KVM, the other is for Virtual Machine Manager. And it worked almost instantly. There is however some weird things going on with the VM when I run it. I think it was CyberOS, not QEmu-KVM.

The worst was with Warpinator. The file sharing open source application for Linux Mint, and for Android. When I first installed it on my Moto G7 Power. It didn't connect with the Linux PC. Then I uninstalled and re-installed three times. They didn't work. Finally I realized that I need to open the port 42000 for the Linux PC. I closed the ports when I tightened the security of it. In order to get this to work, I have to open the port. So I did that and it still didn't work. As last resort, I restarted the PC and restarted Warpinator on both devices and magically they connected. The trick is that once I change the firewall setting. I have to restart the firewall service so that it can pick up the configuration change. And the user experience with this is really awful. Drop Box was way better when sharing files between devices. I think I will stick with Drop Box for now and use Warpinator as a backup process. All I need is something I can push files from one device to another with ease. Drop Box is fine for now.

Rewriting the blog site is going fine. I added a "Wait..." popup to the application. Also the one existing functionality I have moved over using ES6 syntax was working as well. Three days of hard work is paying off nicely.

Linux Adventures - An Update

Han Sulu
Exploring Linux, Learning Linux, Linux, Linux Mint, Open Source

It is been a while (11 days) since my last update. I was not sitting idle for all this time. I have posted two blog posts of things I have recently learned. Those are fun. One of them is regarding how to add application configuration to JDBC session for Spring. And the other is regarding enabling CSRF for Angular with Spring. They are interesting problem to resolve. And they gave me a lot of pleasure.

I also started the new project of migrating the existing code for this blog site to the new project. I mentioned earlier that I have had the services layer and data access layer all migrated, I am in the process of doing moving the code for the Admin project. This is a slow and painful process I have to redo almost all the front end coding using the latest ECMA6 script syntax and latest AngularJS code. One baby step at a time. The new syntax needs some time to get used to. Yesterday, I was able to get a "Hello World" displayed on the page using all the new syntax. I am definitely making progress.

I also got The Last of Us for PS4. And started playing it. It was a totally different experience. This game is not open world. So I had to move to specific point and trigger the progress of the game. But the game play was fairly exciting. Right now, because of the spare time work brings so much joy, I didn't even play the game during the weekend. I still think about playing games, but not as much desired as before. Completing Dragon Quest XI really lowered the urge. I tried to replay Horizon Zero Dawn, but I don't feel the same interest of grinding from beginning to end.

Recent Blog Posts and Updates

Han Sulu
Tech Challenge
Life Goes On, PS4 Gaming, Recent Updates, Site Rework, Tech Challenge

I copied all my blogging site code to my new Java project. And managed to get the services sub project and repositories sub project compiled, and integrated into my new web project. Next, I did an upgrade with the new knowledge I have acquired, such as using DB as session storage, and making all tables UTF-8 compatible.

Then I run into just one tiny problem. I use DB as session storage, and JDBC session access through injection by annotation. The only way to set the max session duration is by hard coding the timeout value as a constant and pass into the annotation. I don't want this. What I want is setting the value in the configuration file and pulling the value during startup from this configuration. And there is no way of doing this with annotation based dependency injection. I took a look at the source code from Spring, and found a way. I can take the current code base from Spring and add my own code to take the configuration values from the configuration values from database. The coding took two nights, and I made a mistake of taking the wrong code base so I had to rewrite the whole thing. In the end it worked as expected. I was pretty happy everything work out the way I have imagined.

I was playing Death Stranding. It was pretty fun. I was thinking of playing Days Gone. But that game creates too much adrenaline. It makes me harder to fall asleep. And I also got Final Fantasy XV for PS4, and The Last of Us. I think I will play the latter a bit just to get a feel what it is about. There are a lot of fun time ahead.

Hacking Spring Session Code

Han Sulu
Tech Challenge
Coding Challenge, Hacking, Spring Boot, Spring Framework, Spring Session

There is not much going on. I spent a lot of time on the new house. Order some new window screens, and a shower door. There are a lot of repair work. The old fridge is busted. The lawn is huge. Every time, it took a long time to clean all up, and so exhausting. Air conditioner is leaking water, and had someone to check and there is no problem. But wasted some money. The car had a leaking issue with the air conditioner line. Very expensive to fix it correct. I have done nothing but paying money. And the only joy was to go to the store buying some parts to make the house a little better.

The code project tutorial is done and online for a while. I am currently taking a break and doing my next site. What I am doing is copying old code from this site, then repackage it with new knowledge and making a better site for the next one. This will take a long time. I am planning the next code project tutorial. The next one will be the move-able popup modal with bootstrap, and JQuery UI. This will put my tutorial to total 39. And I will try to get the tutorial to 40 this year. After this tutorial, the next one will be the Electron.JS tutorial. This will put my tutorial count to 40. I am running out of ideas to make tutorial.

Linux Mint is great. I had numerous updates installed. The update install is quick and easy. Occasionally, I had to restart. But the reboot is also quick. This has been a pretty good experience, unlike the same experience with Windows. I also work out how to use IP Web Cam with my old phone, and it can transfer the video stream to Linux and capture as video file. I guess Life is not as boring as I thought.

Take a Break And Think About What Next

Han Sulu
Recent Updates
Cumulative Updates, Doing Side Work, Down Time, New Ideas, On Break, Project Ideas

I clean the gutter of the new house. That was fun. I bought a pretty awesome ladder that can extend to 18 ft. Then use it to get to the roof. The roof was very steep. Moving around took a lot of energy. I used a long snow remover to dusting the dirt of the gutter. There is a gutter shield installed, so the removal is pretty easy. It took two hours, but it was well worth the time. The gutters looked like haven't been cleaned for at least 18 months. I am glad that a right tool (the ladder) was there for me to do what I have to do.

The new tutorial is almost ready. It took me at least a month to plan and do this. Dragon Quest XI certainly delayed this process considerably. Then I realized my assumptions and conclusions are wrong. So I spent a couple nights to redo the sample application, which I think is well worth the time spent. If I continued with the wrong assumption and conclusion for the tutorial, it might damage my reputation. It is best to do something right. But if occasion slip up and cause some minor damage. I am OK with it.

I gotta talk about how I got the internet service working at the new house. Sign up the service was pretty easy to do via an online form. Then I can link the new account to my existing account. I bought a new modem (so that I don't have to pay rent fee). With an existing WIFI router, I was able to hook up the service within minutes. The trouble come when I tried to activate the service. And it has to be done via the mobile app. And I was not able to get the new account on the mobile application. Turned out that I have to switch the new account as the default account, then it would finally show up on the mobile app. And I was able to activate it. Took two days because I have to commune to the new place and I don't do it every day.

New Tutorial for Code Project is Almost Ready

Han Sulu
Recent Updates
Article Submission, Code Project Tutorial, Recent Updates

I am almost finished with the tutorial on how to handle the unexpected session expiration and getting login page instead of meaningful JSON object. Then I realized that my assumption and design is all wrong. The tutorial will probably be published here as a blog post. It will not be published to codeproject.com. It will probably tarnish my reputation.

Now I have to go back to the drawing board, and redo the tutorial with the new design. It will be better than what it was. Anyways, I will finish the existing tutorial, and get started with this new one. All these are pretty much research and knowledge accumulation. So the work done is not waste.

The house renovation is going as expected, there are unexpected bumps. Went on for a vacation. The air conditioning on the big car seems to be an issue. I think I can fix it with a new air filter. And I had no idea how close the Atlantic ocean front is so close, 2 hours of drive and it is there. I saw a lot of sand fleas and dead horse shoe crabs. And even saw Dolphin swimming near the coast. It was nice, but tired after two days of vacation. I had several sun burn, the worst one was on the top of my feet. So itchy. I don't like vacation. No personal time.

Has Been A While Without Much Update

Han Sulu
Distracted by Life
Distracted, No Spare Time, Recent Updates

The vacation is over. I am going to write another tutorial. This time it will be somewhat practical. It will solve two problems related to session and login in an AngularJS application. I spent a few days on the design of the application. Hit a road block. Before I fell sleep on that night, I found a solution, and it worked. I am going write the tutorial.

After Dragon Quest XI, I started the game Death Stranding. It was a great looking game. I think I liked it better than Days Gone. Oh Days Gone, I am looking at a new update of 35 GB. I have not completed the download of this update yet. After it is done, I will try again with it. Last time I played, I was able to do the motorcycle run and catch the bad guy. It is a tough game. Death Stranding is different, It looks exotic. And I was thinking of going back to Final Fantasy XV. It looks like interesting after Dragon Quest XV. I just don't know if I have the spare time for it.

Well. I better start with the new tutorial. All these tutorials, I am slowing building all the knowledge for the next cool thing. And it is going really great.

New Tutorial on Session Expire and Login Page

Han Sulu
CodeProject Tutorial
CodeProject Tutorial, Coding, IT Technology, Programming Tutorial

Dragon Quest XI, I finally finished it on 4/19/2021. Turned out that the final Boss is easy to beat once I used a trick to lower its attack and defense. And I spent so much time crafting all the perfect gears, weapons, and getting the right aid stuff. In the end, I didn't have to get the best of the best gears (like the supreme sword of light, or the spears, etc). All the party members' health never dropped below 200, and A couple omni health fixed right up. This game is so additive and I spent so much time on it. Now I can hang it up. I will not touch that console for a while.

I picked up another bad habit, reading books. Recently, I have discovered the joy of reading Stephen King's books. First I finished the book "Later". Then I finished "Everything's Eventual". Now I am reading "Hearts in Atlantis". Before all that, I was reading his "On Writing". If you want to understand his writing, this book is a must-read. Once you get through this, then you can get some new perspectives when reading his stories. I admit that it was very joyful reading his work. This fever (of enjoying books) is going to be for a while before it would go away.

I mow the lawn at the new house twice. It was tough the first time. But the second time, it was tedious, but fairly easy. The tough part is the slope side of lawn. On the second time, when I did the slopes, the engine oil got into the fuel line and white smoke came out. Afterwards, it had some leaking. Now it is fine. I won't use the mower on the slope, I will use the trimmer to do the lawn. That was a good lessen learned. I enjoyed the lawn mowing.

Dragon Quest XI, Reading Books, Relax and Recreation

Han Sulu
Relax and Recreation
Books, Dragon Quest, Dragon Quest XI, PlayStation 4, PS4, Recreation, RPG, Stephen King, Thrillers

Dragon Quest XI is a good game. The problem is that it would take so much time to get to the end. I have to not only finish the main quest, but also have to finish the side quests. There were three that I was not able to finish, the last trial of Wheels of Harma; the side quest with Legate's Blade, and the Horse Race. There is also the casino. I was lucky enough to get the Jack Pot and get the Elfin Elixirs. I heard I need a lot to finish the final boss. That takes at least 2-4 hours. There is also the need to collect all the equipment. And gather all the mini medals. That would be another 8-10 hours. See how crazy this is? This game really pushed me to the verge. Once it is done, I will stop playing games for a while. It is too time consuming.

Dragon Quest XI Took Too Much Time

Han Sulu
PS4 Gaming
Game Play, Gaming, PlayStation 4, Recreation, Relaxation

Last night, I was working on the next tutorial. It is about how to handle session timeout. The design I had so far is that I have a login page; the user will first log in. Then in the back ground, there is a little process that runs and check the back end server and get am I alive messages. When timeout occurred, some type of HTTP interceptor will catch the 403 error, then it will force the browser to redirect to the login page. Sounds easy, right?

It didn't work out. The first thing I did was setting the session time out to 2 minutes instead of the default 30 minutes. Theoretically, the heartbeat check is every 10 seconds, and it would timed out by the 12th check. But it never timed out. I can't figure out why. The first thing I did was try to figure out if the timeout configuration is correct. So I reconfigured the previous tutorial sample with 2 minute time out. And it didn't work because with JDBC session access, the application properties configuration of session timeout value didn't work. So I assume that the session time with the new application is not working either. But they were two problems.

The first problem is that with JDBC session access, you cannot use the application properties file to set session timeout value. It has to be hard coded to the annotation @EnableJdbcHttpSession. And this has nothing to do with the never-timeout issue with the current application. The current application uses the heartbeat check and every check would set the last access time to the current time, then expiry time would be 2 minutes of the up-to-date last access time. So with the recurring heartbeat check, the session will never timeout. Interesting eh?

Once I changed the heartbeat to every 3 minutes, and in 2 minutes the session times out, so the session timeout finally happen, and the 403 error didn't occur. Instead, a server redirect happened. That is a 302. I have not yet added the HTTP interceptor, and I can see that what I am imagining is not happening. At this point in my life, what i can imagine in my head, I can write the code to make it happen. When my expectations are not met, I need to find an alternative.

The Tutorial on Session Timeout

Han Sulu
CodeProject Tutorial
Code Project Tutorial, Design Challenge, Technical Problem

After finishing the tutorial on how to use MySQL Db as the session storage, we bought a house. And I decided I will take a week off not doing any tech stuff. I went on a binge of game playing. Tonight I will continue with it. This game Dragon Quest XI, there were so much things in it that one cannot feel finished until most of all are finished. It is very time consuming. At least I was having fun. It is being 140 hours. I hope I don't have to spend 200 hours to finish this game.

What I have been doing with research is very fruitful. Instead of blindly starting another project, I spent the time research on how to do thing right. I have discovered quite a few things that I have missed when I was busy with a project. Now that I am collecting all the ideas and bits and pieces I can use in my projects, I believe I can be more successfully in the future.

The next tutorial is going to be research on how to detect the end of authentication session for an AngularJS application and redirect it to the login page. This is an unsolved security issue and I have a solution, just need to test it out.

On a Break

Han Sulu
Life Goes On
On Break, Recent Updates, Recreation, Rest

Another code project tutorial is about to finish. I slowed down so that I don't feel stressed. Right now I feel more of the urge to complete the game Dragon Quest XI. I am in Act III and am going through all the places that I have visited to redo all the boss fight, then I will take the fight to the Lantern. It feels like I need to spend total 200 hours on that game and only completed just half of it.

For the session management tutorial, who would imagine the configuration is so simple, just create the table in the database first, then add the new database as a dedicated data source for the session and that is it. If I knew is this easy, I would have used on this site. Eh, this site works, I am the only user so probably no need to update it. I am thinking about it because since it is so simple.

There is a bug in the current Admin site, I need to fix it. It was the center align row. The word "class" was spelled wrong. I will fix it in a few days. No rush. Next, after the tutorial, I will write my experience of fixing the MySQL server for this site as a blog post. A lot of good stuff is coming. I feel very productive.

Another Tutorial is About to Be Done

Han Sulu
CodeProject Tutorial
Article Submission, Code Project Tutorial, Session Management

Click here for more site updates.

Recent Photos and Pictures

I love taking photos, and creating drawings. In this section, you will find all the photos and pictures I have created recently. Please enjoy.

Click here for more photos and pictures.

All My Recently Published Articles

Here are the articles which I have recently made public. Please enjoy.

Session Management using MySQL and Spring Boot


This tutorial is originally published on April 29th 2021. This is another one of those things I didn't quite get it, and I wanted to learn. The online sources are not great, so I had to figure out what better alternative I have. And I was able to figure out. This tutorial will offer readers an alternative way of designing secure applications with DB as session storage.

Han Sulu     06/23/2021

Design UTF-8 Encoded Web Application With Spring Boot, AngularJS and MySQL


This tutorial was published this year on April 14th. It is about how to design the MySQL database to hold UTF-8 encoded data, and how to implement the back end REST API and MVC application code to handle UTF-8 encoded string. It also discuss how this can be tested. This tutorial finish my wish of learning how to design a multi-language supported web application.

Han Sulu     06/23/2021

Create AngularJS Application with ES6 JavaScript and Modules


This tutorial will introduce to readers the way of creating a AngularJS application using ES6 JavaScript and Modules.

Han Sulu     04/13/2021

Using ThymeLeaf Page Template Engine with Spring Security


A tutorial on how to setup an application Spring Security and Spring MVC, and use ThymeLeaf for secured page rendering.

Han Sulu     02/27/2021

Reusable AngularJS Component: Warning Stripe


In this article, I will discuss how to implement a warning bar (div with class alert alert-danger) as a reusable directive. It also show how the directive can have two-way data exchange between the directive and the host component. Hope you will enjoy it.

Han Sulu     08/14/2020

How to Load and Display Hierarchical Structured Comments


This tutorial will show you how to load ad display hierarchical structured comments using RESTFul service and Javascript.

Han Sulu     07/21/2020

A Tutorial on Stapes JS - Reusable HTML Editor


This tutorial will show how to design an HTML editor using Stapes JS and JQuery. StapeJS is the one I will be use in combination with JQuery and RequireJS to web applications, which does not utilize the angularJS framework.

Han Sulu     07/12/2020

Click here for more articles.

All My Recent Blog Posts

Here are the blog posts which I have posted recently. Please enjoy.

Enable CSRF Token in Spring Security for AngularJS Application Use


This is a very simple tutorial on how to enable CSRF token as an added security measure for Spring Boot application integrating with AngularJS.

Han Sulu     07/15/2021

Quick Sketch of Hacking Spring Session


In this short blog post, I will discuss how to hack the Spring Session code so that I can load the configuration values from the configuration file then pass it to the Session Repository creation. This should surpass the limitation of specify constants via annotation.

Han Sulu     07/09/2021

Broken MySQL Server and What to Do


I accidentally broke the MySQL database server on my server box, via OS upgrade. This tutorial goes in details on how to trouble shoot the issue and how to resolve it. Hope this is useful for any reader who faces the same issue. Thanks for reading.

Han Sulu     06/24/2021

My Linux Mint Setup and Configuration


Recently I switched my development PC to to Linux Mint from Windows 7. This post is to show you the reader how I made the switch, including the preparation work I have done, the buying laptop process, the process of installing the new OS, and the add-on software I have installed. I also described the simplicity of upgrade the OS to a new version. And the testing I have done to make sure everything works.

Han Sulu     01/24/2021

AngularJS FormData Multi-part File Upload


This post is to discuss how to upload files using FormData and AngularJS $http object. This is something I didn't quite figured out when I designed this site, Recently I have figured out how this works, and I will have to redesign the upload functionality for this site. It is going to be fun. This post is to show you the reader how multipart file upload works.

Han Sulu     01/04/2021

Introduction to ThymeLeaf - Integration with Spring Boot


This tutorial is an introduction to the new rendering engine ThymeLeaf. My goal is to learn enough of it so that I can use it to replace the old tech I was using. The most important aspect of this tutorial is how to define reusable parts, then assemble them into a page. Then the next important aspects are the four different ways to render basic texts on the page, render plain text for an element; render html text for an element; render a collection of items, and use the if-else conditions.

Han Sulu     10/13/2020

Tutorial Blog: How to Use Bootstrap Span Elements with ngRepeat


This is the latest tutorial I have sent to CodeProject. It offers two different solutions to a very simple problem. The problem is simple, but without some out of box thinking, it cannot be resolved easily. In this tutorial, I first tried with a somewhat complicated solution. Then I realized the solution can be simpler, so in the same tutorial, I offered a second solution. I hope you enjoy.

Han Sulu     09/08/2020

Review - Motorola Moto G7 Power Unlocked


The first review from han-sulu.com. I bought a Motorola Moto G7 Power unlocked cell phone. Since I got it, I was very pleased with this phone. It will be with me for a long time. It has a huge battery. With how little I need for a cell phone, this phone provided everything I needed. I as extremely pleased with this purchase. And this post will discuss all this.

Han Sulu     08/02/2020

Click here for more blog posts.