Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Rubyらしさとは?
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Aki Nakahara
May 22, 2025
Programming
30
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rubyらしさとは?
Aki Nakahara
May 22, 2025
More Decks by Aki Nakahara
See All by Aki Nakahara
AIに丸投げしない!Angularメジャーアップデートで実践したAI活用法
akinko_0915
0
33
SidekiqでAIに商品説明を生成させてみた
akinko_0915
0
220
はじめてのWeb API体験 ー 飲食店検索アプリを作ろうー
akinko_0915
0
300
ワイガヤLT会 #2:gitの「めんどくさい」を解決
akinko_0915
0
26
Other Decks in Programming
See All in Programming
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
490
setup-vp GitLab対応の裏側
naokihaba
0
110
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
120
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
600
AIエージェント時代のコードレビューを設計する
nogu66
6
2.7k
更なる可用性を求めて、5年間運用したKotlinのアプリケーションをGoでリプレイスする話
ken_tunc
0
280
WebAssembly in Android Apps 〜 WASMはJNIの夢を見るか
keiji
1
110
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
300
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
340
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
140
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
3.2k
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
210
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
Agile that works and the tools we love
rasmusluckow
331
22k
New Earth Scene 8
popppiees
4
2.6k
Navigating Team Friction
lara
192
16k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
390
Balancing Empowerment & Direction
lara
6
1.3k
Technical Leadership for Architectural Decision Making
baasie
3
570
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
410
Between Models and Reality
mayunak
4
460
Joys of Absence: A Defence of Solitary Play
codingconduct
1
520
Transcript
Rubyらしさとは akinko0915 (あきんこ)
自己紹介 akinko0915 (あきんこ) 中原 暁 (なかはら あき) Classi株式会社 25卒 JavaScriptと非同期処理を極めるために特訓中
Zennで学習記録投稿中!(@akinko0915) Podcast配信中 (前向くラジオ)
カレンダーアプリのプラクティスで受けた指摘 発表テーマの背景
Rubyらしいコードとは・・・?
Rubyist Magazineにも「Rubyらしさ」について語られている 多くのライブラリが別途インストールする必要なく使えるよう になり、利便性は非常に高まったのだが、いくつかのライブラ リに関しては「Ruby らしくない」 という評価を聞いた。具 体的には、メソッドの名前付けや挙動が Ruby の標準的なクラ
スのそれとずれがある、といった指摘である。 こうなると、 Ruby を使う上での直感が効きにくくなるため、 プログラミン グにも影響を及ぼす。 しかしこのような「Ruby らしさ」は 明文化されていないため、 共有がしづらい 「Rubyらしさ」について Rubyist Magazine 0003号 巻頭言 るびま編集長 高橋征義
自分なりに「Rubyらしさ」を 定義してみたい
Rubyならでは! と思った書き方3つ
❶ 繰り返し処理 Array や Hash は Enumerable モジュールを include しているため、each,
map, select, each_with_index などの 繰り返しメソッドが使える
each_with_index
メソッドをうまく活用することができれば 繰り返し分の中でより幅広い処理を 簡潔に実装できるようになる
❷ 条件分岐の書き方 否定条件の書き方 後置でunlessを使用する
❷ 条件分岐の書き方 後置if 後置でifを使用する
endがなく1行で処理を完結させることができる 後置if やunlessにすることで 英語の表現のように書くことができ 人間が読みやすいコードになっている
❸ timesを使う 3.timesとすることで 「3回繰り返す」ことが わかりやすく表現されている
直感的に意図を 読み取ることができるコード
Rubyのメソッドを使い、様々な処理を簡潔 に表現できるコード 人間が話すような言葉で書くこと まとめ:Rubyらしさとは
つまり、Rubyらしさとは 「人間が読みやすい言語」
追記 ChatGPTに、Rubyらしさがみられるコードの書き方を 聞いたところ以下のような回答がありました。
Thank you