Last active
April 28, 2019 07:15
-
-
Save loehx/192c1d1f157a296b3b8409995b80f290 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Me from 'myself'; | |
function LearnCoding() { | |
var motivation = 0; | |
while (Me.interested) { | |
if (motivation <= 0) { | |
motivation += Me.learnSomethingNew(); | |
} | |
var success = Me.code(); | |
if (success) { | |
motivation++; | |
Me.body.releaseDopamine(); | |
} | |
else { | |
motivation--; | |
Me.body.releaseCortisol(); | |
} | |
if (motivation < 0) { | |
// TODO: Find a way to stay on track and not give up | |
Me.interested = false; | |
return; | |
} | |
Me.doStuff(); | |
Me.sleep(); // internally calls: Me.body.brain.adapt(); | |
} | |
} | |
export default LearnCoding; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment