Skip to content

Instantly share code, notes, and snippets.

@philipkiely
Created June 8, 2020 15:36
Show Gist options
  • Save philipkiely/ecc2fb5fbc365eea4eb1dd96f37782df to your computer and use it in GitHub Desktop.
Save philipkiely/ecc2fb5fbc365eea4eb1dd96f37782df to your computer and use it in GitHub Desktop.
A fun script by Liam Niehus-Staab
#!/usr/bin/env python
"""
The 9 questions for technical article idea generation.
Implemented by Liam Niehus-Staab, April 2020
Rights assigned by Liam Niehus-Staab to Philip Kiely, April 2020, as a birthday present
Released with MIT License by Philip Kiely, June 2020
"""
import sys
questions = ["What programming languages do you know well enough to write about?",
"What frameworks and libraries within those languages do you enjoy using?",
"What company specific technologies do you know well?",
"What topic domains are you interested in?",
"What topic domains are your current clients interested in (if you have any)?",
"What topic domains are your ideal future clients interested in?",
"What fields have relevant prior projects explored?",
"What real world systems could you reverse engineer?",
"What environments have you programmed in?",
]
answers = [[] for q in questions]
for i,question in enumerate(questions):
print()
print(question)
print("(Enter 'next' to move to the next question and 'quit' to exit the program)")
while True:
print("Your answer to the above question: ", end="")
answer = input().strip()
if answer == 'next':
break
elif answer == 'quit':
sys.exit()
else:
#answered question, add to answers
answers[i].append(answer)
print("We've collected your answers, and have generated a few ideas.\nFeel free to think of your own ideas as well, with the one's we've generated as inspiration!")
print("(Enter 'n' for the next idea, 's' for small skip, 'S' for big skip, and 'quit' to exit the program)")
"""templates
Topic with language for exp
4/5/6/7/8 with 1/2/3 (for 9)
"""
def merge(lists):
l = [x for x in lists[0]]
for i in range(1, len(lists)):
l.extend(lists[i])
return l
ans = [merge(answers[3:8]), merge(answers[:3]), answers[8]]
if not ans[2]:
ans[2].append("nerds")
def idea_get(sec1, sec2, sec3):
return "{} with {} (for {})".format(ans[0][sec1], ans[1][sec2], ans[2][sec3])
print(ans)
s1 = s2 = s3 = 0
while True:
if s3 >= len(ans[2]):
s3 = 0
s2 += 1
if s2 >= len(ans[1]):
s2 = 0
s1 += 1
if s1 >= len(ans[0]):
print("That's all the ideas we have that fit the template!")
sys.exit()
print()
print(idea_get(s1,s2,s3))
cmd = input().strip()
if cmd == 'quit':
sys.exit()
elif cmd == 's':
s2 += 1
s3 = 0
elif cmd == 'S':
s1 += 1
s2 = s3 = 0
else:
s3 += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment