EpiHandle's corner of the Internet

Weekly Vusfy update #21

Aug 11, 2024

Hello everyone,

How are you? As always, it is a pleasure to have you here.

Welcome to the 21st instalment of the Weekly Vusfy progress updates. This week, I have run into a typical problem you have when working on software.

Let’s dive straight in.

Update dependencies

An evergreen item.

Update Ruby version

This is where things get interesting.

Recently, Ruby version 3.3.4 came out, and this week I upgraded to it. For some reason, Rubocop (the linter I use, I explain what a linter is at the end of this section) started throwing errors about accessory libraries that Vusfy has always had. This is how I discovered that, before the upgrade, Vusfy was not using said libraries.

You thought some things worked in a certain way, and an update shows you that, in fact, you know nothing. Typical software engineering.

In the end, I have removed these libraries, because they introduce changes that I disagree with. I was also not using them, and I do not think I need them.

What is a linter

When talking about programming languages, a linter is a tool that formats the code according to predetermined rules.

You use a linter because you want something that formats the code in a specific way, so you do not have to do it manually every time. This is both in terms of style, because consistency makes the code more readable, and to enforce certain best practices you deem desirable.

Remove last piece of the waiting list feature

While working on various features, I have come across the last surviving bit of the waiting list feature.

Long story short, before I opened Vusfy to you, the public, there was a waiting list. In Vusfy Update #6, I already removed the code for the waiting list. However, this small piece of code had managed to escape my attention.

I do not know about you, but tying up loose ends pleases me.

Add title to event occurrences

While creating some future event occurrences, I thought it would be nice for them to have a title. Now, all event occurrences (future or not) can.

When creating or updating an event occurrence through the form, you can give an optional title to it. Then, when you are viewing it, you can see the title, if it has one, or a default message saying there is no title.

Also, when viewing the index of event occurrences, instead of View, you can see the title of each occurrence, if they have one, or a default message saying there is no title.

Add title to goal occurrences

I have adapted this section from the section above.

While creating some future goal occurrences, I thought it would be nice for them to have a title. Now, all goal occurrences (future or not) can.

When creating or updating an goal occurrence through the form, you can give an optional title to it. Then, when you are viewing it, you can see the title, if it has one, or a default message saying there is no title.

Also, when viewing the index of goal occurrences, instead of View, you can see the title of each occurrence, if they have one, or a default message saying there is no title.

Improve validations for future goal occurrences

Time zone bugs strike again. If you are a developer and you have come across them, I pity you.

Depending on your time zone and when in the day you tried to create a goal occurrence, the future goal occurrence validation would trigger, preventing you from saving the goal occurrence. This was in spite of your goal occurrence having the correct values. I had failed to realise the way I was validating the goal occurrence did not take into account the user’s time zone.

I have now fixed my oversight, and I have also added quite a few tests, to prevent this from catching me off guard again. At least I hope so :)

Improve validations for future event occurrences

I have adapted this section from the section above.

Time zone bugs strike again. If you are a developer and you have come across them, I pity you.

Depending on your time zone and when in the day you tried to create an event occurrence, the future event occurrence validation would trigger, preventing you from saving the event occurrence. This was in spite of your event occurrence having the correct values. I had failed to realise the way I was validating the event occurrence did not take into account the user’s time zone.

I have now fixed my oversight, and I have also added quite a few tests, to prevent this from catching me off guard again. At least I hope so :)

Shorten month in dates across Vusfy

Say you are using Vusfy from your phone. You want to view the list of goal occurrences for any of your goals. If there are elements in the list, the full month name makes the happened date occupy two lines. I dislike this, so I shorten the month names to just use the first 3 letters, across all of Vusfy and not only here. E.g. August becomes Aug.

There are some places where I would rather keep the full month name, but this is good enough for now. At the end of the day, software development is the art of walking a fine line of compromises.

Conclusion

Thank you for your time, and until we meet again, take care of yourselves.

Cheers,
EpiHandle