---
title: Code Development Resources
---

:::caution[Programme Sunset]
The open Mentorship Programme has been sunset and is no longer accepting new participants. These pages remain available as reference material.

I'm now running a private, personalised professional development programme on an invite-only basis - hand-selecting a small number of participants so the shape of each journey can be built around them. There is no application process; participation is by direct invitation only.

Being active in my [Discord community](https://chat.nhcarrigan.com/) increases your chances of being invited.
:::

**CODE REVIEW CHECKLIST, SELF-REVIEW GUIDELINES, AND BEST PRACTICES**

## Code Review Checklist

See [Code Review Checklist](/mentorship/resources/code-review-checklist) for the comprehensive self-review checklist.

## Self-Review Guidelines

### Before Requesting a Review

**Self-Review Process:**
1. Review your code against the checklist
2. Run all tests and ensure they pass
3. Check for obvious bugs or issues
4. Ensure code follows style guide
5. Verify functionality works as expected
6. Check for security concerns
7. Review documentation and comments

### Self-Review Questions

**Code Quality:**
- Is my code readable and well-organised?
- Are variable and function names clear?
- Is the code properly commented?
- Does the code follow project conventions?

**Functionality:**
- Does the code work as intended?
- Are edge cases handled?
- Is error handling appropriate?
- Is input validation in place?

**Testing:**
- Are tests written and passing?
- Is test coverage adequate?
- Do tests actually test behaviour?

**Security:**
- Is sensitive data protected?
- Is input validated and sanitized?
- Are authentication/authorization checks in place?

## Development Best Practices

### Code Quality

**Readability:**
- Use clear, descriptive names
- Keep functions focused and small
- Write self-documenting code
- Add comments for complex logic

**Organisation:**
- Follow project structure conventions
- Group related code together
- Separate concerns appropriately
- Use consistent formatting

**Maintainability:**
- Write code that's easy to modify
- Avoid unnecessary complexity
- Follow DRY (Don't Repeat Yourself)
- Refactor when needed

### Git Practices

**Commit Messages:**
- Write clear, descriptive commit messages
- Use present tense ("Add feature" not "Added feature")
- Reference issue numbers when applicable
- Keep commits focused and atomic

**Branching:**
- Create branches for each feature/user story
- Use descriptive branch names
- Keep branches up to date
- Clean up merged branches

**Pull Requests:**
- Write clear PR descriptions
- Link related issues
- Keep PRs focused and reasonably sized
- Request reviews when needed

### Testing

**Test Coverage:**
- Write tests for new functionality
- Test edge cases and error scenarios
- Maintain good test coverage
- Keep tests maintainable

**Test Types:**
- **Unit Tests:** Test individual functions/methods
- **Integration Tests:** Test component interactions
- **E2E Tests:** Test user workflows (if applicable)

### Security

**Best Practices:**
- Never commit secrets or sensitive data
- Use environment variables for configuration
- Validate and sanitize all user input
- Implement proper authentication/authorization
- Keep dependencies up to date
- Follow security best practices for your stack

### Performance

**Optimisation:**
- Profile before optimising
- Optimise database queries
- Minimize API calls
- Use caching where appropriate
- Optimise assets (images, CSS, JS)

### Documentation

**Code Documentation:**
- Comment complex logic
- Document function parameters and returns
- Keep comments up to date
- Write self-documenting code when possible

**Project Documentation:**
- Keep README updated
- Document setup and installation
- Document API endpoints (if applicable)
- Document deployment process

## Common Pitfalls to Avoid

### Code Quality Issues

❌ **Overly complex code:** Keep it simple
❌ **Poor naming:** Use descriptive names
❌ **Large functions:** Break them down
❌ **Code duplication:** Refactor to DRY
❌ **Commented-out code:** Remove it

### Git Issues

❌ **Vague commit messages:** Be specific
❌ **Large commits:** Make smaller, focused commits
❌ **Mixing concerns:** One concern per commit
❌ **Forgetting to pull:** Keep branches updated

### Testing Issues

❌ **No tests:** Always write tests
❌ **Weak tests:** Test actual behaviour
❌ **Ignoring failing tests:** Fix them
❌ **Testing implementation:** Test behaviour

### Security Issues

❌ **Hardcoded secrets:** Use environment variables
❌ **No input validation:** Always validate
❌ **Outdated dependencies:** Keep updated
❌ **Ignoring security warnings:** Address them

## Development Workflow

### Daily Workflow

1. **Pull latest changes** from main branch
2. **Create feature branch** for your work
3. **Write code** following best practices
4. **Write tests** for new functionality
5. **Run tests** and ensure they pass
6. **Self-review** your code
7. **Commit changes** with clear messages
8. **Push to remote** regularly
9. **Create PR** when feature is complete
10. **Request review** if desired (optional)

### Feature Development

1. **Understand requirements** from user story
2. **Review technical breakdown** if available
3. **Plan implementation** approach
4. **Set up** necessary components/modules
5. **Implement** feature incrementally
6. **Test** as you go
7. **Refactor** when needed
8. **Document** as appropriate
9. **Review** before submitting

---

*Following best practices helps you write better code, work more efficiently, and maintain high quality standards.*

