|
But is it Hungarian Notation? For example, naming an edit control "portEdit" is not using Hungarian. Hungarian originally mean that the purpose of the variable was prefixed by a letter, though that eventually became the type, which was truly annoying when you had stuff like "iCount", which was actually unsigned (and redundant) or code which used 'b' for both "byte" and "bool".
So, what would portEdit be? ePort?
And that is a big reason Hungarian Notion died--nobody agreed on anything except p, i, s, sz and sometimes d (delta), though the latter three were very inconsistent and 'i' was often just prefixed to anything that wasn't a string. I still do use "p" for naked pointers since knowing something is a naked pointer is really important, especially in C++.
EDIT: Just remembered three more places I use Hungarian--h for raw handle, as in hWnd or hFile--and wParam and lParam, though the notation no longer has anything to do with the type.
modified 13-Dec-17 11:49am.
|
|
|
|
|
Fair point, we should probably talk about "type indication" or some such phrase rather than HN.
As an aside, I kind of love the code example in Simonyi's original paper:
1 #include "sy.h"
2 extern int *rgwDic;
3 extern int bsyMac;
4 struct SY *PsySz(char sz[])
6 {
7 char *pch;
8 int cch;
9 struct SY *psy, *PsyCreate();
10 int *pbsy;
11 int cwSz;
12 unsigned wHash=0;
13 pch=sz;
14 while (*pch!=0
15 wHash=(wHash<>11+*pch++;
16 cch=pch-sz;
17 pbsy=&rgbsyHash[(wHash&077777)%cwHash];
18 for (; *pbsy!=0; pbsy = &psy->bsyNext)
19 {
20 char *szSy;
21 szSy= (psy=(struct SY*)&rgwDic[*pbsy])->sz;
22 pch=sz;
23 while (*pch==*szSy++)
24 {
25 if (*pch++==0)
26 return (psy);
27 }
28 }
29 cwSz=0;
30 if (cch>=2)
31 cwSz=(cch-2/sizeof(int)+1;
32 *pbsy=(int *)(psy=PsyCreate(cwSY+cwSz))-rgwDic;
33 Zero((int *)psy,cwSY);
34 bltbyte(sz, psy->sz, cch+1);
35 return(psy);
36 }
Readability is certainly not a word that I'd associate with it.
98.4% of statistics are made up on the spot.
|
|
|
|
|
Joe Woodbury wrote: the notation no longer has anything to do with the type
It was never intended to be anything about the type. It was meant to provide extra info about what the var was being used to hold and what its units were. It was MS that used it for type, losing a lot of its usefulness.
E.g.
float fDistance;
float kmDistance, milesDistance, inchDistance;
|
|
|
|
|
Congratulations for reading something entirely out of context, which, ironically, proves the point I made. It was EVERYONE who used it for type, not just Microsoft (where Simonyi worked.)
Incidentally, and to be pedantic, your examples are NOT strict Hungarian notation, which further proves my point that nobody really understood the damn thing.
My point in your out-of-context quote is that even wParam has lost that secondary meaning Hungarian wise. However, as a whole its linguistically valid since it does describe the intent. When I say "wParam" to a Windows developer, they know what I'm talking about.
|
|
|
|
|
Back in the day I used to love it. Now I hate it.
Kevin
|
|
|
|
|
I find hungarian notation useful inside algorithms, as it makes very clear the types involved in an operation (which is necessary to know in order to maximize the computation precision) and inside private member functions, for the very same reason.
GCS d-- s-/++ a- C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
I use Dungarian notation, thats where I put all the useless letters at the end.
|
|
|
|
|
In my opinion, nothing went wrong. It was just a case where strongly-typed languages and sophisticated IDEs made it unnecessary and more of a hassle than it is worth. Before the nice IDEs it was moderately useful as a way to save time but that was then and most of us have since moved on.
|
|
|
|
|
That only killed bad (system) Hungarian; not good (application) Hungarian.
|
|
|
|
|
Yes, that is true. I sort of look at it as Microsoft-style HN, the bad sort, is what has died.
|
|
|
|
|
PIEBALD whips out his Schwartz again... Making Wrong Code Look Wrong – Joel on Software[^] (OK OK, not technically a Schwartz, but close.)
It was killed by misunderstanding. And never was worthwhile even when it was understood.
Mostly just another case of senior developers not trusting junior developers.
|
|
|
|
|
For an article that promises a post-mortem on what went wrong, the part that was missed was the actual post-mortem.
This space for rent
|
|
|
|
|
|
Broadband services are a wonderful innovation of our time, using multiple frequency bands (hence the name) to carry signals over wires (usually, copper, sometimes aluminium). One of the key aspects of the technology is its ability to adapt to the length and characteristics of the line on which it is deployed. Pfff. My ISP already proved that
I guess it was a busy day in the office?
|
|
|
|
|
|
When the Internet started to become widely used in the 1990s, most traffic used just a few protocols: IPv4 routed packets, TCP turned those packets into connections, SSL (later TLS) encrypted those connections, DNS named hosts to connect to, and HTTP was often the application protocol using it all. 1/2 of HTTP, and more
No, it's not a Net Neutrality post
|
|
|
|
|
We need to invent a real C3PO.
|
|
|
|
|
An actually interesting article about protocols. Thanks Kent!
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
We aim to please. You're very welcome.
TTFN - Kent
|
|
|
|
|
Ch-ch-ch-ch-Changes
(Turn and face the strange)
Ch-ch-Changes
Just gonna have to be a different man
Time may change me
But I can't trace time
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason?
Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful?
--Zachris Topelius
Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies.
-- Sarah Hoyt
|
|
|
|
|
Russian billionaire Yuri Milner says if the space rock 'Oumuamua is giving off radio signals, his team will be able to detect them—and they may get the results within days. We can ask them where are they going (and can we come too?)
|
|
|
|
|
They'll probably fly right by...oh wait they may want to stop at walmart and pick something up for he trip?
Someone's therapist knows all about you!
|
|
|
|
|
The Oumuamuans do everything in threes...
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
The Daily Mail spoke with the leader of a team of researchers with the National Institute on Aging in the U.S. and reports that they have found that putting mice on a diet consisting of eating nothing every other day for a period of time day resulted in improved cognitive functioning. I fast - sometimes for minutes a day
|
|
|
|
|
Sure. But fasting as compared to eating what?
|
|
|
|