Workspace IndexDev Notes › Google Glass form factor & Stitch

#147PoC

Google Glass form factor & Stitch

A note that Google Glass will likely land as a "use only when needed" form factor, plus trying out Stitch.

Not yet scoped.

Why

A quick idea to revisit, not yet expanded.

How it works

Google Glass is expected to land as a "use only when needed" form factor rather than always-on wear; separately, try out Stitch.

Related code

"""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")

← All Dev Notes · Workspace Index · Top ↑

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")

← 전체 개발 노트 · 워크스페이스 인덱스 · 맨 위 ↑