tag:blogger.com,1999:blog-1952375360430497207.post7553499181692731493..comments2023-06-18T05:39:55.965-07:00Comments on Coding Thriller: Rediscovering Hungarian NotationGreghttp://www.blogger.com/profile/16138954675664901193noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-1952375360430497207.post-55520181991679182732019-07-02T18:55:46.221-07:002019-07-02T18:55:46.221-07:00А это боязнь..когда боишься кому то правду расказа...А это боязнь..когда боишься кому то правду расказать..тревога какая то внутвобще<br />Anonymoushttps://www.blogger.com/profile/12552749715601329752noreply@blogger.comtag:blogger.com,1999:blog-1952375360430497207.post-90201476490698221982010-02-07T18:15:27.746-08:002010-02-07T18:15:27.746-08:00index_of_first_book = 5
index_of_last_book = 10
i...index_of_first_book = 5<br />index_of_last_book = 10<br /><br />index_of_first_book.upto(index_of_last_book).each do |index|<br />list_books_open[index].close<br />end<br /><br />Okay, I'm with you so far. The haphazard way in which English cannibalizes other languages leads to terrible inconsistency, making reading more difficult.<br /><br />i_first = 5<br />i_last = 10<br /><br />i_first.upto(i_last).each do |i|<br />rg_opbk[i].close<br />end<br /><br />Uhh... what? By taking some letters out of the words (or even substituting some other letters wholesale for other words), you have magically made things more clear? That's funny, because all I see are the exact same meanings to words I don't know, mapped one-to-one with words I DO know. What advantage does "rg_" have over "list"?<br /><br />I submit that what you've done here is a two-step process: First, understand what information about a name is useless and discard it, and formalize the remaining useful information. Second, take any English words that result from step one, and change them into some other language, who's syntax and grammar are less widely understood than English.<br /><br />Why the second step? What's the benefit? How does that second step add any information, or make anything more clear? How is "rg_" objectively any more clear or more useful than "list"? How is "opbk" better than "open_books?" In both cases, you are communicating the exact same thing.<br /><br />My business brain reels at the massive expenditure in training that this second step adds, when the first step is entirely adequate for removing unwanted or useless information from names.<br /><br />To be perfectly clear: if it <b>really</b> "doesn't matter what it stands for", why can't I call a list of anything a list? Why is it necessary to invent another word for something that already has a word?Chris Moorhousehttps://www.blogger.com/profile/00534819763937146586noreply@blogger.comtag:blogger.com,1999:blog-1952375360430497207.post-17575728316842856232007-11-29T19:52:00.000-08:002007-11-29T19:52:00.000-08:00Hungarian notation I feel at best is a silly notat...Hungarian notation I feel at best is a silly notation with little redeeming value. A name is important and shouldn't need to be adorned with extraneous things that may or may not change as the code matures. Your example about unfounded assumption about code does not disappear with the introduction of Hungarian notation but increases. By attaching "other" information to the name you assume that this will help clarify its purpose/type/role, but in fact doing so runs a greater risk of being wrong, or at least wrong in the future. Better by far is to limit the size of routines/methods/functions such that local bindings can be seen as such and global bindings, if any, are obvious. In the end a good program should be like good prose. Good prose is good because of clear well thought out names, events, and metaphors. Good code should be the same and need not use pig-latin and made up nomenclatures to tell its story.Anonymoushttps://www.blogger.com/profile/13257502639354829317noreply@blogger.com