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
0
330
今日から使いたくなるifとfor
JJUG CCC 2019FallでLightning Talkしたスライドです。
コードに関してのご意見は受け付けます。
イシカワ
November 23, 2019
Tweet
Share
Other Decks in Business
See All in Business
Studio Inc. Company Deck
studiodesignapp
PRO
0
14k
『ふりかえる力』を育み、メンバーの自走力を高める 1 on 1 / 1-on-1 sessions to foster self-reflection
tbpgr
1
900
2025年12月期 第二四半期決算説明資料
mobcast20040326
PRO
0
530
20250901_UPDATER_companysummary
updater_pr
0
87k
ヘルスベイシス_会社説明資料_v3.4
yasudashoyo
1
62k
GeminiのCanvas機能で脳を悦ばせてみた
o2mami
1
240
会社紹介資料 / ProfileBook
gpol
4
45k
拝啓、登壇回数0回だった一年前の私へ
natty_natty254
4
170
AIが実現するプロダクトオーナーと開発者の架け橋
bicstone
2
200
透明性レポート(2025年上半期)
mercari_inc
0
410
Cierpa&Co._Culture Deck_202509
cierpa0905
PRO
0
580
FinTech WATARU会 #16 金融経済圏の激戦図:預金集めの次の一手
8maki
0
190
Featured
See All Featured
Making Projects Easy
brettharned
117
6.3k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
Rails Girls Zürich Keynote
gr2m
95
14k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
20k
GraphQLとの向き合い方2022年版
quramy
49
14k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
480
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; } } }