I'm learning Pascal and have been commenting my code to keep track of what each function does. Is it acceptable to publish code with lots of comments or does it come off as unprofessional? I want to make sure I'm on the right path with this.
5 Answers
Yes, it's fine to use comments, but be careful not to overload your program with them. Find a sweet spot where you provide useful explanations without cluttering the code. Use comments for necessary details only—self-explanatory code should speak for itself!
I usually skip comments unless something is really complex. For example, commenting simple imports doesn't add much value. If your variable names and logic are clear, you might not need as many comments.
Using the names of your variables and functions to explain things is often better than oversaturating your code with comments. Strike a balance! Too many comments can make your code harder to read. Aim for clarity through your code structure.
It's definitely up to you! I personally wouldn't put as many comments as you're using, but if they help you, keep 'em. You can always publish it and later edit out comments that aren't as helpful anymore. Don't let the fear of unprofessionalism hold you back from sharing your work. Just avoid releasing anything as 'stable' without proper testing—that's what would be unprofessional.
If comments help you understand your code better, go for it! Just remember: a clean and readable code structure should minimize the need for excessive comments. Too many can make it hard for others to focus on the actual code, so try to keep it clear and straightforward.

Exactly! The fear of not being professional shouldn't stop you from sharing your progress. Plus, you can always refine your code and comments later.