Last active
August 29, 2015 14:06
-
-
Save yuitest/59c4aadaca6378c179ab to your computer and use it in GitHub Desktop.
生活感あふれる擬似コード
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
生活感あふれる擬似コード | |
なるべく、現状をそのままに書きます。 | |
改善点があればコメントで。 | |
必要に応じて Gist から GitHub に移行します。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when 入眠: | |
if 次の朝が出社日: | |
iPhone のアラームを ON | |
else: | |
iPhone のアラームを OFF | |
ensure iPhone が非マナーモード | |
ensure iPhone が充電中の状態 | |
ensure iPhone の音量が最大 | |
ensure iPhone にイヤホン・ヘッドホンが装着されていない |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when 朝: | |
if 出社日 and 出社日だがまだ 1 時間以上の余裕はない: | |
# 洗濯乾燥機があれば分岐いらない | |
return | |
天気を取得する | |
if 雨が降る: | |
# 乾燥機があれば分岐いらない | |
return | |
洗濯して干す() | |
def 洗濯して干す: | |
洗剤の残量チェック | |
洗濯物を回収する | |
if 容量が多すぎる: | |
洗濯物, 残り = 分割(洗濯物) | |
TODO に残りの洗濯を追加する | |
洗濯機を作動させる |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
洗濯乾燥機が欲しい | |
-> 置き場がない | |
-> 引っ越す | |
-> お金がない | |
-> 貯金する | |
引っ越す | |
-> お金がない | |
-> 貯金する |
https://github.com/gennad/Design-Patterns-in-Python/blob/master/null.py
import null
してモック代わりに使った方が厳格になりそう。
Python 3 だと日本語を識別子に使えるし。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
脳を整理する。