# Prognostication For Fun And Profit: States And Events

DevFeed: [Prognostication For Fun And Profit: States And Events](<https://devfeed.tech/articles/prognostication-for-fun-and-profit-states-and-events-1259.md>)

Original publisher: [Read original article](<https://shopify.engineering/17488276-prognostication-for-fun-and-profit-states-and-events>)

Author: Shopify Engineering

Published: 2011-07-26T20:22:00Z

Content type: article

Language: en

Sources: [Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering.md>), [Shopify Engineering - Shopify Engineering](<https://devfeed.tech/sources/shopify-engineering-shopify-engineering.md>)

Topics: [data](<https://devfeed.tech/topics/data.md>)

Tags: [data](<https://devfeed.tech/tags/data.md>), [database](<https://devfeed.tech/tags/database.md>), [event](<https://devfeed.tech/tags/event.md>), [events](<https://devfeed.tech/tags/events.md>), [logs](<https://devfeed.tech/tags/logs.md>), [metrics](<https://devfeed.tech/tags/metrics.md>)

## AI overview

The article explains how events as points in time and states as time intervals support different forms of counting. It uses accounting snapshots and period-based income statements to illustrate the distinction.

## Source excerpt

Measuring stuff is hard, even when it stands still. When things change over time the situation gets even worse. I'm Ben Doyle, research scientist and data prophet at Shopify. Over the next little while I'm planning to go into some detail about how we're calculating some common ecommerce metrics (like customer count, churn rate, lifetime value, etc.) here at Shopify. Most of these metrics come down to fancy ways of counting, but the devil is in the details. For Instance...