Skip to content

Instantly share code, notes, and snippets.

@decagondev
Created December 26, 2024 22:38
Show Gist options
  • Save decagondev/00abcab8c17d8b203aaef72a711334f5 to your computer and use it in GitHub Desktop.
Save decagondev/00abcab8c17d8b203aaef72a711334f5 to your computer and use it in GitHub Desktop.

JavaScript Take-Home Assignment

URL Shortener Service

Create a simple URL shortener service using Node.js and Express. The service should:

  1. Accept a long URL and return a shortened version
  2. Redirect users from the shortened URL to the original URL
  3. Keep track of how many times each shortened URL has been accessed
  4. 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


Java Take-Home Assignment

Event Scheduling System

Design and implement a meeting room booking system that manages scheduling for multiple conference rooms. The system should:

  1. Allow users to book rooms for specific time slots
  2. Prevent double-booking of rooms
  3. Support searching for available rooms given a time slot
  4. 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


Python Take-Home Assignment

Log Analysis Tool

Create a command-line tool that analyzes web server log files and generates useful metrics. The tool should:

  1. Parse log files in common formats (e.g., Apache, Nginx)
  2. Generate statistics about:
    • Most frequent IP addresses
    • Most accessed URLs
    • Distribution of HTTP status codes
    • Peak traffic periods
  3. Support filtering by date range and status code
  4. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment