DLT, Why Proof of Work (works)

Photo by Olga Serjantu on Unsplash

Consider that there are two mines; either mine can mine gold or silver. It costs the same amount of effort to mine gold as it costs to mine the exact value of silver. To mine either commodity, the mining company has to pay people in gold to work in the mines, provide equipment, etc. The yield on silver is much higher than that of gold. You can get ten units of silver for each unit of gold.

Both of the mines are always looking for a more efficient way to get ahead. One invents…

Photo by Cytonn Photography on Unsplash

All those digital ledger folks talk about this mythical beast known as the smart contract. I assume we all know what a regular contract is? I like to think of a contract as a document between two or more counterparties that describes a fair and equitable exchange of goods and services. A contract may be as simple as the verbal contract I have with my children; if you walk the dogs and empty the dishwasher each day, I will give you an allowance every week. Completely unsolicited, I have to acknowledge Greenlight, which makes this process crazy easy. …

Photo by Dominik Vanyi on Unsplash

In my previous post about DLT, I touched on the concept of Proof of Work and mentioned in passing Proof of Stake. In this blog, I expand on these concepts and how they are fundamental to the idea of a trustless distributed consensus.

Firstly we have to describe what the problem is that we are trying to solve. Bitcoin set out to solve the complicated issue of creating trust between a group of trustless agents.

So what is this problem? A person asks to borrow some money from you and agrees to pay you back tomorrow. Since you are trusting…

Photo by Landon Parenteau on Unsplash

On Friday, April 30th, 2021, I tweeted the following.

Though small in the grand scheme of things, it felt terrific to be in a position to do something about my family’s impact on the world.

Of the handful of tweets I have made, this is the one that garnered the most responses. The first question asked was, ‘How do you know that your carbon offsets are real?’ and secondly, ‘What is a carbon offset anyway?’ The goal of this short blog is to answer those questions.

Firstly, What is a carbon offset?

The way I described this to my…

Photo by Joshua Hoehne on Unsplash

Preamble, the blockchain, first came to public attention in 2008 through a paper penned under the pseudonym Satoshi Nakamoto. This seminal paper detailed an economic and technical model that proposed a solution to the (seemingly impossible) ‘double-spend’ problem in a decentralized, distributed system. This paper, accompanied by a reference implementation, formed the basis for Bitcoin. At the time of writing, each Bitcoin has a value of over fifty-five thousand US dollars. Less than one year ago, a Bitcoin was worth less than eight thousand dollars.

The rapid appreciation of Bitcoin value and a market cap of over one trillion USD…

Photo by Morgan Housel on Unsplash

Ray Kurzweil has predicted that by 2030 general Artificial Intelligence will outperform our brain’s DNA-driven structures and be ubiquitous. Let’s put that statement in context today; in 2021, we are on the threshold of self-driving cars on the road. SpaceX both launches, docks, and lands fully autonomous spacecraft regularly. In 2020 SpaceX successfully flew twenty-five orbital missions, two of which carried humans. Last week, Tesla announced that you are six times safer in their car with the self-driving enabled vs. driving yourself on the road and have the data to back this claim. …

Photo by Dan Asaki on Unsplash

We are at the end of our journey, for now. In this last part, we will quickly look at the maze code. The plan here is not to dive in with great detail but to focus on some essential aspects. Firstly we create a room type.

// room.js
const room = function( attrib ){

attrib = attrib || {};
const dv = (value,def ) => (typeof value === "undefined")?def:value;
const _name = dv( attrib.name, "<lost>");
const _msg = dv( attrib.msg, "");
const _doors = dv( attrib.doors…

Photo by Pedro da Silva on Unsplash

For years people have described me as procrastinating; they have asked me why my inbox has a thousand unanswered messages; I have felt guilty that somehow I was not ‘on top of things.’ I have always felt derelict about how I operate. Thanks to a recent podcast by Tim Hartford titled ‘Masterly Inactivity Versus Micromanaging,’ I now have a framework to describe how I handle life.

If you have a moment, take time to listen to what he describes and the situations that resonate. …

In this section, we will revisit the code initially published in part 1. We have done a fair amount of refactoring, and we have written some tests. Now we have to rework the character object to use the items and weapons. Hopefully, you will see that the code is easier to read and less error-prone.

We were able to fix up a number of the underlying issues and ensure that we have covered many edge cases. More important, though, we get to revisit the fight logic and add a magical weapon.

Let us review the code for a character and…

In the first part of this series, I joke about how if this were production code, I would write tests. Well, tests are what I needed; there were a few errors in the code that slipped through. We jump back to the code from Part 2 and add tests for the items in the game.

To perform the tests, I will use the Jest testing framework (https://jestjs.io); it’s easy to install and makes for a clean node environment. There are many other test frameworks but, I find Jest quick and easy to use.

The first step is to break up…

Michael Francis

Technologist, father, and dreamer (https://medium.com/@mdcfrancis/disclaimer-9465cb530047)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store