Who is responsible for making sure I have my rainy day money?

I am looking to move out. Part of this is deciding how much I am going to need to put away for a rainy day. In the current Covid-19 climate, this rainy day is looking mostly like unemployment, not a wrecked boiler or broken appliance.

Looking at what would be available if I was suddenly out of work, the Universal Credit system is the first port of call but might not cover me living with a high London rent and the bills associated. I might get some money from redundancy or severance pay but that is highly dependant on my length of service.

The buck falls to me to make sure I have savings put away to cover me through the months of searching for new work; the Money Advice Service recommends three months of essential outgoings. A study from 2018 for Legal and General (Atomik Research on behalf of Legal & General) found that 15% of those surveyed have no savings at all, and less than a third have under £1500 put away.

Should government then mandate we save more or should we look at schemes such as Italy’s TFR?

If we look at TFR in Italy were part of your salary is deferred, at to a point where might resign or leave due to illness, you can build up a comfortable buffer in case of a rainy day. Calculated to be about a 14th of your salary, plus 1.5% and something for inflationary concerns, it can work out - but has a similar pitfall to the current statutory redundancy pay that short term service can leave you in the lurch.

In comparison, Germany’s scheme acts in a similar way to the UK’s National Insurance contributions for benefits and pensions. For an employee, it stands at 2.5% of income, with responsibility be placed equally on the employer-employee to contribute. The conditions needed to quality are much like if you were seeking unemployment allowance and not a deferred payment like that of Italy.

So then what about the other way and placing the onus entirely on the employee?

Forcing the employee to look at their fixed outgoings and save 3 months worth might be a smart strategy - acting as an extra stop-gap before need to seak government support. This might be hard if the time frame was short.

If my situation changed and I find myself not wanting to be tethered as a renter, but buy a house? Let me use the savings as part of a deposit contribution and decrease my overall payment sizes.

If the current climate of low interest and a higher deposit sheet continues, we could see a large swathe of investment and renewed confidence in lenders. This is - of course- assuming normal economic circumstances.

Covid-19 has shown how government support has been extremely useful in cushioning in the short term the bite of economic shocks. In a 5 country comparison paper, the Institute for Government showed wage subsidy schemes have slowed unemployment. If we consider the borrowing needed to fund these schemes in some countries if we could reduce the amount by having force savings coupled with a better unemployment “insurance”. Both measures when an economy is not under economic strain could have a huge benefit, and be extended to allow such savings to be used at other times.

Brits: What is our face-mask problem?

Social Distancing, Regular Handwashing, Face Masks, Bubbles: All these concepts of trying to reduce the spread of SARS-CoV-2. 

Uptake in some has been slow; wearing a face-mask is not massively commonplace in the general public (unless it has been mandated as if you are using the public transport network); certain scenes of packed beaches have spread across news outlets and mass outrage has often followed by those who are calling it unfair and shameful; police-calling on neighbours and Facebook group posts about "whoever <insert persons> parent's are should be ashamed for letting them outside to play and meet up".

Why has facemask uptake been so slow?

I cannot recall a time when a health-care problem has affected the UK and been under all the following conditions:
  • Not individualistic in nature - as in your current illness is something contained within your self. Most illness is personal in nature - that fact that you have an overactive thyroid does not spread to others - in a physical sense.
  • A virus that is so easily spread, has a massive asymptomatic transmission but not a massive mortality rate and being slowly discovered to be in the general population
  • The floor for catching it is simply being around someone - no specific, self-inflicted method of transfer. It is highly contagious with very little effort and there is still discussion around whether it can be carried on airborne particles.
H1N1 was close; I re-call massive poster campaigns at local doctor's surgeries. Similarly, when Sars hit in 2003, there were similar levels of trying to educate the public, however, both diseases did not hit as far within the internal UK. No pattern of behaviour of wearing a face-mask, regular distancing, cancelling of events was established as in these cases the disease was not on track for them to be needed.

After spending time in the People's Republic of China where wearing a mask for colds and other minor ailments (along with not breathing int he thick smog in Beijing), using a face-mask is just a social standard. It is expected and they easily to hand. #

Face-masks as a style item and being "unfashionable" is not even an idea I see as being worth consideration. As has been evident with treads of decorating them, videos of people covering them in makeup. I own a knitted patterned one, with the company being able to supply around 30 different designs. 

Will face-masks for the common cold become a norm? I am not sure. Government has pushed them on public transport - as a legal requirement- and recommended, but it has not been as plastered as the "Stay at Home, Save Lives, Protect the NHS" slogan and it's associated friends. The Royal Society and British Academy looked at the behavioural science of mask-wearing, stating that 25% of people in the UK wore masks in public places. This in stark comparison to 83% in Italy and 64% in Spain. I hope it would, but who knows. 

Face-masks are a vital part of being safe outside when you have to mix with others. I'll leave you with my favourite infographic, so far, around why wearing a mask makes sense. (I did have to use it to explain to someone why it is worth it but that is another story).Still unclear on the value of masks? Let the pee meme explain - SFGate


A very dumb experiment in Sorting

The Mistake, but the question.

As part of the preparation for interviews, I have been re-touching some of the foundational concepts in Computer Science. Some of the more interesting challenges have been relearning and implementing sorting algorithms in Python.

Success has been... wrought with interesting mishaps where my understanding did not quite match the implementation I had written. One of these more interesting mistakes arose from creating a bubble sort.

I will say now- I did successfully implement a bubble sort, but the first "mistake" did lead to an interesting question:

"What is the efficiency of this janky creation?"

The concepts around efficiency are not new to me, but testing and saying what it is for a new algorithm where it is not obvious is a new area.

The Algorithm

On a gist here - in case you ever feel (but I do not know why) inclined to copy it and try it out.
def somethingSort(array): pointer = 0 number_of_comparisons = 0 while pointer < len(array)-1: if array[pointer] > array[pointer+1]: array[pointer+1],array[pointer] = array[pointer],array[pointer+1] pointer = 0 else: pointer += 1 number_of_comparisons += 1 return array,number_of_comparisons
  • Compare the current value and the next
  • If Current is bigger then the next, swap them
  • Reset the pointer back to 0 (go back to the beginning)
  • ELSE increase the pointer by one (move onto the next pair of numbers and compare)
  • If the pointer is at the current length of the input array, then we have finished sort
I can see the problems very clearly when I summarize it like this. If you happen to be sorting at the end of the array, after you find a pair to swap, you will be sent right back to the beginning. This can cause the algorithm to re-check all the values.. at least twice.

The Analysis

Now, this is the bit I was mostly interested in, but unsure when it came to generating a conclusion. This is an area - scalability- where I believe there will always be lots of questions are left to be answered in some form, as to how things scale informs major design decisions.

All calculations were run at least 10 times for each randomly generated list of up to 500 values long. The randomly generated numbers were between 1 and 100 inclusively.


The algorithm quite nicely (but unfortunately) scaled cubically. This being that for every input, it will do the cube of it in terms of the number of comparisons. For reference:
  • Quick Sort has an average nlogn for comparisons - in the worst cases (but rarely)
  • Bubble Sort has an average and worst of n² 
There is an R² value attached to the graph, however this is not a good metric to use, as R² is primarily for comparing linear data to a line of best fit. This is not linear.


This is the point of data is the area I am least certain on. The time was calculated by recording the time before the calculation and after then taking the difference. All calculations were left on the same computer with the same applications in the background.

The point of the analysis I am not sure of is around what the equation of the correlation line is. As stated before, using R² is a bad choice for non-linear data. My indecision arises around how that value improves when increasing the power of the correlation line. So I am being hypocritical by using it to decide on the equation. It is somewhere between  n² and  n⁵.

Learning is slow but worth the climb

This is still a new area for me. I really did enjoy re-visiting and programming sorting algorithms. The analysis itself might be a bit off, but I can only improve from there.

I already have in mind improvements for this algorithm, and doing so might mean it is just a copy of one that already exists.

Onwards to more learning!