Skip to content
Olibyte Blog
HomeGitHubStack OverflowLinkedIn

Using the STAR format for your next Behavioural Interview Part 1

interview, star, recruitment, software engineering, javascript, canvas, Jenkins, Jest, selenium, bugfix, test driven development6 min read

The STAR response is a structured and effective method for answering behavioral interview questions. It stands for Situation, Task, Action, Result. Using this format allows you to provide a concise and structured account of your past experiences, showcasing your communication skills (usually the point of the behavioural interview) and how you go about solving problems.
Try building your response around a "war story" - a specific example where you ended up being the hero. The keywords act as "sign-posts" so you and your interviewer don't get lost in the story.
Don't be shy - take credit for your achievement. However, never speak negatively of a colleague when explicating a problem that you happened to solve - it's a red-flag you could be a bad culture fit.

Interviewer: What kind of approach do you take to solving problems?

I pride myself on taking a systematic and collaborative approach to solving problems. For example...

Situation:

I found myself in a situation where many instructors enrolled in our Learning Management System (Canvas) were contacting our unit reporting that after submissions had been received for an assignment, the submission type couldn't be updated. Users could select different options for the submission type, but these changes weren't retained when the page was saved. This issue was causing frustration and workflow disruptions for our users, particularly instructors who needed to update the rules and requirements of their course assignments.

Task:

My task was to develop a fix using JavaScript to allow the updating of submission types in an assignment even after submissions had been received. The objective was to ensure that users could select and retain different submission types as needed, providing a seamless user experience.

Action:

Investigation
My first action involved thoroughly investigating the codebase related to assignment submissions and submission types within Canvas LMS. This involved understanding the existing code and identifying the specific code paths responsible for handling submission type updates.
Code Analysis
After pinpointing the relevant code sections, I examined how submission type changes were being processed and stored in the system. I identified that the code lacked proper handling for updating submission types post-submission.
Code Refactoring
To address the issue, I initiated a code refactoring process. I modified the code responsible for submission type updates to include logic that allowed changes to be saved and retained, even after submissions had been received.
User Interface Enhancements
The fix required adjustments to the user interface as well. I made the necessary changes to the assignment editing interface to ensure that users could select, update, and save different submission types with ease.
Unit Testing
To validate the correctness of the code changes, I created comprehensive unit tests using Jest. These tests covered various scenarios and edge cases to confirm that the refactored assignment type logic produced accurate results.
End-to-End Testing
I also integrated end-to-end tests using Selenium WebDriver to simulate real user interactions with the Canvas LMS. These tests aimed to verify that the bug was fully resolved and didn't introduce any new issues in the user interface.

Result:

As a result my team lead was thrilled and highlighted the new benefits of this fix:

  • Submission Type Updates
    Users could now update submission types for assignments even after submissions had been received. This provided flexibility and met user expectations, as they could adapt to changing requirements or situations.
  • Enhanced User Experience
    The fix resulted in an improved user experience within the LMS. Users no longer encountered frustration when trying to modify submission types, contributing to higher user satisfaction.
  • Code Quality
    The code refactoring and enhancements improved the maintainability and quality of the LMS codebase. It also adhered to best practices, making it easier for future development and updates.
  • Testing & Quality Assurance
    Extensive testing, including unit testing and end-to-end testing, was conducted to ensure that the fix didn't introduce regressions or new issues. This thorough testing process helped guarantee the stability of the Canvas LMS. The unit tests and end-to-end tests I developed ensured that the bug fix was thoroughly validated. We also implemented continuous integration in our Jenkins pipeline to automatically run these tests with every code change, further safeguarding against future regressions.
  • Documentation
    I documented the bug fix thoroughly, outlining the changes made to the codebase and the steps for testing the updated functionality. This documentation served as a valuable resource for the development team and for knowledge sharing within the organization.
    In summary, the bug fix successfully addressed a critical issue in Canvas LMS, allowing users to update submission types for assignments after submissions had been received. This demonstrated the effectiveness of systematic troubleshooting, code analysis, and code refactoring to enhance the functionality and user experience of the platform.

When shouldn't I use the STAR method?

You can't STAR every question, though sign-posting is still extremely important. For example, your interviewer may want to know more about the Action you took.

Follow-up question: Can you tell us more about the logic you implemented when refactoring the code?

Sure!
Identification of Submission Type State
First, I modified the code to identify the current submission type for the assignment. This information was crucial for determining whether changes were allowed and for comparing the selected submission type with the current one.
User Interaction Handling
When a user attempted to update the submission type for an assignment, I introduced logic to capture their selection and intentions.
If the assignment had no submissions, the logic allowed the user to update the submission type directly without any restrictions. This was because there were no existing submissions to consider.
If there were submissions for the assignment, the logic prompted the user with a confirmation dialog. This dialog informed the user that changing the submission type might impact existing submissions and asked for confirmation to proceed.
Handling of Existing Submissions
If the user confirmed the submission type change, the logic proceeded to update the assignment's submission type.
For assignments with existing submissions, the logic also included a data migration process. It converted the existing submissions to match the newly selected submission type, ensuring data integrity and consistency.
Validation and Error Handling
Robust validation checks were implemented to prevent unauthorized changes or invalid submissions. This included checks to ensure that the user had the necessary permissions to make submission type changes.
If any errors or inconsistencies were encountered during the process, error messages were displayed to the user, guiding them on how to address the issue.
User Feedback
Upon successful submission type updates, the logic provided immediate feedback to the user, confirming that the change had been applied. This feedback reassured users that their requested changes had been successfully processed.
Logging and Auditing
Comprehensive logging and auditing mechanisms were integrated into the code to track submission type changes. This allowed administrators and support teams to monitor and review assignment history.
Code Documentation
Throughout the refactoring process, I documented the code changes extensively. This documentation included inline comments explaining the purpose of the code, the logic used, and the rationale behind specific decisions. Additionally, I updated external documentation to reflect the new functionality.
Summary
The logic implemented during the code refactoring ensured that submission type changes were handled securely and transparently, even for assignments with existing submissions. It considered user permissions, data migration, error handling, and user feedback to create a seamless and reliable user experience within Canvas LMS. This approach not only resolved the bug but also improved the overall functionality and maintainability of the system.

Share this post!

Thanks for reading! Don't forget to smash that share button and subscribe.

© 2024 by Olibyte Blog. All rights reserved.