Hungarian Notation Cheat-Sheet
> > some of the young guys where i work asked for some recos on hungarian
> (they're working on mfc apps now after their java-heavy experiences in college).
> i gave them the following. note the last paragraph.
> >
> > ###
> >
> > RECOMMENDATIONS for
> > HUNGARIAN NOTATION
> >
> > The following are some common recommended Hungarian Notation prefixes for
> variables defined in MFC projects:
> >
> > BOOL bFinished;
> > BYTE byteLastProcessed;
> > BYTE* pbyteLastProcessed;
> > CHAR cFirst;
> > CHAR[] (null-terminated) szCommandBuffer;
> > CHAR* (null-terminated) pszCommandBuffer;
> > CByteArray cbaExplodedValues;
> > CByteArray* pcbaExplodedValues;
> > CCriticalSection ccsArrayProtector;
> > CButton* pButton;
> > CDocument* pDoc;
> > CEdit m_edtLogWindow;
> > CEdit* pedtLogWindow;
> > CFile cfileLog;
> > CListCtrl m_lcDevices;
> > CListCtrl* plcDevices;
> > CMapStringToString mapCommandLookup;
> > CMapStringToString* pmapCommandLookup;
> > CPropertyPage m_pageConfigurationOptions;
> > CPropertySheet m_sheetSetup;
> > CString strPrefix;
> > CString* pstrPrefix;
> > CStringArray csaCommands;
> > CStringArray* pcsaCommands;
> > CWnd* pwndParent;
> > DWORD dwValueCount;
> > DWORD* pdwValueCount;
> > HANDLE hBitmap;
> > HDC hdc;
> > HICON hiconMaster;
> > HWND hwndParent;
> > INT nRangeBegin;
> > INT* pnRangeBegin;
> > LONG lTemp;
> > RECT rectClient;
> >
> > I hereby waive all royalties due me for use of these prefixes provided
> that users acknowledge that the one true hierarchy of programming languages
> is as follows: "C/C++, PHP, Assembler, Pascal, Perl, FORTRAN, Smalltalk,
> LISP, Java, Visual Basic, BASIC, ADA, PL/I, COBOL". Users will also
> acknowledge that C# was recently named "Rookie of the Year", but is - as
> yet - unranked.
> >
> > ###
Expletive deleted
Thursday, March 18, 2004
I'm a hungarian guy, but real programmers who want to understand hungarian notation should use hungarian words as well
hBitmap => kBitTérkép
sFirstname => szVezetéknév
bSex => bNem
Thursday, March 18, 2004
Are you sure you didn't mean
bSex => bKöszönöm ?
Just me (Sir to you)
Thursday, March 18, 2004
Go down to Hungarian Notation section.
http://mindprod.com/unmainnaming.html
Tom Vu
Thursday, March 18, 2004
http://dict.sztaki.hu/dict_search.php?L=ENG%3AHUN%3AEngHunDict&O=ENG&flash=&E=1&sid=bed94b7e652dbd8545481886d052a51b&in_form=1&W=sex&M=2&P=2&C=1&A=1&T=1&F=0
Thursday, March 18, 2004
Should have put a smiley. It was a (lame) joke for the Hungarian speakers here.
Just me (Sir to you)
Thursday, March 18, 2004
bSzívesen ;)
George Illes
Thursday, March 18, 2004
Hey, I got the joke. :)
However, bFirstName = bVezetéknév would mean that "Martha" is my last name. Oops. (It should be bKeresztnév.)
Martha
Thursday, March 18, 2004
Martha: bIgaz, it's Keresztnév, but not a boolean so szKeresztnév
Thursday, March 18, 2004
Right, whoops. Ezer bocs (és egy anyamedve).
Martha
Thursday, March 18, 2004
Are you the "Martha" ?
Martha Stewart ?
Ex-girl friend of Mr Simonyi Charles ?
What's your future jail address, so we could send you some oranges and bananas there ;-)
RasterBurner $0314
Thursday, March 18, 2004
saláta krém
This has to stop
Thursday, March 18, 2004
martha: női fejlesztő?
a salata krém hízlal
Thursday, March 18, 2004
I rather doubt that Ms. Stewart speaks Hungarian. (Ugh. Shudder. I hate that woman.)
Fejlesztö az talán túlzás, de legjobb tudomásom szerint nem vagyok férfi. :)
Martha
Thursday, March 18, 2004
The Magyars are coming, the Magyars are coming!
Nem ertem
Thursday, March 18, 2004
I thought the whole point to hungarian notation is that it's so wonderfuly simple and clear that it saves programmers from having to look up the actual type of variables.
Isn't a hungarian cheat sheet kinda silly? Or perhaps just an admission that hungarian notation doesn't work after all.
Thursday, March 18, 2004
So now can we have tips and pointers for studying Hungarian? With the Japanese thread, this one, and a few more, we can pester Joel to add a "Joel on Learning Languages" forum!
Jim Rankin
Thursday, March 18, 2004
You should recommend that they NOT be infected with Hungarian Notation. Let the compiler do the type-checking. Humans should think at a higher level of abstraction.
runtime
Thursday, March 18, 2004
Learn Hungarian if you want to talk to extraterrestrials.
(see Fermi Paradox: The Hungarian Answer)
Jarod 2
Thursday, March 18, 2004
Thanks for mentioning that. I hadn't heard it before. My Magyar wife got a kick out of it, especially the third supporting point.
Kyralessa
Thursday, March 18, 2004
Recent Topics
Fog Creek Home
|