Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
2 週間で Twitter Bot を作ってみた
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Daisuke Garaike
April 23, 2024
Programming
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
2 週間で Twitter Bot を作ってみた
"TechBrew in 東京〜業務外で取り組む 個人開発での学び〜" での LT で用いたスライド。
https://findy.connpass.com/event/313271/
Daisuke Garaike
April 23, 2024
More Decks by Daisuke Garaike
See All by Daisuke Garaike
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
600
立川で超かぐや姫!について話したい / Talking Cosmic Princess Kaguya! in Tachikawa
contour_gara
1
370
AR グラス + ミニ PC で実現する新しいモバイル環境
contour_gara
0
350
TDD 実践ミニトーク
contour_gara
1
420
Spring Boot と AWS S3 を使ったアプリケーションのテスト
contour_gara
0
150
ノート PC に Linux 入れてみたけど結構良かった
contour_gara
0
3.6k
JUnit5 から Kotest へ
contour_gara
0
210
社外での学びを社内に還元したい
contour_gara
1
560
Database Rider を用いたデータベーステスト
contour_gara
0
490
Other Decks in Programming
See All in Programming
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
140
えっ!!コードを読まずに開発を!?
hananouchi
0
220
AIエージェントで 変わるAndroid開発環境
takahirom
2
680
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
コーディングルールの鮮度を保ちたい for SRE NEXT 2026 / keep-fresh-go-internal-conventions-sre-next-2026
handlename
0
140
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
210
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
210
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
350
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.8k
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
170
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
210
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
220
Featured
See All Featured
A Tale of Four Properties
chriscoyier
163
24k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
190
Skip the Path - Find Your Career Trail
mkilby
1
170
The SEO identity crisis: Don't let AI make you average
varn
0
510
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
500
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
660
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
240
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
590
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Transcript
2 週間で Twitter Bot を作ってみた 2024-04-23 TechBrew in 東京 Daisuke
Garaike
自己紹介 gara Twitter: @contour_gara GitHub: contour-gara 大学院では大気海洋相互作用の研究 Python, Fortran 23
年に新卒で入社 Java でサーバーサイドの開発 業務外では Kotlin
写真を毎日投稿してくれる Bot 写真が趣味なので、 毎日写真を投稿したい。 投稿時間、文章は毎回同じなのに、 毎回設定するのは面倒。 決まった所に写真を置いておけば 投稿してくれる Bot があると助かる。
https://github.com/contour-gara/ gara-photo-spring-boot
実は...... Python で自動化コードを書いたものが動かなくなった。 https://x.com/XDevelopers/status/1641222782594990080 だらだら書くコーディングスタイルだったため、 リファクタリングできなかった。
技術選定で悩んだ • Kotlin • ライブラリに依存しない設計 • バージョン管理、自動化、テスト • Spring Boot,
Ktor • Mybatis, Expose • Docker, Kubernates 素早い価値提供 (LT) のためにも、 左の慣れている技術を採用した 必ずやりたかったこと 諦めたこと
アーキテクチャ? • 手続き型の書き方でスクリプトを書く • 決められた Path に写真を置いておく • cron で定時にプログラムを実行
これまで これから • オブジェクト指向で保守性の高いアプリケーション開発 • 自宅のサーバーでコンテナを起動 • Dropbox に写真を置いておく • cron で定時に Dropbox のファイルをコピー • cron で定時に API を叩く https://little-hands.hatenablog.com/entry/2 018/12/10/ddd-architecture
2 週間 → 2 日間 土日はサボってしまう。 テストで悩んでしまう。 https://github.com/contour-gara/gara- photo-spring-boot/commits/main/ 動くプロダクトを作るために
LT に申し込んだ。 旅行 検証 モデリング 資料 作成 クライアントの テストどうするん? 開発 開発 申込
Twitter クライアントのテスト Twitter4J と twitter4j-v2 を使用 https://github.com/Twitter4J/Twitter4J https://github.com/takke/twitter4j-v2 適切なリクエストと適切なレスポンスがある以上、 テストすべきではないだろうか?
ライブラリ API End Point Twitter4J: 変更可能 → モック可能 v2: ハードコーディング 既存のドメインに対してのリクエストを テストする方法はあるのだろうか...... リクエスト レスポンス
まとめと今後 2 週間後に LT をするというケツを設定することで、 なんとか作りきることができた。 技術選定で悩み、諦めたことを挑戦していきたい。 ライブラリをフォークして、テストしやすくしたい。 自分というユーザーがいる プロダクトを大切に開発を続けたい