---
title: "Comment by Spyros Argalias on \"Newbie Devs, Please Stop Doing This\" | Hashnode"
description: "Great suggestions. Very important things for beginners to do :). The only thing I disagree with are the comments in code. Comments have the problem that they&#3"
url: "https://hashnode.com/posts/newbie-devs-please-stop-doing-this/6095f36f1ea29f2c341df869/comment/60966b9e1ea29f2c341dfeb9"
---

[Discussion](https://hashnode.com/posts/newbie-devs-please-stop-doing-this/6095f36f1ea29f2c341df869)

Comment [Newbie Devs, Please Stop Doing This](https://hashnode.com/posts/newbie-devs-please-stop-doing-this/6095f36f1ea29f2c341df869)

[Spyros Argalias](https://hashnode.com/@sargalias)

[May 8, 2021](https://hashnode.com/posts/newbie-devs-please-stop-doing-this/6095f36f1ea29f2c341df869/comment/60966b9e1ea29f2c341dfeb9)

Great suggestions. Very important things for beginners to do :).

The only thing I disagree with are the comments in code.

Comments have the problem that they're easy to become outdated, because programmers may not update comments when they update code. They are also redundant if you use good names.

For example:

```
// Here is a function, with bad names, that needs comments

/*
    this function sends data
    a: url slug
    b: data to send
    c: optional configuration object
*/
function foo(a, b, c = {}) {
    const d = `example.com${a}`; // create absolute URL
    const e = Object.assign(c, {data}); // create new configuration object with data
    fetch(d, e); // send data
}

// Here is a good function. It doesn't need comments because the names are very descriptive
function sendData(urlSlug, data, requestConfiguration = {}) {
    const absoluteURL = `example.com${urlSlug}`;
    const configurationObject = Object.assign(requestConfiguration, {body: data});
    fetch(absoluteURL, configurationObject);
}
```

What's your opinion on this? Keep up the good work! :)

[Orangemn6](https://hashnode.com/@Orangemn6)

[May 8, 2021](https://hashnode.com/posts/newbie-devs-please-stop-doing-this/6095f36f1ea29f2c341df869/comment/60966b9e1ea29f2c341dfeb9#reply-6096dcd221068818a5c617e0)

Part of the code template is editing the comments in this case. You should add comments because even if _you_ can read it, others might not be able to.
