Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
(エンジニアに送る)人に優しくなるための3つの方法 / 3 Ways for Engineer...
Search
naoya_s
January 31, 2020
Programming
0
18
(エンジニアに送る)人に優しくなるための3つの方法 / 3 Ways for Engineers to Be Kind to People
naoya_s
January 31, 2020
Tweet
Share
More Decks by naoya_s
See All by naoya_s
静的解析ツールの刷新に向けた取り組み
suginao
1
360
RuffではじめるPython開発 / Python Development with Ruff
suginao
0
55
AWS SAMをさわってみた話 / Try AWS SAM
suginao
0
30
全国在宅勤務制度のすゝめ / Practice of National Telecommuting System
suginao
0
10
サーバーレスなAPIサービスの全容 / All of the serverless API services
suginao
0
1.2k
Other Decks in Programming
See All in Programming
Level up your Gemini CLI - D&D Style!
palladius
1
170
「文字列→日付」の落とし穴 〜Ruby Date.parseの意外な挙動〜
sg4k0
0
360
Media Capture and Streams: W3C仕様と現場での知見
nowaki28
0
130
AIコーディングエージェント(NotebookLM)
kondai24
0
110
これだけで丸わかり!LangChain v1.0 アップデートまとめ
os1ma
6
1.3k
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
220
AIと協働し、イベントソーシングとアクターモデルで作る後悔しないアーキテクチャ Regret-Free Architecture with AI, Event Sourcing, and Actors
tomohisa
5
18k
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
130
ローターアクトEクラブ アメリカンナイト:川端 柚菜 氏(Japan O.K. ローターアクトEクラブ 会長):2720 Japan O.K. ロータリーEクラブ2025年12月1日卓話
2720japanoke
0
430
CSC509 Lecture 14
javiergs
PRO
0
220
Herb to ReActionView: A New Foundation for the View Layer @ San Francisco Ruby Conference 2025
marcoroth
0
240
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
2.9k
Featured
See All Featured
For a Future-Friendly Web
brad_frost
180
10k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.5k
Balancing Empowerment & Direction
lara
5
780
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
How to Ace a Technical Interview
jacobian
280
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
Mobile First: as difficult as doing things right
swwweet
225
10k
Git: the NoSQL Database
bkeepers
PRO
432
66k
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.1k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Transcript
(エンジニアの方々に送る) 人に優しくなるための 3つの方法 Webナイト宮崎 Vol.8 ~てげ良いコード書きたい~
お前誰よ?? 名前:杉田 尚弥(@suginao17) 出身:宮崎 所属:株式会社アラタナ 趣味:辛麺
良いコード is 何?
先生に聞いてみた!
None
None
今回話す、”良いコード” 他人(レビュアー)が見て 理解しやすい・親切なコード
どうやったら書けるの? ・エンジニア個々人が努力する💦 ・プロジェクトやチーム単位で コーディング規約を設ける😩
否
結論: エンジニアが疲弊するだけなので ツールやライブラリを使おう!
【フォーマッタ】 flake8, black 【静的型チェッカー】 mypy 【ツール・エディタ】 pre-commit VSCode PyCharm
フォーマッタ 【flake8】 ・PEP8に加え、シンタックスエラーまでチェックする ・pyflakes(論理的なエラーを検知) ・pycodestyle(規約に準拠しているか検知) ・mccabe(循環複雑度の高いコードを検知) ・設定ファイルで自由に規約を変更できる
フォーマッタ 【black】 ・PEP8に準拠しているかのチェック ・制限が強く自由に設定ができない → 導入が楽 ・flake8と相性が悪いので、一部設定を変える必要有
None
静的型チェッカー 【mypy】 ・Python3.5で実装された型ヒントを静的に解析する ・実行前に型エラーを検知できる ・可読性を担保する
ツール 【pre-commit】 ・フックスクリプトを管理する ・GitHubで公開されているリポジトリを指定して実行できる ・任意のタイミングで処理を実行できる ・コミット前にフォーマット ・プッシュ前に型チェック
エディタ 【VSCode】 ・設定ファイル次第で可能性は∞👍 ・設定沼にハマらないように注意 【PyCharm】 ・Pythonを書くんだったら、間違いない ・設定しなくても、だいたいのことができる
【言語別対応表】 並べたものの、あまりピンとこない... 大体あってる!? おまけ Python PHP JavaScript フォーマッタ black PHPMD
Prettier リンター flake8 PHPCS ESLint 型チェック mypy Phan Flow
ツールを上手に使って 人間に優しくなろう! 最後に