Skip to content

Commit

Permalink
Add quiz back
Browse files Browse the repository at this point in the history
  • Loading branch information
heratyian committed May 17, 2024
1 parent a0fd8ac commit bb2c01a
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions content.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,47 @@ end

<!-- TODO: add config steps? -->

## Quiz
- Why are style guides important in software development?
- They make the code more colorful.
- Not correct. Style guides focus on formatting and best practices.
- They ensure code is consistent and easy to understand.
- Correct! Style guides provide a set of rules for code formatting and best practices.
- They speed up the execution of code.
- Not correct. Style guides do not affect code execution speed.
{: .choose_best #importance_of_style_guides title="Importance of Style Guides" points="1" answer="2"}

- What is the primary function of a linter?
- To execute the code.
- Not correct. Linters do not execute code.
- To identify and fix syntax and stylistic errors.
- Correct! Linters help maintain code quality by identifying issues.
- To compile the code.
- Not correct. Linters do not compile code.
{: .choose_best #function_of_linter title="Function of a Linter" points="1" answer="2"}

- Which gem can be used to enforce Ruby style guidelines in a Rails project?
- `faker`
- Not correct. Faker is used to generate fake data.
- `devise`
- Not correct. Devise is used for authentication.
- `rubocop`
- Correct! RuboCop is used for enforcing Ruby style guidelines.
{: .choose_best #ruby_style_gem title="Gem for Ruby Style Guidelines" points="1" answer="3"}

- ESLint can automatically fix many of the issues it detects in JavaScript files.
- True
- Correct! ESLint has an option to automatically fix issues.
- False
- Not correct. ESLint can indeed fix many issues automatically.
{: .choose_best #eslint_fix title="ESLint Automatic Fix" points="1" answer="1"}

- Using a linter ensures that your code has no runtime errors.
- True
- Not correct. Linters identify syntax and stylistic errors, but not runtime errors.
- False
- Correct! Linters do not guarantee the absence of runtime errors.
{: .choose_best #linter_runtime_errors title="Linter and Runtime Errors" points="1" answer="2"}

## Conclusion
Adhering to style guides and utilizing linters are practices that significantly enhance the quality of your code. They ensure your code remains clean, consistent, readable and maintainable, facilitating better collaboration and fewer bugs. By incorporating these tools into your development workflow, you promote a higher standard of coding practices across your team.
Expand Down

0 comments on commit bb2c01a

Please sign in to comment.