Splitting in smaller functions
After fixing variable names, it's the next step towards improving readability
This shows that there’s no such thing as a language that is universally better than other languages. Which one to choose depends. I’ve written about this in the past.
In any case, after fixing the variable names, and before going on to improve its readability further by splitting it in smaller functions, I rewrote it in Python. You can see it (split in smaller functions) here. Here’s an extract:
def calculate(self): self.find_days_from_equinox_to_full_moon() self.find_days_from_full_moon_to_sunday() self.find_easter_sunday()
While the program is getting much better, it still has many improvements that need to be made. But the thing is, it’s quite long. More on this next time.