Software engineering and personal development

Tag: refactor

Rename Rails controllers, views and migrations with Rails Refactor

Img source: https://www.youtube.com/watch?v=-sX05s0STs8

There can be cases where you wished you named that controller a lot better, as it does not make any sense and is very ambiguous in its current form. If you have ever wondered whether there is a way for you to do quick renamings of multiple related files inside a Rails project, then I have some good news for you. There is already a gem called Rails Refactor, that can be used to do these renamings. Continue reading

Comments remind you to write simpler code

 

Img source: thoughtco.com

When you are programming, there are cases when you implement something in such a way that it is difficult to understand and reuse by others. As a result, you decide to write comments above it to explain the logic behind your code. The moment you decided to write this type of comment, you admitted that your implementation is already complicated enough so that others or your future self would benefit from adding this plain English type of explanation. Continue reading

© 2024 Fatos Morina

Theme by Anders NorenUp ↑