Magic Numbers #21

Open
opened 2026-02-02 15:05:01 -05:00 by jared · 0 comments
Owner

grep -B 20 "/dev/$device" # Why 20?
awk '{print $10}' # Why column 10?

Improvement: Use named constants:

readonly CEPH_CONTEXT_LINES=20
readonly SMART_TEMP_COLUMN=10

grep -B 20 "/dev/$device" # Why 20? awk '{print $10}' # Why column 10? Improvement: Use named constants: readonly CEPH_CONTEXT_LINES=20 readonly SMART_TEMP_COLUMN=10
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/driveAtlas#21