Cover Image by Freepik
Introduction
Writing code is easy but writing readable code is tricky. When working as the sole developer, you m...
For further actions, you may consider blocking this person and/or reporting abuse
For naming convention, here is my use case
Also, The identifiers with corresponding area that they are specifically used in(or found in)
camelCase ->Java(and many other)
PascalCase -> almost every language
snake_case -> database & python(and some other)
kebab-case -> web-development(HTML, CSS, Js and related tech)
Kebab for goats
Hey @middlekerb
Welcome to the community of thriving developers, connect with people, gain knowledge by reading blogs and even create blogs to share your knowledge
All the best
We all follow this in our team ! exactly the same.
nice article. I agree with almost everything except the comments. IMO comments should be scarse, write code that can be easily read, use comments only when the logic is hard to grasp or you need to convey something to your future self.
The problem with writing articles like this is that you’ve got a really good set of stuff that does improve quality (testing, security, etc) coupled with subjective standards (formatting, naming, and comments) which do not improve quality.
The former are disciplines which can demonstrably improve code quality, security, and performance. The latter are opinions that many folks have, sometimes rather strongly, which are a matter of preference, and contribute very little of value to the code. The latter, however, does have the potential to improve the developer experience, which is important.
My advice to most folks: focus on what makes your code better, and then for the formatting just use something that does that for you. If you find yourself spending any meaningful amount of time focused on aesthetic qualities of the text files that make up your application, you’re likely wasting valuable time that you could be using to write more tests which will make your code better.
thanks for sharing
Follow secure coding practices to protect against common vulnerabilities, such as injection attacks, cross-site scripting (XSS), or insecure authentication. Sanitize user input, use parameterized queries, and validate and escape data to prevent security breaches.
Regards: apk crave
I always keep constants and environment variables in UPPER_SNAKE_CASE
class/constructor camel case, capitalized first letter
Everything else camel case, first letter lower case
The identifiers with corresponding area that they are specifically used in(or found in)
camelCase ->Java(and many other)
PascalCase -> almost every language
snake_case -> database & python(and some other)
kebab-case -> web-development(HTML, CSS, Js and related tech)
Very good points! One thing that is also very important to remember is how readable is the code for the stakeholders (team, group, etc.)
I believe adhering to a style and coding convention can only improve the readability if the stakeholders agree that it does 😛
So having the buy-in from everyone involved is super critical.
Сongratulations 🥳! Your article hit the top posts for the week - dev.to/fruntend/top-10-posts-for-f...
Keep it up 👍
Thanks for this awesome article 🍕. Really insightful
Thanks for sharing, even if I haven't got to this level, at least I have the knowledge now..
I usually write ugly stuff that i only can understand then start separating core functions and methods so i can reuse them.... then i start commenting and prettifiyin.