Managing time, the nerd way

Lately I realised I've been socialising too much, meeting new people and doing lots of stuff. But this stops now. Not only because I grew weary of lots of things but also because people disappoint. But machines don't, do they? 

Apparently, the first one to invent (create?) the first AI will win everything. Vladimir Putin talked about it, Elon Musk talked about it, so I need to work on it and work it. I want this AI to be my friend (ง'̀-'́)ง 

But, what if you suck at time management? What if you always over engineer your stuff and end up with half finished products? The only realisation this AI will bring up, is that you fail and you should git gud.

Well, we've all been there.

I think I found a solution, though. Remember when you were studying and how assignments always had an imposed time to finish them in? 

Read this book and bamboozle an essay by tomorrow or you'll get rekt!

That's exactly what I did, I read a book about getting things done (trademark) and then I wrote a huge python program/app/framework that will manage my time for me. 

Here's a technical overview before we dive in:

This image is totally unrelated. 

The biggest problem is overthinking (ᵔᴥᵔ)

First thing, before writing your own thing is look if there is something that exists and use it. 

I tried pomodoro. But my tasks require me to spend more than 25 minutes. 

I tried some other task management app, but I don't give a shizzle about shiny ui, typing in my tasks for half an hour, feel good about and go get a smoke, ending up doing nothing really.

And the list goes on.

So that was a clear fail and an unproductive use of my time.

After giving it some thought, I wrote down exactly what I needed.

  • Decide of a task
  • Time it
  • Tell me when I should be done
So that is the bare bones MVP (most valuable program) that I could need. 

Now, should I code it or is there something that exists that I could repurpose? 

Meet the (ノ◕ヮ◕)ノ*:・゚✧ iEgg

I ordered a fantastic device from Amazon, it's an IOT bluetooth interconnected smart egg that rings when the time is out and notifies you on every social network. A little bit like the Wuphf from the office:

Here is a pic of the glorious device: 

So yeah, a cooking egg. I just decide on a task, twist to set the time and it rings when I should be done and not on facebook. 

The only downside to this, is the constant ticking and my colleagues at work don't appreciate it at all. So as Raymond Hettinger would put it: 

There must be a better way!

And there is indeed.

Your very own Alexa in 11 lines of code (or almost)

I've been doing a lot of DevOps lately at work so I grew familiar with Ansible, bash and other stuff so here is the solution I came up with to track and manage my time.
A little command line script, that acts like a timer and then shout outs on the speakers (°ロ°)☝ "Yo buddy the task is done". 

The script is basically this function, that I saved as in my home directory (you could just paste that stuff in .bashrc or whatever but I was lazy):

function countdown(){
   date1=$((`date +%s` + $1));
   while [ "$date1" -ge `date +%s` ]; do
     current1=$(($date1 - `date +%s`));
     echo -ne "$current1" \\r
     sleep 1
   echo "$2"
   eval "say $2"

And then invoke it like this (wherever you put

. ./ && countdown 2400 "Docker fixen sollte fertig sein."

It will basically say "Docker fixen sollte fertig sein"  with a dude's voice on my Mac after 40 minutes. ("Fixing Docker should be done") You can set it to Woman's voice, or spongebob or whatever. The timer stays and you always have an overview of how much time is left. 

The console output is your log. You can see how much time you spent on a task and also what task you've been working on. 

This changed my life. I've been using it for a week now and it's really good. So, this is not really an Alexa, but we're halfway there! 

Anyways, try it out and good luck counting time and being judged by your computer/mac/toaster. 

written by KarimJedda on 2017-09-04