4 ms·
> It is quite interesting to look how some of those recommendations change in the industry over time [...]. For example in Clean Code, Robert Martin argues agai
by dozzie 10y ago
> It is quite interesting to look how some of those recommendations change in the industry over time [...]. For example in Clean Code, Robert Martin argues against the idea of [...]
Martin claimed in the very same book several ridiculous things (like not
documenting short functions, which makes autogenerated documentation look
awful; apparently Martin haven't ever used documentation generators before
writing the book).
It's hard to take Martin's recommendations as coming from "the industry".
- Silhouette 10y agoThere's plenty one could reasonably criticise about Clean Code and some of Martin's other work, particularly in the context of building robust systems, but he is not wrong that Hungarian notation is mostly obsolete given modern programming languages and tool chains.
- jwdunne 10y agoI agree. I found the "ideal" argument length of 0 (or I think 1) to be a bit ridiculous, though I was in the love affair period you have when you first start learning functional programming. I read (see below) that the idea of Hungarian notation was bastardised. The idea wasn't to encode type information as such, not in the primitives type sense. It was more to encode meaning succinctly. To use the example given, Position(x, y) is perfectly fine in Hungarian notation, because the variables tell us exactly what they are: the x and y coordinates as part of a point. The Hungarian notation we rip on would have us write Position(ix, iy). With the tools and type systems today, yeah, it's obsolete in the truest sense. Interesting piece of history none the less. I guess the real usefulness is the idea of encoding verbose information that our current tools and language do not support. That sounds better than encoding a primitive. https://blogs.msdn.microsoft.com/rick_schaut/2004/02/14/hungarian-notation/ https://blogs.msdn.microsoft.com/rick_schaut/2004/02/14/hung...