w3resource

Daily Coding Challenges & Projects


Weekend


Frontend Mini Project Challenge

Build a Mini Frontend Project

Challenge:

Create a Dark Mode Toggle using HTML, CSS, and JavaScript.

    Requirements :

  • Implement a toggle switch to switch between light and dark themes.
  • Use CSS variables for theme colors.
  • Persist the user's theme preference using localStorage.

Bonus :Add smooth transition effects between themes.

Backend Challenge

Languages Focus : Scala, R, Swift (server-side with Vapor), TypeScript (Node.js with TS)

Problem:

Develop a RESTful API endpoint that returns user profile data.

    Requirements :

  • Use one of the weekend focus languages.
  • Create an endpoint /api/users/{id} that returns user data in JSON format.
  • Implement error handling for cases where the user is not found.arXiv

Bonus : Integrate with a database to fetch real user data.

Database Query Challenge

Problems on SQL - HR Database :

  1. Write a SQL query to find employees who joined in the last 3 months.
  2. Write a SQL query to find employees who have not received a salary increase in the last 2 years.
Structure of HR database :

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem: Implement a function to check if a string is a palindrome.
    • Hint: Compare the string to its reverse.
  • Medium:
    • Problem: Find the first non-repeating character in a string.
    • Hint: Use a hash map to count character occurrences.
  • Hard:
    • Problem: Implement a LRU (Least Recently Used) Cache.
    • Hint: Combine a hash map with a doubly linked list for efficient operations.

Bug of the Day

Language Focus :

TypeScript (Node.js with TS)

    Code:

    
    function greet(name: string): string {
      return "Hello, " + name.toUppercase();
    }
    

    Challenge : Identify and fix the error in the above code.

📋 Daily Micro-Project

Weekend Focus : BackendWIRED

Challenge :

Create a simple CRUD API for managing tasks.

    Requirements:

  • Implement endpoints to create, read, update, and delete tasks.
  • Use an in-memory data store or a simple database.
  • Ensure proper error handling and input validation.

Trivia: 5 Fun Facts

  1. Who created Linux? Linus Torvalds.
  2. What does "SQL" stand for? Structured Query Language.
  3. Which programming language is known for its snake logo? Python.
  4. What year was JavaScript created?
  5. What does "HTML" stand for? HyperText Markup Language.arXiv

Tool of the Day (Updated)

Tool : Insomnia

    Insomnia is a powerful open-source API client designed for debugging REST, GraphQL, and gRPC requests. It's lightweight and great for collaboration.

      Resource Roundup:

Interview Question of the Day

Daily Interview Questions

    Frontend : :
    1. What is the difference between null and undefined in JavaScript?
    2. Explain how the event delegation pattern works in JavaScript.
    3. How does the Virtual DOM work in React, and why is it useful?
    4. What are the key differences between Vue.js computed properties and watchers?
    Backend :
    1. Explain the difference between synchronous and asynchronous programming in Node.js.
    2. What is the difference between a thread and a process?
    3. How does memory management work in Python?
    4. Explain how a RESTful API differs from GraphQL.
    Database :
    1. What is the difference between INNER JOIN and LEFT JOIN in SQL?
    2. How does indexing improve query performance in databases?
    3. What is the difference between NoSQL and SQL databases?
    Others :
    1. What are system calls in an operating system? Provide an example.
    2. What is containerization, and how does Docker help in deployment?

Daily Quiz Challenge

    Frontend :

    1. What is the output of typeof null in JavaScript?
      • "null"
      • "object"
      • "undefined"
      • "number"
    2. Which CSS property is used to change the text color of an element?
      • font-color
      • text-color
      • color
      • text-style
    3. In React, what hook is used to manage state in a functional component?
      • useEffect
      • useState
      • useContext
      • useReducer

    Backend :

    1. Which HTTP method is idempotent?
      • POST
      • GET
      • PATCH
      • DELETE
    2. In Node.js, which module is used to create a server?
      • http
      • fs
      • url
      • net
    3. What does ACID stand for in databases?
      • Atomicity, Consistency, Isolation, Durability
      • Accuracy, Consistency, Isolation, Durability
      • Atomicity, Concurrency, Integrity, Durability
      • Availability, Consistency, Isolation, Durability

    Mixed Quiz :

    1. Which SQL clause is used to filter grouped rows?
      • WHERE
      • HAVING
      • GROUP BY
      • ORDER BY
    2. Identify the correct syntax for a Python lambda function that adds two numbers.
      • lambda x, y: x + y
      • def lambda(x, y): return x + y
      • lambda x y: return x + y
      • function(x, y) => x + y

Weekly Cross-Domain Activities ( Updated ) ( May 02 to May 08, 2025 )

API of the Day:

Challenge : Cat Facts API

Build a fun web app that displays random cat facts. Add a "New Fact" button to fetch and display a new fact with each click.

API: https://catfact.ninja/fact

Linux/DevOps Tip:

Automate Backups with cron

    Use crontab -e to schedule a daily backup of a directory:

    0 2 * * * tar -czf /backup/$(date +\%F).tar.gz /your/data/folder
    

    This runs at 2:00 AM daily and compresses your target folder into a date-stamped .tar.gz archive.

Real-World Project of the Week ( Updated ) ( May 02 to May 08, 2025 )

Project of the Week:

    Build a Markdown Blog Engine using Node.js + Express or Flask.

    • Users should be able to create blog posts using Markdown files. Convert them to HTML for rendering.

Collaborative Project:

    Contribute to Public APIs GitHub repo — help by submitting useful APIs or improving documentation for developers worldwide.

Case Study:

    Study "Trello" clone functionality

    Focus on drag-and-drop lists, card management, and task labels using React + Redux or Vue + Pinia.


Previous Daily Coding Challenges & Projects : 04-04-2025   07-04-2025  08-04-2025  09-04-2025  10-04-2025  11-04-2025  14-04-2025  15-04-2025  16-04-2025  17-04-2025  18-04-2025  21-04-2025  22-04-2025  23-04-2025  24-04-2025  25-04-2025  28-04-2025  29-04-2025  30-04-2025  01-05-2025  02-05-2025



Follow us on Facebook and Twitter for latest update.