Skip to content

Conversation

shu1513
Copy link
Contributor

@shu1513 shu1513 commented Dec 5, 2024

Using object instead of an array, this way you won't need any of the helper functions or any of the adjustments in other files. Furthermore, you avoid digging yourself into a hole(a possible future mistake) when you use object keys instead of array indexing. I hope you can see what I am trying to do here. I was indeed surprised when I saw when you used an array. Also, the helper functions, even though I know what they do, in the future when someone else try to understand this code, it would require whomever reads this code to go around an additional circle to understand the code, instead of the directness of not using helper functions. So maybe helper functions are not always as helpful, sometimes they can be counter-helpful and make the code more confusing harder to understand.

Using object instead of an array, you won't need any of the helper functions or any of the adjustments in other files. Furthermore, you avoid digging yourself into a hole(as in a possible future mistake) when you use object keys instead of array indexing. I hope you can see what I am trying to do here. I was indeed surprised when I saw you used array. In addition, the helper functions, even though I know what they do, in the future when someone else try to understand this code, it would require whomever read this code to go around an additional circle to understand the code, instead of the directness of not using helper functions. So maybe helper functions are not always as helpful, sometimes they can be counter-helpful and make the code more confusing for when another person reads them.
@vejol vejol added the part 6 label Jan 3, 2025
@vejol vejol added this to the Part 6 - yearly check 2025 milestone Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants