The other day I was thinking if there was a logic to how I took on new projects and actually performed them. So, last night I wrote the following python program
This is some imaginary python code reflecting my current state of mind as it relates to work/side projects. Do you have any advice for me? Code it in the comments! 🙂
Please excuse the fact that I don’t have much whitespace to separate the different code blocks. Unfortunately, I haven’t had time to fix an issue with my code that messes up indentation if I put blank lines within code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
""" The other day I was thinking if there was a logic to how I took on new projects and actually performed them. So, last night I wrote the following python program This is some imaginary python code reflecting my current state of mind as it relates to work/side projects. Do you have any advice for me? Code it! :) """ import Farhan import patience, persistence, hardwork, simplicity import random, HigherPower # HigherPower = More knowledgeable person, supervisor, luck, God # Skip do_project and start reading from "Start of the loop below" :) def do_project(me, project): motivation = 100 previously_performed_tasks = [] for task in project.tasks: if task in previously_performed_tasks: motivation = motivation - random.randint(2,10) # Don't like repetition! while true: try: me.attempt(task) except Overwhelmed: # me.procrastinate() # 2008, fa: Shouldn't be doing this! me.motivate("I can do this!") # 2008, fa: added continue # try again. except ReallyCantDoIt: HigherPower.help() # Help! continue else: break # TODO: Figure out how to multi-task efficiently :-/ previously_performed_tasks.append(task) if task.hard and motivation < 80: # Yay, I did a hard task! motivation = motivation + 10 if project.tasks.alot_remaining: me.learn(patience) me.be_patient() me.learn(persistence) if motivation < 10: # Can't do this anymore! if me.really_cant_do(project): me.learn(hardwork) me.learn(patience) me.work_hard() me.be_patient() if me.really_cant_do(project): # Still can't do it :( me.cut_losses() return False else: # self-motivate me.be_persistent() me.work_hard() me.motivate("I can do this!") # 2008, fa: added motivation = 70 continue return True # ============= Start of the life loop me = Farhan(alive=True, driven=True) while me.alive and me.driven: project = me.ideas.next_project_idea() if me.adds_enough_value(project) and simplicity.simplies_life(me, project): project_outcome = do_project(me, project) me.lesson_learned(project) # TODO: Does process_success set 'me.driven'? me.process_success(project_outcome) # TODO: Figure out how to multi-task efficiently :-/ # TODO: What sets 'me.alive'? |