PDA

View Full Version : kinda aggrivating me



guyfromfl
03-29-2008, 12:17 AM
this is more like a poll that should be posted some where else, but lets see what happens...

why is the new naming convention "myVariable" why the my?

its bad enough MS wants everthing to be me.whateverWeArTalkingAbout.Value.

im sorry i just hate My Pictures, My Documents, My Crappy Computer...

sorry im a DOS & NIX guy and get aggro over Microsft crap.

anyways lets have fun...tell me what you think pro or against the above. this should be fun. :)

manav
03-29-2008, 12:30 AM
I will answer only if this thread is moved to general discussions. lol haha haha lol :D

guyfromfl
03-29-2008, 12:37 AM
bump::move this mofo

maxorator
03-29-2008, 03:05 AM
You just need to get used with it.

Every company has their own ways of naming things and you can't blame them because you're not used to theirs.

manav
03-29-2008, 03:08 AM
ok. now this thread is in general section. lol.
i like the convention My Documents, My Pictures, etc. they are so clear and make my PC a Personal Computer :D haha lol

and when in doubt it is better to use the name, mycout, than using cout, for example. lol haha

PING
03-29-2008, 06:40 AM
I don't see the point in bashing microsoft for something like this. MS bashing is a popular sport, how come i dont see you complaining about KDE's naming convention of having K as the starting letter in most applications ?

VirtualAce
03-29-2008, 07:24 AM
why is the new naming convention "myVariable" why the my?

its bad enough MS wants everthing to be me.whateverWeArTalkingAbout.Value.

im sorry i just hate My Pictures, My Documents, My Crappy Computer...

sorry im a DOS & NIX guy and get aggro over Microsft crap.



1. The naming convention was probably used to appeal to the everyday user. I find nothing wrong with it.

2. How does .NET have anything to do with this thread?

3. I'm not a Microsoft hater just for the sake of hating Microsoft nor do I consider myself a Microsoft hater. They have good products and not so good products. XP is a good product. Vista is a not so good product. MSVS 2005 is an excellent product, DirectX 9 is an excellent product, MSVS 6 was not, DirectX 3 was not, and DirectX 10 is perhaps showing to also not be what it was hyped to be. Some of their API documentation is rather convoluted, incorrect, etc., but so is every other company's API docs.
The things that irritate me about Microsoft have nothing to do with what is in this thread. I think I'll stop right there.

manav
03-29-2008, 07:33 AM
may be he wanted a general discussion on naming conventions.

i don't have any problem with any naming convention, be it JavaSources, MS, or linux_kernel.
but just for the discussion i want to know why a command that prints the running process list is called ps on *nix of course?

Dino
03-29-2008, 07:39 AM
When someone comes up with a convention, it is usually for a good reason. Variable naming conventions are vast and varied. MS's happens to be called Hungarian notation. The intent, I suppose, is to lessen the burden on the programmer to go digging the include files to figure out what data type a particular variable is defined as. If all "ints" start with "n", then whenever you see a var that starts with "n", you can go with the assumption that it is an int. Saves time. I prefer a well defined naming convention.

Todd

VirtualAce
03-29-2008, 07:48 AM
When someone comes up with a convention, it is usually for a good reason. Variable naming conventions are vast and varied. MS's happens to be called Hungarian notation. The intent, I suppose, is to lessen the burden on the programmer to go digging the include files to figure out what data type a particular variable is defined as. If all "ints" start with "n", then whenever you see a var that starts with "n", you can go with the assumption that it is an int. Saves time. I prefer a well defined naming convention.


I believe he was talking about the naming convention used for folders and such in the OS, not actual code.

Thantos
03-29-2008, 09:12 AM
It is still better then the iCrap style that is plaguing everything it seems.

The "My Foo" style does make sense if the user can only ever see their version of it. Then it seperates the personal files (MY files) from the public files.

Yarin
03-29-2008, 09:38 AM
Actually, I like the Hungarian notation, think about it: "pcRAMDriveFSBuffer" is more descriptive and takes less characters than "ram_drive_fs_buffer" (although it's not always as easy to read)

But I also dislike My Computer, My Documents, etc.. We should start calling it My Internet Explorer , My Wordpad, My Calculator, My Visual Studio, then too.

Mario F.
03-29-2008, 12:28 PM
The 'My' thing/convention makes sense. It clearly identifies the real purpose of those folders and directs users to them (even though I've never, ever, used them). It has my vote.

As for myVariable... why not? My personal library resides entirely on the 'mjpf' namespace. Inside I have several private objects prefixed with 'my' to help me distinguish what is not going to be made accessible from what is.

Since we are on the subject of folders and files, you know what I would like instead? If everything was more like Plan 9.

vart
03-29-2008, 11:48 PM
when you try access My Documents of other user (say Bob) you really see Bob's Documents...

guyfromfl
03-30-2008, 02:02 AM
awsome...

my beef is just that my is usually very vague, in both programming and file structure. if i accidently save a project/file in the "My" part of windows i usually figure it for dead and use save as instead of searching through all that crap that is 'supposed' to make it easier.

the naming conventions I use are far different because 'my' doesnt tell you anything except in Mario's case. If I were to pick a variable name it would be local but at the same time tell me what I am doing with it. like lNameConNum (because im working on a soundex algotrithm....)


however to each their own!!!

this convo was started to see what the rest of the world thought and like a seinfeld episode.. is really about nothing.

cheers.

maxorator
03-30-2008, 03:00 AM
my beef is just that my is usually very vague, in both programming and file structure. if i accidently save a project/file in the "My" part of windows i usually figure it for dead and use save as instead of searching through all that crap that is 'supposed' to make it easier.
That's why there are so many "My Blabla" folders - so you could save everything to the related folder and it would be easier to find. It's your problem if you save your programming projects to My Videos or My Received Files. :D

dwks
03-30-2008, 03:19 AM
I create my own folders and use those, mainly because I don't like long folder names, especially ones with spaces. Going from "Documents and Settings" to "Users" was a good idea, and I think Vista's "Documents" folder is much better than "My Documents" as well. (Not that I ever use any of the standard folders, of course.)

I think they called it "My Documents" originally because they wanted to show off how Windows filenames could be really long and have spaces in them. :)

maxorator
03-30-2008, 04:54 AM
I have all my main folders directly on drive C. Good short path. :)

Mario F.
03-30-2008, 07:52 AM
I have nothing on drive C except for the OS :)

EDIT: Oh! And installed applications, mind you. I used to have a progs folder in D. But since some apps really don't like to reside in odd places, for the sake of simplicity, I bowed to applications being on C.

brewbuck
03-30-2008, 11:22 AM
If all "ints" start with "n", then whenever you see a var that starts with "n", you can go with the assumption that it is an int. Saves time.

It "saves time" until you decide to change the type of the variable to "long" and then you have the joy of renaming hundreds of instances of that variable name.

IMHO, a variable should be named according to its use, not its type. Usually, the type is obvious from the use anyway.

brewbuck
03-30-2008, 11:25 AM
I don't see the point in bashing microsoft for something like this. MS bashing is a popular sport, how come i dont see you complaining about KDE's naming convention of having K as the starting letter in most applications ?

"Why didn't you bring up X" isn't really an effective argument...

But if you want, you can hear it from a die-hard KDE user: starting everything with "K" is stupid. There, I said it.

PING
03-30-2008, 11:41 AM
"Why didn't you bring up X" isn't really an effective argument...

The comment was basically because of this




sorry im a DOS & NIX guy and get aggro over Microsft crap.



I don't understand why most people hate microsoft for no reason, just so that they can look 'Kewl' . If someone has problems with mySomething or myThatthing and chooses to plainly ignore something like Kompare Koffice Konqueror etc. or iTunes, iPhone, iPod .. its purely because they dislike MS and no other reason, IMO the op is just being biased against windows and not thinking rationally.

Having said that, let me clarify that i love the KDE way of naming things and i dont particularly mind MyComputer and MyDocuments. I hardly use the other My-folders to store anything.

brewbuck
03-30-2008, 11:46 AM
I don't understand why most people hate microsoft for no reason, just so that they can look 'Kewl' . If someone has problems with mySomething or myThatthing and chooses to plainly ignore something like Kompare Koffice Konqueror etc. or iTunes, iPhone, iPod .. its purely because they dislike MS and no other reason, IMO the op is just being biased against windows and not thinking rationally.

I think any rational person is going to have biases. Rationality dictates that you use the tools which are appropriate to the situation. If a rational person is always in situations where Windows is not the right solution, then that person will, rationally, have a bias against that OS.

Agreed, the topic is kind of a rant, but I don't think it pretended to be anything else.

PING
03-30-2008, 12:02 PM
Agreed, the topic is kind of a rant, but I don't think it pretended to be anything else.

I think the manner in which the OP posted was pretty stupid thats all. Please lets not start another MS vs *nix debate here. :)

maxorator
03-30-2008, 12:51 PM
It "saves time" until you decide to change the type of the variable to "long" and then you have the joy of renaming hundreds of instances of that variable name.

IMHO, a variable should be named according to its use, not its type. Usually, the type is obvious from the use anyway.
CTRL+F?

IMHO, it is totally impossible to understand anything if I don't know what the type is.

dw, b, w, n, lp, lpdw... FTW!! (b is byte because bool sucks :D).

Mario F.
03-30-2008, 02:28 PM
IMHO, it is totally impossible to understand anything if I don't know what the type is.


If you do your homework right, you won't need to know what type the variable is.

whiteflags
03-30-2008, 02:39 PM
I'm surprised how much importance we're attaching to minutae that either vexes us or makes us feel comfortable. Is this life? We all need to do better maybe.

abachler
03-31-2008, 09:14 AM
CTRL+F?

IMHO, it is totally impossible to understand anything if I don't know what the type is.

dw, b, w, n, lp, lpdw... FTW!! (b is byte because bool sucks :D).

and we all love ppcstr, it sounds like some variation of a potato gun gone horribly wrong ...

Personally I use hungarian when its useful, but I dont use it all the time. dwTemp pTemp come to mind, when the same base name Temp may be used within the same function. I dislike using temp1 temp2 temp3 etc.

maxorator
03-31-2008, 09:20 AM
Personally I use hungarian when its useful, but I dont use it all the time. dwTemp pTemp come to mind, when the same base name Temp may be used within the same function. I dislike using temp1 temp2 temp3 etc.
Well yeah, I also use normal variable names (sometimes in Estonian), but I attach dw, w, etc onto them. ;)

abachler
03-31-2008, 09:24 AM
Well yeah, I also use normal variable names (sometimes in Estonian), but I attach dw, w, etc onto them. ;)

I'm partial to hindi, slovenian, and german myself. I wonder if this is a common practice to use variable names in other languages.

maxorator
03-31-2008, 09:32 AM
If you do your homework right, you won't need to know what type the variable is.
I am a reverse engineer, assembly programmer and C programmer. Things like COM, STL, GTK, OLE, interfaces, templates, classes, subclasses, iterators, methods, overloading are not what I deal with. I deal with FLOATs, DOUBLEs, DWORDs, WORDs and BYTEs. That's all I have and those are the most important things for me. ;)

matsp
03-31-2008, 09:57 AM
I'm partial to hindi, slovenian, and german myself. I wonder if this is a common practice to use variable names in other languages.

If you want people that are not familiar with your language to be able to understand your names, then that's probably not a good idea. For your personal programming, who cares?

--
Mats

indigo0086
03-31-2008, 10:39 AM
The .NET Framework is HUGE, I think their naming convention is actually pretty easy to get especially if you are trying to figure something out and guess the first word and you somehow pop up with the right function. Or not, but it is pretty easy that you don't have to remember, but know a general direction.

abachler
03-31-2008, 10:54 AM
If you want people that are not familiar with your language to be able to understand your names, then that's probably not a good idea. For your personal programming, who cares?

--
Mats

Well, sometimes I don't want casual snoopers to easily iunderstadn the code...