In the summer of 1997, NASA's Pathfinder spacecraft landed on the surface of Mars, and began transmitting incredible, iconic images back to Earth. But several days in, something went terribly wrong. The transmissions stopped. Pathfinder was, in effect, procrastinating: keeping itself fully occupied but failing to do its most important work.
În vara anului 1997, naveta spațială a NASA, Pathfinder, a aterizat pe suprafața planetei Marte și a început să transmită înapoi pe Pământ imagini incredibile și iconice. Dar după câteva zile acolo, s-a stricat ceva. A încetat transmisia. Pathfinder de fapt tot amâna: își ocupa tot timpul, dar eșua cu privire la îndeplinirea celui mai important scop.
What was going on? There was a bug, it turned out, in its scheduler.
Ce se întâmpla? S-a dovedit că exista o eroare în programatorul ei.
Every operating system has something called the scheduler that tells the CPU how long to work on each task before switching, and what to switch to. Done right, computers move so fluidly between their various responsibilities, they give the illusion of doing everything simultaneously. But we all know what happens when things go wrong.
Fiecare sistem de operare are ceva denumit programatorul care îi spune CPU-ului cât timp să aloce fiecărei sarcini, înainte să permuteze, și la ce să permuteze. Făcut corect, computerele se mișcă ușor printre responsabilitățile lor variate și dau iluzia că fac totul simultan. Dar cu toții știm ce se întâmplă când ceva o ia razna.
This should give us, if nothing else, some measure of consolation. Even computers get overwhelmed sometimes.
Ar trebui să ne dea, măcar, o metodă de consolare. Chiar și calculatoarele se suprasolicită uneori.
Maybe learning about the computer science of scheduling can give us some ideas about our own human struggles with time.
Poate că învățând despre știința programării computerelor vom căpăta niște idei despre propria luptă umană cu timpul.
One of the first insights is that all the time you spend prioritizing your work is time you aren't spending doing it. For instance, let's say when you check your inbox, you scan all the messages, choosing which is the most important. Once you've dealt with that one, you repeat. Seems sensible, but there's a problem here.
Una din primele descoperiri e că tot timpul petrecut cu prioritizarea muncii e timp pe care nu-l folosești muncind. De exemplu, să spunem că-ți verifici inbox-ul, verifici toate mesajele, alegându-l pe cel mai important. După ce te-ai ocupat de acela, repeți procedura. Pare rezonabil, dar există o problemă acolo.
This is what's known as a quadratic-time algorithm. With an inbox that's twice as full, these passes will take twice as long and you'll need to do twice as many of them! This means four times the work.
Asta e cunoscut sub denumirea de algoritm de timp pătratic. Cu un inbox care e de două ori mai plin, aceste eforturi vor dura dublu și va trebui să rezolvi de două ori mai multe! Asta înseamnă muncă împătrită.
The programmers of the operating system Linux encountered a similar problem in 2003. Linux would rank every single one of its tasks in order of importance, and sometimes spent more time ranking tasks than doing them. The programmers’ counterintuitive solution was to replace this full ranking with a limited number of priority “buckets.” The system was less precise about what to do next but more than made up for it by spending more time making progress.
Programatorii sistemului de operare Linux au întâlnit o situație similară în 2003. Linux își clasifica fiecare sarcină în ordinea importanței sale, și uneori petrecea mai mult timp clasificând sarcinile decât făcându-le. Soluția contraintuitivă a programatorilor a fost să-i înlocuiască toată clasificarea cu un număr limitat de „găleți” prioritare. Sistemului îi lipsea precizia următorului pas, dar a compensat foarte mult focalizându-se mai mult pe progrese.
So with your emails, insisting on always doing the very most important thing first could lead to a meltdown. Waking up to an inbox three times fuller than normal could take nine times longer to clear. You’d be better off replying in chronological order, or even at random! Surprisingly, sometimes giving up on doing things in the perfect order may be the key to getting them done.
La mail, dacă insiști să rezolvi întâi cel mai important lucru, ai putea da greș. Când ai un inbox de trei ori mai mare decât ar fi normal ți-ar lua de nouă ori mai mult timp să-l rezolvi. Ți-ar fi mult mai bine dacă ai răspunde la ele cronologic sau chiar pe sărite! Surprinzător, uneori renunțarea la crearea lucrurilor în ordinea perfectă ar putea fi cheia rezolvării lor.
Another insight that emerges from computer scheduling has to do with one of the most prevalent features of modern life: interruptions.
Altă idee ce reiese din programarea computerelor are adesea legătură cu una din etichetele vieții moderne: întreruperile.
When a computer goes from one task to another, it has to do what's called a context switch, bookmarking its place in one task, moving old data out of its memory and new data in. Each of these actions comes at a cost.
Atunci când un computer trece de la o sarcină la alta, are legătură cu ceea ce numim o schimbare de context, marcându-și locul într-o sarcină, mutând datele vechi în afara memoriei sale și introducând date noi. Toate aceste acțiuni au un preț.
The insight here is that there’s a fundamental tradeoff between productivity and responsiveness. Getting serious work done means minimizing context switches. But being responsive means reacting anytime something comes up. These two principles are fundamentally in tension.
Ideea e că există un compromis fundamental între productivitate și receptivitate. Îndeplinirea serioasă a orice înseamnă minimizarea schimbărilor contextului. Dar a fi receptiv înseamnă să reacționezi când survine ceva. Aceste două principii sunt în mod fundamental în conflict.
Recognizing this tension allows us to decide where we want to strike that balance.
Recunoașterea acestui conflict ne permite să decidem unde vrem să potențăm acel echilibru.
The obvious solution is to minimize interruptions. The less obvious one is to group them. If no notification or email requires a response more urgently than once an hour, say, then that’s exactly how often you should check them. No more.
Soluția evidentă ar fi să minimizăm întreruperile. Cea mai puțin evidentă ar fi să le grupăm. Dacă nicio notificare sau un mail nu necesită un răspuns să spunem, mai urgent de o dată pe oră, atunci acesta e intervalul exact la care ar trebui să le verifici. Nu mai des.
In computer science, this idea goes by the name of interrupt coalescing. Rather than dealing with things as they come up – Oh, the mouse was moved? A key was pressed? More of that file downloaded? – the system groups these interruptions together based on how long they can afford to wait.
În știința computerelor, această idee se numește unitate întreruptă. Decât să rezolvi lucrurile pe măsură ce apar - „A fost mutat mouse-ul? A fost atinsă o tastă? S-a descărcat mai mult acel fișier?” - sistemul grupează împreună aceste întreruperi în funcție de cât de mult pot aștepta.
In 2013, interrupt coalescing triggered a massive improvement in laptop battery life. This is because deferring interruptions lets a system check everything at once, then quickly re-enter a low-power state.
În 2013, unitatea întreruptă a declanșat o îmbunătățire masivă în durata de viață a bateriilor de laptop. Asta deoarece amânarea întreruperilor lasă sistemul să verifice deodată totul, apoi reintră rapid într-o stare de energie scăzută.
As with computers, so it is with us. Perhaps adopting a similar approach might allow us users to reclaim our own attention, and give us back one of the things that feels so rare in modern life: rest.
Și noi și computerele experimentăm același lucru. Probabil că adoptând o abordare similară ne-ar permite nouă utilizatorilor să ne reclamăm propria atenție, și să ne redea unul dintre lucrurile ce le simțim rar în viața modernă: odihna.