Refactoring

On Sunday, April 12th 2020, 8:07:23 am by Lee Nattress

I've spent some time refactoring the code for the various parts of the app. I've noticed in my excitement to get things working, I've made some serious spaghetti code.

If I was under peer review, this would not happen, but because this is a lone project right now, and I'm in dreamer mode, it happened anyway.

So let's go back and fix some of it.

Firstly, and perhaps most obvious is that there are too many nested and useless branching statements. It's if city here.

Then a few different ways of doing something, and I've made functions that do similar things in different files. Let's pull those into the same file, or at least make them unique.

There are few standards in error messages, in fact, two different types of error, so let us sort that.

Some of the CSS colours and theme designs and padding were not unified. Let's fix those.

There are endless ways to refactor code but at some point, you'll feel more comfortable and happier with the way it feels.

museful code blogging profile image
museful code blogging

museful is a terminal application and web interface that lets developers on a project have more meaningful discussion with anybody interested in the source code than just commit messages.

Recent

Why Museful Exists

Monday, April 13th 2020, 12:42:12 pm

by Lee Nattress

Tidy Up For Releasable Version

Monday, April 13th 2020, 8:00:26 am

by Lee Nattress

What Is Museful?

Sunday, April 12th 2020, 12:26:39 pm

by Lee Nattress

Refactoring

Sunday, April 12th 2020, 8:07:23 am

by Lee Nattress

Npm Package!

Saturday, April 11th 2020, 8:33:48 pm

by Lee Nattress