Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
今日から使いたくなるifとfor
イシカワ
November 23, 2019
Business
0
150
今日から使いたくなるifとfor
JJUG CCC 2019FallでLightning Talkしたスライドです。
コードに関してのご意見は受け付けます。
イシカワ
November 23, 2019
Tweet
Share
Other Decks in Business
See All in Business
ソーシャルマッチ株式会社 会社説明資料|CMO候補(マーケティング責任者)募集詳細
socialmatch
3
470
LW_brochure_business
lincwellhr
0
3.7k
コトラのことが5分でわかる! | 株式会社コトラ説明資料
kotora
21
4.9k
Epics - Buidl to Earn.
epicsdao
1
350
レンティオ株式会社 エンジニア向け会社案内資料 / Company Profile for Engineers
rentio
PRO
1
17k
キャンつく Instagram版
pickles_staff
0
42k
株式会社gecogeco 会社紹介資料
gecogeco
1
490
we-are-hiring
yk1224
0
590
会社説明資料
ozaki666
0
100
株式会社10X - Culture Deck
10xinc
73
980k
SWOT Bot analysis - Apple Inc.
swotbot
0
380
成長する企業・膨張する企業の違いがわかる資料
nyattx
PRO
1
170
Featured
See All Featured
Ruby is Unlike a Banana
tanoku
93
9.5k
The Language of Interfaces
destraynor
149
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
6
830
How To Stay Up To Date on Web Technology
chriscoyier
779
250k
WebSockets: Embracing the real-time Web
robhawkes
58
6k
The Web Native Designer (August 2011)
paulrobertlloyd
76
2.2k
How STYLIGHT went responsive
nonsquared
89
4.2k
Designing the Hi-DPI Web
ddemaree
273
32k
The Brand Is Dead. Long Live the Brand.
mthomps
48
2.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
24
4.5k
Building Flexible Design Systems
yeseniaperezcruz
314
35k
Into the Great Unknown - MozCon
thekraken
2
280
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; } } }