The best Thunderbird addon

The best productivity Thunderbird addon in my opinion, is Nostalgy. If you get 200+ emails a day and you are searching for a very effective mail mover, folder navigator stuff, try this as well. If you get used to it, you can turn off the Folder pane entirely.

Addon development was lagging a few years back and did not follow Thunderbird versions, but it was worth to hold back to an older Thunderbird just to have it working.

The addon now is up-to-date, it is very efficient, properly configurable, Linux command line fans will appreciate its style.

 

Advertisements

JIRAism with dates

If you have a filter that searches for a certain date range, like:

created >= 2018-02-01 AND created <= 2018-08-31

you are going for a huge surprise when it does not find entries that were created at 2018-08-31.

Turns out, 2018-08-31 is really “2018-08-31 00:00” and you can immediately see the problem. If anything was created on 08-31, during the day, it won’t show up in the results.

You have to either increase the day by 1 to 2018-09-01 or add hours:minutes to the search expression: “2018-08-31 23:59” but then you have to enclose it in quotation marks.

Avoiding Julia global variables for performance

The Performance Tips in Julia documentation mentions that we should avoid global variables as the compiler cannot optimize its type as it can change any time.

This implies for the uninitiated the worst problem that would occur if one doesn’t care about this warning, that the program will be expecting this value to be anything, and converting it when necessary, taking up CPU time.

There is a side implication though and its impact IMHO is worse and probably contributes a lot to the slow execution time. When calling a function which relies on a global variable (olde’ Pascal habit), the program will allocate metric tons of memory through gazillion allocation cycles. I do not intend to dig deep in JIT, VM and why’s, this is just the observation:

function f(count)
  step = 0
    for i = 1:count
    step += stepValue
  end
end

stepValue = 2

@time f(1)
@time f(10^7)

  0.011182 seconds (1.08 k allocations: 134.588 KiB)
  1.108794 seconds (10.00 M allocations: 152.596 MiB, 20.90% gc time)

This happens because `stepValue` is global.
If `stepValue` is provided as an argument, running will be 3 magnitudes faster, allocations 5 magnitudes lower:

function f(count, stepValue)
  step = 0
    for i = 1:count
    step += stepValue
  end
end

@time f(1, 2)
@time f(10^7, 2)

  0.006086 seconds (1.09 k allocations: 160.264 KiB)
  0.005649 seconds (189 allocations: 11.816 KiB)

(the first @time executions are there to heat-up JIT and allocations, the second run is the real timing)

Installing gmpy2 in Ubuntu 16.04 for Python 3

Installing gmpy2 under Python 3 seems easy:

» pip3 install gmpy2

But this won’t work for the first time because pip whines about not finding mpfr.h in the proper place (this is part of the MPFR library), so libmpfr-dev needs to be installed.

Then it whines about not finding mpc.h in the proper place neither, so libmpc-dev needs to be installed as well. If you are lucky, then you had installed both libs for other reasons and you are wasting time here. But if not:

» sudo apt-get install libmpfr-dev libmpc-dev

Now gmpy2 install at last:

» pip3 install gmpy2
Collecting gmpy2
...(blahblah)Successfully built gmpy2
Installing collected packages: gmpy2
Successfully installed gmpy2-2.0.8

Bitbucket and its brilliant billing logic

Last year, one of my colleague left the company, just to return 6 months later. He is really a boy scout person, tidying up everywhere he can. So when he left to that new company, he modified his Bitbucket profile, especially the company name he works at.

When working with us, he was Billing Contact at our Bitbucket.org account and the Bitbucket account was payed with his superior’s credit card. Atlassian was sending their monthly bill, which we liked, because we like deducing tax where we can.

Little did my colleague know, when he modified his company name, Atlassian managed to modify the Customer’s name on every bill onward sent to us. It is good to hear again: Atlassian modified the frikkin’ customer name because a single, individual person modified the company he works at.

Now I don’t know how bills are created in United States of A, but it has a high probability that Dolphin Inc. cannot really deduce tax by waving a bill, which has “Turtle Inc.” on it. If it is possible, I’ll probably move there to make billions.

The best part is that the cardholder – who really pays the bill – did not change at all.

If you’ve ever met Bitbucket’s annoying account/user mechanism, you know that Bitbucket tries to convince you that you should have a single account, and you can be in multiple teams. This looks convenient, but the above billing procedure makes this very problematic. “Billing Contact” has to be a new account with proper company name, never to change it (however the creating user still holds the capability to modify the profile any time).

Of course, I could advise how to mitigate this problem, but that is so much in the common-sense area, my mind is still going round how this clusterfuck could even happen.

Steam client on Android is pure genius. Almost.

TL;DR: It is impossible to log in to the Steam services with the Android Steam app using only that phone the app is on (until a fix arrives).

The Steam client on Android has two security features built in it.

One of them you might already know.
If you try to authenticate into Steam from a computer/browser where you have never before logged in, Steam will not let you in immediately, but first it will ask a security code. Behind the scenes Steam sends this security code to the current email address in your Steam profile. You have to access that email, read the code and provide it to the login form (which awaits your input).

This feature is very useful. If someone were to get your Steam credentials, he/she cannot log in, as they won’t have access to your email service where the security code arrives.

The second feature is mobile phone specific.

If you download the Steam client, go to the login page, and for some reason you leave the login page in any state, username/password entered or not, and later you return to the Steam app, every field on the login form is cleared and you need to reenter it.

These two security measures combined is the most fantastic, evar.

If you try to log in with the Steam client for the first time on an Android phone and you enter your username/password, Steam’s superb “new-browser” defense mechanism kicks in. The Steam client will ask for the security code. To take a look at the security code, you have to change to Gmail (or whatever mail client) app and read the email. So when you return to the Steam app, the second “clear-the-form” feature kicks in, and the login form is cleared.

What happened to QA?

update: people with smart phones that can split the screen are saved as changing screens that way does not move focus away from the Steam password page and does not clear all fields.