“Well, we have to measure something.”, And the perils of metrics.

“What gets measured, gets managed,”

Peter Drucker famously said.

The sentiment makes sense. If we are not looking at a compass, how can we know if we are going in the right direction? How can we keep ourselves honest, and how can we course-correct?

Thanks to the culture of metrics, in 2019 Amazon has surpassed Apple as the most valuable company on the face of the planet.
Indeed, what gets measured, gets managed, but at the expense of everything else. Less famously, Drucker said

Working on the right things is what makes knowledge work effective. This is not capable of being measured by any of the yardsticks for manual work.

It is very human to want a put significant round number, so we can judge it’s value. We like explicit situations, and a moral gray area is always unwelcome. Your score is 73rd percentile, and eating meat on a Friday is a sin. At least that is clear.

But life is more complicated and nuanced. It is somehow tough to measure the desired outcome accurately. So we defer to measuring the closest thing that is easy to gauge. Can’t hurt, right? At least we’re in the ballpark.

Well, it can.

In 1956 V. F. Ridgway has pioneered an area called “Dysfunctional Consequences of Performance Measurements.” In the first study of such kind (and the one that gave the name to the whole genre), a systematic analysis of the quantitative measurements in the governmental sector and found multiple examples of it going terribly wrong.

(Quantitative is a fancy term for something that has a number.)

“Indiscriminate use ( of quantitative measures) may result in side effects and reactions outweighing the benefits.”

It boils down to the fact that unlike scientifical phenomena, organizations, markets, and people are really complex. By creating simplistic representations, we leave uncomfortable stuff out, ending up with a perfect model for a world that does not exist. We develop synthetic metrics to gauge “the best we can” and start to measure the progress against that number.

As phrased in “Goodhart’s law“, once you make that artificial number your target, it stops being a useful metric. Everybody in the organization will now realign their priorities in order to “bump” the number. With no regard to how that translates into the bottom line.

  • As pictured by sketchplanations above, as a nail-making company, you want to make a lot of customers happy with your nails (a noble cause indeed). But if you are sloppy with your metric-choosing, you can get the opposite effect,
  • Let’s imagine you are trying to measure the output of support employees. If you make them answer the most support tickets, they will try to hit that number at the expense of actually helping the customer, or even worse – making the customer come back a few times with the same problem.
  • If you’re a private doctor trying to avoid lawsuits (like in the USA), you will order unnecessary expensive tests to ensure legal defense. Conversely, when incentivized to curb spending (like in Poland), you will try to guess the diagnosis to avoid costly tests.

Jerry Muller, the author of “The Tyranny of Metrics,” coined the term Metrics Fixation, which is where you replace judgment with numeric indicators.

The most characteristic feature of metric fixation is the aspiration to replace judgment based on experience with standardized measurement.

Jerry Muller

In a frantic search for performance metrics, we often grab the number that is easiest to gauge, ignoring that “Not everything that matters is measurable and not everything that’s measurable matters” (Jerry Muller).

Metrics fixation not only punishes the organization by delivering unexpected outcomes and lower performance. I would argue that it is one of the most significant risks the modern world faces today.

Broad societal problems with metrics.

1. The educational system.

Photo by Feliphe Schiarolli on Unsplash

Public Education is, of course, a lofty goal and a massive achievement of our civilization. It is intended to teach young people a habit of life-long learning, open their minds, and realize their full potential. But the education system has a metric: grades.

The entire school experience is designed to be measurable, controlled, and spoon-fed. You cannot take a long time getting to know algebra because it would be unfair to your fellow test-takers. You cannot skip ahead because the class is not moving at your pace. And in effect, children learn one lesson the most: Learning is not fun.

When students cheat on exams, it’s because our school system values grades more than Students value learning.

Neil deGrasse Tyson

2. Economy and finance.

Photo by M. B. M. on Unsplash

Shockingly, economists and investors are not judged by the performance of their models in real markets! They are not eager to wait decades to validate a model, so they pick metrics easier to measure – testing the hypothesis on synthetic data, ending up with a perfect model for an ideal world.

If you are a passenger on a plane and the pilot tells you he has a faulty map, you get off the plane; you don’t stay and say “well, there is nothing better.” But in economics, particularly finance, they keep teaching these models on grounds that “there is nothing better,” causing harmful risk-taking. Why? Because the professors don’t bear the harm of the models.

Colorful Nassim Taleb, best-selling author of Incerto, on Economy.

3. Artificial intelligence

Photo by Arseny Togulev on Unsplash

Unintended consequences of metrics is the core reason why Elon Musk thinks artificial intelligence is the biggest threat to the human race.

The biggest problem with AI is not that it will become wary of us giving it orders and decides to wipe us out on a whim. This is exemplified in the canonical thought experiment called the paperclip maximizer. Nick Bostrom shows us that artificial general intelligence, presented by a single metric ( number of paper clips produced ), designed competently and without malice, could ultimately destroy humanity.

OK, I GET IT! But what else can we do? Should we fly blind?

Photo by Joao Tzanno on Unsplash

Of course not!

Measuring is still the best way to keep you honest and on track. If you measure against real, tangible goals like revenue – it will help you achieve them.

But it’s hard to find those goals in other areas. If your goal is to “be healthy,” should you aim for lower weight? Body Fat percentage? VO2Max (the amount of oxygen you can consume in the unit of time)? Your maximum bench press weight?

Every single one of those numbers represents an opinionated model, and those models are in odds with each other. If you go to 10 different doctors, you will probably get 11 different answers. And each one will not be focused on you but their pet model of the world.

But you know what a great model of reality is? Real-world. It is not entirely measurable, it’s not an exact number, but it’s real. If you want to feel great, then you can use what “Qualitative” measuring is – your answer to the question “do I feel great”

  • If your goal is to learn a foreign language, then ask yourself the question, “did I just have a meaningful conversation in a foreign language.”
  • If you want to hire a great employee, don’t judge them by the diploma. Give them a trial project and see how they work, interact with colleagues, and further the real goals of your organization.

People have a natural drive to do a good job and demonstrate autonomy, mastery, and purpose. It has been proven over and over again that intrinsic is the only motivation that makes sense long-term It has also been proved, that when you introduce extrinsic one (this one big metric, higher salary, more pocket money for doing house chores), the intrinsic motivation will vanish, and your employees will stop trying to further your agenda under the singular guidance of the all-important metric.

The more a quantitative metric is visible and used to make crucial decisions, the more it will be gamed—which will distort and corrupt the exact processes it was meant to monitor.

An adaption of Campbell’s Law

Instead of putting a round number on the wall, create an organization where you can trust your people to do the right thing. At least until the advent of Artificial Intelligence.

Sign up to my “Deliberate thoughts” list for more content like this 👇

Contacting the pigeons….
Success 🚀 ! You’re in! Check your inbox to confirm your email address.

Working from home? I could never!

null-2Working remotely does not mean working from home. You don’t have to wear sweatpants all day and shun all human interaction.

There are plenty of alternatives and I’ve tried them all. In this tutorial I explore all the different places you can work from – cafes, coworks, national parks and more.

Simple Payments for India 🐘

DUpTabpUQAEE_cR.jpg
Automatticians and my fabulous turban.

This is a summary of the presentation I gave in Mumbai in February of 2018.

Prefer PDF format? (4.1 MB)

Why Simple Payments?

I am a public school teacher and not a web-designer. I decided to start a new business (…). After I found the “Add Payment” button I knew I could do it. I went public and started taking payments two days later. The new button simplified everything.

Simple Payments is a feature of Jetpack plugin and WordPress.com that enables you to sell products on your site. I had a privilege of being a part of the team that launched it in 2017.

Yes, there is WooCommerce with ample functionality, various payment gateways, plugins and options.

But starting with WooCommerce is not easy. The choice and configuration can be overwhelming, especially for someone that just wants to test their business. WooCommerce has a fantastic wizard now that simplifies the process considerably, but there is always a tradeoff between functionality and ease of use.

Simple Payments is designed for an easy start. No, there are no other payment gateways, no plugins, no automated fulfilment, no AI. Easy start, that is it.

But often, the start is the hard part.

 

PayPal is coming to India

As of now (feb 2018), PayPal is gearing towards entering the Indian market. Simple Payments is built on top of PayPal Express Checkout.

  • Launching soon for general users.
  • Testing with large merchants at the moment (BookMyShow, Yatra)
  • Accepting and payout in INR
  • Right now, you can collect USD and pay out to your bank account that will convert to INR

How hard it is to start with Simple Payments?

Zrzut ekranu 2018-01-25 o 13.15.18.png
That is all information you have to provide to start selling

To start selling with Simple Payments, you need:

  • PayPal account
  • One of the plans:
    • Jetpack Premium (₹690/m, ₹6900/y)
 OR
    • WordPress.com Premium (₹575/m, ₹6900/y)
  • One form to fill out

Yes, that is it. One form. And in this form the required fields are:

  • Name of what you are selling
  • Price / currency
  • Email that will be connected to PayPal account

One more thing…

You don’t really need a PayPal account.

PayPal has a feature called “progressive onboarding”. That means, if you receive money destined to the email address that does not have PP account yet, money will be waiting for you to claim until you create such account.

Zrzut ekranu 2018-01-25 o 13.26.27.png
Email badgering me to claim the money I earned

Simple is also sustainable

Back in the day, I was running an e-marketing agency and we also did WooCommerce stores. Whenever something broke, API changed, etc – I had lots of work to keep it all running. Sometimes client changed API keys to PayPal, or a setting got deprecated. But with Simple Payments:

  • No payment gateway setup
  • No access token keys, app secrets, etc
  • Reliant only on 1 plugin (Jetpack) and external API (WPCOM) that is heavily tested every day
  • Auto updates and backups built in (JP „undo”  feature)

No late night calls from your customers that something broke!

Successful Simple Payments sellers

This is a small gallery of successful Simple Payments sellers. As you can see, there are various business models.

 

Minnetonka Fishing Team

High school fishing championship participation.

Zrzut ekranu 2018-01-25 o 10.41.52.png

 

Tom Bol Photo workshops

You gussed it – photography classes 🙂

Zrzut ekranu 2018-01-25 o 11.34.25.png

 

Smart Food Solutions

Prepared meal plans

Zrzut ekranu 2018-01-25 o 12.36.27.png

Beltaine Cottage

Self-published books.

Zrzut ekranu 2018-01-25 o 11.39.36.png

 

North Winds Wilderness School

Outdoor wilderness classes.

Zrzut ekranu 2018-01-25 o 10.54.37.png

 

Bend it like Budha

Yoga retreats

Zrzut ekranu 2018-01-25 o 12.35.47.png

Under the hood 🔧

So what are we doing there to make it happen?

  1. Customer clicks „Pay with PayPal”
  2. PP JS makes request to WPCOM endpoint
  3. WPCOM endpoint calls transaction/create PP endpoint
  4. Returns transaction id to your site JavaScript
  5. JavaScript opens PayPal dialog
  6. Customer enters CC details, clicks „pay”
  7. PayPal JavaScript calls WPCOM endpoint to finish transaction
  8. WPCOM endpoint calls PP transaction/execute
  9. Passes success message to your site
  10. Sends you notification and email
  11. Displays result to the customer

 

All data stored on your site

  • `jp_pay_order` custom post type
  • `jp_pay_product` custom post type

Start selling!

78eX.gif

Simple Payments is designed to get you started. Don’t over-engineer your solution if you are not yet selling anything. Start simple, test your business and then scale with WooCommerce once you have more orders than you can deal with.

 

More resources

React Native Isomorphic app in a weekend

TeamParrot is an app that reads your Slack scrollback out loud so you can listen to your coworkers while doing awesome stuff.

Because I work in a distributed company and have coworkers all around the globe, every day I wake up to a full wall of scrollback to go through. Some of it is actionable, some of it is just chatter, but its good to at least have a vague notion of what is going on.

I also value efficiency and not wasting time, so I came up with TeamParrot.

Having an app in the app store was on my Bucketlist for some time, so I jumped on this simple idea like an angry Twitter user on a chance to humiliate someone.

These days, I usually work with React and React Native seems like an ingenious way to get my feet wet in the pool of app development

Before we even start, I assume you read the official docs – they are pretty decent these days.

Starting a React Native project

Starting an RN project was pretty easy and as many projects these days, starts with a generator.

You have to install RN as a global npm module and then you generete a project, as noted here:

npm install -g react-native-cli
react-native init AwesomeProject
cd AwesomeProject
react-native run-ios

You just provide a name and then the tool creates a project for you.

The project builds in XCode and Android SDK.

Few notes about Android sdk:

  • You DONT need Android studio and it is a terrible piece of software
  • Android SDK is a set of command-line tools
  • These tools install their own libraries, device images, etc. There are multiple versions and each of the files is surprisingly huge. That is one of the reasons that Android development is such a hassle. I would really love some cloud build system
  • Emulating is also a hassle. Genymotion was good solution for me, but you need to point it at the same image files you use to build your software

Renaming a React Native project

Of course I provided a bad name and then had to rename my project. Read about it here:

https://piszek.com/2017/02/07/react-native-rename-my-app/

Using external APIs

Your app needs to connect to an external Oauth? We got you covered!

https://piszek.com/2017/01/29/react-native-oauth/

Using libraries / internal APIs

As you may have heard, React Native does not use WebView like many other JavaScript mobile app technologies ( Cordova for example ).

In RN, higher-order native components ( sometimes big pieces of an app ) are used to piece together you interface. These components have JavaScript wrappers and you can use them as you would any React component. Because these components are pure native, the app behaves just as fast as native. Many components are already wrapped by Facebook in the official repo, even more have sprouted as npm modules. I needed Text-to-speech library for TeamParrot and I found a few.

If you are using a component/library that adds some native code, you need to link it.That means adding the native code parts to the build process of your app. Usually, the automatic tool `rnpm` will do that for you, so when you type

rnpm link

or

rnpm link library-name

You should be done.

Sometimes it involves few manual steps – putting imports here and there in the native code.

Adding flair

Few pieces like that require fiddling with the native code are Icons and Fonts:

https://piszek.com/2017/02/01/react-native-vector-icons-fontawesome-and-others/

Files structure and isomorphic code 

zrzut-ekranu-2016-11-12-o-19-37-20

By default, you will have `index.ios.js` and `index.android.js` and as you can imagine – one is an entry point for your app in iOS, the other is the entry point for you Android code.

By default, your codebases are separate, but don’t be discouraged! There is one weird trick that programmers will hate you for!

Just put this both in `index.ios.js` and `index.android.js` :

import { AppRegistry } from ‘react-native’;
import Main from ‘./main’;
AppRegistry.registerComponent( ‘YourApp’, () => Main );

That way, both of your entry points use the same main component.

My folder structure of choice is

  • android
  • app.js – main logic
  • assets
  • components – these are dumb components
  • config
  • index.android.js
  • index.ios.js
  • index.web.js
  • ios
  • lib
  • login.js
  • node_modules
  • package.json

What is “index.web.js” you ask? Well, this app builds in web too! That means that I can develop my UI in chrome devtools !

Read more about isomorphic prototyping here

Release

Is your App ready for the big day? Not so fast! You have to submit it to the review.

Releasing in App Store

  1. Get Apple developer account
  2. Register yourself in itunesconnect
  3. Create your provisioning keys in XCode
  4. Create a bundle
  5. Sign it
  6. Upload to App store
  7. If you want to invite beta testers, you still need to submit it for a review

You want to update your app post release? Dont forget to configure CodePush! 

Maketing

 That is an entry even in itself and maybe a post for later!

But with these steps you should be able to make most of the simple apps out there.

Some other valuable links

React Native Isomorphic app over the weekend

This article is part of my “React Native Isomorphic app over the weekend” series. It shares the problems I encountered during development of TeamParrot and Headstart Journal.

Secret patterns of flavour

In March 2016, while helping to organize TEDxWarsaw, I had a great pleasure of working with James Briscione on his amazing talk “Secret Patterns of flavour”. This fulfilled my Bucketlist item #4.

James is a head of Institute of Culinary Education in New York and together with IBM created “Cognitive Cooking with Chef Watson” book and app. He explores the science of flavour and how different chemicals come together to create a symphony of taste we all enjoy and crave. Since I call myself a Cognitive Engineer and am a foodie, Cognitive Cooking seemed like something extremely interesting and I jumped at first opportunity to help.

Finally, we have a recording to show James’s amazing work:

 

For me personally, it was an amazing journey and a great privilege. James lives on the bleeding edge of cuisine innovation and it was inspiring to meet him and see the final talk and learn a lot!

Some interesting links

 

So you want to work at Automattic?

Today, it’s been precisely 6 months since I joined Automattic as JavaScript wrangler. All you’ve heard about how awesome this company is in fact an understatement!

It is out of this world!

IMG_0951
Working from out of this world.

I have started a blog dedicated to helping you get hired remotely. I have transfered this post there Click here to read -> .

PS: Working in Silicon Valley company was my Bucketlist #26

LearnMinder – Teaching kids how to code

LearnMinder is a SmartPhone app that blocks internet access until a homework / coding challenge is solved.

It is intended to be installed on a child’s smartphone. Parent can set up a topic that the child needs to practice. Every time the child wants to play or browse the Internet, she/he has to first solve a challenge custom tailored to current skill level. When the challenge is solved – child can use the Internet again.

The whole challenge is presented in a narrative that “the Internet is broken” and child needs to fix a bug in the software to use it. In the process, it learns, that all services it enjoys using are created by someone, maintained constantly and it is not magical black box.

Day by day, challenge by challenge the child gets more comfortable in thinking how the websites / services / games are designed and that sometimes it’s actually more fun to create these products than to use them.

Future integrations include

  • Coding lessons
  • Duolingo – foreign language lessons
  • Fintess tracker – training workouts

Current state

This application will be integrated with code.org and released under Open Source license.

I decided to re-write it in React Native to iron out some kinks.

How this app came to be – EUhackathon

In 2015 I had a pleasure to participate in EUhackathon. It was a splendid 2-day hackathon held in Brussels with a theme

Tools to help teach kids digital skills

During this event I created “Interfixer“, which I’m now rebranding as “LearnMinder

During presentations, along with a fully functioning demo, I presented:

And I won!

This was a huge surprise for me, but the Jury decided that my application was best, and as a single participants, I won the 2015 edition of EU Hackathon 🙂 (You can read more here)

I met some AMAZING people (this was such a whirlwind!)

euhackathon252520435
Me with European Commission Vice-President Andrus Ansip

IMG_4438
Me with Esther Wójcicki, Sergey Brinn’s mother-in-law