Skip to content

Instantly share code, notes, and snippets.

@binary-data
Created November 25, 2018 18:46
Show Gist options
  • Save binary-data/bc1bf7349a49950c08324f296f0b7871 to your computer and use it in GitHub Desktop.
Save binary-data/bc1bf7349a49950c08324f296f0b7871 to your computer and use it in GitHub Desktop.
A simplified simulation for Andrey Salomatin's article: https://hackernoon.com/work-hard-enough-and-you-wont-finish-anything-d631d65e7478
DAYS = 20
DEVS_COUNT = 4
QA_COUNT = 2
def run():
tasks = {
'in_progress': 0,
'testing': 0,
'rc': 0,
'done': 0
}
releases = 0
release_days = 0
release_durations = []
for day in range(1, DAYS):
release_days += 1
tasks['in_progress'] += 3
if day % 2 == 0:
t = min(tasks['in_progress'], DEVS_COUNT)
tasks['in_progress'] -= t
tasks['testing'] += t
if tasks['rc'] < 5:
q = min(tasks['testing'], QA_COUNT)
tasks['testing'] -= q
tasks['rc'] += q
else:
tasks['done'] += tasks['rc']
tasks['rc'] = 0
releases += 1
release_durations.append(release_days)
release_days = 0
print(tasks)
print(releases)
print(release_durations)
run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment