Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C#

Chris Smith
Chris Smith
689 Points

Might be a silly comment related question

Only a few videos into C# - but if I were to essentially litter my first few coding projects with comments, will that unnecessarily increase file sizes? Or are the average file sizes nothing to really worry about? Was just a curious question I had floating in my head as I was watching the video about comments.

1 Answer

If you are just developing your code, I don't think that adding comments is going to increase your file size enough to worry about. Once you want other people to download your code, then the file size can have an impact on the speed at which the code is fully downloaded, and then you might want to consider code minification.

If you are just learning the language, it's probably better to have comments to help you know what you are doing and stay organized, than to ignore language features that you don't fully understand that you otherwise might want to add comments to.

Chris Smith
Chris Smith
689 Points

Thanks! That was what I was assuming. Currently learning it to start out and wanted to kind of litter my code with comments as a reference so it all makes sense to me.