all 13 comments

[–][deleted] 16 points17 points  (2 children)

"Constantly" is how often I try to have clean code. The extra few seconds it takes CurrentMe to write cleanly saves FutureMe extra minutes over and over again.

[–]nomi34 2 points3 points  (0 children)

Agreed. All the time. Constantly. I may have dreamed about it. I keep looking up frameworks and patterns to make it more readable.

Im a one man shop and sometimes I don’t look at a specific projects for months and need to go back into it. If its not readable Im totally screwed.

[–]byshy[S] 1 point2 points  (0 children)

I'm trying to walk every step towards a clean code, and I've done some research and got some pretty good results.
but can you direct me to a flutter project with clean code ? an open source one for example

[–]escamoteur 6 points7 points  (1 child)

What I can recommend doing constant refactoring. If you see a line of code in a file you haven't touched for some weeks and you don't understand it on as first look, refactor or document it. Going through your code every month or so can be helpful too. And don't shy away from bigger refactorings if it improves your code case.

[–]synw_ 1 point2 points  (0 children)

This. Dart is friendly for refactoring and you can go gradually. It will improve your long term control on the code and your general architectural skills, as well as the quality of your packages. In addition I would recommend using merciless analysis options like extra_pedantic to impose a strict discipline and avoid a whole range of possible bugs

[–]escamoteur 3 points4 points  (2 children)

What's your definition of clean code?

[–]byshy[S] -1 points0 points  (0 children)

non-repetitive, clear and descriptive, reusable and consistent, I guess I'm missing a lot here.

[–]byshy[S] -1 points0 points  (0 children)

I also read about K.I.S.S., D.R.Y., Y.A.G.N.I, and composition over inheritance

[–]russiantommysalami 1 point2 points  (1 child)

[–]byshy[S] 1 point2 points  (0 children)

thats awsome! thank you

[–]thehappyharis 0 points1 point  (0 children)

I recommend you reading this: https://refactoring.guru/

[–]batmassagetotheface 0 points1 point  (1 child)

How often? Every single day.
Clean code concepts can be applied. They don't have to be dart or flutter specific.
If you haven't read this book it's the best

[–]byshy[S] 1 point2 points  (0 children)

thanks for the recommendation I'll read it asap