w3resource

Daily Coding Challenges & Projects


Tuesday


Frontend Mini Project Challenge

CSS Animation Effects

    Challenge:

    Create a glowing border animation effect around a button using only CSS keyframes.

  • Add smooth infinite glowing animation.
  • Try different colors!

Playground Suggestion: CodePen, JSFiddle, or your site’s built-in playground.

Backend Challenge

Daily Language Focus: Java / Kotlin

Challenge Java/Kotlin:

Problem:

    Create a simple REST API endpoint that returns a hardcoded JSON object like:

    Code:

    
    {
      "message": "Welcome to the API!"
    }
    
    
  • In Java: Use Spring Boot.
  • In Kotlin: Use Ktor or Spring Boot Kotlin DSL.

Database Query Challenge

Problems on SQL - HR Database :

  1. Write a SQL query to list all employees who joined in the last 90 days.
  2. Write a SQL query to find departments with more than 10 employees.
Structure of HR database :

HR database



Data Structures & Algorithms Challenge

  • Easy:
    • Problem: Given a sorted array, remove duplicates in-place so that each element appears only once.
    • Hint: Use two pointers approach: slow and fast.
  • Medium:
    • Problem: Implement a function to perform binary search on a sorted array.
    • Hint: Think of low, mid, and high pointers and adjust search space based on comparison.
  • Hard:
    • Problem: Given an array, find the maximum subarray sum using Kadane’s Algorithm.
    • Hint: Track local_max and global_max at each step.

Bug of the Day

Java / Kotlin

Bug ( Java ) :

    Code:

    
    public class Main {
        public static void main(String[] args) {
            int arr[] = {1,2,3,4,5};
            for(int i=0; i<=arr.length; i++) {
                System.out.println(arr[i]);
            }
        }
    }
    

    Challenge: Find and fix the bug(s) in this code!

📋 Daily Micro-Project

Focus: Backend

Challenge :

Create a login validation API (mock) that:

    Backend Micro-Project:

  • Accepts username and password (POST).
  • Returns success if credentials are admin/admin123, otherwise failure.

Suggested stack:

  • Java + Spring Boot or Kotlin + Ktor.
  • Trivia: 5 Fun Facts

    1. Kotlin was developed by JetBrains, the creators of IntelliJ IDEA.
    2. The first-ever website is still online (info.cern.ch).
    3. The term "bug" in programming was popularized after an actual moth was found in a computer.
    4. SQL was initially called SEQUEL (Structured English Query Language).
    5. Java was originally called Oak after an oak tree outside James Gosling’s window.

    Tool of the Day

    Tool : Postman

      Why?

    • Postman simplifies API development and testing with easy UI-driven requests, environment variables, and automated testing support!
      • Resource Roundup:

        • Postman Learning Center
        • Free Postman API 101 Course

    Interview Question of the Day

    Daily Interview Questions

      Frontend :
      1. What is specificity in CSS and how is it calculated?
      2. How do media queries work in responsive design?
      3. What are pseudo-elements in CSS? Give examples.
      4. What’s the difference between relative, absolute, and fixed positioning in CSS?
      Backend :
      1. What is a servlet in Java?
      2. Explain checked vs unchecked exceptions in Java.
      3. What is the role of JVM in Java application execution?
      4. How does garbage collection work in Java?
      Database :
      1. What is a primary key vs foreign key in SQL?
      2. What is normalization? Explain its different forms.
      3. How does a clustered index differ from a non-clustered index?
      Others :
      1. What is virtualization in cloud computing?
      2. How does Git branching work and why is it useful?

    Daily Quiz Challenge

      Frontend ( CSS Focus ) :

      1. Which property is used to make an element move from one point to another?
        • animation
        • transition
        • transform
        • keyframes
      2. What unit is relative to the viewport height?
        • em
        • vh
        • rem
        • px
      3. Which pseudo-class selects an element when a user mouses over it?
        • :active
        • :hover
        • :focus
        • :visited

      Backend ( Java/Kotlin Focus ) :

      1. Which keyword is used to inherit a class in Java?
        • inherits
        • extends
        • implements
        • imports
      2. What is the default value of a boolean variable in Java?
        • true
        • false
        • null
        • undefined
      3. Which Kotlin keyword is used to define an immutable variable?
        • val
        • var
        • let
        • const

      Database :

      1. Which SQL clause is used to combine rows from two or more tables?
        • WHERE
        • JOIN
        • GROUP BY
        • ORDER BY

      Others :

      1. In Git, which command is used to upload local repository content to a remote repository?
        • git pull
        • git push
        • git commit
        • git init

      Mixed Quiz :

      • What is the use of the z-index in CSS?
      • What is method overloading in Java?
      • How does a LEFT JOIN work in SQL?
      • What is the purpose of Docker Compose?

    Weekly Cross-Domain Activities ( April 25 to May 01, 2025 )

    API of the Day:

    Challenge:

    Use the Bored API to create a simple app that suggests fun activities when you're bored.


    Linux/DevOps Tip:

    Useful Commands for File & Directory Management and Troubleshooting

      Here are 10 powerful and often underused commands for managing files and debugging issues in Linux systems:

      1. stat filename – View detailed metadata about a file (last access, inode, etc.)
      2. ls -lhS – List files by size in human-readable format
      3. tree -L 2 – Display a directory structure up to 2 levels deep
      4. find /path -type f -size +100M – Find files larger than 100MB
      5. ncdu – A disk usage analyzer with a simple interactive UI (install required)
      6. lsof +D /path/to/dir – List open files in a directory
      7. inotifywait -m /some/dir – Watch for real-time file changes in a directory (from inotify-tools)
      8. file filename – Determine file type and encoding
      9. tail -F /var/log/syslog – Live-follow system logs with file rotation support
      10. watch -n 1 'df -h / && free -h' – Watch disk and memory stats refresh every second

    Real-World Project of the Week ( April 25 to May 01, 2025 )

    Project of the Week:

      Build a Personal Expense Tracker App

    • Tech Stack Options:
      • TypeScript + Express + PostgreSQL + React

    Collaborative Project:

    Case Study:

      How is Notion Built?

    • Uses React + TypeScript frontend
    • Backend with C++/Rust hybrid for performance
    • Offline-first architecture

    Challenge: Try replicating a basic note-taking component!


    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

    

    Follow us on Facebook and Twitter for latest update.