# do you name your file Myfile?



## LxQ (Apr 13, 2006)

Microsoft is getting on my nerves... I'm doing a tutorial and every time it tells me to rename a file or a field or anything, it's always MyFile, MySpreadsheet, Myfield, MyNewField, MyMyNewField...  I was pretty aggravated to always go to My Documents or My Music..  does anyone at Microsoft think we name anything My..-something?


----------



## Joe4 (Apr 13, 2006)

I think that is just there way of insuring that you don't accidentally pick a reserved word for a variable when writing code.  I have seen numerous problems that people have had with their code because they try to use words like "Cells" or "File" as variable names.

I usually do the same thing, precede all my variable with the word "My" to make sure I don't do the same thing.  You could just as easily choose some other prefix, i.e. "foo", etc.


----------



## Von Pookie (Apr 13, 2006)

I use it as a standard variable prefix all the time, especially when writing sample code to post on the board. It has nothing to do with Microsoft suggestions and everything to do with what happens to pop in my head. It's just easy *shrug*


----------



## HalfAce (Apr 15, 2006)

I too name everything "MyFile", "MyCell", "MyVariable", (etc.) and it has nothing to do with
Microsoft. I can't even say it's because it's easy, or just what pops into my head.
The reason I do it is plain & simple.

I do it because (as with everything else)... it's all about _ME_!

(  )


----------



## SydneyGeek (Apr 18, 2006)

I often do it when writing examples too. I guess, because it's generic. But I can see how it could grate on the nerves after the 99th MySomething  :x 

It does have one advantage -- you can see when someone copied an example because it's full of MyVariables :wink: 

Denis


----------



## Greg Truby (Apr 18, 2006)

Personally, I never name anything _My_Whatever.  So whenever I see one on my system, 99 times outta 100 it's something Microsoft created.


----------



## Von Pookie (Apr 18, 2006)

Something I apparently forgot to mention when I posted before: Other than using it in samples for the board, I *do* tend to re-write code for myself.

So, on my first runthrough I may name it "myVar" or something even more generic, but once I am sure everything is working I go back through and rename them to be something a bit more descriptive. And even then, this is not always the case. If it's just a one-off code, I'll just leave it. Depends on the situation.

That's just me, though. Everyone has their own style of coding


----------

