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
今日から使いたくなるifとfor
Search
イシカワ
November 23, 2019
Business
360
0
Share
今日から使いたくなるifとfor
JJUG CCC 2019FallでLightning Talkしたスライドです。
コードに関してのご意見は受け付けます。
イシカワ
November 23, 2019
Other Decks in Business
See All in Business
パーソルクロステクノロジー_DXソリューション本部のご紹介 / Introduction_of_dx
pxt_gs_ssol
0
2k
DMM.com コーポレートブック
dmm
2
490k
【正社員型エンジニア派遣事業】採用資料
cdcsaiyo
0
1.4k
アッテル会社紹介資料/culture deck
attelu
11
17k
株式会社SHO-CASE_会社案内20260525
20201001
0
170
インターセクト会社説明資料
intersect
0
260
2025年度「海の家プロジェクト」ピッチ資料
brush2026
0
230
ログラス会社紹介資料 / Loglass Company Deck
loglass2019
17
540k
RecruitingGuide(KR)
kakaojapan
0
670
2026.6_中途採用資料.pdf
superstudio
PRO
5
110k
プリザンターの紹介 - OpenSourceConference 2026 SENDAI
s_pochi
0
140
株式会社リバイブル 会社説明資料
rebible
0
720
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
860
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
840
Visualization
eitanlees
152
17k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.3k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Paper Plane (Part 1)
katiecoart
PRO
0
8.5k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Rails Girls Zürich Keynote
gr2m
96
14k
Exploring anti-patterns in Rails
aemeredith
3
390
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
190
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Transcript
今日から使いたくなる ifとfor ウルシステムズ株式会社 石川将之
自己紹介 • 石川将之(イシカワ マサユキ) • ウルシステムズ株式会社2019卒入社 • プログラミング経験は半年 • 今の仕事はCRMシステム周り
• 性格はせっかち 2
研修でまなんだこと 3 資料作成 Tips プロジェク ト管理基礎 インタ ビュー モデリング ファシリ
テーション 見積り 業務フロー プログラミ ング クラウドイ ンフラ Webシステ ム構築
最も感動したこと 4 if & for サイコー 「分岐」と「繰り返し」さえあれば どんなことでもできる!
ifとforの万能性 • ソート 5 public static void main(String args[]) {
int[] array = { 8, 3, 3, 4, 5 }; for (int i = 0; i < array.length - 1; i++) { for (int j = array.length - 1; j > i; j--) { if (array[j] < array[j - 1]) { int tmp = array[j - 1]; array[j - 1] = array[j]; array[j] = tmp; } } } } → ifとforで出来る!
ifとforの万能性 • 業務ロジック 6 public static void main(String args[]) {
for(int i = 0; i < visiter.size(); i++){ if(visiter.getPass().isExistAAA){ user.add(visiter[i]); } if(visiter.isBBB){ break; } } for(int i = 0; i < user.size(); i++){ if(user.isLogin()){ if(user.isXXX){ doXXX(); } else if(user.isYYY) { doYYY(); } else if(user.isXXX){ doZZZ(); } } } } → ifとforで出来る!
ifとforの万能性 • Javaの中身もifとforで出来てる! 7 public static long parse(String s) {
・・・ for (k = wtb.length; --k >= 0;) if (wtb[k].regionMatches(true, 0, s, st, i - st)) { int action = ttb[k]; if (action != 0) { if (action == 1) { // pm if (hour > 12 || hour < 1) break syntax; else if (hour < 12) hour += 12; } else if (action == 14) { // am ・・・ } } } }
ifとforの万能性 • 女の子の落とし方 8 public static void main(String args[]) {
TalkResult result = talk(); if(result.getLINE()){ for(int i = 0; i < 365; i++){ sendMessage(); } } } → ifとforで出来る! if(tooManyMessage()){ break; }
ifとforの万能性 • 私の一日 9 public static void main(String args[]) {
sleep(); for(int i = sleepiness(); i == 0; i--){ if(sleepy()){ goToBed(); } else { goToWork(); } } } → ifとforで出来る!
ifとforの万能性 • 私の一日 10 public static void main(String args[]) {
sleep(); → ifとforで出来る! wakeUp(); goToWork(); for(int i = 0; i < task; i++){ doTask(); if(teiji()){ break; } } goBackHome(); }
最後に・・・ 11 if & for Love
最後に・・・ 12 if & for Love public static void main(String
args[]) { for(int i = 0; i < JJUG_CCC_LT.time; i++){ stayHere(); if(Audience.clapHand()){ break; } } }