[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/b/ - Random

Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1792472803883.jpg (125.99 KB, 1024x1024, img_1792472796090_rstvofny.jpg)ImgOps Exif Google Yandex

44c88 No.2480

i'm tired of seeing code where everything is just 'data_list' or 'temp_val'. it makes reading a simple loop feel like solving a puzzle you didn't ask for. i remember working on that old e-commerce refactor where we spent three days just tracing what 'item_ref' actually held. it was a total mess. try this for your next small feature: name things by what they represent in the business logic, not the primitive type they use. if it holds a user's email, call it 'user_email'. don't call it 'string_val'. it's a simple change but it makes the diffs so much easier to scan during code reviews. never use generic names when you can be specific. it feels like extra typing at first, but you'll save so much time when you have to debug something at 2 AM. it actually makes the logic 'self-documenting' without needing a bunch of comments that nobody reads anyway.


[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]