Skip to main content


Showing posts from 2020

Scripting with Java

I think Java is quite verbose for scripting. However, it can also be fun. I wrote a very simple experiment of ls command. You should try it out. Download file ls and chmod +x ls then you can run ./ls . There are no flags/options supported.😆 - ninjahoahong

My books review: Money for the rest of us

Overview: The "Money for the rest of us" book is a list of 10 questions serve as a guideline to invest. It is light book with not many pages and can be read during commute time. The book does not require audiences to have any special knowledge. My impression: The author, Mr. David, is very friendly and patient to answer my questions. The 10 questions are greatly explained by the author, and I think they provide a good starting point. However, I think anyone who wants to invest should build their own checklist and a general guideline for different situations. When a general guideline is in place, the decisions need to respect the guideline in order to make consistent decision. Consistency , in my opinion, is the most important in the long run as it provide information for constant feedback and improvements. Overall, I think this is a good book that helps improving my decision making process. - ninjahoahong

Use SwiftUI preview with UIKit

In my opinion SwiftUI preview is the most useful feature in SwiftUI if you want to work with older version of IOS. In this post I share how I set up my project.  Create project like showing in the pictures:   Delete the unused ContentView which use the SwiftUI.   Modify AppDelegate as follow. Create MainView (UIView) and MainViewController (UIViewController). Adding these previews functions into MainView and MainViewController. Build the project and refresh Canvas. The previews should show now. You can try to change a background color of the ViewController and see the change take effect immediately. Like in the video: Finally, Link to the code. - ninjahoahong

A starting project example for Spring Boot 2 with Postgresql, Swagger2, and JWT

Inspired by my colleague, I have spent some time putting together a Spring Boot 2 starting project. Audience: Developers who would like to have a structured Spring Boot 2 project to compare. Link to the repository: spring-boot-example Dependencies: Spring Actuator for management lombok for easy annotations swagger and swagger-ui for docs Spring devtools for dev Spring security for signup and login postgresql for database jpa for database access jjwt for jwt in java h2 for database using in test security test for testing security stuffs Spring Boot Starter Test for testing boot application What in the examples: Simple sign up and login. Simple Rest API demostration. Auto database migration with Flyway. Auto documentation generation with Swagger2 Build with gradle. Running locally with Docker + docker-compose. Store data in Postgresql database. Init database with startup sql-script. Some unit test for the Rest API. Reference: My colleague proje

Resources for learning to get Cloud (AWS, Azure, GCP) Architecture Certifications

In this post, I would like to share a quick notes on the resources and my learning to get three cloud architect certifications: AWS Cloud Certificate Solution Architect Associate, Google Cloud Solution Architect Professional, Azure Az 300. I hope it help and good luck to your exams. AWS Cloud Solution Architect Associate This is the most details exam in all three exams that I took.     * Time I have spent to learn: roughly 150 hours.     * ACloudGuru video course in Udemy.     * Udemy practice exams.     * Tutorial Dojo resources [1]     * Practice with the web portal. My learning:     * Going through the highlevel overview by Watching 10000 videos.     * Doing practice exam to figure out what I do not know well.     * Reading the docs about the not know.     * Going to the portal and practice that thing. Google Cloud Solution Architect Professional This is the most general exam in all three exams that I took.         * Time I have spent to learn: about 30 hours.     * GCP c

Packing lightly to save our environment

I am checking for a new trip with my favorite airline - Finnair. And I have notice that if everyone takes a small action as packing less 1 kilogram of baggage can save a huge amount of fuel. Therefore, the small action can also save our environment. "If possible, take direct and short routes, combine different forms of transit (for example, a train journey with a flight) and fly with airlines that use modern and fuel-efficient aircraft fleet. You can also directly influence the fuel consumption by packing lightly. If every Finnair passenger would have travelled with one kilogram less baggage in 2018, the fuel savings would cover 20 flights from Helsinki to Tokyo." Reference: - ninjahoahong

Games I have played: Sugar Blast

Recently, I have played a game made by Rovio Entertaiment, the Angry Bird maker, called Sugar Blast. Following you can see the main scene of the game. Personally, I really like the art style of the game especially those cute mini figures. I have not found a game very interesting with challenges such as the "choco challange" show in the following pictures. The challenges usually last several days and the top 3 will get gold, silver, and bronze medals. The player will get match with players of similar levels so that the race is more exciting. Beside the challenges, there is also event such as caching rainbow candies or stars which will get the player different in game rewards. In addition, a player can create a team or join another team created by other player. Below is a video on a demo play. In the demo, I have played a level using special skills such as the magic guy to re-arrange the layout and the "powers-up" to bomb a large area. There is