taniarascia / comments

Comments
7 stars 0 forks source link

refactoring-dont-repeat-yourself/ #111

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Basic Refactoring: Don't Repeat Yourself | Tania Rascia

Refactoring is the process of editing code to improve efficiency and readability without changing the output. I made a little example to…

https://www.taniarascia.com/refactoring-dont-repeat-yourself/

dicodiaz commented 2 years ago

Hello Tania, great article! I just wanted to add that you could use object destructuring to pass the whole device object as an input for the printData function, like this:

data.forEach((device) => {
  printData(device);
})

But then you'd have to refactor the printData function like this:

const printData = ({id, name, sessions}) => { ... }

And that would make the code more readable without changing the output.

I liked the rest of the article a lot as it gave me another insight about refactoring, keep up the good work!

MicroverseNelson commented 1 year ago

Great Article, as a student of microverse i appreciate the article. very useful.

anyepeter commented 1 year ago

Wow. Thanks for sharing your knowledge with us. The article is amazing!!

Feliverse commented 1 year ago

It's just I need to improve my code. Thank you, nice example

Lul-Abdifan commented 1 year ago

Hello Tania, Nice Article! Good job, keep it up!

Gardimy commented 1 year ago

Hello Tania , Your article is helpful ! So Thank you to share your Knowledge with us.

Keep going!

MoyasiGinko commented 1 year ago

Hello there Tania, the article was descriptive and very useful. Thank you for sharing knowledge and guidance.