Re:How I, a beginner developer, read the tutorial you, a dev...
by tetha on Monday September 22, 2025 @03:24PM
(#45338259)
This is why I'm sad that hungarian notation has gained into such a bad reputation. Sure, you can overdo it, but a `duration_ms` or a `response.size_bytes` or a `max_memory_mb`, or an `overhead_ns` is so much easier to use.
[ Parent
| on HN ]
Re:How I, a beginner developer, read the tutorial you, a dev...
by account42 on Tuesday September 23, 2025 @09:12AM
(#45346560)
Better yet would be unit-aware types. Then instead of
duration_ms = 1000
you can have
duration = 1s // or duration = Seconds(1) in deficient languages
and it's either a compile error or the type system enforces the correct conversion.
As for the bad rap of hungarian notation, it's mostly from people using it to encode something that is already clear from the types. "fDuration" helps no one over just "duration".
Re:How I, a beginner developer, read the tutorial you, a dev...
by 1718627440 on Thursday September 25, 2025 @05:51AM
(#45370963)
But that's what the actual hungarian notation was about: decoding the type of thing it represents not the data type used.