Google Glass · Stitch
Google Glass는 '필요할 때만 쓰는' 형태가 될 것이라는 메모, 그리고 Stitch 사용해보기.
아직 만들지 않았습니다
이 페이지는 카드에 적힌 내용을 펼쳐 보여줄 뿐입니다 — 돌아가는 코드도, 열어볼 데모도 아직 없습니다. 무엇을 왜 만들려는지가 아래에 있습니다.
어떻게 보나
아직 범위 미정.
기술 노트
각 항목이 실제로 무엇을 보여주고 어떻게 동작하는지 — 위 카드보다 자세한 기술 설명입니다.
Google Glass · Stitch준비 중
목적: 짧게 남겨둔 메모 — 아직 펼쳐보지 않음.
동작 방식: Google Glass는 '필요할 때만 쓰는' 형태가 될 것 · Stitch 사용해보기.
관련 코드:
"""Google Glass form factor note: "use only when needed" rather than
always-on. A minimal simulation of on-demand vs. always-on activation.
"""
import random
class AlwaysOnDisplay:
"""Always active -- constant power draw, constant attention cost."""
def tick(self, has_relevant_info):
return "rendering (always on)"
class OnDemandDisplay:
"""Activates only when there's something worth showing."""
def tick(self, has_relevant_info):
return "rendering (activated)" if has_relevant_info else "idle (off)"
def simulate(display, ticks=8, seed=0):
random.seed(seed)
active_ticks = 0
log = []
for t in range(ticks):
relevant = random.random() < 0.3 # info worth showing ~30% of the time
state = display.tick(relevant)
if "off" not in state and "idle" not in state:
active_ticks += 1
log.append(state)
return log, active_ticks
for name, display in [("always-on", AlwaysOnDisplay()), ("on-demand (Glass-style)", OnDemandDisplay())]:
log, active_ticks = simulate(display)
print(f"{name}: {log}")
print(f" active {active_ticks}/{len(log)} ticks\n")