News for hackers. Stuff that matters.
Re:Ask HN: How to become good at naming things in code? by sloaken on Sunday April 05, 2020 @08:27PM (#22789912)
Try to make the beginning part of the name unique. If you follow the Hungarian notation, put that at the end of the name not the beginning. Bad example strname, straddress, strphone. Better: namestr, addressstr, phonestr.
Re:Ask HN: How to become good at naming things in code? by tcbasche on Monday April 06, 2020 @01:50AM (#22791190)
Arguably both of those are terrible. It's just fluff for no real benefit. Why do you not know what data type those things are?

What's wrong with 'address' or 'phone_number' or something to that effect?

Re:Ask HN: How to become good at naming things in code? by sloaken on Monday April 06, 2020 @10:53AM (#22794249)
key phrase was 'IF'. I typically do not apply type info, as I care about its logical purpose when debugging. Most modern IDE will tell you the type when you hover over them.