共感で繋がるSNS
GRAVITY(グラビティ) SNS

投稿

リアス

リアス

# プログラマーあるあるbot
class ProgrammerLife:
def __init__(self):
self.problem = "バグが発生"
self.status = "絶賛デバッグ中..."

def main_loop(self):
# ログメッセージ
print(f"[{self.problem}]: {self.status}")

# 処理開始
while True:
# デバッグが永遠に終わらない
if self.debug_complete():
# 処理完了
self.deploy_success()
break # 正常終了
else:
self.debug_frustration()
self.search_google() # Google検索という名の神頼み

def debug_complete(self):
# 奇跡的にバグが解消される確率
return random.random() < 0.001

def deploy_success(self):
print("🎉 3日間徹夜したバグが、printデバッグ入れたら一瞬で解決した。")
print(">>> 謎の達成感と虚無感のSyntaxWarning: 未定義の感情です")

def debug_frustration(self):
print("😭 printデバッグを無限に入れても解決しない。")
print(">>> 絶望Exception: 原因不明")

def search_google(self):
print("👨‍💻 Google「バグの原因は君のコーディングミスだよ😎」")
print(">>> 煽りException: 💢")

# 実行
if __name__ == "__main__":
import random
life = ProgrammerLife()
life.main_loop()
GRAVITY
GRAVITY13
話題の投稿をみつける
関連検索ワード

# プログラマーあるあるbot