Create a simple URL shortener service using Node.js and Express. The service should:
- Accept a long URL and return a shortened version
- Redirect users from the shortened URL to the original URL
- Keep track of how many times each shortened URL has been accessed
- Include basic error handling and input validation
Requirements:
- Use Express.js for the REST API
- Store URLs and their metadata in memory (no need for a database)
- Include unit tests using Jest
- Implement rate limiting for the API endpoints
- Document your API endpoints using JSDoc or similar
Bonus points:
- Add custom URL slugs
- Implement URL expiration
- Add basic authentication
Expected time: 2-3 hours
Design and implement a meeting room booking system that manages scheduling for multiple conference rooms. The system should:
- Allow users to book rooms for specific time slots
- Prevent double-booking of rooms
- Support searching for available rooms given a time slot
- Handle booking conflicts appropriately
Requirements:
- Use Java 11 or higher
- Implement proper object-oriented design
- Include unit tests using JUnit
- Handle edge cases (e.g., overlapping bookings, invalid times)
- Use appropriate data structures for efficient searching
- Include documentation for your classes and methods
Bonus points:
- Add room capacity constraints
- Implement recurring meetings
- Add booking modifications and cancellations
Expected time: 2-3 hours
Create a command-line tool that analyzes web server log files and generates useful metrics. The tool should:
- Parse log files in common formats (e.g., Apache, Nginx)
- Generate statistics about:
- Most frequent IP addresses
- Most accessed URLs
- Distribution of HTTP status codes
- Peak traffic periods
- Support filtering by date range and status code
- Output results in both console and JSON formats
Requirements:
- Use Python 3.8+
- Handle large log files efficiently
- Include proper error handling
- Write unit tests using pytest
- Support multiple log file formats
- Include type hints
- Document usage with examples
Bonus points:
- Add support for real-time log monitoring
- Implement anomaly detection
- Create visualizations using matplotlib or similar
Expected time: 2-3 hours