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
320
今日から使いたくなるifとfor
JJUG CCC 2019FallでLightning Talkしたスライドです。
コードに関してのご意見は受け付けます。
イシカワ
November 23, 2019
Tweet
Share
Other Decks in Business
See All in Business
Cursor活用ガイド(非エンジニア向け)
satoyusuke
0
210
5年勤めた印刷屋から ITエンジニアに転職した話
ichigats
0
160
ラクスパートナーズ採用ピッチ資料_エンジニア部門.pdf
rakuspartners_recruit
0
24k
エレコム株式会社 中途採用説明資料
elecom_hr
0
130
LW_brochure_engineer
lincwellhr
0
34k
三井物産グループのデジタル証券〜銀座〜徹底解説セミナースライド(20250630)
c0rp_mdm
PRO
0
2.1k
SlackでDMを使わない方が いい理由を説明してみた
walkersumida
1
1k
rsgt2025-hub-discount-guy
aokiplayer
0
230
Feedback in Action
lycorptech_jp
PRO
1
300
特別講義 理系のための法学入門
seko_shuhei
2
2.4k
M3 Career Culture Deck(セールス&コンサルティング職)
m3c
1
280k
Brief Profile (June 27, 2025)
tsogo817421
2
240
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Bash Introduction
62gerente
613
210k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Become a Pro
speakerdeck
PRO
29
5.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
How to train your dragon (web standard)
notwaldorf
95
6.1k
The Cost Of JavaScript in 2023
addyosmani
51
8.5k
How to Think Like a Performance Engineer
csswizardry
25
1.7k
Building Adaptive Systems
keathley
43
2.7k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
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; } } }