This spring is getting squashed on either side, and it'll squash by certain amount x, that depends on your mass, and that x will be turned into a motion of a needle and that'll read your mass.
Many chefs spend years perfecting their recipes, learning to slice particular fish a certain way and toss it with precise proportions of ingredients in a unique motion for a specific amount of time.