Andrew.Log
-
[EDA] (讀書心得) Event Driven Architecture In Golang 第一章 - 介紹與基礎
Mar 30, 2025
-
1 min read
這陣子因為公司的專案正在準備導入
微服務
,所以買了這本書來研究,看完之後決定把讀書心得給記錄下來,在還沒讀之前,有好多對這個架構的疑問,像是分散式系統怎麼做Transaction
…等,但書上的內容都有得到解答,書中會以MallBots
的服務(是個基礎電商系統),帶我們慢慢的了解微服務架構。那我們就從第一章開始吧!第一章主要是介紹
MicroService
與Event-Driven
基礎概念。 -
原來 Arrow Func 可以這樣用
Mar 20, 2025
-
1 min read
剛進公司時,被指派了寫上團購系統前台後台的登入系統,是這樣的,後台管理員還有不同的角色,每個角色所擁有的權限也不一樣。所以可以希望透過
Middleware
來做權限的控管。 -
DDD 中的 Pub/Sub 模式應用
Feb 24, 2025
-
2 min read
以往在
MVC
架構下的設計,並沒有分領域的概念,所以時常修改或新增需求時,我們都要從API
開始 Trace..,依序地找到Controller -> Service ...
等等,這樣的設計方式,耦合比較高之外,也不易擴充。 -
[Leetcode]424. Longest Repeating Character Replacement
Jan 7, 2025
-
2 min read
You are given a string s and an integer k. You can choose any character of the string and change it to any other uppercase English character. You can perform this operation at most k times.
Return the length of the longest substring containing the same letter you can get after performing the above operations.
-
3. Longest Substring Without Repeating Characters
Dec 30, 2024
-
2 min read
Given a string s, find the length of the longest substring without repeating characters.
-
[Leetcode]128. Longest Consecutive Sequence
Dec 16, 2024
-
1 min read
Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence.
You must write an algorithm that runs in O(n) time.
-
[Leetcode] 198. House Robber
Dec 12, 2024
-
2 min read
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent houses have security systems connected and it will automatically contact the police if two adjacent houses were broken into on the same night.
Given an integer array nums representing the amount of money of each house, return the maximum amount of money you can rob tonight without alerting the police.
-
[Leetcode] 377. Combination Sum IV
Dec 11, 2024
-
1 min read
Given an array of distinct integers nums and a target integer target, return the number of possible combinations that add up to target.
The test cases are generated so that the answer can fit in a 32-bit integer.