article cover image
التعليقات الكودية
تطوير الويب والبرمجيات 3 دقائق 0 تعليق 22 مشاهدة
صورة المستخدم يوشع يوسف
يوشع يوسف
تم النشر 2026-06-30 10:07:18 - آخر تحديث 2026-06-30 10:07:18

Don't comment on what the code is doing because the code explain what it doing if you refactor it
comment on why the code is here
// الكود لا يكذب لكن التعليق قد يفعل

e.g.
boolean isEven = x % 2 == 0;
Boolean isBigger = x > y;

if ( isEven && isBigger) {
// do something
}

TODO
[x] Task 1, feat or new feature, refactor, docs, style, test, perf or Performance improvements, chore or dependencies i.e. Task 1 is Done, feat is Done, refactor is Done, Documentation is Done, style(whitespace, formatting, etc.) is Done, test is Done, perf is Done, chore(build process or auxiliary tools and libraries) is Done
[] todo: Task 1 i.e. you should do Task 1
[x] fixme: There is Bug, Problem, or Error in This Component, i.e. Bug, Problem, or Error in This Component is Fixed
[] fixme: There is Bug, Problem, or Error in This Component, i.e. you should Debug or Solve Problem

Better Comments:
// * use Bootstrap 5 i.e. This Comment is Important
// ! <marquee> is deprecated
// ! ._set is N+1 problem i.e. Alert
// ! for for is O(n^2) i.e. don't use
// ? Can I Use Bootstrap Library i.e. Question
// ? Why you use Bootstrap Library i.e. Query
// // ? use bootstrap 5 i.e. Commented out instead of delete Comment

Python Documentation:
def my_function(param1, param2):
"""
the subject line: its case is Title Case

the body explains what and why instead of how

Args:
param1: Description of param1.
param2: Description of param2.

Returns:
A description of the return value.

Raises:
ValueError: If input is invalid.
"""
# ... function body ...

---
Comment Markdown

# Heading
## sub-heading
### H3
#### H4
##### H5
###### H6

bold text:
** text ** or __ text __

italicized text:
_ text _ or * text *

Strikethrough text:
~~ text ~~

Superscript text:
^ text ^ e.g. 4x^2^

Subscript text:
~ text ~ e.g. H~2~O

Link Naming:
[Link Name](https://www.example.com)

Block Code:

```Programming Language Name
The Code
```
monospace text:
`text` e.g. `import` or `ctrl keyboard + R keyboard` or `variable`

Blockquote:
> header
> body
> -- footer
>> Nested Blockquotes

A Description list:
First Description Term
: This is the definition/description of the first term.
Second Description Term
: This is one description definition of the second description term.
: This is another description definition of the second description term.

A Todo List:
- [ ] incomplete
- [x] completed

A unnumbered List:
* list item
+ Indent the list
- And even more

A numbered list:
1. list item
1. With multiple levels
1. And even more

Thematic Breaks aka Horizontal Rules:
*** or ___ or ---

---
MathJax
Block Math Formula:
$$
Formula
$$

Line Math Formula:
$ Formula $

Math Variable:
$ variable $

التعليقات (0)