code writing methods

hello again, i was just wondering if there is any real reason behind the way people write code or if it is just the way they are taught.
i mean int myInt and int my_int mean the same things, but the only thing that i have heard about them, is that they are quirks of windows and linux programmers, respectively.

i program on windows and prefer the linux method specifically for readability purposes. as im getting further into programming, i.e. classes, objects, and methods of classes, im seeing that the underscore is cumbersome, but thats the only reason i would stop using it. any input would be nice, thanks!
the only thing that i have heard about them, is that they are quirks of windows and linux programmers, respectively
You've heard wrong. It's true that the Windows API is written in CamelCase and that many UNIX interfaces are in all lower case, but it'd be an overgeneralization to say that one is a predominant style in some platform.

There's no reason. Some people just like CamelCase, and some people prefer to use things that resemble spaces. Personally, I like CamelCase for complex types and underscores for functions and simple types, especially POD types.
Use whatever style suits you, but try to be consistent.
Its mainly by choice. There's no real difference.
The main thing you should focus on is that you write the source code for PEOPLE.
A computer doesn't care if you name an integer i, integer, orMyInt as long as your consistent.

Focus on comments, and names that at a quick glance tell others what that data value holds.

Think about it.
Whats easier to know at a glance what the value is for?
1
2
3
float a = 0.07;
// or
float stateTax = 0.07;
Topic archived. No new replies allowed.