RDB Internals Made Intuitive: Notes from Database Design and Implementation

In this post, I’ll share what I learned from the book Database Design and Implementation by Edward Sciore, which explains how a relational database (RDB) works by guiding the reader through building a simple RDBMS called SimpleDB. My goal is to give an intuitive, top-down understanding of how RDBs work internally. I also hope this post serves as a high-level summary of the book, helping readers grasp the core ideas before diving deeper. ...

July 5, 2025 · 13 min

キャリア 5 年目の振り返り

2020 年 4 月に働き始めてから 5 年が経った。本当は毎年 12 月に一年の振り返りをしようと思っていたのだが、今回はいろいろあって 4 月になってしまったので、2024 年 1 月から 2025 年の今までを対象として振り返りをして、今年の目標を書こうと思う。 海外就職 カナダに渡航して約 1 年半経った。最初の一年間は private college という日本の専門学校のようなところに通っていて、それからジョブオファーを得て働き始めた。 海外で働いてキャリアを積むというのがカナダに来た目的だったので、ようやくそのスタート地点に立てた。 この半年間、書類上は学生インターンとして就労していたのだが、正社員に昇格できることになった。クビにはされなかったし、パフォーマンス的に及第点は取れているのだとほっとした。しかし、一緒に働いている人々の支援がなければこう上手くはいかなかった。改めて自分が環境に恵まれていると思うし、チームのみんなには感謝したい。 渡航してから就活に関することは、ストーリー風にまとめて note で記事にした: ハンデを覆す運と戦略 - カナダ就活記。 トロントへの引っ越し カナダに渡航してから一年間はバンクーバーにいて、就職のためにトロントに引っ越してきた。距離は 3500km くらいあるらしく、札幌から那覇までの距離の約二倍とか。国内でもかなりの隔たりがある。馴染みのない土地で知り合い 0 人の状態から再スタートとなった。 しかし、これはもう慣れっこで、初めて東京に引っ越したときもバンクーバーに来たときもそうだった。内向的な自分でも、ありがたいことに人と交流する機会に恵まれて、知り合いも友達も少しできた。そういう経験があったので、今回は大して心配はしてなかった。 結局、家とオフィスとスーパーと図書館くらいで普段の生活は完結してしまって、職場以外ではほとんど人と会わない生活をしばらく送ってしまったが、ようやく余裕が出てきた。トロントでも知り合いの輪を広げていきたい。 オンライン動画講座 働き始めて少しした頃、動画講座を作ってくれないかという依頼をもらった。Fast campus というプラットフォームを運営している韓国の会社からだった。正直、最初は怪しんだが、話を聞いてみると本当のことのようだった。初めてのことで不安もあったが、これも経験になるかと思い受けてみることにした。 そうして SQL 講座 を作った。これは思った以上に大変だった。何もないところから自分でカリキュラムを作って、スライドを作成して、練習問題を考えて、撮影をした。編集は向こうに丸投げだったので、そこだけが救いだったが。 やはり締切があると精神的にもストレスが掛かる。結局一週間ほどあった冬休みはほぼ全てこの講座に費やし、その後も働きながら夜や土日に作業をし、すべてが終わったのは本格的に作業を始めてから一ヶ月以上後のことだった。 リリース後、苦労して作った割には何も反響がなく、やっぱりそんなに甘くないんだなぁと思った。報酬は講師料としてもらっていたので売れても売れなくても自分の取り分は変わらないのだが、少し残念だった。 とはいえ、会社勤めの給料以外でお金を稼いだのは初めてで、とてもいい経験だったと思う。 今後の目標 トロントで会社員をするという生活にも慣れてきて、正社員への移行も決まったところで、渡航当初の目的は達成しつつあるのだとふと思った。では、次はどうする?というのが問題だ。 改めて時間を取って、自分にとって大切なもの・達成したいものは何かと考えてみたところ、経済的に自立することと、幸せな家庭を持つことの二つが思い浮かんだ。 経済的自立と言う言葉はもはや使われすぎていてチープにも感じるが、具体的にどういう状態なのかと自分なりに考えてみたところ、住みたい場所に住める(衣食住)、レストランで値段を気にせず注文できる(娯楽)、そして、働かなくてもそれらの状況を維持できるという条件を思いついた。まとめると、したいことをお金のせいで諦めなくてよい、したくないことをお金のためにしなくてよい、ということ。 家庭を持つということについては完全にプライベートのことだが、近々結婚する予定で、家族との関わりも大事だなと思っている。 そして、これら二つを達成するためにキャリア上の成功が必要になる。手応えのある仕事ができたら楽しいし、お金も稼げる。ではそのために何が必要かということを考えて、技術・英語・永住権の三つにまとめて目標とした。 技術について ソフトウェアエンジニアとしての技術を磨くこと。今は RDB(Relational Database) のストレージエンジンを開発するチームにいるので、それを自分の専門として深めていこうと思う。これまではこれと言った専門がなく悩んでいたが、ようやくはっきりした目標ができた。今はまだ分からないことだらけだが、論文を読んで OSS の実装と紐付けられるくらいになりたい。 ストレージエンジンを開発しているエンジニアそれほど多くないだろうし、こういう低レイヤーのニッチな分野で実力をつけることは、キャリア戦略としても悪くないのではないかと思う。 英語について 英語圏で生活する以上、あらゆることの基盤に英語がある。一応仕事をしてクビにならない程度にはなれたが、まだまだ苦労は絶えない。複数人の会話だとついて行けないことも多いし、ドラマや映画を字幕なしで楽しむことも難しい。 仕事でもコミュニケーション能力は重要だし、私生活においても英語で苦労したくない。今は特にリスニングに課題を感じていて、普段の生活の中で不自由しないくらいになりたいと思っている。 永住権について キャリアにしろ家庭生活にしろ、カナダで安定して暮らすためには永住権が必須だと思う。英語の試験を受けたりして現状ではできるだけスコアを高めたが(カナダ永住権のための CELPIP CLB 9+ 攻略法)、それでもカットオフスコアを超えるかどうかぎりぎりのラインだ。 ...

April 14, 2025 · 1 min

Hands-On C++ Concurrency: Quick Sort and Hash Table

In this hands-on tutorial, we will explore concurrent programming in C++ through the implementation of a concurrent quick sort and a lock-based hash table. Building Blocks Before diving into the detailed implementation, let’s first go through the building blocks of concurrent programming in C++. std::thread std::thread is a class that represents a single thread of execution. It can be used to create new threads that run concurrently with the calling thread. ...

June 17, 2024 · 7 min

Step-by-Step Guide to Building a WebSocket Chat App with Axum and React

In this guide, we’ll walk through the process of creating a full-stack chat app using WebSocket. Our backend will be built with Axum, a powerful Rust backend framework, and Shuttle, a development platform, while the frontend will be developed using React and Vite. We’ll cover Utilizing WebSocket in Axum and React. Generating unique identifiers using nanoid. Incorporating telemetry with tracing for enhanced logging. You can find the complete code for this project on GitHub. Setup Let’s start by creating a new repository for this project: ...

April 22, 2024 · 12 min

Deploying a Rust WebAssembly (WASM) App to GitHub Pages

In this tutorial, we’ll guide you through the step-by-step process of deploying a Rust WebAssembly (WASM) app on GitHub Pages. The final website will consist of a JavaScript frontend that utilizes WASM, generated from Rust code. The project we’ll use is called lp, a logical operation language that I created earlier. We won’t delve into the implementation details; instead, our focus will be on incorporating WASM into an existing Rust project. ...

March 5, 2024 · 6 min

Building a Lisp-like Language from Scratch in Rust

This post delves into building an interpreter for a Lisp-like language using Rust. No knowledge beyond Rust basics is required to follow this post. Inspiration and Project Overview Inspired by Stepan Parunashvili’s article Risp (in (Rust) (Lisp)), I created lip, an interpreted language designed for logical operations with a Lisp-like syntax. This supports logical operations (not, and, or), branching (if expression), lambda functions, and variable definition. This post guides you through the process of building an interpreter, focusing on the core functionalities of tokenizing, parsing, and evaluating expressions. While it may sound complex, the process only requires basic Rust knowledge. The language we’ll build is lp, a distilled version of lip designed for illustration. The live demo of an lp interpreter is accessible via a browser, and the complete code is available on GitHub. ...

March 4, 2024 · 11 min

PDF Summarizer with Ollama in 20 Lines of Rust

Explore the simplicity of building a PDF summarization CLI app in Rust using Ollama, a tool similar to Docker for large language models (LLM). Ollama allows for local LLM execution, unlocking a myriad of possibilities. This post guides you through leveraging Ollama’s functionalities from Rust, illustrated by a concise example. Since PDF is a prevalent format for e-books or papers, it would be useful to be able to summarize it. We’ll be employing the following libraries: ...

February 10, 2024 · 3 min

Rust Error Handling: thiserror, anyhow, and When to Use Each

In this blog post, we’ll explore strategies for streamlining error handling in Rust using two popular libraries: thiserror and anyhow. We’ll discuss their features, use cases, and provide insights on when to choose each library. TL;DR thiserror simplifies the implementation of custom error type, removing boilerplates anyhow consolidates errors that implement std::error::Error While thiserror provides detailed error information for specific reactions, anyhow hides internal details Return Different Error Types from Function Let’s start by creating a function decode() for illustration. The function has 3 steps: ...

February 6, 2024 · 6 min

Organize Rust Integration Tests Without Dead Code Warning

In this blog post, we’ll explore strategies for organizing integration tests in Rust, addressing challenges like dead code warnings and maximizing modularity. Integration Testing In Rust Conventionally, integration test files are placed in tests directory at the top level of a project. Let’s create a project for illustration: 1 cargo new --lib my-tests 1 2 3 4 5 6 7 8 ❯ exa --tree --level 2 . ├── Cargo.lock ├── Cargo.toml ├── src │ └── lib.rs └── tests └── integration_tests.rs src/lib.rs: ...

February 5, 2024 · 6 min

Embarking on Backend Development with "Zero To Production In Rust"

In this blog post, I will share insights gained from Zero To Production In Rust, a comprehensive guide to backend development in Rust. Through the development of a newsletter app, this book covers various important topics for developing an API server. TDD and User Stories: A Shared Vision This book adopts Test Driven Development (TDD) as a consistent approach, starting implementation with tests. This improves code reliability and, more importantly, facilitates a shared vision when collaborating with others. I think it is effective, especially in scenarios like pair programming. ...

February 4, 2024 · 4 min