DEV Community

Ben Halpern for The DEV Team

Posted on

Feruz Oripov, The Real MVP.

Refactoring organizations_controller.rb. #3793

Adding set_organization method for not repeating query code.

What type of PR is this? (check all applicable)

  • [x] Refactor
  • [ ] Feature
  • [ ] Bug Fix
  • [ ] Documentation Update

Description

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Added to documentation?

  • [ ] docs.dev.to
  • [ ] readme
  • [ ] no documentation needed

[optional] What gif best describes this PR or how it makes you feel?

alt_text


Refactoring dashboards_controller.rb. #3794

What type of PR is this? (check all applicable)

  • [x] Refactor
  • [ ] Feature
  • [ ] Bug Fix
  • [ ] Documentation Update

Description

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Added to documentation?

  • [ ] docs.dev.to
  • [ ] readme
  • [x] no documentation needed

[optional] What gif best describes this PR or how it makes you feel?

alt_text


Refactoring chat_channels_controller.rb. #3808

What type of PR is this? (check all applicable)

  • [x] Refactor
  • [ ] Feature
  • [ ] Bug Fix
  • [ ] Documentation Update

Description

Related Tickets & Documents

#3739

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Added to documentation?

  • [ ] docs.dev.to
  • [ ] readme
  • [x] no documentation needed

[optional] What gif best describes this PR or how it makes you feel?

alt_text


Refactoring social_previews_controller.rb. #3818

What type of PR is this? (check all applicable)

  • [x] Refactor
  • [ ] Feature
  • [ ] Bug Fix
  • [ ] Documentation Update

Description

Refactoring repeated respond_to code.

Related Tickets & Documents

#3739

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

Added to documentation?

  • [ ] docs.dev.to
  • [ ] readme
  • [x] no documentation needed

[optional] What gif best describes this PR or how it makes you feel?

alt_text

This is how great software happens.

Top comments (9)

Collapse
 
yaser profile image
Yaser Al-Najjar

Refactoring code is a great skill that not so many developers have...

Many developers feel afraid of doing these kind of tasks, it's actually scary cuz even changing one line could break things!

Great job, @feruzoripov

Collapse
 
jeddevs profile image
Theo

I've always found refactoring to be refreshing ans even fun.
Thinking of better and more efficient ways to do something.

But thats just me. I always keep a copy of my original code just incase which helps me to not be afraid to royaly screw itup 😁.

Collapse
 
yaser profile image
Yaser Al-Najjar

I find it the opposite, cuz sometimes this happen:

break

Thread Thread
 
ben profile image
Ben Halpern

Refactoring against a sturdy test suite is fun. Not so much without 😄

Therapeutic refactoring is definitely a thing

Collapse
 
feruzoripov profile image
Feruz Oripov

This is how I started my open source contribution journey, thanks )

Collapse
 
scrabill profile image
Shannon Crabill

Factoring is so important!

Collapse
 
rhymes profile image
rhymes

Great job @feruzoripov!

Collapse
 
feruzoripov profile image
Feruz Oripov

Thanks)

Collapse
 
feruzoripov profile image
Feruz Oripov

I'm so inspired after reading it. Thank you so much )