this post was submitted on 15 Nov 2023
2 points (100.0% liked)

Programming

3 readers
1 users here now

This magazine is dedicated to discussions on programming languages, software development, and coding. Whether you are a beginner programmer or an experienced developer, this is the place for you. Here you can share your knowledge, ask questions, and engage in discussions on topics such as coding languages, software engineering, web development, and more. From the latest trends and frameworks to tips and tricks for debugging, this category covers a wide range of topics related to programming.

founded 2 years ago
 

Comments in code are quite often a code smell. Let’s see what is suboptimal about comments and talk about some strategies to avoid them.

you are viewing a single comment's thread
view the rest of the comments
[–] ZILtoid1991@kbin.social 4 points 1 year ago (1 children)

There were times I've done line-by-line commenting to reverse engineer code I've written in the past. Also very important in case of Assembly and similar problematic languages.

I've also done some line-by-line stuff to show how my engine is initialized, so people will understand why a given line is there and not just have to know what lines they must type in.

[–] JackGreenEarth@lemm.ee 2 points 1 year ago (1 children)

Yeah, comments are absolutely necessary in languages like assembly and gcode.

[–] danrot@kbin.social 1 points 1 year ago

I give you that, but I am not talking about assembly languages, therefore the examples from my blogpost aren't showing any :-)