Friday 11 September 2015

Law of Interface Responsiveness

Changes in response time between 0 and 1 seconds don't matter, because they're too small to notice.

Changes in response time between 1 and 10 seconds matter a lot, because the user will get bored waiting for it to finish.

Changes in response times above 10 seconds again don't matter, because the user is less likely to be sitting there waiting for it to finish, and will have gone and done something else.

Thursday 3 September 2015

Mental arithmetic tips

For a sum like 8 * 26, imagine 26 -> 16 48, and when you have that clear in your head, smash them together to get 208.

To factorize a number less than a 1000, you only need to test divisibility by primes up to 31. There aren't that many of them: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 and 31.

To test for divisibility by 2, check if the last digit is divisible by 2. To check 3, check if the sum of the digits is divisible by 3. To check 5, check if the last digit is 5 or 0. To check 11, add and subtract alternative digits, for example 374 = 11 * 34, and 3 + 4 - 7 = 0.

The others are not so easy. For some of them, think of subtracting a multiple of the prime, for example

301 = 280 + 21 = 7 * 40 + 7 * 3 = 7 * 43.

Test the lower primes first, because they are more likely to succeed.

For the larger primes, you can memorize the composite numbers they are involved in:

23 * 23 = 529
23 * 29 = 667
23 * 31 = 713
29 * 29 = 841
29 * 31 = 899
31 * 31 = 961