[Claude 쓰면서 토큰 아끼려고 한 짓들] EP.2 — my precious를 지켜야 한다

에이전트를 9개로 줄이고 CLAUDE.md를 다이어트시킨 뒤, Compacting conversation...이 뜨는 간격이 눈에 띄게 길어졌다. 같은 작업을 시켜도 예전보다 한참을 더 버텼다. 뿌듯했다. ...

March 28, 2026 · 김태영

[Saving Tokens While Using Claude] EP.2 — My Precious Must Be Protected

After trimming down to 9 agents and putting CLAUDE.md on a diet, the intervals between Compacting conversation... messages got noticeably longer. Same tasks, but it lasted much longer than before. Felt good. Then I was watching the console after requesting a new feature. Tests ran. 30 cases, all passing. But Claude was mentioning the successful tests again. Something felt subtly off. I asked Claude. “Why are you mentioning tests that already passed?” Claude explained the concept of tools. When Claude executes a terminal command or reads a file, those are all “tool calls.” And every time a tool runs, its entire output stacks into the conversation context. npm test results — 30 lines. Hugo build log — 180 lines. All of it. Tests all passed with nothing to look at, yet it read all 30. For build errors, only the last 5 lines mattered, but it loaded all 180. ...

March 28, 2026 · 김태영

딩초 학부모

소파에 비스듬히 기대어 무릎 위에 놓고 흔들면서 재우던 갓난아이가 올해로 8살이 됐다. 나는 초딩의 ‘학부모님’이 됐다. 어제는 따님이 방과후 수업에서 마술을 배워서 깜짝 공연을 해줬다. 세상이 정말 빠르게 변하고 아이도 쑥쑥 자라는데, 나는 훌륭한 아버지로, 남편으로 자라고 있는지 항상 고민이 된다. ...

March 28, 2026 · 김태영

[Claude 쓰면서 토큰 아끼려고 한 짓들] EP.1 — 세 시간 만에 사용량을 초과한 이야기

지인에게 화장품 쇼핑몰 구축 의뢰를 받았다. 직장에서 C만 쓰다 보니 새 기술스택을 써볼 기회였다. 결제는 토스페이먼츠, 프론트는 React. “금융권 차세대가 전부 React로 간다"는 말이 마음에 걸렸고, 토스페이먼츠는 Node 친화적이었다. 방향은 금방 잡혔다. ...

March 27, 2026 · 김태영

[Saving Tokens While Using Claude] EP.1 — Hit the Limit in Three Hours

A friend asked me to build an e-commerce site for cosmetics. I’d been writing nothing but C at work, so this was a chance to try a new stack. Toss Payments for checkout, React for the frontend. “Every next-gen finance project is going React” — that comment stuck with me, and Toss Payments was Node-friendly. The direction came together quickly. Obviously, I’d never used this stack before. I wanted to learn it, but the deadline didn’t allow for “study first, build later.” So I gave vibe coding a shot. ...

March 27, 2026 · 김태영

[LeetCode Grind 169] Week1 - 8. Binary Search

문제로 풀이 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 class Solution { fun search(nums: IntArray, target: Int): Int { var left = 0; var right = nums.size - 1; while(left <= right){ val mid = left + (right-left) / 2 val v = nums[mid] when { v == target -> return mid v < target -> left = mid + 1 else -> right = mid - 1 } } return -1 } }

February 3, 2026 · 김태영

[LeetCode Grind 169] Week1 - 7. Valid Anagram

문제로 풀이 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 class Solution { fun isAnagram(s: String, t: String): Boolean { if(s.length != t.length) return false val count = mutableMapOf<Char, Int>() for(char in s) { if(count[char] == null) count[char] = 1 else count[char] = count[char]!! + 1 } for(char in t) { val v = (count[char] ?: return false) - 1 if(v == 0) count.remove(char) if(v > 0) count[char] = v; } return count.isEmpty() } } kotlin은 nullable한 값에 비교연산자를 사용할 수 없다... (대입은 된다) ```kotlin // 이렇게 쓰면 에러가 난다... non-null로 만들어줘야 한다 ?:를 잘 활용하자 if(count[char] > 0) count[char] = count[char]!! - 1 ```

January 29, 2026 · 김태영

[LeetCode Grind 169] Week1 - 6. Invert Binary Tree

문제로 풀이 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 /** * Example: * var ti = TreeNode(5) * var v = ti.`val` * Definition for a binary tree node. * class TreeNode(var `val`: Int) { * var left: TreeNode? = null * var right: TreeNode? = null * } */ class Solution { fun invertTree(root: TreeNode?): TreeNode? { if(root == null) return null; invertTree(root.left) invertTree(root.right) var temp = root.left root.left = root.right root.right = temp return root } } 전위탐색 1. 현재 노드 2. 왼쪽 서브트리 3. 오른쪽 서브트리 중위탐색 1. 왼쪽 서브트리 2. 현재 노드 3. 오른쪽 서브트리 후위탐색 1. 왼쪽 서브트리 2. 오른쪽 서브트리 3. 현재 노드 TODO. 전위,중위,후위 탐색이 필요한 경우 각각 공부해놓기

January 28, 2026 · 김태영

[LeetCode Grind 169] Week1 - 5. Valid Palindrome

문제로 풀이 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 class Solution { fun isPalindrome(s: String): Boolean { var start = 0 var end = s.length - 1 while(start < end) { var f = s[start] var b = s[end] when{ !f.isLetterOrDigit() -> start++ !b.isLetterOrDigit() -> end-- f.lowercaseChar() != b.lowercaseChar() -> return false else -> {start++; end--} } } return true } } 정규식으로 풀었더니 최하위 점수를 받았다 ... 정규식은 많은 비용을 감수한다 메모하기 ... kotlin의 when은 참 편리한것같다 ...

January 27, 2026 · 김태영

[LeetCode Grind 169] Week1 - 4. Best Time to Buy and Sell Stock

문제로 풀이 1 2 3 4 5 6 7 8 9 10 11 12 13 14 class Solution { fun maxProfit(prices: IntArray): Int { var minPrice = Int.MAX_VALUE var maxProfit = 0; for(price in prices) { if(minPrice > price) minPrice = price else { maxProfit = max(maxProfit, price - minPrice) } } return maxProfit } }

January 25, 2026 · 김태영