w3resource

Daily Coding Challenges & Projects


Weekend


Frontend Mini Project Challenge

Bring together JS, CSS, React or Vue

Project :

Dark Mode Toggle / Theme Changer

  • Build a toggle to switch between light & dark themes.
  • Persist the user’s preference using localStorage.
  • Use CSS variables (--bg, --text) to define themes.
  • Enhance with a smooth transition for theme switch (e.g., .5s fade).

Try it on : CodeSandbox or StackBlitz

Backend Challenge

Scala, Swift (Vapor), TypeScript (Node.js), R

Scala Task :

Write a small CLI tool to parse a CSV of sales data and compute total sales per category using functional style (e.g., map, groupBy).


Swift (Vapor) Task :

Create a Vapor server with a GET endpoint /status returning JSON { status: "OK", timestamp: ... }.


TypeScript (Node.js) :

Build a small Express API with TypeScript to manage tasks: GET /tasks, POST /tasks, data stored in-memory.


R Task (data-focused) :

Load a dataset in R, calculate the mean and median of a numeric column, and plot a histogram.

Database Query Challenge

Problems on SQL - HR Database :

  1. Find departments with more than 10 employees.
  2. Identify employees with no projects assigned (in a join table employee_projects).

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem :Reverse the kth node from the end in a linked list.
    • Hint :Use a single pass or sort and return index 1.
  • Medium:
    • Problem : Implement a min-queue using two stacks that supports enqueue, dequeue, and retrieving min in O(1).
  • Hard:
    • Problem :Solve "Longest Palindromic Substring" — dynamic programming or center expansion.

Bug of the Day

Language : Python / PHP

Python Bug

    Buggy Code:

    
    def add_items(lst=[]):
        lst.append(1)
        return lst
    print(add_items())  # called twice
    
    

Issue : Why does list grow between calls? Fix it.


PHP Bug

    Buggy Code:

    
    function half($x) {
      return $x / 2;
    }
    echo half("abc");
    

Issue : PHP warns or returns unexpected — add type validation.

📋 Daily Micro-Project

Budget Tracker :

Task :

  • Build a simple budget tracker UI in React or Vue.
  • Users can add expense/income items.
  • List items with category, amount.
  • Show total balance and total expenses.

Trivia: 5 Fun Facts

  1. Scala was launched in 2004 by Martin Odersky.
  2. Vapor is a server-side Swift framework introduced in 2016.
  3. R originated in the 1990s by Ross Ihaka and Robert Gentleman.
  4. TypeScript was created by Microsoft and released in 2012.
  5. Functional programming is a key paradigm in both Scala and R.

Tool & Resource of the Day

Tool : Postman

Great for testing APIs and automating requests.

Resource Roundup :

  • Vapor Docs (Swift backend)
  • Scala by Example
  • R for Data Science (ebook)

Interview Question of the Day

Daily Interview Questions

    Frontend ( General ) :
    1. How do you manage themes in React or Vue?
    2. Explain localStorage and its persistence scope.
    Backend ( Scala / Swift / TypeScript ) :
    1. What is Akka in Scala and why use it?
    2. Explain the Swift Vapor request pipeline.
    3. What are benefits of TypeScript over plain JavaScript?
    Database :
    1. What is the difference between HAVING and WHERE?
    2. When do you use a LEFT JOIN vs INNER JOIN?
    Others :
    1. Define “functional programming.”
    2. What are “goroutines” equivalent in other languages?

Daily Quiz Challenge

    Frontend :

    1. Write CSS variables to define dark/light theme toggles.
    2. How do you store theme preference in browser memory?
    3. Which React hook is best for persisting side-effects?

    Backend :

    1. How do you parse JSON in Vapor?
    2. What is TypeScript’s interface, and how’s it different from type?

    Database :

    • Query that counts projects per department.

    Mixed Quiz :

    1. Drive code differences between let/var/const in JS.
    2. PL/SQL – when do you use GROUP BY?
    3. Functional languages – what's an immutable data structure?

Weekly Cross-Domain Activities ( July 18 to July 24, 2025 )

API of the Day:

JokeAPI : Build a random joke app with categories and flags (NSFW filter).

Linux/DevOps Tip :

Use htop, iotop, and iftop to monitor CPU, disk, and network usage on Linux servers.

Real-World Project of the Week ( July 18 to July 24, 2025 )

Project of the Week:

Build a Task Manager App

  • Use React + Express + MongoDB
  • Support CRUD: Tasks with due dates, priority, and status
  • Implement filters (Today, Completed, Priority)

Collaborative Project:

Start a GitHub repo for this task manager and invite others to contribute (issues, PRs, README).

Case Study:

Analyze the GitHub UI/UX — Can you recreate the repository page using frontend tools?


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  08-05-2025  09-05-2025  12-05-2025  13-05-2025  14-05-2025  15-05-2025  16-05-2025  19-05-2025  20-05-2025  21-05-2025  22-05-2025  23-05-2025  26-05-2025  27-05-2025  29-05-2025  30-05-2025  02-06-2025  03-06-2025  04-06-2025  05-06-2025  06-06-2025  09-06-2025  10-06-2025  11-06-2025  12-06-2025  13-06-2025  16-06-2025  17-06-2025  18-06-2025  19-06-2025  20-06-2025  23-06-2025  24-06-2025  25-06-2025  26-06-2025  27-06-2025  30-06-2025  01-07-2025  02-07-2025  03-07-2025  04-07-2025  07-07-2025  08-07-2025  09-07-2025  10-07-2025  11-07-2025  14-07-2025  15-07-2025  16-07-2025  17-07-2025



Follow us on Facebook and Twitter for latest update.