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?
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.
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 ;)
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:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.