Yusuke Hatanaka

I'm working as a software engineer in Japan. I like reading, watching basketball game, and fishing. 
Not only the fact oriented but also intuition.
May 16, 2024

TIL: necessary permission of to exec `gh pr merge' for GitHub App

When we want to merge pull-request while GitHub Action's workflow without PAT, then we may want to create a GitHub App and use its ephemeral token. However, to find the correct pemission setting is very frustrated. Here is minimum permissions requirements to exec `gh pr merge`. Contents: Read and write Metadata: Read-only Pull request:...
Read more
May 2, 2024

TIL: mocking an IntersectionObserver

We want to test a component that to be intersection to the viewport is happened sometime when using React. I found an easy solution in @shopify/jest-dom-mocks. Something like this (Pseudocode, but fundamental's included): import { render, waitFor } from '@testing-library/react'; import { intersectionObserver } from '@shopify/jest-dom-m...
Read more
April 30, 2024

This month I read. Apr, 2024

• Hypermedia Systems 本書では、ハイパーメディアシステムとは、World Wide Web のことであると定義づけられている。本書で語られるのは、ロイ・フィールディング博士の論文 REST as a network architecture に忠実なシステムアーキテクチャーであり、近年の Web アプリケーションアーキテクチャーとは対照的であるが故に、非常に興味深く読み進めることができた。 ハイパーメディア、RESTful に再フォーカスし、宣言的なドキュメントの力で、ユーザーエクスペリエンスの高いユーザーインターフェースを実現する過程を見ることができる。 具体的な話は、htmx と呼ばれる JavaScript ライブラリの紹介とあわせて、Co...
Read more
April 20, 2024

TIL: also the bug report template is minimum

I posted a little finding about minimun testing reproductive script for rails in recently, today I found another likes that is bug report template. neat.
Read more
April 17, 2024

TIL: minimum rails reproductive script

I found a great minimum reproductive script when I was looking at rails/rails pull #51523. # frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails", ARGV.first || "7.1.3" end require "action_controller/railtie" require "minitest/autorun" class FoosController < ActionController::B...
Read more
March 30, 2024

This month I read. Mar, 2024

• データモデリングでドメインを駆動する──分散/疎結合な基幹系システムに向けて 基幹系システム、いわゆる会社が業務を遂行するにあたって必要な業務システムの、設計に対する指南書というとチープな印象になってしまうが、今後長年に渡って読まれるであろう名著の予感がする。 "残"にフォーカスしたデータモデリングが、現実の非同期的な業務を情報システムとして巧妙に写し取っており、前半それだけでも読み応えを感じた。また、本書由来のアイデアでは無いそうだが、エンティティをロールとして扱うという着想が、近年のコンパウンドスタートアップのプロダクト戦略に繋がる着想だという気づきもあった。例えば、Rippling は従業員データをエンティティと据えて、給与支払い先というロールに見立てて給...
Read more
February 29, 2024

This month I read. Feb, 2024

• 失敗の科学 認知的不協和が引き起こす愚行、人はなぜ失敗から学ぶことが苦手かについて、様々な事例を用いて紹介した本。認知的不協和とは、自身の認知とは矛盾した別の認知を抱えることによるストレス状態、不快感のこと。これを脱するために、正当化や記憶のすり替えといったことが起きる。 読んでいて辛くなってくる内容が多いが、マージナル・ゲイン、リーン・スタートアップ、RCT、プレモーテムといった具体的な学びも多い。印象的なエピソードとして、非難が引き起こす悪影響についてがあり、これは強く意識しておきたいと感じた。 • GitLabに学ぶ 世界最先端のリモート組織のつくりかた The GitLab Handbook の内容をベースに、リモート組織のメリットやデメリットへの対策、...
Read more
January 31, 2024

This month I read. Jan, 2024

• トヨタの失敗学 「ミス」を「成果」に変える仕事術 • トヨタの片づけ • [図解]トヨタの片づけ トヨタの品質や仕事改善に対する考え方が紹介されている。これまで成功を納めてきた様々な企業の思想を体現した内容になっているように思えた。 例えば、徹底的に無駄を省くという思想は、京セラ稲盛氏の伝える筋肉質な経営と繋がる価値観だ。また、改善を進めるためには基準が必要であるという考え方や、失敗は書き残し振り返るといった話については、Google SRE のエラーバジェットや SLO、ポストモーテムといったプラクティスに近い。大部屋方式はチームトポロジーのストリームアラインドチームと同じ考え方に思える。 ビジネスウォーズというポッドキャストにトヨタ対ホンダというシリーズがあ...
Read more
December 31, 2023

This month I read. Dec, 2023

• ユニコーン企業のひみつ ―Spotifyで学んだソフトウェアづくりと働き方 Spotify に務めていた著者による、従来型の企業とスタートアップなテック企業のプロダクト開発に対するマインドセットの違いが語られている。 従来型とは、納期と予算の範囲でものづくりをするプロジェクト型のプロダクト開発のことを指している。対して、テック企業のプロダクト開発には予算も納期も存在していない。あるのは企業のミッションと、チームへの信頼(権限委譲)と、技術を一級市民として扱い品質への妥協を許さないこと。 今となっては本書の内容が極めてセンセーショナルというわけでは無さそうだ。しかし、従来型の企業や、組織やビジネスがスケールしたことにより、従来型回帰への強い力学が働き始めた企業が、...
Read more
November 25, 2023

This month I read. Nov, 2023

• <イラスト図解>工場のしくみ • 最新版 ビジュアル図解 食品工場のしくみ 製造業界関連の to B SaaS を展開するスタートアップ企業に転職が決まり、来年から新たな環境でソフトウェアエンジニアとして働くことになった。 ソフトウェアエンジニアである前に to B SaaS を提供する者として、業界ドメインに対する理解が必要であることは言うまでも無い。製造業における中心は工場であり、これらの書籍からは、工場が人・モノ・金をどのような考えで扱い、どのような業務プロセスが存在しているかを学ぶことができる。 日本の製造業は、人口減少による人手不足が大きな課題となっており、IT による生産性の向上が求められていると聞くが、その道程は険しいと感じる。 例えば、人間が紙に...
Read more
May 2, 2022

Package gl was not found in the pkg-config search path on WSL2

When you got following error to run the program that depends gl package on WSL2 Ubuntu environment. % go run main.go # pkg-config --cflags -- gl gl Package gl was not found in the pkg-config search path. Perhaps you should add the directory containing `gl.pc' to the PKG_CONFIG_PATH environment variable No package 'gl' found Package gl ...
Read more
March 5, 2021

Using terraform workspace in multi account environment

In the modern age, a network infrastructure is frequently written down to the code. To use terraform is the one option to achieve them, also I use on a daily. These days, we are forced to construct several network environment on the cloud which are always in used by developing, testing and providing services to the world. We always hop...
Read more