RSSAmplifier

Blog

junueno.dev - articles (EN)

Engineering notes by Jumpei Ueno: AWS/GCP infrastructure, FinOps, SRE, CI/CD.

junueno.devRSS feed ↗44 posts

Latest posts

My AI drew the hero as a different man in every scene. It's one guy's life story

I build explainer videos fully automatically. For each scene, a local image-generation AI draws that moment, one frame at a time. I was making one about an ancient Roman general — the whole life of a…

Letting an AI agent hit 'like' scared me more than letting it post

I let an AI agent run the social media for my own product. The first thing I handed over was "post from our own account." Honestly, that part isn't that scary. The words are ours, and if it flops, we…

"I won't post without your approval" — my dutiful AI died after two minutes

I run an AI agent (Claude Code) that produces content and takes it all the way to publishing on external platforms, on its own. I had exactly one rule. Publishing is irreversible, so right before it…

The AI decided "we're allowed to use this" — an adversarial agent caught contract data seconds before it bled into another project

The scariest moment I've had while talking design with an AI wasn't a code bug. It wasn't a prompt gone sideways. It was this: the AI (and honestly, me too) had quietly decided "this data is fine to…

I told one AI to demolish the handoff prompt I wrote for another AI. It found a test that passes even when it's empty

I'm building an app with Claude Code right now. The setup is a little unusual. One "commander" session writes the instructions, and separate "worker" sessions implement them in parallel. The commande…

Close your editor before heavy jobs? The heavy job lives inside my editor

I run an automated video pipeline that generates images locally, on my Mac. A 16GB M4. The image model is FLUX, a 12B-parameter thing that keeps 7GB of weights resident in memory even quantized down…

"Is it actually running?" — the night I asked three times while stitching 17 images into one video

I run a little pipeline that builds history-explainer videos end to end — script, narration, images, video — all automatically, all by myself. Up until one day, the background was a single picture, s…

The rules were written down. Nobody followed them. Then CI went red on day one

My project's docs had rules. "One document, one responsibility." "Split anything over 45 lines." I wrote that. The day before yesterday. Here's how that was going. - Folders with no README (no index)…

Recruited by a shady Russian hosting company

One morning, an email landed. Subject line: 'your cloud cost reduction setup?' That one lands cleanly, honestly. Cloud cost reduction is one of the things I put on my public shingle, so the sender ju…

Claude Code faked its own work, then wrote me an unprompted confession

I'll confess up front: this is basically a sequel to my earlier piece, the one where an AI decided it was being hacked when nobody was attacking it, and spiraled. An AI lied to me again. Only this ti…

I put a WAF on the front door. The spam wasn't using the front door.

There's a small corporate site. A few days after launch, one piece of spam landed in the contact form. Zero actual damage. Just a lazy ad. But there were two real problems. One: no spam protection at…

Why did one day of AI cost more than a month of servers?

Same old story: I'm running the SaaS our CFO shipped to production in two days. A non-engineer exec builds something fast with Claude Code, and the engineer (me) goes through the back end one piece a…

Claude Code detected a hack that never happened, then spiraled

One evening, a monitoring alert went off: a server behind a web service was down. I handed the incident to Claude Code. Half experiment, half laziness — "it's routine triage, what could go wrong." Le…

When should you publish a dev post? I counted, and JP vs EN are mirror images

Let me confess something a little creepy. I have a habit of peeking at other people's dev posts. Not stealing the writing — relax. I run a tiny read-only job that fetches the public pages on dev.to,…

Playing hide-and-seek with an API key our CFO's Claude Code kept hiding

There's a B2B SaaS that a non-engineer executive built all the way to production in two days , by handing everything to an AI. Real customers use it. It works. Features ship fast. It's genuinely impr…

CPU and DB were bored, yet every site timed out: a slow-read bot that starved Apache's workers

One morning, a bunch of EC shops sharing a single server all tripped their monitors at once with "response timeout." Let me be honest up front: the outage itself self-recovered in about five minutes.…

How a Slow Office VPN Led Me to File a US Patent

This is the story of how a mundane complaint — "the VPN is slow" — turned into a US patent application. Not a granted patent. An application . I want to be precise about that from the start, because…

Dynamic Programming: Fibonacci Numbers

Introduction Dynamic Programming is an efficient algorithm design technique used to solve problems by breaking them down into smaller subproblems. It stores the results of these subproblems to avoid…

Dynamic Programming: 0/1 Knapsack Problem (1D & 2D DP)

Problem Given a list of weights and values and a total capacity, determine the maximum value that can be placed in the knapsack. 2D DP 1D DP (space optimized)

Dynamic Programming: Longest Common Subsequence (LCS)

Problem Given two strings, find the length of their longest common subsequence. Tabulation Approach (2D DP)

Dynamic Programming: Longest Increasing Subsequence (LIS)

Problem Given an integer array, return the length of the longest strictly increasing subsequence. Tabulation (O(n^2))

Dynamic Programming

Introduction Dynamic Programming is an efficient algorithm design technique used to solve problems by breaking them down into smaller subproblems. It stores the results of these subproblems to avoid…

Segment Tree

Introduction Segment Tree is an efficient tree data structure for dynamic range queries. This is why it is called a "Segment Tree." The array is recursively divided into two segments until the segmen…

Finding Perfect Numbers in Python

The following Python code finds perfect numbers within a given range: Running this code will output perfect numbers such as 6, 28, 496, and 8128. --- Efficient Perfect Number Checking Using Mersenne…

Push a Docker Image to AWS ECR

Versions Homebrew 3.4.7 Nginx 1.21.6 Ngrok 3.0.2 AWS CLI 2.5.8 About AWS ECR AWS ECR is a repository service like DockerHub. You can create your own repository, either public or private. How to 1. Pr…

Expose a Local Web Page with ngrok

Versions Homebrew 3.4.7 Nginx 1.21.6 Ngrok 3.0.2 About Ngrok - A tool that makes the specific port of local machine public on internet - Pricing: Free for personal use - Official website: https://ngr…

3. Longest Substring Without Repeating Characters

URL: https://leetcode.com/problems/longest-substring-without-repeating-characters Difficulty: Medium Problem Statement Given a string, find the length of the longest substring without repeating chara…

Variables in Rust

We can declare variables with let. let binds variables. Binding is the process of associating a variable name with a value. Variables can refer to the value bound to them. If the value bound to the v…

Greatest Common Divisor

Let's implement an efficient function to compute the greatest common divisor using recursion in Python. The original code is borrowed from Algorithm Science: A Beginner's Guide by Tetsuo Asano, P.73.…

Power

Let's implement an efficient power function using recursion in Python. The original code is borrowed from Algorithm Science: A Beginner's Guide by Tetsuo Asano, P.70. --- Full Code You can compute th…

29. Divide Two Integers

https://leetcode.com/problems/divide-two-integers Difficulty: Medium In this article, I will explain how to solve the problem Divide Two Integers with Timothy H Chang's solution. His solution is best…

26. Remove Duplicates from Sorted Array

https://leetcode.com/problems/remove-duplicates-from-sorted-array Difficulty: Easy This is easy problem. Just remove duplicates from array. And the array is sorted. I will explain my code. ※ You need…

1456. Maximum Number of Vowels in a Substring of Given Length

https://leetcode.com/problems/maximum-number-of-vowels-in-a-substring-of-given-length Reference Code: [[Java/Python 3] Slide Window O(n) codes](https://leetcode.com/problems/maximum-number-of-vowels-…

58. Length of Last Word

https://leetcode.com/problems/length-of-last-word Very easy problem. You can try out your new programming language here. Problem Given a string s consisting of words and spaces, return the length of…

Create an ECS Fargate Service Step by Step

Prepare Docker Image at ECR If you don't have an image at ECR, please check this article and get it. Push Docker image to AWS ECR In this article, I use React app image. About ECS AWS Elastic Contain…

React Context and useContext

Context Context in React.js provides a way to pass data through the components without props. We can avoid to pass props again and again. (Parent to child via props) useContext Code below shows "Jun…

React Effects and useEffect

Effects We can perform data fetching, subscribing, and manually changing DOM from React components. In React, we call these operation 'side-effects' or 'effects' in short. And we have to use useEffec…

React State and useState

State In React, state is a data that is stored in the component. It is used to store data that changes over time. For example, if you want to store the number of times a button is clicked, you can us…

Binary Search

Binary search is an algorithm to check if a target number exists in a list. The time complexity of this algorithm is O(log N). Prerequisites - The list elements must be numbers. - The list must be so…

456. 132 Pattern

URL: https://leetcode.com/problems/132-pattern Difficulty: Medium Even though the tag of this problem is "Binary Search", you can solve this problem without using binary search. However, it is a prob…

349. Intersection of Two Arrays

URL: https://leetcode.com/problems/intersection-of-two-arrays Difficulty: Easy This is a simple and easy problem. Although, I solved this problem using binary search, and a funciton that remove dupli…

69. Sqrt(x)

https://leetcode.com/problems/sqrtx My answer was O(n), so the execution time was too long. To reduce the time complexity to O(logn), I will explain the solution using binary search. I aim to improve…

Dockerizing a React App

Versions Node version: 16.13.0 Docker version: 20.10.12 Link GitHub Repo https://github.com/jun-uen0/react-dockerfile Here’s How to Dockerize React App https://www.bacancytechnology.com/blog/dockeriz…

Pull the Nginx Image and Run the Container

Versions OS: MacOS (intel chip) Docker version: 20.10.12 Official image of Nginx Nginx distribute its official Docker image on Docker Hub. https://hub.docker.com/ /nginx How to 1. Pull Nginx Docker i…