w3resource

Daily Coding Challenges & Projects


Thursday


Frontend Mini Project Challenge

React Hooks & State Management

Challenge :

Build a Counter Component using React with the following features:

  • Increment and decrement buttons
  • A reset button
  • The counter value should persist in localStorage using the useEffect hook.

Try Online : CodeSandbox or StackBlitz!

Backend Challenge

Node.js & Go

Node.js Problem :

    Create a REST API endpoint using Express.js to return a filtered list of employees with salaries greater than a specific amount.

    // Route: GET /employees?minSalary=5000

Go Task :

    Write a program in Go that reads a CSV file of employee records and prints only those with "Manager" in the job title.

Database Query Challenge

Problems on SQL - HR Database :

  1. Write a SQL query to list departments where the average salary is less than 5000.
  2. Write a SQL query to find the names of employees earning the highest salary in each department.
Structure of HR database :

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem: Write a function to check if a string is a palindrome.
    • Hint: Use two pointers.
  • Medium:
    • Problem: Given a binary tree, return its inorder traversal.
    • Hint: Use recursion or a stack.
  • Hard:
    • Problem: Implement an LRU (Least Recently Used) Cache.
    • Hint: Use a combination of a HashMap and a Doubly Linked List.

Bug of the Day

Node.js / Go

Node.js Bug:

    Buggy Code:

    
    app.get('/user/:id', (req, res) => {
      const userId = req.params.id;
      const user = users.find(u => u.id === req.param.id);
      res.send(user);
    });
    

Challenge :

Fix the bug related to incorrect property access and ensure proper error handling.

📋 Daily Micro-Project

Frontend

Challenge :

Build a React Toast Notification component that:

  • Appears for 3 seconds and disappears
  • Can display different types: success, error, warning

Trivia: 5 Fun Facts

  1. The first web browser was called WorldWideWeb (later renamed Nexus).
  2. Go (Golang) was created at Google by Robert Griesemer, Rob Pike, and Ken Thompson.
  3. The concept of closures in JavaScript comes from Scheme, a dialect of Lisp.
  4. The Node.js runtime was built on Chrome’s V8 JavaScript engine.
  5. React was originally developed by Jordan Walke, a software engineer at Facebook.

Tool of the Day (Updated)

Tool : React DevTools Extension

    Inspect the component tree, hook state, and props of React apps.

Resource Roundup:

    Top Vue.js Learning Resources

    • useHooks.dev — A collection of reusable React hooks
    • Overreacted by Dan Abramov — Deep dives into React concepts
    • Free eBook: Fullstack Open (fullstackopen.com)

Interview Question of the Day

Daily Interview Questions

    Frontend ( React Focused ) :
    1. What is the purpose of the useEffect hook in React?
    2. How does React's useState differ from this.state in class components?
    3. What are controlled vs uncontrolled components in React?
    4. Why are keys important in React lists?
    Backend ( Node.js & Go ) :
    1. What is middleware in Express.js?
    2. Explain event-driven architecture in Node.js.
    3. How does Go handle concurrency?
    4. Compare Node.js non-blocking I/O with traditional synchronous models.
    Database :
    1. What is a correlated subquery?
    2. Explain the purpose of foreign keys in relational databases.
    3. What is normalization and why is it important?
    Others :
    1. What is a load balancer and how does it work?
    2. What are WebSockets and how are they different from HTTP?

Daily Quiz Challenge

    Frontend ( React ) :

    1. What does useEffect(() => {}, []) mean in React?
    2. Which lifecycle method does useEffect replace?
    3. How can you lift state up in React?

    Backend ( Node.js & Go ) :

    1. What does req.params contain in Express.js?
    2. What is the purpose of the context package in Go?
    3. How do you handle errors in Go idiomatically?

    Database :

    1. What is the difference between HAVING and WHERE?

    Others :

    1. What’s the difference between npm and npx?

    Mixed Quiz :

      • JavaScript: What is the output of console.log([] + []);?
      • SQL: Which clause groups rows sharing a property?
      • Go: What is the zero value of a string?

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  05-05-2025  06-05-2025  07-05-2025



Follow us on Facebook and Twitter for latest update.