It seems that CamelCasing is not best. Do you agree?

I had to bitterly accept an expert comment recently, J/K

..Implying that my usage of CamelCasing in my code was lame, and I should use underscores.
My personal feeling was that camelCasing was easier to read, less long, but this article below confirms the expert opinion, underscores are better!


So I grudgingly_accept!  j/k

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ste5anSenior DeveloperCommented:
It depends on the language and environment.

btw, TCP_IP_connection is in camelCase tcpIPConnection or in CamelCase TcpIPConnection. Cause you only uppercase 2 letter abbreviations, 3 or more letters are the first in upper case and the rest in lower case. Thue REST_endpoint is RestEndpoint.

But the rest is mere superstition ;)
Well I personally prefer underscores, but in the end (at least in my opinion) personal preference should not be reason to adhere to a certain coding style.

I personally try to write code whenever possible as if I would like to contribute to the open source community.

This means using pep8 for python but using camel case for javascript.

- I have to actively switch my brain whenever switching a programming language, as I don't have one unified coding style

- The code looks less disturbing to the community
- I can use standard tools, ( flake8 for python, jslint for javascript etc) to check for syntax errors / coding style issues, unused vars, . . .
- The look and feel of code, that I wrote in language X looks similar to most of the code written in language X, that can be found in the net.

Conventions are an attempt to simplify collaboration.
Different groups/communities will very often use different conventions.

Sometimes, there's really one convention, which is way superior to another one. For most coding style conventions I personally don't see a big difference.

Please note also, that some conventions use CamelCase and underscore_conventions at the same time but that the respective coding style suggests to use one for certain things (e.g. var names, file names) and the other one for others (e.g. classes)

If you work on a project, that you don't want to make open source, where you don't work with many other developers, then it is not a big issue if you stick with your own coding style, as long as it is coherent.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
käµfm³d 👽Commented:
CamelCase TcpIPConnection
To be pedantic, that would be Pascal Case, not Camel Case.
ste5anSenior DeveloperCommented:
In great detail lies great wisdom: This was CamelCase, not camelCase ;)
beavoidAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Game Programming

From novice to tech pro — start learning today.