Daily Coding Challenges & Projects
Thursday
Frontend Mini Project Challenge
React - Hooks & State Management
Challenge :
Build a Step Counter App using React Hooks (useState).
Your app should include:
- Input to set the step value (e.g., +2, -3).
- Buttons: Add Step, Subtract Step, and Reset.
- Display of the current count.
- Disable "Subtract Step" if the count would go below 0.
Try it Here: [CodeSandbox Starter]
Backend Challenge
Node.js & Go
Node.js Task :
Task : Build a RESTful API using Express that returns a list of products in JSON format.
Requirements :
- GET /products – returns an array of objects with id, name, and price.
- Use Express.js with no database (mock data only).
Go Task :
Task : Write a Go program that sets up a simple HTTP server and responds with “Hello, Go backend!” on /hello.
Database Query Challenge
Problems on SQL - HR Database :
- Find all employees who have not changed departments in the last 2 years.
- Find departments that have more than 5 employees currently assigned.
Data Structures & Algorithms Challenge
- Easy:
- Problem : Check if a string is a pangram (contains all 26 letters of the alphabet).
- Hint : Use a Set to track unique characters.
- Medium:
- Problem : Rotate a 2D matrix (NxN) 90 degrees clockwise in-place.
- Hint : Transpose + reverse rows.
- Hard:
- Problem : Design a Least Recently Used (LRU) Cache using a HashMap and Doubly Linked List.
- Hint : HashMap for O(1) access, DLL for order tracking.
Bug of the Day
Node.js & Go
Node.js Bug :
Buggy Code:
const nums = [1, 2, 3];
const result = nums.forEach(num => {
return num * 2;
});
console.log(result); // What's wrong?
Fix : Fix the bug and make sure it returns the correct transformed array.
Go Bug :
Buggy Code:
package main
import "fmt"
func main() {
var x int
if x = 5 {
fmt.Println("x is", x)
}
}
Challenge : Identify and fix the syntax error.
📋 Daily Micro-Project
Frontend :
Challenge :
Create a custom toggle switch using HTML, CSS, and React.
- Toggle between “ON” and “OFF” states.
- Use useState to manage state.
- Style it to look like a sliding switch.
Trivia: 5 Fun Facts
- JavaScript was originally developed in 10 days by Brendan Eich in 1995.
- The first computer bug was an actual moth trapped in a relay.
- The name “Python” was inspired by Monty Python’s Flying Circus, not the snake.
- Go (Golang) was created at Google in 2009 by Robert Griesemer, Rob Pike, and Ken Thompson.
- Git was created by Linus Torvalds, the creator of Linux, in 2005.
Tool & Resource of the Day
Tool : React Developer Tools
Use this Chrome/Firefox extension to inspect React component hierarchies in the browser Developer Tools.
Resource Roundup ( React State Management ) :
Interview Question of the Day
Daily Interview Questions
- What is the difference between props and state in React?
- How does useEffect differ from componentDidMount?
- What is closure in JavaScript and where is it useful?
- What is the purpose of the key prop in React lists?
- How does Node.js handle asynchronous code with its event loop?
- What is middleware in Express.js?
- What are goroutines in Go?
- Explain the difference between concurrency and parallelism.
- What is a foreign key and why is it important?
- How does a GROUP BY clause work?
- What is a subquery, and where is it used?
- What is the difference between process and thread?
- What is CI/CD and how is it implemented?
Daily Quiz Challenge
- What does useState return?
- A variable only
- A setter function only
- A state variable and a setter function
- What’s the output of this JS snippet?
- 6
- '123'
- '33'
- Which method is used to stop event bubbling in JS?
- event.stopPropagation()
- event.preventDefault()
- event.stopBubble()
Frontend ( React & JS ) :
console.log(1 + '2' + 3);
- In Node.js, fs.readFile() is:
- Blocking
- Non-blocking
- Which HTTP method is idempotent?
- POST
- GET
- PUT
- In Go, what keyword starts a goroutine?
- run
- go
Backend ( Node.js & Go ) :
- Which clause filters groups in SQL?
- WHERE
- HAVING
Database ( SQL ) :
- Which React hook allows side-effects?
- useState
- useEffect
- What does SQL JOIN do?
- What's the default port for HTTP?
- 8080
- 443
- 80
Mixed Quiz :
Weekly Cross-Domain Activities (Updated) ( May 16 to May 22, 2025 )
API of the Day:
Use the NASA Astronomy Picture of the Day (APOD) API
Challenge :
Build a mini web app that fetches and displays the daily astronomy picture from NASA's APOD API with its title and description.
- Challenge Add-on: Add a date picker to view past pictures.
- NASA APOD API Documentation
Linux/DevOps Tip :
Monitor Disk Usage with du and ncdu
Commands :
- Use du -sh * to get a summary of disk usage by folder.
- Use ncdu (if installed) for a more interactive and visual exploration of what's eating up space in your directories.
Real-World Project of the Week (Updated) ( May 16 to May 22, 2025 )
Project of the Week:
- Use a backend like Node.js, Flask, or Django.
- Use a markdown parser (like marked in JS or markdown in Python) to render posts.
- Add support for categories, tags, and featured images.
Build a Blog Platform with Markdown Support
Bonus : Allow login functionality to create/edit/delete posts.
Collaborative Project:
Create a “Dev Tools Hub” Web App.
- A multi-tool app offering features like:
- JSON formatter
- UUID generator
- Base64 encoder/decoder
- Regex tester
- Organize collaboration via GitHub and assign different tools to team members.
Case Study:
How Trello Works — Kanban Task Boards.
- Study how Trello organizes cards, lists, and boards.
- Build a mini Kanban board with drag-and-drop functionality using Sortable.js or native drag-and-drop API.
- Focus on data modeling and client-server sync logic.
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