Daily Coding Challenges & Projects
Weekend
Frontend Mini Project Challenge
React Hooks & State Management
Task :
React Theme Switcher Component
Challenge :
- Build a React component that toggles between "Light Mode" and "Dark Mode".
- Use useState to manage the current theme.
- Apply corresponding styles dynamically using conditional classNames.
Bonus : Save the selected theme in localStorage and restore it on page reload.
Backend Challenge
Node.js & Go
Node.js Challenge :
Title : Express.js Route Rate Limiting
Task :
- Create an Express server with a /login endpoint.
- Implement a basic rate limiter that allows only 5 requests per minute per IP.
Hint : Use middleware and Map to track timestamps per IP.
Database Query Challenge
Problems on SQL - HR Database :
- List employees who joined in the last 6 months and have a salary above the department average.
- Write a SQL query to display the employee name, department, and manager name for each employee.
Data Structures & Algorithms Challenge
- Easy:
- Problem : Reverse an Integer
- Hint : Watch out for negative numbers and overflow.
- Medium:
- Problem : Find the First Unique Character in a String
- Hint : Use a frequency map and index tracking.
- Hard:
- Problem : Trapping Rain Water Problem
- Hint : Two-pointer approach or precompute maxLeft and maxRight arrays.
Bug of the Day
Node.js & Go
Node.js Bug :
Buggy Code:
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send('Welcome');
});
app.listen(3000);
console.log('Server running');
Challenge : Why is "Server running" printed before the server starts? Where should it be?
GO Bug :
Buggy Code:
package main
import "fmt"
func main() {
var names = []string{"Alice", "Bob"}
for i := 0; i <= len(names); i++ {
fmt.Println(names[i])
}
}
Challenge : Spot the runtime error and correct the logic.
📋 Daily Micro-Project
Frontend React :
Project :
Build a Live Character Counter Input Box
- Create an input field and display live character count below.
- Limit characters to 150 and show warning when 90% full.
Use useState and dynamic styles.
Trivia: 5 Fun Facts
- React’s Virtual DOM is inspired by functional programming principles.
- Go was originally created to improve compilation times.
- JavaScript was originally named Mocha.
- Node.js uses the V8 JavaScript engine developed by Google.
- JSX is not required in React – it's syntactic sugar over React.createElement.
Tool & Resource of the Day
Tool : Vite
A blazing fast frontend build tool for modern web development.
- Why use it?
- Lightning-fast cold starts.
- Instant Hot Module Replacement (HMR).
- Native support for ES Modules and TypeScript.
- Great for React, Vue, and Svelte apps.
- Official Site : https://vitejs.dev
Resource Roundup :
State Management in React (Beyond useState)
- Redux Essentials Tutorial (Official Docs)
- Jotai – Atomic State Management for React
- React Global State Management Comparison (Blog)
https://redux.js.org/tutorials/essentials/part-1-overview-concepts
Minimal and scalable alternative to Redux or Context API.
https://blog.logrocket.com/comparing-react-global-state-management/
Covers Context, Redux, Jotai, Recoil, Zustand, and more.
Interview Question of the Day
Daily Interview Questions
- What does useEffect do and how does dependency array affect it?
- Explain the difference between useMemo and useCallback.
- How would you prevent unnecessary re-renders in a React component?
- Why is it a bad practice to update state directly in React?
-
Backend ( Node.js & Go ) :
- What is middleware in Express.js?
- How do goroutines differ from OS threads?
- Explain the Event Loop in Node.js.
- What are Go channels and how do they help with concurrency?
- What is a correlated subquery and when would you use it?
- What are stored procedures and what are their advantages?
- Explain what a database view is and when it should be used.
- What is the difference between virtualization and containerization?
- What does the top command in Linux show?
Daily Quiz Challenge
- What does useRef() return by default?
- Mutable object
- DOM element
- State variable
- Undefined
- What is the output?
- 0
- 1
- 2
- 3
Frontend Quiz ( React & JavaScript ) :
const [count, setCount] = useState(0); setCount(prev => prev + 1); setCount(prev => prev + 1);
- No return in render
- Updating state inside render
- Using useEffect with missing dependency
- Using useMemo without return
- What is the default port for Express.js apps?
- 8080
- 3000
- 5000
- 4000
- In Go, which package is used for HTTP handling?
- os
- http
- fmt
- net/http
- What is req.params used for in Express?
- Body data
- URL query
- Route parameters
- Headers
Backend Quiz ( Node.js / Go ) :
- Which key ensures uniqueness in a table?
- Foreign Key
- Primary Key
- Index
- Group Key
Database :
- Which of the following is not a JavaScript data type?
- Symbol
- Float
- Undefined
- Object
Mixed Quiz :
Weekly Cross-Domain Activities ( June 13 to June 19, 2025 )
API of the Day:
OpenWeatherMap API :
Use the REST Countries API
Task : Build a React app that lets users search a country and shows its flag, capital, and region.
Linux/DevOps Tip :
Top 5 Linux commands for server monitoring:
- top
- htop
- vmstat
- iotop
- netstat -tulpn
Real-World Project of the Week ( June 13 to June 19, 2025 )
Project of the Week:
Build a Task Manager App (Frontend + Backend + DB)
- Use React for UI
- Node.js + Express for API
- PostgreSQL for data persistence
Collaborative Project:
Contribute to the open-source Habit Tracker project on GitHub: github.com/codecrafters-io/habit-tracker.
Case Study:
How Notion Manages Real-Time Collaboration:
- WebSockets, Operational Transform (OT), and React for UI syncing.
Try replicating a collaborative notes editor using Firebase Realtime DB
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