|
da-leak is d bigst horor!
|
|
|
|
|
This[^] is one of the funniest things I have ever read.
|
|
|
|
|
Although I am not primarily a driver developer, I have written a few. The 1st rule is don't put any MessageBoxes in the driver not even while debugging.
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
Recently a developer in the team decided to prefix all classes in a namespace with a four alphabet acronym (let's call it DSRS, it's pretty close to what it is). I cannot elaborate how many brain cells have gone dead in me in comprehending the code and telling him to remove that prefix or use something more useful. His answer: people will get used to it and so will new devs... Speechless....
Ashish Kaila
|
|
|
|
|
A very similar thing was done to the main database at my last job. Only took me 1-2 years to "get used to" it.
Though, to be honest, it was actually somewhat useful in the way they did the naming. When they casually used the prefixes in conversation and expected you to know what it meant was when it got confusing.
|
|
|
|
|
Draw a red circle whit a slash through it (the classic 'No' symbol), and put TLA in the middle.
Karl
|
|
|
|
|
I recommend going a search and replace operation to replace this acronym by another: RTFM
|
|
|
|
|
Reminds me another programmer I know. He prefixed everything with his initials
|
|
|
|
|
Now that is one of the most useless prefixes that I have heard of!
Just because the code works, it doesn't mean that it is good code.
|
|
|
|
|
So you know at least which classes have to be exchanged
|
|
|
|
|
Haha... Never thought like that . But true ! I can write a script and have it do it for me ! In the end, the prefix will only apply to my script: ABCDPrefixRemover.bat
Ashish Kaila
|
|
|
|
|
I had the reserve.
Wenn seeing my initials (PH) in an id i wen "What the... ? Why would I put my initials here? Was I drunk on imagined importance that day? I am soooo ashamed of myself!"
Only the next day I figured, it means "Post History". As the comment above it said.
(And no, "Post History" is not "the Present" in this context).
|
|
|
|
|
There was a guy at my last job who did that. And every one of my coworkers insisted I mark each change I made to a stored procedure with a comment containing my name so they know who made the change (so they could go to that programmer and ask him/her about it). They thought that was a better idea than version control. Even though the code was littered with names of old programmers who no longer worked there.
|
|
|
|
|
If it doesn't breach your development teams coding standards, then it's valid. You do have coding standards, yeah?
Microsoft's standards recommend TLA's should be title case ie: Dsrs not DSRS unless the TLA is only 2 letters in which case it should be all caps ie: System.IO.
The upside is that developers have there own approach to solving problems and tell-tale signatures like this will help you debug their code. Recognising individual programming styles is a good thing.
BTW it is crap but this sort of thing isn't uncommon. A better solution would be to extend the namespace to include Dsrs
|
|
|
|
|
Robert Croll wrote: Microsoft's standards recommend TLA's should be title case ie: Dsrs not DSRS unless the TLA is only 2 letters in which case it should be all caps ie: System.IO.
Robert Croll wrote: BTW it is crap but this sort of thing isn't uncommon. A better solution would be to extend the namespace to include Dsrs
Gotcha!
Greetings - Jacek
|
|
|
|
|
Robert Croll wrote: Microsoft's standards
Robert Croll wrote: is crap
'Nuff said.
I kid (mostly), but I never do anything "just because Microsoft says so".
|
|
|
|
|
|
Worse I had to deal with was single letters that weren't related.
for example
Table names A_EmployeeInformation, B_EmployeePay, A_EmployeeSpouseInfo, C_PayHistory
I asked the database guy um why the letters, he said it grouped them by function and I should know that being a DBA for 5 years, and then questioned if I knew anything about Database design. It was at that moment I had fears over the database, and I was right, cause then we started seeing AA, and BB for tables that were reference tables, and my favorites were the ABC tables reference table used by A, B, C tables.
Was so glad when I was removed from that program for a bigger profile one.
|
|
|
|
|
Well, then use you another prefix for your classes: "WTFisDSRS". If he asks you to remove that prefix, just answer: Yes, I will.. when you remove yours.
|
|
|
|
|
Being an old-timer, I have made a practice of prefixing a variable name with its type. For example, an integer for tracking the number of actions taken might be named intActions and a money variable (logical subclass of decimal) might be mnyCashIn . Even now, with much smarter compilers, I still do it. This makes my code consistent, whether old or new, compiled or script. It also simplifies porting between weakly typed languages and strongly typed languages.
|
|
|
|
|
It's called Hungarian Notation[^].
- S
50 cups of coffee and you know it's on!
Code, follow, or get out of the way.
|
|
|
|
|
.. and it was highly recommended for use in VB6.
|
|
|
|
|
Hey Bob,
I think it depends on the platform being used. If I am using a not so type safe platform where at coding time type cannot be inferred, then a prefix for denoting object type is perfectly valid. I am not so sure about type safe languages such as C#. Also the problem I described was prefixing of classes which again should be avoided in my opinion regardless of platform. Anyhow happy friday and happy coding !
Ashish
Ashish Kaila
|
|
|
|
|
WTF?
while (e) { Coyote(); }
|
|
|
|
|
"I hate TLAs." You may quote me.
|
|
|
|