Posts

Showing posts from 2022

Driving Test was passed

Image
Hurray! I passed the driving test! Driving isn't a rocket science, yet it's still a challenge, especially when there is noise surrounding your determination, such as "You're a coder, not a driver"; "You're too old to learn driving"; "You're going to a centre with the least passing rate", etc. Leaving your comfort zone can be intimidating, but when you take a leap, you open yourself up to new experiences, opportunities and growth. Embrace a new change with an open mind and a positive attitude. You'll be pleased at what you can achieve.

Merry Xmas 2022

Image
  Lunch @ The Fox I felt trilled when actually meeting up the colleagues who I used to meet online only. The tradition Christmas party in a tradition pub made our gathering warm.

Event: Comparing Native Java REST API Frameworks with Matt Raible

Image
Manchester Java Community hosted a meetup with a fantastic speaker Matt Raible in Infinity Works 's office. Matt compared the startup performance and memory usage of Spring Boot , Micronaut , Quarkus and Helidon frameworks. He built a REST API application secured by OAuth 2.0 and ran the application in Docker with the four frameworks respectively. His slides and related resources can be found at Comparing Native Java REST API Frameworks - Manchester JUG 2022 . Here is my thought after the talk: Java is still hugely popular and widely used ( Yay! ). The community should contribute to the language to encourage more younger generation to adopt it. Use SDKMAN to manage multiple JDK in a local computer Use HTTPie which is better than cURL for testing API Test OpenID Connect requests and debug responses with OpenID Connect debugger Build optimized Docker images for your Java applications with Jib Compare with startup time which does matter for Serverless Tak...

Unique Random Numbers

Thanking Java's stream feature, it is easy to generate a list of unique random numbers. For example, we want to pick up 6 lucky numbers for Lotto which ranges from 1 to 59. new Random().ints(1, 59+1).distinct().limit(6).sorted().boxed().collect(Collectors.toList());

J Forum

I joined an online conference called J Forum which explored the current state of Java ecosystem, ahead of this September's release of Java 19. Here are some takeaways: Garbage Collector Ergonomics . There are several GC selections for various situations. Here are the recommendations: Serial: single core, smal heaps Parallel: multi-core small heaps; batch jobs with any heap size G1: responsive in medium to large heaps (request-response/DB interactions); only when processors 2+ and memory 1728MB+ Z: responsive in medium to large heaps (request-response/DB interactions); JDK 17+; Pause < 1ms Shenandoah: responsive in medium to large heaps (request-response/DB interactions); JDK 17+; Pause <10ms GC Tuning does not only rely on setting heap size ( -Xmx for well-sized workloads,  -XX:MaxRAMPercentage for workloads to be scaled along container memory limits, -XX:ActiveProcessorCount ), but also understanding the workload. You should select appropriate GC and have enough...

YFinance4J and Java 17 New Features

Java 17 as LTS has been released since Sep 2021 while Java 8 remains widely used. I have prepared a Java library for Yahoo! Finance called YFinance4J to demonstrate some new features after Java 8. Hopefully the new features may tempt you to switch.

Event: Deploy to the cloud with Github Actions

Image
Manchester Java Community hosted an event in a dog friendly office of Kin + Carta . We learnt about digital transformation experience as well as Brian Benz live coding with Github and Azure new features.  Digital Transformation experience is about to transform an enterprise to agilely adapt the digital technology, such as API Gateway and Cloud Routing, to bring better user experience. Thanking the cloud advocate Brian, he brought us Octoverse Report about better performance and well being for developers. He also showed us a fun feature of Github Co-pilot as an AI pair programmer as well as more practical features in Github: Github Codespaces and Github-hosted runners . Certainly the key topic Brian demonstrated is Feature Filters in Azure App. This new feature is helpful for A/B Testing and Blue-Green Deployment. I was feeling chilled when I had a chat with participants in person. We shared our struggles in WFH and our daily coding works.

Effective Java

Image
Effective Java is one of must-read books for every Java programmer. Certainly this book does not introduce Java syntax, it does not instruct what Java libraries or frameworks are popular. Instead it explains best practices of Java programming in detail. This book makes you how to code in Java like an expert. This book covers 11 topics as the following: Creating and Destroying Objects Methods Common to All Objects Classes and Interfaces Generics Enums and Annotations Lambda and Streams Methods General Programming Exceptions Concurrency Serialization The first three chapters talks about how to start Java code designs. Instead of constructors, you should consider other methods like factory and builder. Which and how you should implement common methods like toString, equals, hashCode. Some rules are actually parts of Object-Oriented Design principles. The next three chapters involves some key usages of Java: Generics, primitive types, auto-unboxing and Collections are commonly used and yo...

Designing Data-Intensive Applications

Image
Designing Data-Intensive Applications introduces diverse landscape of technologies of storing and processing data. It covers from fundamental concepts, distributed data and data processing. This book does not tell you what software or how to build a data related application. It rather talks about how data systems work and their design concerns. The book starts with non-functional requirements such as reliability, scalability and maintainability. Then it jumps data models which are associated with birth of NoSQL and ORM, thus query languages. The next chapter deeply dives into storage which is a common topics of traditional databases, e.g. Hash Indexes, Sorted String Tables, Log-Structured Merge-Trees, B-Trees. The topic is also extended to OLTP and OLAP, data warehouse. In the last chapter of the first section, it turns to topics of encoding formats such as JSON, XML and binary and dataflow services such as REST, SOAP and RPC. The second section is about distributed data. It starts wit...

Cartwright Gardens, London

Image
 You'll find another you at the end of the road. Who know?

Java and I

Along the release of Java 18, dev.java published an article about Java Platform Revolution . Truly Java 8 is still one of the most popular and widely used Java version. It is not only because of the great features the article mentioned, but also the new commercial scheme has been introduced since Java 8. Anyway, Java 8 is an unforgetable milestone of Java history. Another unforgettable Java version is, in my opinion, 1.4, which came with many features, such as Regular Expression, Cryptography, Logging, Non-blocking I/O, XML, etc, to modernise the programming language. I made my first application - Secure Chatbox Server-Client in Java twenty years ago. I posted a few articles to Tech Republic for Java 1.4. Running a Java application was a nightmare at that moment. I remember that starting an Oracle application built in Java allowed me to take a nap. Running a Java applet could use up memory of your computer. It has taken a long time to rebuild its image. Nowadays Java has been wi...

Clickstream Collector

Image
"This is My Architecture" is an inspirational video series produced by AWS. HK01 shared their Serverless Clickstream Analytics Architecture in the program. Inspired by that, I created a tech stack at  https://github.com/tekichan/clickstream-collector to demonstrate how to build a Clickstream Collector in AWS Serverless Architecture. In addition, inspired by a TV program, I built Touchwood App at https://tekichan.github.io/clickstream-collector/ as the demo frontend. Hopefully the app may bring you fortune. 😉 我阿媽話「講錯嘢要 Touchwood」。好似我咁。每日都講錯好多嘢,每日都發生好多唔如意嘅事,但就每次都搵唔到塊wood嚟touch。 有人話「樹木喺有靈性,touch一下就會有好運」,呢個app入面就有好多款wood可以touch。 有時唔只喺講錯嘢,得閒touch下都好,或者都會帶來好運。大家都try try,就算明知無用都好。 - Never @ IT狗

Statistics Tutorial via Python and Jupyter

You know what? The average salary of Data Scientist in London is £74,644 in 2022. I have created a tutorial about Statistics via Python and Jupyter . The tutorial aims at beginners who are interested in Data Scientist career and want to master Statistics and Python, considered as fundamental knowledges of Data Science. URL:  https://github.com/tekichan/statistics-tutorial