Daily Coding Challenges & Projects
Thursday
Frontend Mini Project Challenge
React Hooks & State Management:
Challenge:
- Build a simple Counter App using React that supports the following:
- A count state that increases/decreases on button clicks
- A "Reset" button
- A button that doubles the current count
Bonus: Store the count in localStorage using the useEffect hook.
Try it online: CodeSandbox Starter
Backend Challenge
Node.js & Go
Node.js Challenge:
Problem:
- Accepts a POST request with firstName and lastName
- Returns a JSON with fullName (concatenated)
Create a REST API endpoint in Node.js (Express) that:
Bonus: Add validation using express-validator.
Go Challenge:
Problem:
- Reads a CSV file containing employee names
- Returns the total number of unique last names in the file
Write a Go program that:
Bonus: Use maps for counting and the encoding/csv package.
Database Query Challenge
Problems on SQL - HR Database :
- Write a query to display all employees who joined in the current year.
- List departments where the average salary is above $10,000.
Data Structures & Algorithms Challenge
- Easy:
- Problem: Write a function to check if a string is a palindrome (ignore spaces and case).
- Hint: Clean the string, then compare it to its reverse.
- Medium:
- Problem: Given an array of integers, return indices of the two numbers such that they add up to a specific target.
- Hint: Use a hashmap to store value → index.
- Hard:
- Problem: Implement a Least Recently Used (LRU) Cache class with get() and put() methods.
- Hint: Use a hashmap + doubly linked list for O(1) operations.
Bug of the Day
Node.js (JavaScript)
Buggy Code:
const fs = require('fs');
fs.readFile('data.txt', 'utf-8', (err, data) => {
if (err) throw err;
console.log("Data read:", data.toString());
});
Challenge: Why might data.toString() throw an error? Fix it.
Hint: data is already a string when you pass 'utf-8'.
📋 Daily Micro-Project
Frontend
Challenge: Build a Theme Toggle Button in React.
- Uses useState to toggle between Light/Dark themes.
- Changes body background color accordingly.
Bonus: Store theme preference in localStorage.
Trivia: 5 Fun Facts
- React was developed by Jordan Walke, a Facebook engineer.
- Go (Golang) was created at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.
- console.log() was first introduced in Netscape Navigator 4.
- npm (Node Package Manager) was created in 2010.
- The first ever website is still online: http://info.cern.ch
Tool of the Day
Tool : React Developer Tools
- React Cheat Sheet (freecodecamp)
- useHooks.dev — A modern hook explorer
Resource Roundup:
React Cheat Sheet & Hooks Guide
Extension: React DevTools
Interview Question of the Day
Daily Interview Questions
- What is the difference between useEffect() and useLayoutEffect()?
- How does the useCallback() hook improve performance?
- What is the purpose of key in React lists?
- Can you explain the concept of controlled vs uncontrolled components?
- How does Node.js handle concurrency with a single-threaded model?
- What is the difference between process.nextTick() and setImmediate()?
- What are goroutines in Go?
- How does garbage collection work in Go?
- What is a foreign key? How does it ensure data integrity?
- When would you use a subquery instead of a JOIN?
- How can you detect and avoid SQL injection?
- What is the difference between a virtual machine and a container?
- What is CI/CD? Why is it important in software deployment?
Daily Quiz Challenge
Frontend : React & JS
- What does useEffect(() => {}, []) do?
- Runs on every render
- Runs once on mount
- Runs before unmount
- Never runs
- Which method is used to update state in React?
- updateState
- modifyState
- setState
- changeState
- What will this return: typeof null
- "null"
- "object"
- "undefined"
- "function"
Backend : Node.js & Go
- In Node.js, which module is used to work with file system?
- os
- fs
- file
- stream
- What does defer do in Go?
- Skips execution
- Runs immediately
- Delays execution until function returns
- Runs only on error
- What is the output of console.log(typeof NaN)? >
- "number"
- "NaN"
- "undefined"
- "object"
Others : Database
- What SQL keyword is used to filter grouped data?
- WHERE
- HAVING
- GROUP
- FILTER
Mixed :
- Which is true about React state?
- It mutates directly
- It’s global
- It should be treated as immutable
- It is only available via Redux
Weekly Cross-Domain Activities ( April 18 to 24, 2025 )
API of the Day:
Build a currency converter using the ExchangeRate API
- Fetch live exchange rates
- User selects currency pair and amount
- Displays converted amount instantly
Linux/DevOps Tip:
10 Commands to Monitor Server Health:
Real-World Project of the Week ( April 18 to 24, 2025 )
Project of the Week:
- Tech Stack Options:
- React + Node.js + PostgreSQL
Build a Task Manager App with login, add/edit/delete tasks, and due date reminders
Collaborative Project:
Open-source GitHub Project: Habit Tracker App** ← let users add habits, track streaks, share progress. Invite community collaboration!
Case Study:
- Real-time updates using WebSockets
- Kanban board layout
- Offline support via IndexedDB
How Trello Works Under the Hood
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