GSoC Journey: Week 07 of Coding Period

Senthilathiban
3 min readJul 13, 2024

--

Hello folks,

Myself Senthil Athiban, a final year undergraduate student at Madras Institute of Technology. This blog represents a continuous series documenting my journey through GSoC. If you haven’t already read my previous blogs, I encourage you to check out my previous blogs here. I have been selected as a GSoC student at OpenMRS for the Validation Rule Builder for the Form Builder project. My primary mentor is Dennis Kigen, and my backup mentor is Hadijah Kyampeire.

📅 Week 7: July 08 — July 13

Tasks to be completed this week:

📄 Add Date Validation: Integrate a date validation feature to check if the date is in the past or future by comparing it with a base date.

🛠️ Refactor Unit Test Coverage: Ensure that unit test cases follow good practices.

GSoC Midterm Evaluation

As the Google Summer of Code Evaluation was scheduled from July 07 to July 12, 2024, I submitted the evaluation, presented my GSoC work presentation, with a live demo. Do check it out here.

Tasks Completed

Developing a validation rule: Added a new validation rule for date fields to check if the selected date is either in the past or future by comparing it with a base date.

🧪 Testing: Refactored my previously written unit test cases, made corrections to follow good practices such as using regex instead of hardcoded values for assertions. Added new unit tests for date validation.

📚 Documentation: Created new examples and tutorial guides to help users understand the functionality of the newly added validation rules.

Challenges Faced

🔍 Querying in Test Cases: As I mentioned in my previous blog, writing poor test cases and not adhering to best practices is preferable to having none at all. I encountered such a scenario when I opened my VS Code on July 10, 2024. After installing the ESLint plugin for test files, I encountered errors, such as avoiding direct access to DOM elements. Initially confused by these errors, I referred to the official documentation, which prioritizes querying a DOM element instead of accessing it directly — a good practice for beginners starting with testing.

Lessons Learned

Avoiding Common Mistakes: During the early stages of development, seeking mentorship before diving into coding is advisable. While common mistakes aren’t severe, they can impact code quality and potentially lead to errors in the future. Gain insights by reading documentation, blogs, and collaborating with fellow developers.

Plans for Next Week

  • Engaging with Form Users: Ensuring that the implemented validations are beneficial for users of the form, and discussing further improvements by adding miscellaneous helper functions.

About Me

I’m Senthil Athiban, a final-year undergrad from India. My days are for VS Code, and my nights are for GitHub — a constant journey of coding and exploration, fueled by passion and curiosity.

🔗 Connect with Me

--

--