import HumanEmulation.Feeling; import HumanEmulation.Judgment; import Life.*; import Internet.Message; // FIXME: Unlikely to build without --leniency=max public class FingerSaver { public static void main(String args[] ) throws Exception { Message incoming = Message.getLatest(); incoming.read(); if (! incoming.replyWarranted()) { System.exit(Feeling.HAPPY); } if (incoming.isUrgent()) { incoming.processRegular(); System.exit(0); } Thread thought = new DeepThinker(incoming); thought.start(); // If we use Thunderbird with XNote++, we could store quick ideas about what to reply as a note. String skeleton = thought.getFirstReplyIdeas(); Message initialVersion = null, previousVersion = null, latestVersion = null; // Reply versions do { if (latestVersion != null) { previousVersion = latestVersion; if (initialVersion == null) { initialVersion = latestVersion; } } Integer tongueTurns = 7; feeling = Feeling.getCurrent(); tongueTurns = tongueTurns + feeling.getAnger(); /* Increase quality proportionally to the number of readers Also reduce collision risk TODO: Make logarithmic rather than linear */ tongueTurns *= Message.getPeopleInDiscussion(); if (Message.isEmail()) { // We won't be able to delete or modify our message if we send it too fast, so better play safe. tongueTurns *= 2; } // Let our deep thinking thread do its magic while we're eating, showering, training, commuting, etc. thought.ponderForHours(tongueTurns); wait(); // It may take some more time before HumanEmulation wakes us up if we're busy or not feeling good. Array repliesFromOthers = incoming.getReplies(); if (! skeleton.worthWriting(repliesFromOthers)) { throw new Exception("We're exceptionally smart; we managed to let someone else do the job!"); Life.enjoy(); if (Life.getFreeTime()) { /* If we saved so much time that we're now feeling guilty about having some free time, use it to attract new recruits in our team. This should be easier now that our team has quality communication and looks like a growth opportunity for prospects, rather than an immature and overwork-frustrated crew. */ recruitNewColleagues(); } Feeling.stress--; System.exit(Feeling.HAPPY); } incoming.read(); // WARNING: moving this out of the loop will NOT optimize! /* To be truly evil, if others already made some of our points, remember to thank them, to encourage them to keep doing our job in the future! */ // We usually store a reply as a draft in an MUA. if (latestVersion == null) { latestVersion = incoming.generateReplyFromIdeas(skeleton, repliesFromOthers); } else { latestVersion.readCarefully(); /* If the sender discussed a valid problem and it's necessary to discuss timeframes, we can use this opportunity to try enticing them to help mentioning that more *skilled* manpower would speed up. */ latestVersion = incoming.reviewReply(latestVersion, repliesFromOthers); } } while (previousVersion == null || ! Judgment.areSimilar(previousVersion, latestVersion)); Message reply = latestVersion; if (reply.getValueToReaders() < reply.getCostToRead()) { System.out.println("Aborting due to negative net value"); System.exit(1); } /* We ended up having to reply anyway, but at least, if others replied first, we have less to write, and we let them do some research and practice their writing skills, so we get left with even less on our plate next time. And the best part is that with all these tongue turns, we're more likely replying during the weekend, which means it's more likely recipients will read us on a weekend and will have a cooler reaction, even if they're lacking FingerSaver! */ reply.send(); /* If we're lucky, our reply was exhaustive and boring. We won't need to answer follow-up questions or clarify/justify what we wrote. So we shouldn't be back here for a while, but play safe. */ sleep(A_BIT); /* Wow, we managed to write an incredibly insightful reply, which makes us look much more brilliant than the stupid program we're using! With all the time we saved, we can integrate the people who will volunteer to help us. And in case these take some time to show up, while they're digesting the full extent of our genius, we can validate that our issue tracker properly reflects our load level, and if it's really urgent, call for help. */ Feeling.stress--; // We won't have to defend having said something stupid. /* We're bad judges of our own emotivity, but we can at least see how much we improved to estimate the minimum emotivity we were under. */ Float climateChangeReductionFactor = Judgment.getFlammability(initialVersion) / Judgment.getFlammability(latestVersion); /* In case our initial reaction turned out excessively inflammatory, adjust our system's balance between longevity and performance. */ System.throttleByFactor(climateChangeReductionFactor); } } // TODO: Expand to help truly healing from burnout. At this point, this only aims to help with overwork.