This video helps you to understand how a single for loop left unchecked can heat and blast your CPU. When you are using container you need to be serious on performance.
Else it will cost you much more on the cloud and on your machine.
How to program and simulate mining in blockchain? This demo with working code will help you program it easy and gives you a head away to start with real blockchain programming. Not the way few false blockchain experts fool you by knowing tokens and program around it using a platform like ethereum or NEO.