This page lists all the site updates. These are short posts that describe the events in my life. These posts are frequently added here, but have less content than the blog post or the article pages. I like to post one everyday so that I can go back and check what series of changes for an extended period of time. These site updates also track the progress of various projects. Some of them might contain funny stuff, anything that can entertain the readers of these sites. Hope you enjoy them.
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
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
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
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
I have done it, Dragon Quest XI, all characters are raised to Level 99. It was so easy. Before I raced to the end of Act II, I was grinding for levels and spent a good 8 hours on Hotto Steppe. The main character was set to Level 82, and every one else's level is at at least 70, some are at Level 77. When I got to Act III, surprise, the rest of the characters were brought back to the level at the end of Act II. Then the combined Pip-Up of Hallelujah and Electro Light, two hours every one got to Level 99.
This game is quite ridiculous in terms of the time you can waste. With the hunt of treasure boxes, mini-medals, side quests, and all the Boss battles, I hd a lot of fun, and it is too much. I feel like once I am done with this, I can rest for a while, not playing games. It was really fun, but it is over the top. I can put the console away for a while and do something constructive and not so time-consuming. But it is not done yet, for Act III, I have to go though all the boss battle all the way again. It is still a long way to go. I did have a lot of fun fighting the Metal Slimes.
I started another tutorial. This one is fun, I wanted to learn how to use MySQL database as the storage for Session management. As I researched the ways, the one that was available, is not what I needed. And I found a different way to do it. That will be the tutorial. The sample application is done. I am about to write the tutorial.
Dragon Quest XI - All Characters Level 99
Years ago, I recycled an old MacBook. Before I have done that, I removed the hard drive. It has been sitting there in the tool box. I sometimes worried that if it leave out there for too long and it will go bad. The hard drive is a 2.5 HDD SATA 5400 RPM, 80 GB capacity. It was really old (over 10 years). A week ago, I decided to but a hard disk case so that it can become a portable external hard drive. The case would provide some protection to it.
On the two long sides, there are four TORX screws. You know, those star shaped screws which only special screw driver can screw in/screw out of them. I don't have such screw driver, and when the HDD case arrived, I cannot put the hard drive in. The screws were in the way. The case however, is good fit if I can get the screws out. It was frustrating that I am so close. The first thought I had was, I need to buy some new screw drivers, wait for them arrive, then I can unscrew these damn screws and I can fit the drive in to the case.
That would take a few more days. And this realization just make me upset. I don't need a new set of screw drivers, they come and I use them once and never again. It is a waste. The screws were sticking out. The next thought I had is that I have some pliers, why don't I try use the pliers to hold the screws and twist them out. It was a brilliant idea out of such frustration. I twisted the screws out. Then I fit the drive into the case. This is another example of how a person can think outside of the box and win. And in the end, I won.
Unscrew the TORX Screws with a Pliers
Last night, I have finished the 2nd Act of Dragon Quest XI. It was very long. In order to get to the final battle, I have to go floors up, and there are a lot of monsters. I tried to get around these since I don't need the experience any more, the Luminary is at level 82, and all the companions are at level 70s.
Did my best to get around these monsters, and there were places I need to get to. The monsters would block, and I had to fight them to get through. The point is that, I have to go all 4 floors to clear the path from the 1st floor to the top. Finally I got to Jasper Unbound and it was an easy fight when I used all the tricks that was described online. Then I have to save the game, which goes all the way to the bottom of the fortress. From there I can fly all the way up to the 4th floor and meet the final boss.
And Mordegon is easy. The first round, it took like 6 turns forme to win. Then the 2nd round, it took about 8 to 9 rounds, and all my guys were in full health when Mordegon got dropped to the floor. And I got the ugly sword. It was expected since I spent so many hours to grind to the high level so that I can get the bad guy easily. This is the single most addictive part of this game, Everything is predictable and if you do the work, you get the reward. I am looking forward for the next 100 hours for the 3rd Act. Stay tuned.
CodeProject tutorial is almost complete. I also went to the Cherry Garden today and took some nice photos.
Dragon Quest XI Mordegon Beaten
Almost a week has passed, I just started writing the tutorial on the web application supporting UTF8. Writing the sample application is like being in the breeze, cool and comfy. But writing the tutorial is just hard. I had to organize my thoughts and put it on paper. And I have to make it good enough to read. It is not always easy to do.
There was one problem with work, and recently was resolved, Apparently, the Web Accessibility in Chrome can really screw up the rendering of a page. I had to help the BU users to disable Web Accessibility. Anyways, I consider the issue resolved. It was unbelievable three weeks of going no where.
The new car is great. Tax 2020 is completed. I think I have two weeks I can get some work done. I plan to get the tutorial completed. That is the most important. I also need to publish the previous tutorial here at this site. I got time.
Dragon Quest XI has been unbelievable. I got all the crew back in Act II. And got everyone all the right skills, Then I started farming metal slimes. I got the Luminary to level up to Level 80. Now, the crew is in the Fortress of Fear. It is quite addictive because it is predictable and easy to get the high of accomplishments of doing the quests. I can see the great appeal of such game. Anyways, I will play some when I have the time, but I will be focused on getting this tutorial done.
The New CodeProject Tutorial is In Progress
The past few days has been a roller coaster ride. One luxury car is completely destroyed. It is replace by another. The Justice League movie was simply awesome. And I watched it multiple times. This is why there is lack of updates here. I was not just playing and not working, I did finish the enhancement for setting category and keywords. And I deployed the change.
But, what I had to do before the deployment did cause a huge scare for me. I started the night with update of the software packages for the web server. It was easy and took a few minutes. Then I rebooted the server. Everything works. Then I saw the info that I need to upgrade the OS from Ubuntu 18 to Ubuntu 20.04. I have done one before and it was a breeze. So I thought this would be quick and easy. No. The upgrade took like 20 minutes because software packages are needed to be downloaded and installed. During the long installation. There were errors. MySql server was not able to start. I figured it is something a reboot will fix. It didn't. Then I tried to manually start it, and it was not there. I had to Google to find out it had to be unmasked. And I was still not able to start it.
At first, there was no log output. Seriously no log output. Someone online suggested that run "mysqld --help" and see what type error would be output, that actually helped. So it was my "my.cnf" had some bad configuration. I tried correct it, and it was no help. Then a light bulb lit up. I have did configure my Linux laptop with the same configuration. I could just copy the same change to the configuration files on the server and it would work. So that was what I did. I deleted the bad line from the "my.cnf" and added the good line to the "mysqld.cnf". The copy didn't work as expected, and I corrected one more time and the MySql server was finally up. And the site was back online. Then I was able to deploy the enhancements. Yay!
This taught me an important lesson. I need to backup the data when I have time and restore the site if needed. I will do the first back when I have time. It took a few steps, and it is not very easy, but it is do-able. It would save me from losing the important site data.
What a Scare - Server Upgrade and Site Down
Yes, I saw the Snyder Cut. It was awesome.
The connection was not very good, so the HBO Max disconnected a few times, Still the movie was really good. It is way better than the one that was released earlier. Just having the privilege to see such creation was unbelievable. I always liked the superhero movies from Zack Snyder. I liked "Watchmen", "Man of Steel" and director's cut of "Batman v. Superman" (although I didn't like the monster Doomsday). This new Justice League just tops all that were before.
One central theme I am looking at is the effort that was put into making such a movie, an additional $70 million on top of the $300 millions that was before. The master craftsmanship that was put into making this movie, with much better fight scenes, better dialogues, and better of everything. One thing it is clear, to produce world class product, one must put great effort into the production of it. This is something I strive to do, and do better.
I took the nights off to watch the movie. Before, I was making some good progress on the site, the keywords and category popup is already integrated with the page content editing, and the resource upload page. Just a little more time, I can get them into the other pages. Once this is done, I will go back to the tutorials.
Snyder Cut
I just completed the third Code Project tutorial a few days ago. It is for the ES6 script and AngularJS. I wrote the sample app during the holidays, and the tutorial just two weeks ago. Everything was smooth. After this is completed. I took some break. Right now I am adding some new feature to this site. There was no functionality to show the existing keywords, and categories from past postings. I am writing two different popups that will be used to choose category and keywords from existing categories and keywords pool. This also gives me an opportunity to see what existing categories and keywords are.
During the weekend, I started on the sample application for using Google's OpenID for authentication. I got to the point where the OpenID is setup. Then I decided I don't want to start another tutorial. At that point, I went back to Dragon Quest, I am almost 100 hours into that game, with a lot of hours logged. I am at the point where I defeated the sea monster Alizarin. And I am at the northern town with the Gold Fever. It was very nice. Anyways. I am thinking of getting the functionality of this site done. Then I will go back to the tutorial. And I am going to enjoy the video game for a while. What a great life.
Third Code Project Tutorial Published
On 02/27 and 02/28, I took an external hard drive and copied all the data from it to my Linux OS. What I wanted to do was clean up the disk, then re-format it on a Mac computer so it can be used with Mac. Turned out the whole idea was bad. It was easy to copy the files off. Took about one hour to do that. Then after the re-format using ExFAT format, the copy became really slow.
I tried all kinds of ways to speed up the copying, and was not able to do it. There is one tip offered by the open source community, turn off the swap file, and update the system data transfer cache or something. But it didn't work. Then I reformatted the externl hard drive with my Linux OS to NTFS, And copied some files on it, and it couldn't be read by Windows, same with the ExFAT format. In the end I had to copy the files to another NTFS formatted external drive, then dump it to the Mac PC, and reformat the original external drive to ExFAT format, then copy the files over. Again, the copying became slow. In the end it took 10 hours to copy everything over.
I guess there is something wrong with the hard drive itself, not a problem with the operating system. But the whole weekend was wasted on this little work.
A Curious Case of External Hard Drive
One thing bothered me about my Linux laptop was that I cannot use the scanner on my Brother MFC printer. The printer was detected and usable right after I installed Linux OS. The scanner, Nah.
Today, I decided to make another crack. From printing a page, I found the printer model number, and I searched online, turned out there is a Linux driver for the printer I had. It was after all a 5 years old, there should be a scanner driver available. On Brother company page, I entered the printer model name, and there is the option of a Linux driver, DEB or RPM. I chose the DEB file. Then the page will list out all the links, One of them is called Scanner Driver 64 bit DEB Packager. The description stated, This is the Scanner Driver. There it is. I downloaded, double clicked and installed. The output said, "This driver has already been installed." Then I started the app called " Document Scanner". And it found the scanner. But when I tried to scan a sample document. It said cannot connect to the scanner. WTF?
After searching online with no short and good answer, I decided to reboot the machine. Just like old Windows OS, the restart did the trick, and I was able to scan a document. And the resulting PDF is much more clearer than the scanning done on Windows. This clear document that was scanned opened so much opportunities. Think about drawing and keep them as digital arts. And use drawing and combine GIMP editing, it could make something greater. Linux is the greatest!
Installed Scanner Driver on my Linux Laptop - Works!
While creating the last update, I discovered yet another bug. It was introduced during the functionality change to use FormData and multi-part file upload. Apparently, the default file size for upload is 1MB. In order to change this default size, I have to add something to the application properties file. I forgot to do it. Stupid. This bug is also apparently in the tutorial I have sent to codeproject. I don't care at this point. But I will fix it in the tutorial post at my blog. I was over-confident about the stuff I put out. Anyways, it is fixed and deployed.
For the past few days, I have been working with electronjs, doing a simple NotePad application. I installed node.js for this (which I thought I wouldn't do anytime soon. Guess I was wrong). It turned out to be a fairly nice application development framework. It is incredibly useful for a developer when he/she knows JavaScript fairly well, and like to do multi-platform supported apps. Turn out I am good with JavaScript and had a keen interest with Desktop application development. So it was a pretty cool thing I found. The app will not take too long to develop. Once that is done, I will start working with the tutorial of ES6 with AngularJS. Good times ahead.
Fixed yet Another Bug for This Site
Finished another tutorial for code project. I will post it here tomorrow. This tutorial took a while, and it was done. As I have stated in the tutorial, there are some unanswered questions. For example, if I use CSRF tokens, how do I use them in an AngularJS application. There is a way, I need to figure it out and write a tutorial for it. Another one I posted in the tutorial is that how do I use OAuth in Spring Security and how do I add role based authorization to it. Another tutorial for that. You might ask, what about the next project?
Well, I am collecting materials for the next one. And for this web application, I am planning some enhancement to it. I will add new buttons to browse existing category and keywords, so that they can be added to the posts, updates, and resources. This is planned to complete in this year. I also find some more issues to the web application and I will fix.
As for life, recently I saw French movie Nicky Larson et le parfum de Cupidon, which is based on Japanese comic book City Hunter. Fantastic movie. very funny and very close to the comic book. I was a big fan on City Hunter. So the movie was a delight. These books were from a long time back and I remember very little about the details. What I can remember was how well the drawings were. It was amazing what artists can do with their drawing pen. What is more amazing was how live action film can do these days to recreate something that was only possible on paper 20 some years ago.
Another Tutorial Completed and Sent to Code Project
I bought a HDMI to USB-C video capture device, and a Mini-HDMI to HDMI cable. They arrived on Sunday 02/07. I took them for a few tests, I was able to connect my Nikon D5100 to my Linux PC, and I can use OBS Studio to record the preview data with D5100. And the end result is disappointing. The video was recorded with the data that was show on the LCD screen of the camera, it was low quality. There is a red focus box on the screen and cannot be removed. The overall quality is worse than the embedded cam of the laptop. The mini-HDMI cable will be put into storage for a while.
I tried another test. Connecting the Linux PC to my Playstation 4. It was working. But the end result is still a disappointment. The recorded video at 1920x1080, it was slow like snail and the audio is at much faster pace than the video. And when record at 720x480, the video was extremely smooth. However, it was so small on my laptop, the game was unplayable. I tried the last setting, play at 1280x720, still too small on the laptop. And the video is very staggered. The reason is that it was running at 24-29 frames per second. And only when it is running at 60 frames per second would make it truly smooth. I connected PS4 to my Linux PC, then PC to the TV, and the game is playable.
Overall, the end result is disappointing. I am extremely happy that a price at $17, no-brand HDMI to USB-C video capture device works on Linux as a USB video input source. But the disappointment with the performance is not something I should be happy about. I got what I paid for. The Linux laptop is crappy, and the video capture device is crappy, the overall performance will not be any good. I am satisfied now. I bought these stuff because I want to get the experience of setting up the video streaming of the game playing. This setup have taught me that it is not hard. Even with Linux PC as the video processing hardware, setting it up, takes only $17. To make it best, I need to spent a lot more equipment. All I want is to capture some gaming, and feel the experience. I am happy with what I got.
Linux on a Laptop - An Update (2)