Daily Coding Challenges & Projects
Wednesday
Frontend Mini Project Challenge
Focus: Vue.js Components
Challenge :
Create a reusable Vue.js component named <UserBadge> that accepts props for username, avatarUrl, and isOnline. It should display:
Requirements :
- The user's avatar.
- The username.
- A green dot if online, red if offline.
Try it Online: On Vue SFC Playground
Backend Challenge
Language Focus : Python & PHP
Python Challenge :
Task : Write a Python script that monitors a directory for file changes (add, remove, modify) in real-time without using third-party libraries.
Hint : Use os and time modules for polling.
PHP Challenge :
Task : Create a PHP script to validate and sanitize user-submitted emails, removing malicious characters and checking format.
Hint : Use filter_var() with FILTER_SANITIZE_EMAIL and FILTER_VALIDATE_EMAIL.
Database Query Challenge
Problems on SQL - HR Database :
- Find all employees who joined the company in the last 90 days.
- Find departments that have more than 5 employees.
Data Structures & Algorithms Challenge
- Easy:
- Problem : Check if a string is a palindrome (ignore spaces and case).
- Hint : Use two-pointer technique.
- 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 seen values.
- Hard:
- Problem : Implement a Least Recently Used (LRU) cache with get/put in O(1) time.
- Hint : Use OrderedDict in Python or combine hashmap + doubly linked list.
Bug of the Day
Language Focus: ( Python & PHP )
Python Bug :
Buggy Code:
$name = "John";
echo 'Hello, $name!';
Fix : Provide default values for all required arguments or use argument checking.
PHP Bug :
Buggy Code:
val numbers = listOf(1, 2, 3, 4)
println(numbers[4])
Fix : Use double quotes for variable interpolation:
echo "Hello, $name!";
📋 Daily Micro-Project
Backend Task :
Challenge :
Optimize a slow SQL query that joins employees, departments, and locations.
- Add relevant indexes.
- Rewrite query to avoid subqueries where possible.
Hint : Use EXPLAIN ANALYZE to evaluate query cost.
Trivia: 5 Fun Facts
- Python was named after Monty Python, not the snake.
- The first computer programmer was Ada Lovelace in the 1840s.
- PHP originally stood for "Personal Home Page."
- The first email was sent by Ray Tomlinson in 1971.
- JavaScript was created in just 10 days by Brendan Eich.
Tool & Resource of the Day
Tool : Postman
Use Postman for testing RESTful APIs with support for environments, tests, and mock servers.
Resource Roundup :
- Vue Mastery – Free intro to Vue.js
- Python Patterns GitHub
Interview Question of the Day
Daily Interview Questions
- What are Vue.js computed properties used for?
- How does Vue.js handle reactivity?
- What’s the difference between v-show and v-if in Vue?
- Explain how slots work in Vue components.
- How is memory managed in Python?
- What’s the difference between include and require in PHP?
- How can you prevent SQL injection in PHP?
- What is the Global Interpreter Lock (GIL) in Python?
- What is a database index and how does it work?
- What’s the difference between HAVING and WHERE in SQL?
- How would you normalize a database?
- What is a daemon process in Linux?
- What is the difference between Docker image and container?
Daily Quiz Challenge
- What directive is used for conditional rendering in Vue?
- v-if
- v-show
- v-render
- Both a & b
- In Vue.js, what lifecycle hook is called after the component is mounted?
- What is the purpose of a key in a v-for loop?
Frontend ( Vue.js ) :
- What does *args do in Python functions?
- How do you define a constant in PHP?
- Which PHP function is used to hash a password securely?
Backend ( Python & PHP ) :
- Which SQL clause is used to group rows?
Database ( SQL ) :
- JS: What does typeof NaN return?
- SQL: What keyword is used to eliminate duplicates?
- Python: What’s the output of bool("")?
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