Test code is like a box of chocolates

Coding •

Test code giống như hộp sô-cô-la, bạn sẽ không bao giờ biết mình sẽ nhận được gì… cho đến khi nó bị lỗi!

Test code is like a box of chocolates

Jsonize with custom field name in TypeScript

Coding •

A step by step discovery of how to customize JSON serialization and deserialization in TypeScript.

LeetCode starter kit

Leetcode •

Một vài toolkit và tips cho những bạn mới bắt đầu với LeetCode một cách hiệu quả. Bên cạnh đó, mình cũng chia sẻ một số nguồn tham khảo để học về thuật toán và cấu trúc dữ liệu...

LeetCode starter kit

Tôi làm gì khi tôi review code

Coding •

Code review không chỉ là kiểm tra chất lượng, mà còn là cơ hội để nâng cao kỹ năng và xây dựng sự đồng cảm trong team. Bài viết chia sẻ những nguyên tắc mình áp dụng khi review, từ cách giữ thái độ khách quan, tránh dùng “you”, đến việc thoả hiệp với tech debt. Hy vọng những kinh nghiệm này sẽ giúp bạn trở thành một reviewer hiệu quả, góp phần cải thiện cả chất lượng code và cả team...

Tôi làm gì khi tôi review code

Leetcode 1653: Minimum Deletions to Make String Balanced

Leetcode •

In this post, I share my approach to solving Leetcode problem #1653: Minimum Deletions to Make String Balanced. This challenge involves deleting characters from a string to ensure no 'b' precedes an 'a'. I discuss my strategy and experience aiming for a 100% success rate...

Leetcode 1653: Minimum Deletions to Make String Balanced

Use ADB to backup and restore local data for testing 2

Android •

Revisiting the use of ADB to backup and restore test data, addressing changes since Android 10 that restrict file saving to app directories. Also exploring how Android Studio's Device Explorer manages to save and upload files despite these restrictions...

Leetcode 148: Sort list - with Radix sort

Leetcode •

Exploring the implementation of Radix Sort to solve Leetcode problem #148: Sort List. The approach involves using a base of 10^exp and running the sort 5 times to cover all possible values, with detailed steps and code provided...

LeetCode 321: Create maximum number — a dynamic programming approach

Leetcode •

Discussing a dynamic programming approach to solve LeetCode problem #321: Create Maximum Number. The problem involves creating the maximum number of length k from two arrays while preserving the relative order of digits...

A very simple argument parser

Scripting •

Discussing a simple approach to creating an argument parser for Python scripts. This parser handles parameter arrays, supports positional and key-value arguments, and checks for key existence, offering a lightweight alternative to complex libraries...

Use ADB to backup and restore local data for testing

Android •

Introducing a short trick to backup and restore local data for testing Android apps using ADB. This method is useful for managing test data, especially when dealing with different app versions or complex data setups...

Extend the ADB to Make App Debugging Easier

Android •

Exploring how to extend ADB to make app debugging easier. This involves using ADB for more than just basic commands, and integrating it with tools like dev menus, Facebook's Flipper, Stetho, or Hyperion to enhance the debugging experience...

Beautiful code

Code review •

Reflecting on a recent code review request from a friend, discussing the importance of writing clean and maintainable code. The example provided is in TypeScript, highlighting common pitfalls and best practices.

Let's code with Leetcode

Leetcode •

Mmm…, I don’t know how to start this post, actually, it’s not about Leetcode but about my laziness (yes, very similar to the story about git naming)

A short story of naming git-branch from a lazy coder

Scripting •

Sharing experiences and challenges of naming git branches as a developer who prefers using UI tools over the console. Discussing the transition from long, descriptive branch names to more manageable ones...

A short story of naming git-branch from a lazy coder

AnnoPref — make saving SharedPreferences easier

Android •

AnnoPref is a Java annotation processor that simplifies the process of saving SharedPreferences. By defining a class with fields, AnnoPref automatically generates get/set functions for those fields.

Handle screen rotation without onConfiguration­Changed

Android •

Learn how to handle screen rotation in Android without using `onConfigurationChanged`, by leveraging `OrientationEventListener` to create responsive views that adapt to orientation changes smoothly.

Text and font rendering on Android

Android •

An in-depth exploration of text and font rendering techniques on Android, including font size scaling, fit font size algorithms, text drawing, and handling shadows.