I got paid more than Charles Dickens

Adjusted for inflation, I was paid more than Charles Dickens was per word.

But I didn’t write any critically acclaimed stories, I wrote code. This is quite surprising to me as I didn’t know I was already producing work more rewarded than the writer of Great Expectations or A Christmas Carol.

He was paid $0.0025 British Pounds per word in 1836 which today would be about $0.41 USD adjusted for inflation.

Here’s the code to see if you compare to the greatest writer of the Victorian Era:

total=0
for sha in $(git rev-list --no-merges --author="james" master | sed -e '$ d'); do
    added=$(git diff --word-diff=porcelain $sha~1..$sha|grep -e"^+[^+]"|wc -w|xargs)
    deleted=$(git diff --word-diff=porcelain $sha~1..$sha|grep -e"^-[^-]"|wc -w|xargs)
    duplicated=$(git diff $sha~1..$sha|grep -e"^+[^+]" -e"^-[^-]"|sed -e's/.//'|sort|uniq -d|wc -w|xargs)
    if [ "$added" -eq "0" ]; then
        changed=$deleted
        total=$((total+deleted))
        echo "sha:" $sha, "added:" $added, "deleted:" $deleted, "duplicated:"\
             $duplicated, "changed:" $changed
    elif [ "$(echo "$duplicated/$added > 0.8" | bc -l)" -eq "1" ]; then
        echo "sha:" $sha, "added:" $added, "deleted:" $deleted, "duplicated:"\
             $duplicated, "changes counted:" 0
    else
        changed=$((added+deleted))
        total=$((total+changed))
        echo "sha:" $sha, "added:" $added, "deleted:" $deleted, "duplicated:"\
             $duplicated, "changes counted:" $changed
    fi
done
echo "Total changed:" $total


awk 'NF>1{print $NF}' wordschangedpercommit.txt

My own startup from start to acquisition was built on top of an open-source e-commerce platform called Saleor at the time.

By the time of acquisition according to the code above I created a total of

519 Total commits
181,476 total lines added

Total changed: 5,475,527 words

I then manually looked over all commits with over 10,000 words (I’m not that hard of a worker so those surprised me.) I found that all the ones above 200,000 words are data files, libraries, compiled things, etc from open source libraries.

So in those cases, I safely discounted about 86% of the words – and to be honest that is being pretty conservative.

So all in all I “touched” (added, removed, edited) 13% of the total.

This adds up to just over a dollar a word!

Keep in mind a “word” in this case can be an attribute, html, a variable for emails.

A simplified version of our login form in Django earned me over $23.

When I think of this as a business owner, maybe next time I will skip the passwords and save a few dollars.