Text this: Principles of bacterial detection