- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Admin
I agree that C is not strongly typed. I always declare everything as byte arrays and cast on the fly when I absolutely have to.
Admin
Admin
The real WTF is one of Ryan's beloved developers, who always uses design patterns and loves hungarian notation because someone might think an email address is an instance of a stringButNotJustAnyGeneralSortOfStringButASpecialString had earlier checked in a 500 line update to the application where every use of ContactEmailAddress was changed to sContactEmailAddress because thats our standard and we can't let ContactEmailAddress appear at all because it might be confusing but the cherished developer who follows all of Ryan's picky little rules forgot that there was a config file.
Admin
Indeed. I demand a refund.
Admin
Or not. In which case we may have a problem.
Admin
Oh. I think I'd better quit messing around on this forum and get to taking the prefixes off all my data entry screen labels.
Admin
It could be worse. He could be disrobing readers.
Admin
TRWTF is "I was exploring our SVN logs". Time for some motherfucking programming kiddo.
Admin
Disagree. There is NO reason to use Hungarian Notation in modern code. The WTF here is clearly:
A) The dev who checked this in added an obsolete naming convention to something that was the proper way before it
B) The dev checked in ONLY this change as though it was some major feature.
Admin
So, he fixed a showstopper bug in an application and he was supposed to wait to check it in until he had some major feature to bundle it with?
Admin
Making modification to Config file is thing of past. Now convention over configuration will rule till something new is going to come.
Admin
Apart from that, C is of pratical use 0, since invention of java.
Admin
Real programmer use Reverse Polish Notation.
Admin
If it wasn't a bug, there's no reason to use Hungarian in modern code. The connotation I got from the article was that this dev arbitrarily decided to use Hungarian in a config file where it wasn't needed.
Admin
Or he could be disCmdrTacoing readers.
ObCaptcha: did somebody load a new dictionary? My browser didn't autocomplete this one.
Admin
Real programmers use APL. Java, C, C# etc are for sissies.
Admin
ALL HUNGARIAN NOTATION USERS SHALL BURN IN HELL!!!
Admin
Few can be bothered with proper exception handling. Java and Python programs that just quit or at least abort when you are trying to do with a huge barf in a window saying "Exception"
How about not quitting and trying to continue instead of aborting if there is an error?
BitPim is an example if something goes wrong in a transfer it aborts the whole transfer. One phone book entry it doesn't like and it barfs and aborts the transfer. Better than the Java programs which just exit I guess.
Admin
That's my thought also. Is has nothing to do with any preference for Hungarian notation -- it has everything to do with a variable name matching a key name.
Admin
If you're anything like the clowns here, you sit on it for weeks and then commit with a message like, "bunch of changes."
Is it really so fucking hard to run hg diff in one terminal, hg commit in another, and just summarize what's changed? God almighty. /rant
Admin
There's good Hungarian notation and bad Hungarian notation.
Bad Hungarian notation tells you the language type that you're storing the data in, e.g. DWORD dwWindowWidth, String sContactEmailAddress.
Good Hungarian notation tells the you semantic type of the data, e.g. DWORD dx, String emailContact. Note this is usually more specific than the language type.
Often the prefix is enough (as in dx above.)
http://www.joelonsoftware.com/articles/Wrong.html
Admin
The real WTF is still using XML when all the cool kids have moved onto JSON.
Admin
woopdie doo... what a lame WTF today...
Admin
The real WTF is that they are all using subversion. Everyone knows Microsoft VSS is king of source control.
Admin
Nice try, troll. VSS gave up the throne to Team Foundation Server, and Subversion only runs on MACs anyway.
Admin
Team. Team. Team. Team. Team. I even love saying the word team.
Admin
I used to hate Hungarian Notation but when it is done right it is actulaly realy good.
What is bad is when you have a vaiable like
int nIndex;
and some bone head comes and changes the vaiable type
DWORD nIndex;p without renaming it to dwIndex; because that turns it from a help to sabotage.
Admin
Not so bad, try working with a developer, that ignores your suggestions and where there's no documentation at all, not even quality assurance for code.
They don't have release schedule, just code (oh it runs) then release. Btw, he also doesn't use version control.
To learn the database structure i use poor mans sql query logging (tcpdump and percona utils).
Admin
And that's what freaks me out, Mr MyBad doesn't sound like the kind of person to use hungarian notation on his own. Which means it's being forced on him by the other developers. Which brings to mind something a child psychologist once mentioned to me about often finding that his putative patients are the only sane person in the family.
Admin
Admin
He is bad and he know it
Admin
Which is why I dislike Hungarian notation for variable type, just name the variable as to what it does or the domain it is in and be done with it.
I have seen type change far to often, usually by people that shoudl know better. People ask for a phone number field and the guy makes a var iPhoneNumber completly forgetting that a phone number is NOT a number, it IS a string that happens to use a subset of characters, namely digits, you need to maintain any leading 0's, same with zip codes and SSN's. You have no idea how many times I have seen these defined as ints or longs first.
As for renaming them, if it is exposed from a library you need to parse through every possible assembly that might access it to see if it does and change it there. Refactoring things like this is just bad so should not use hungarian notation for type. No compromise on my end there.
Admin
Yeah, I don't like using it for data type either.
I've found it can be helpful to stick a prefix on member variables to identify them as such.
Admin
Admin
Admin
(Unfortunately i never know if my compiler is still working checking the types ...)
In fact state of the art are dependant type systems.
Admin
But he IS that guy. And the guy who uses variable names like 'q' and 'whatever' just because he has no imagination. And the guy who keeps all of his code checked out of the repository for three months, then complains that he has merge conflicts. And the guy... Well, you get the point.
Every company, sooner or later, has 'that guy'. They come in different flavors, with different degrees of competence, but their fingerprints are unmistakeable.
Admin
This exactly what I was thinking. Really you should have a an untrusted string type to store user input. Attempts to send user supplied data to web form, or as part of an SQL command should result in type error at compile time.
Admin
That's all very well, but we all know what having too many dates can do to your system.
Ewww.
Admin
Admin
Exactly why you might want something to tell the receiver what it's getting although personally I would use an attribute (if not a DTD or somesuch) or something here rather than Hungarian to keep it atomic and machine readable.
Admin
Yes because checking in 1 character is a waste of a -m (very bad ration because even the -m it 2x making some massive overhead) with next arg length significantly > 1 char (I mean fuck, the space and "" alone does that), and one must wait until the diff shows many characters changed and multiple lines to make it feel worth while (even if massively unrelated), but then if you have a boss who checks every commit within 5 minutes kill yourself problem solved guys.
Admin
Oh my, its like FORTRAN 77 all over again.
I'll take the self documenting code thanks.
Admin
The only TRWTF thing here is that you all, Nagesh included, are only pedantic wimps that find enjoyment in ridicule things that are obviously, blatantly wrong. It's like beating a dead dog or fighting with a barbie doll. You are a disgrace for the real nerd community. Study and be brillant frist before posting here or I promise I will destroy you with my troll powers.
Admin
i do hope this guy becomes a regular i'll take his posts as "thread closed" (hence the top-posting)
Admin
lsat post!
Admin
Ill admit TFS is really good nowadays. I'm also an admitted microsoft junkie.
But if cost was no object, Borland Starteam is THE best SCC system on the planet. Anyone who says otherwise simply hasn't tried it yet. The fact that it costs 5 times TFS (per developer/subject to features used) also doesn't help it get more market penetration.
Admin
I only play Team Foundation Classic Server as demo man.
Admin
This ^
I've done this, usually I pick up on it when I diff before a checkin - but seriously this happens.