Daily Coding Challenges & Projects
Wednesday
Frontend Mini Project Challenge
Vue.js Component
Task :
Create a Reusable Alert Box Component in Vue.js
Requirements:
- Accepts type prop (success, error, warning) and shows appropriate styling.
- Slot for dynamic message content.
- Close button to hide alert (with v-if or v-show).
Bonus : Use transition for fade-in/out effect.
Try Online : Use Vue SFC Playground
Backend Challenge
Python / PHP
Python Challenge :
Write a Python script to read and count word frequencies in a large text file without loading it entirely into memory.
Hint : Use with open() and readline() or chunked reading.
PHP Challenge :
Create a simple REST API in PHP using plain PHP (no framework)
Hint : Use with open() and readline() or chunked reading.
- GET /api/greet?name=John → Response: {"message": "Hello, Sara!"}
Bonus: Return HTTP 400 if name is missing.
Database Query Challenge
Problems on SQL - HR Database :
- Find employees hired in the last 3 months.
- List departments where the average salary is above 8000.
Data Structures & Algorithms Challenge
- Easy:
- Problem: Write a function to check if two strings are anagrams.
- Hint: Sort both and compare or use frequency counters.
- Medium:
- Problem: Find the maximum subarray sum (Kadane's Algorithm).
- Hint: Use dynamic programming – track current and global max.
- Hard:
- Problem: Serialize and deserialize a binary tree.
- Hint: Use preorder traversal with null markers for serialization.
Bug of the Day
Python / PHP
Python Bug :
Buggy Code:
def divide(a, b):
try:
return a / b
except:
print("Error occurred")
finally:
return "Done"
print(divide(10, 0))
Challenge :
Find and fix the issue. Why does it not print the error? Why doesn't it return correctly?
PHP Bug :
Buggy Code:
<?php
$name = $_GET['name'];
if ($name = "admin") {
echo "Welcome, admin!";
}
?>
Challenge :
What's wrong with the condition?
📋 Daily Micro-Project
Database Optimization
Challenge :
Optimize this slow SQL query
Original Query:
SELECT * FROM employees WHERE department_id IN (SELECT department_id FROM departments WHERE location_id = 1700);
Task :
- Rewrite using JOIN
- Add indexing suggestions
Bonus : Explain why JOIN is more efficient here.
Trivia: 5 Fun Facts
- Python was named after Monty Python, not the snake.
- The original PHP stood for Personal Home Page.
- SQL was originally called SEQUEL.
- Vue.js was created by a former Google engineer, Evan You.
- PostgreSQL was first released in 1996, evolved from Ingres (1970s).
Tool & Resource of the Day
Tool : Hugging Face Transformers
Use Case :
Build and deploy state-of-the-art machine learning models for NLP, vision, and more with just a few lines of code. Easily fine-tune and use pre-trained AI models like BERT, GPT, T5, and CLIP.
Key Features :
- Access 100,000+ pre-trained models.
- Easy integration with PyTorch and TensorFlow.
- Seamless pipeline APIs for tasks like text generation, classification, summarization.
https://huggingface.co/transformers
Interview Question of the Day
Daily Interview Questions
- What are Vue directives? Give examples
- How does two-way binding work in Vue?
- What’s the difference between computed and watched properties?
- What’s the difference between v-if, v-show, and v-for?
- Explain Python’s garbage collection mechanism.
- How does asyncio work in Python?
- What are superglobals in PHP?
- Explain the difference between require, include, and require_once in PHP.
- What is a clustered vs non-clustered index?
- Explain the purpose of foreign keys in relational databases.
- What is normalization and why is it important?
- What’s the difference between Docker and a VM?
- What is latency vs throughput in system design?
Daily Quiz Challenge
- What lifecycle hook is called after the component is mounted in Vue?
- In Vue, what does :class bind to?
- What is the result of typeof null in JavaScript?
Frontend ( Vue.js / JS ) :
- What’s the output of: print('5' + '3') in Python?
- Which PHP superglobal contains GET data?
- What’s the purpose of yield in Python?
Backend ( Python / PHP ) :
- Which SQL clause is used to filter aggregated results?
Database :
- What does pip stand for in Python?
Others :
- What does v-model do in Vue.js?
- What is the time complexity of accessing a Python dictionary key?
- Which SQL command is used to add a new column to a table?
Mixed Quiz :
Weekly Cross-Domain Activities ( May 09 to May 15, 2025 )
API of the Day:
NASA Astronomy Picture of the Day (APOD) — Use NASA's APOD API to fetch the image or video of the day along with its description, and display it in a simple UI.
Challenge :
Build a gallery-style viewer where users can:
- See today’s image
- Browse previous days using a calendar or buttons
- Read accompanying explanations
Resource:
Linux/DevOps Tip :
Monitor disk I/O and performance using iotop, sar, and glances
Commands to Explore :
- iotop – Monitor real-time I/O usage by processes
- sar – Collect, report, or save system activity information
- glances – A cross-platform monitoring tool with an elegant web UI
Real-World Project of the Week ( May 09 to May 15, 2025 )
Project of the Week:
- Add, categorize, and delete transactions
- View monthly summaries and pie charts
- Store data locally or connect to a backend for persistence
Build a Budget Tracker Web App — Develop a web-based expense tracker where users can:
Tech Stack : HTML, CSS, JavaScript (with Chart.js for graphs)
Collaborative Project:
Join the First Contributions GitHub Project — Learn how to make your first open-source pull request and contribute to beginner-friendly repositories with guided instructions.
Case Study:
Explore Trello's Task Management UI — Analyze how Trello manages drag-and-drop task organization with React and libraries like react-beautiful-dnd.
Challenge :
Try building a minimal Kanban board with drag-and-drop cards and persistent state.
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