Daily Coding Challenges & Projects
Wednesday
Frontend Mini Project Challenge
Vue.js:
Challenge:
- Build a Vue.js reusable alert component that supports different types like success, warning, and error.
Requirements:
- Use props to accept type, message, and dismissible.
- Conditionally style based on the alert type.
- Add close button if dismissible is true.
Try it here: Play with Vue online
Backend Challenge
Python & PHP
- Task: Write a script that monitors a directory and logs whenever a new file is created.
- Hint: Use watchdog or os module to observe directory events.
- Task: Create a PHP script to validate and sanitize user inputs (name, email, phone).
- Hint: Use filter_var() and htmlspecialchars().
Python Challenge:
PHP:
Database Query Challenge
Problems on SQL - HR Database :
- Write a query to find employees who have not been assigned to any department.
- List departments that have fewer than 5 employees.
Data Structures & Algorithms Challenge
- Easy:
- Problem: Write a function to check if a string is a palindrome.
- Hint: Use two-pointer technique.
- Medium:
- Problem: Find the first non-repeating character in a string.
- Hint: Use hash map to count frequencies.
- Hard:
- Problem: Implement an LRU Cache.
- Hint: Combine a hash map with a doubly linked list for O(1) get/put.
Bug of the Day
Python & PHP
Python Bug:
Code:
def multiply(a, b=[]):
b.append(a)
return b
print(multiply(2))
print(multiply(3))
Challenge: What's wrong? Fix the function to avoid unexpected behavior.
PHP Bug:
Code:
<?php
$number = "10";
if ($number === 10) {
echo "It's ten!";
} else {
echo "Not ten.";
}
?>
Challenge: Why is it printing "Not ten."? Fix the issue.
📋 Daily Micro-Project
Database Focus
Task: Optimize this slow query on a large employees table:
SELECT * FROM employees WHERE email LIKE '%@company.com';
- Hint:
- Avoid LIKE '%...'
- Add FULLTEXT index or refactor query.
Trivia: 5 Fun Facts
- The first computer bug was an actual moth stuck in a relay.
- Python is named after Monty Python, not the snake.
- PHP originally stood for "Personal Home Page."
- Linus Torvalds created Git in just 2 weeks.
- JavaScript was developed in just 10 days by Brendan Eich.
Tool of the Day
Tool : Postman
- Learn Vue.js - vuejs.org
- Free Vue Course by VueMastery
- Free REST API course (Postman + Express)
Resource Roundup:
Interview Question of the Day
Daily Interview Questions
- What's the difference between props and state in Vue?
- How do you emit an event from a child to a parent in Vue.js?
- What is Vue’s reactivity system and how does it work?
- How does Vue.js handle two-way data binding?
- What is Python's GIL and why does it matter?
- How does PHP handle session management?
- What is a Python generator and when would you use one?
- Explain RESTful principles and HTTP methods.
- What is a foreign key constraint in SQL?
- What are ACID properties in databases?
- How does a clustered index work?
- What is a shell in operating systems?
- Explain what DevOps pipelines are used for.
Daily Quiz Challenge
Frontend : Vue, JS
- What is the default value of v-model bound to a checkbox in Vue?
- true
- false
- null
- undefined
- What does v-if do in Vue?
- Loops elements
- Binds class
- Conditionally renders DOM
- None
- Which method is used to prevent the default event behavior in JavaScript?
- stopPropagation()
- preventDefault()
- stopDefault()
- blockDefault()
Backend : Python, PHP
- What will print(bool("False")) return in Python?
- True
- False
- What does isset($var) do in PHP?
- Declares a variable
- Checks if variable is set
- Initializes the value
- None of the above
- What is the output of 2 ** 3 in Python?
- 6
- 8
- 9
- 5
Others :
- Which clause is used to filter rows after grouping?
- WHERE
- HAVING
- GROUP BY
- SELECT
- What does HTTP stand for?
- Hyper Transfer Text Protocol
- Hyper Text Transfer Protocol
- High Text Transfer Protocol
- Hyper Terminal Transfer Protocol
Mixed :
- Which of these is not a frontend framework?
- Vue.js
- Flask
- React
- Angular
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