## Work = mad. Physics says so. Maths proves so.

Work = mad” may not be news to you. But did you know it is a physical fact and provable using Maths? It all started with a discussion about moments, torque, force, work, energy, power etc. We need to briefly talk about Force, and then Work.

## Force

Sir Isaac Newton is probably the greatest scientist ever. I once stood in the same room as Newton, unfortunately I was 350 years late. One of the many contributions Newton made to Physics was in the ‘field of mechanics’ (disambiguation: not a pasture of grease-monkeys, rather the area of physics concerned with the study of bodies in motion).

Newton gave us 3 Laws of Motion, and Newtons 2nd Law of Motion states “When a resultant external force acts on a body, the rate of change of velocity is proportional to and takes place in the direction of that force“. In other words, when we apply a force, F, to an object/mass, m, the object/mass will accelerate, a, (rate of change of velocity) proportionately to the size of the applied force. Newtons 2nd Law of Motion is symbolized as:

$$Force = mass \times acceleration$$

$$F = ma$$ Equation (1)

## Work

We can thank Gustave-Gaspard Coriolis for the notion of ‘Work’ in mechanics. ‘Work’ refers the distance (displacement) over which a Force is applied, and can be symbolized as:

$$Work = Force \times distance$$

$$Work = Fd$$ Equation (2)

## Finally

If we now substitute Equation (1) into Equation (2), by substituting ‘ma’ for F, we can see that

$$Work = mad$$

Q.E.D.

Note: The above derivation takes a simple non-relativistic case of a Force operating on a mass in a straight line.

## Chrome 70 – Chrome sign-in is Automatic with any Google login

The latest update to Chrome (Chrome 70) sneaks in yet another ‘convenience’ for you. When you use Chrome to login to and Google account (Gmail, YouTube, etc.), it will automatically also log you into Chrome. That could be handy – if you want to sync your Passwords, Payment handlers, bookmarks, browsing history, search history, etc. But it could be a serious security and privacy breach if the machine you’re using is not your machine; whether that be in work, college, library, internet-cafe etc.

There is no pop-up warning you, or asking your permission, and you are opted in automatically when you update to Chrome 70. Fortunately you can disable it. It’s in the same location as the previous sneaky ‘convenience’ was added, as described in my previous blog post “Chrome 68 Payment Handler API – is it storing Payment Methods?“.

Thanks to issues raised by users as described in this Google Blog “Product updates based on your feedback” Google relented and included the option to turn off the auto Chrome sign-in. But why did the opt-out only come after a wave of negative feedback? Didn’t Google realise in their design meetings the opt-out was a necessity? Or did they prioritise the data they’d gather over your security and privacy?

## Chrome 68 Payment Handler API – is it storing Payment Methods?

### Chrome 68 Payment Methods – it’s on without you knowing it’s on

Googles latest update of the worlds most popular browser just released is Chrome 68. There are several additions in Chrome 68 and the labelling of non-https websites as “Insecure” is rightly getting plenty of attention. But another important addition in this update is the inclusion of Chrome 68 Payment Handler API, and notably the fact it is ENABLED by default. You may like that, or you may not.

If you don’t want Chrome giving permission to websites you visit to “check if you have payment methods saved” then head to your Chrome settings [see instructions below] now and DISABLE the option – because Google have already enabled it in the Chrome 68 update.

### What are Payment Methods, are they good or bad?

Payment Methods are all about making it easier to make online purchases. In principle that’s a good thing, however you may not like it due to the privacy, security or other considerations. The good thing is that you have a choice, and it’s up to you to make an informed choice. The bad thing is that Google have decided for you and you’re not informed, they could have at least given a pop-up to ask how you would like to configure the new option. If you don’t want the slightly more technical details – no problem, just skip the next section and jump to “How Do I Disable Payment Methods in Chrome?”.

### The W3C and Payment APIs

The World Wide Web Consortium (W3C) describes itself as an “international community where Member organizations, a full-time staff, and the public work together to develop Web standards.“.  There are two particular standards that relate to Payment Methods:

“This specification standardizes an API to allow merchants (i.e. web sites selling physical or digital goods) to utilize one or more payment methods with minimal integration. User agents (e.g., browsers) facilitate the payment flow between merchant and user.”

“This specification defines capabilities that enable Web applications to handle requests for payment.”

The two links above give the full specs, including further links to the repos on github for both Payment Request API source code, and Payment Handler API source code. That means you can contribute to the APIs – remember the W3C plus others “and the public work together to develop Web standards.“. That’s pretty cool. In addition, or alternatively, you could contribute to your favourite open source browser. If your favourite browser isn’t open source then you can’t contribute to it. That sucks. Of course you could make an open source browser your new favourite, or start your own open source browser…

## ReHacking Google Chrome – Customisable New Tab Extension

### New Tab → Customisable New Tab 🙂

Take control of your web browsing experience with this customisable New Tab Custom Colour Blank Page Chrome Extension. It will allow you to pick a colour for your New Tabs in Chrome, because you can choose from a selection of popular colours (Black, White, Incognito, InPrivate, Red, Yellow, Blue, etc.) or similarly choose from a palette of 256 colours to suit your personal mood and taste. This will replace the default New Tab in Chrome which consists of 2554 lines of HTML and scripts, with a quick loading 10 lines of HTML. Gone will be the Search bar and the 8 Most Recently visited websites.

If you already installed my simpler “New Tab Blank Black Page” or read about it in the blog Hacking Google Chrome – Custom Chrome New Tab Extension  then you may also like the extra features this new Extension offers. Or if you are happy with just Black then that simpler Extension is perfect for you.

Another advantage to using this New Tab extension is that you can set the Start Page in Chrome to open your New Tab page. So Chrome will launch even quicker, and it might avoid some awkward moments. Like when you open Chrome or a New Tab and your boss sees a list of recruitment websites in your Most Visited Sites. Or your partner sees you’ve been on dating websites :p . Or most frightening is if your nerd friends see you’ve visited uncool-tech sites <_< , now you can impress them with your customised New Tab. Of course a true nerd will write their own, hey wait a second!

### How do I get the Extension?

Open Chrome and simply go to the New Tab Custom Colour Blank Page ( ← or click that link) in the Chrome Webstore and click the “Add to Chrome” button. That’s it! You will see the Extension icon appear to the right of the Chrome address bar. You can configure the extension by clicking the icon.

Enjoy using the extensions and other apps, feel free to rate them and leave a comment, feedback or suggestion.

## Hacking Google Chrome – Custom Chrome New Tab Extension

### Hacking the Chrome New Tab – Speed up your Browsing experience

About two-thirds of us use Google Chrome for web surfing. And I’d say about two-thirds of us would like to change the Chrome New Tab page. Well I did anyway. You know the New Tab page with the Search bar and 8 most recently opened websites [see picture below]. I don’t like it, it’s slower loading and gets replaced 90% of the time. So I went to the Settings to change it to a blank page (loads faster etc.) but I was surprised to find that there is no such option. Whaaaat! You can only change the New Tab to open a specific URL (or their New Tab page). Previously I would create a local file, e.g. blank.html, and load that. But this time I decided I’d see if I could hack Chrome to bend to my wishes. Well of course you can hack Chrome, in fact they encourage you do so, and even to publish and share your work. So I did just that.

### So what are Google Chrome Extensions?

According to the Chrome Developer website “Extensions are small software programs that customize the browsing experience.” Sounds perfect and just the ticket. It’s surprisingly easy to write an extension, all I needed was an .html file and a .json file. If you want to publish your Extension on the Chrome Web Store you will need a Chrome Developer account which requires a gmail and a once off \$5 fee. But you don’t have to publish it to use it or even share it, you can distribute the extension yourself and people can use it directly however they will have to enable Developer Mode in Chrome in order to enable it initially – but once installed they can turn Developer Mode off again.

## The Rope of Dreams Recut: Polynomials of the Third Order – Cubic Equations

### The Rope of Dreams Recut – Cubic Equations

Did you make the most of The Rope of Dreams in my previous post “The Rope of Dreams : Polynomials of the Second Order – Quadratic Equations“. I hope so. Well now you have a chance to take your 120 meter rope and enter another Dimension with Cubic Equations.

### What is the Scenario?

Once again you are given the Rope of Dreams, and a Golden Scissors which is the only thing that can cut the Rope of Dreams. You can cut the Rope of Dreams twice (cross section, no longitudinal cuts), which will give you 3 lengths. These lengths will be laid out one for each dimension X, Y, Z (i.e. left-right, backward-forward, up-down), and whatever volume you enclose anywhere on Earth is yours to keep, or do with whatever you wish. You can enclose only a single volume, a single time, and then must return the rope and the scissors. What would you do? You may not think of a Polynomial of the Third Order – a Cubic Equation, but you probably should. In this post we’re talking about cuboids, we’ll leave spherical shapes aside for now.

### Do the Math!

This time we’ll do the mathematics first and then apply our findings to determine how best to maximise the volume we enclose. In the previous post we derived and proved the following quadratic equation:

Previously: $${ x^2 = (x-n)(x+n) + n^2 }$$

Multiply by $$x$$: $${ x^3 = x ((x-n)(x+n) + n^2)}$$

Multiplying this out: $$\boxed{ x^3 = (x-n) x (x+n) + xn^2}$$

## The Rope of Dreams : Polynomials of the Second Order – Quadratic Equations

The Rope of Dreams – Polynomial

Imagine you are given a length of rope that is 120 meters long, and told that you can go to any place on Earth and whatever you enclose with the rope – is yours to keep, or do with whatever you wish. You can enclose only a single area, a single time, and then must return the rope. What would you do? You may not think of a Polynomial of the Second Order – a Quadratic Equation, but you probably should.

### What would you do?

Say a big “Thanks”, take the rope, and start pondering the options. A likely plan is to think of where on Earth you want to go (a tropical island, a bustling city, a countryside retreat, maybe even Fort Knox – it’s your choice), and while en route to your destination figure out how to maximize the area the 120 meter rope can enclose. I’ll leave the destination to your own imagination (you can post in the Comments section below) and turn our attention for now to maximizing the area the rope can enclose once you get there. Did someone say Polynomial!

### How long is a piece of string, or 120 meters of rope?

A likely first question you might have is to get an idea of just how long 120 meters is, so some reference examples might help, note that ‘m’ is short for ‘meter’. A soccer pitch is between 90m and 120m in length; A rugby pitch is 100m – the same as the 100m sprint in Athletics (Usain Bolt, Carl Lewis etc.); An American football pitch is 110m long; A CLG/GAA (Cumann Lúthchleas Gael / Gaelic Athletic Association) pitch is between 130m – 145m in length. For petrol heads, 120m is about 24 Nascars end-to-end, or 21 Formula1 cars end-to-end – that’s almost the entire grid – are you heading to Monaco with your rope?

## Monty Hall Proof – The Formula

Monty Hall Proof – The Formula is here. My two previous posts described the Monty Hall Problem – Can You Solve This Maths Puzzle? and Monty Hall Solution – Advanced! Well, this is the next installment of the trilogy, a simple mathematical proof.

If you don’t like Maths (Mathematics, Math) then, well, you have serious problems – get some help :^) This isn’t difficult at all, it’s just a bit of simple probability and algebra, yep ALGEBRA ♥

The Probability that you will Win is the quotient of the Number of Cars, and (divided by) the Number of Doors. To represent that symbolically using algebra is simple:

$$P(W) = \frac{NC}{NDtot}$$ … Equation (1)

The Probability that you will Lose is a little more interesting, it is the quotient of the Number of Doors less the Number of Cars, and (divided by) the Number of Doors, in symbolic notation this is:

$$P(L) = \frac {NDtot – NC}{NDtot}$$ … Equation (2)

There’s one last equation we want, and it says the Probability that we either Win or Lose is 1 – since these are the only two possible events. In other words, we have to either win or lose – there are no other possible events (see my earlier post re the philosophical and physics debates on that general point). Anyway, to represent this symbolically:

$$P(W) + P(L) = 1$$ … Equation (3)

(Equation (3) is based on Kolmogorov’s second axiom i.e. $$P(\Omega) = 1$$)

## Monty Hall Solution – Advanced!

This post “Monty Hall Solution” continues on from my previous post Monty Hall Problem – Can You Solve This Maths Puzzle? If you haven’t read that post, then read it now before reading this. Because I will now show you even more Monty Hall Solution coolness! We saw that you could increase (double) your chances of winning a car by understanding some maths, so let’s delve further into it and who knows, you might win something big (then again you might not, but hey!).

So what happens, if there are 4 doors instead of 3 doors? And what happens if there are 5 doors, 6 doors, hmmm, more code required – cool!

Checkout the code on GitHub.
Get my free Monty Hall Game on Google Play.

### Does The Monty Hall Solution Hold True For 4 or More Doors?

For 4 doors we would expect that the odds would be 1/4 (25%) for not changing Vs 1.5/4 (37.5%) for changing. “How did you get those figures?” I hear you ask. Well, with 4 doors, each door has a 25% chance of being correct. Our 1st chosen door has a 25% chance – the other 3 doors have a combined 75% chance. When Monty removes one of those 3 doors by opening it -the remaining 2 doors still have a combined 75% chance – which is now divided by the 2 remaining doors i.e. 37.50% chance each. Once again the figures from the 70 million simulations are very precise.

Doors in Game: 4

Unchanged Wins: 2498993, Changed Wins: 3750566
Unchanged Wins: 24.99%, Changed Wins: 37.51%

Unchanged Wins: 2498720, Changed Wins: 3750419
Unchanged Wins: 24.99%, Changed Wins: 37.50%

Unchanged Wins: 2500812, Changed Wins: 3748980
Unchanged Wins: 25.01%, Changed Wins: 37.49%

Unchanged Wins: 2499171, Changed Wins: 3747829
Unchanged Wins: 24.99%, Changed Wins: 37.48%

Unchanged Wins: 2499602, Changed Wins: 3749207
Unchanged Wins: 25.00%, Changed Wins: 37.49%

Unchanged Wins: 2497548, Changed Wins: 3748332
Unchanged Wins: 24.98%, Changed Wins: 37.48%

Unchanged Wins: 2499206, Changed Wins: 3749860
Unchanged Wins: 24.99%, Changed Wins: 37.50%



## Monty Hall Problem – Can You Solve This Maths Puzzle?

The Monty Hall Problem is an interesting Maths Puzzle – with a hotly disputed answer. Monty Hall is a well known American TV Show presenter, and this particular maths puzzle gained some notoriety on his TV Show – hence the name “Monty Hall Problem”. The puzzle is quite simple to understand, but as is so often the case it is a little more tricky (and fun) to figure out the answer.

World famous mathematicians have gone to their grave disputing the answer. But I’ll explain it in easy to understand language, and demonstrate a proof using a computer simulation I wrote which played no less than 70 million games. The source code for the simulation is available on GitHub so you can review it yourself 🙂

### Show Me The Monty Hall Problem Puzzle!

Monty shows you 3 doors which are closed. You are told that behind one of the doors is a car, behind the other 2 doors lies a Goat. If you choose the correct door you win the car. The doors are labelled 1, 2, and 3. Let’s say you choose Door 1. In an unexpected twist Monty opens say Door 3 – behind which stands a goat! Monty then asks you “Do you want to stick with Door 1, or do you want to choose Door 2 instead?”.

So do you stick or twist? You can stick with Door 1 or try your luck with Door 2. Monty is waiting. Your heart is racing. The crowd are shouting in equal measure “Door 1” and “Door 2”, some jokers are even shouting “Door 3” ]:> 😀

### Show Me The Monty Hall Problem Answer.

Not so fast. The fun is figuring out the correct answer – if there is a correct answer. What I’m going to do is put forward an answer and explanation, then I’ll write a software program to simulate this scenario 70,000,000 (70 million) times and see if it agrees with my proposed answer. Is it better to stick or to twist – or does it make any difference? I’ll share the results (and the code) of this simulation with you. In the meantime, you can try to solve the puzzle by yourself. But before that, I’ll propose an answer – spoiler alert – don’t read the next paragraph if you don’t want to see the proposed answer.