ProgrammingTalking about time like a human.

Talking about time like a human.

-


Jotting down some notes, because this is a conversation I’ve had a few times with my teams.

Software engineers tend to talk about time in unambiguous mathematical terms, using formats we’ve constructed purely for the sake of making sure the computers do the right things as the right time in ways that we design and debug. We’ve lost our humanity.

When building a workflow tool, nontechnical query language, or whatever, you need to communicate to your users whether you’re describing a moment in time or a length of time.

For the sake of conversation:

time span = length of time
time stamp = moment in time

Reflect on these translations:

  • “Once a week (time stamp), check which users have not been notified of their outstanding points in the last month (time span).”
  • “Run the next step of this workflow after waiting 3 days (time span) from today (time stamp).”
  • “Look up contacts that have changed within 3 days before (time span) midnight on Christmas (time stamp).”
  • “Send this email one week (time span) after New Years (time stamp).”
  • “Find anyone who requested a refund within three weeks (time span) of our last promotion (time stamp).”

The statements above can be translated to the appropriate code while being much more approachable to a marketer or accountant.

if record.change_date < ago(30d) is just begging for a support ticket.



Source link

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest news

Transform Customer Feedback into Actionable Insights with CrewAI and Streamlit | by Alan Jones | Dec, 2024

AI for BIBuild an AI-powered app to analyze unstructured feedback, generate insightful reports, and create interactive visualizationsNew AI...

Manage Amazon SageMaker JumpStart foundation model access with private hubs

Amazon SageMaker JumpStart is a machine learning (ML) hub offering...

Take your dog for a walk

The following contains spoilers for “Empire of Death.”“Empire of Death” is the typical Russell T. Davies series finale:...

Modeling Extremely Large Images with xT – The Berkeley Artificial Intelligence Research Blog

As computer vision researchers, we believe that every pixel can tell a story. However, there seems...

Must read

You might also likeRELATED
Recommended to you