100 Days of Code Challenge!


Hello community!

I’ve been challenged to start the #100DayCodeChallenge, and guess what?! Challenge Accepted!! So for the next 100 days, I’ll be sharing my knowledge, learning, and experiences.

Below is my progress from previous days, and I’ll now be updating regularly from today. If you’re up for it, join me on this adventure!

Day 1 of 100daysofcode : System Planning and Design

Before we write a single line of code, we need a clear plan. The below diagram, created with Dia, represent the initial design phase, outline the structure and functionality of the system we’ll be building. It serves as our blueprint and first step, ensuring we stay organized and focused throughout the development process.

We’re building an Outdoor Adventure Gear e-commerce site. This flowchart maps the user journey from searching for gear to completing checkout. By visualizing this process, we can ensure a smooth and intuitive experience for our users. These ‘roots’ will support a robust and user-friendly platform.

So as I said planning is crucial in software development. It help us visualize the different components of the system, how they interact, and the overall flow of information. This process prevents costly mistakes later on and ensures a more robust and efficient final product. Let’s take a closer look of our simplified system design…

100daysofcode lebanon-mug

Day 2 of 100daysofcode : Time Complexity and Big-O Notation

let’s suppose we write a code and we understand it well, but do you ever thought if your code is scalable and clean?

So here comes time complexity to help us measures how the runtime of an algorithm changes as the input size increases. It helps evaluate the efficiency of algorithms and choose the best one for a task. Often expressed using Big-O notation, which provides an upper bound on the worst-case scenario.

Big O notation is used to describe the upper bound of an algorithm’s runtime. It gives an idea of the worst-case scenario as input size grows.

Common Big O notations include:

O(1): Constant time
O(log n): Logarithmic time
O(n): Linear time
O(n²): Quadratic time
O(2ⁿ): Exponential time

Below are two examples on how to find complexity using Big-O notation:

So why it matters?

Understanding time complexity helps in predicting the performance of algorithms, and choosing scalable solutions.

Big O notation provides a universal way to compare algorithms, ensuring the best choice for the problem at hand.

100daysofcode lebanon-mug

Day 3 of 100daysofcode : Architecture Breakdown and Design Pattern

Today, I focused on structuring the architecture for my e-commerce project built with React, Node.js, and MongoDB. Here’s a breakdown of how I’ve set up the project to keep things clean, scalable, and easy to maintain.

Frontend (React):

-Components: I’ve created reusable UI elements such as ProductList, Header, and Footer to keep the code modular and maintainable.
-Pages: Each page (e.g., HomePage, ProductPage, CartPage) handles routing and renders the appropriate components.
Services: All the API calls to the backend are centralized in service files to keep the logic separate from the UI.
Global State: I’m using the Context API (or custom hooks) to manage global state, making it easier to share data across components.

-Backend (Node.js + Express) :
MVC (Model-View-Controller)

-Routes: I’ve set up API routes for different functionalities, like fetching product data, handling user authentication, and managing orders.
-Controllers: Each route has a corresponding controller that processes the business logic.
-Models: I’ve created models for products, users, and orders that map to collections in MongoDB.

Database (MongoDB):

-Collections: MongoDB stores the main data for the project, such as:
Products: Contains product details and inventory.
Users: Stores user profiles and authentication data.
Orders: Tracks user orders and transaction details.

Communication:

The frontend communicates with the backend via RESTful APIs, making requests for data or sending information to be saved.
The backend handles these requests, interacts with MongoDB, and sends the relevant responses.

Why this setup?

This architecture is designed to ensure:

Modularity: Each part of the app (frontend, backend, database) is organized in a way that makes it easy to manage and scale.
Maintainability: It’s easier to update, debug, and extend the project because the responsibilities are well-defined.
Collaboration: The clear structure will make it easier for others to understand and contribute if needed.

Tech Stack:

  • Frontend: React + Context API
  • Backend: Node.js + Express
  • Database: MongoDB
  • IDE: Visual Studio Code

Looking forward to your feedback!
100daysofcode lebanon-mug

Day 4 of 100daysofcode : RESTful API Integration

What I Built:

Today, I learned about RESTful APIs and implemented an endpoint in my e-commerce project to fetch a list of products from the backend. I also explored how the frontend interacts with the backend to display this data dynamically.

What I Learned:

  1. What are RESTful APIs?

REST stands for Representational State Transfer, which is a design pattern for creating scalable web services.
A RESTful API allows communication between a client (frontend) and a server (backend) using HTTP methods such as:
GET: Retrieve data.
POST: Send data to the server.
PUT/PATCH: Update existing data.
DELETE: Remove data.

  1. How RESTful APIs Work:

The backend exposes endpoints (URLs) that the frontend can call to perform specific actions.
For example:

  • Backend endpoint: /api/products (fetch all products).
  • Frontend calls this URL using an HTTP GET request and receives a list of products in JSON format.
  • The client then uses this data to render it visually in the user interface.

Key Takeaways:

  • RESTful APIs allow seamless communication between the frontend and backend.
  • Learned how to fetch data using the fetch API in React and dynamically render it.
  • MongoDB Compass is a helpful tool for adding and managing data during development.

Below is an example of how I fetch API from backend:

lebanon-mug 100daysofcode

Day 5 of 100daysofcode : Planning Phase 2 – Design, Collaboration, and Growth

Today, our team had a deep planning session for phase 2 of our project, and it was both productive and inspiring. Here’s a snapshot of what we covered:

Key Takeaways from the Meeting:

1-Frontend Design:
We’re adopting the MVC (Model-View-Controller) architecture for the frontend to create a clear separation between logic, UI, and data. This will make the code easier to maintain and scale.

2-Backend Structure:
For the backend, we’re following the RESTful API architecture, a modern approach for building scalable, modular, and efficient applications. This architecture focuses on providing a clear interface for communication between clients and servers, ensuring a clean separation of concerns.

3-MongoDB Compass:
Explored how MongoDB Compass can help us visualize and manage our database more effectively, saving time and reducing potential errors during development.

4-API Integration and Authentication:
We discussed how to handle API integration efficiently and ensure secure authentication processes. It’s exciting to see how these elements are coming together to form a robust system.

5-Collaborative Brainstorming:
One of the best parts of the meeting was how everyone shared ideas and contributed to the discussion. The creativity and problem-solving mindset of the team were truly inspiring.

6-Deadlines and Roles:
We set clear deadlines for Phase 2 and aligned roles to ensure smooth progress and accountability.

Reflections:
Leading this session made me realize how much I’ve grown in team management, thanks to my previous team leader. Their guidance and support played a huge role in shaping the leader I am today. It’s rewarding to pass on the same collaborative and structured approach to my current team.

Planning, brainstorming, and aligning with the team is such an important step, it sets the foundation for a successful project. Grateful for the journey so far!

lebanon-mug 100daysofcode

Day 6 of 100daysofcode : Visualizing the Backbone of Our Outdoor Adventure Gear Store

Today, I focused on creating an Entity-Relationship (ER) Diagram for an outdoor adventure gear store!

An ER diagram is a powerful tool that visually represents the data structure of a system and helps map out how various entities interact with one another. For this project, the diagram serves as the foundation for our database design and workflow understanding.

Here’s a quick overview of what I achieved today:

1-Identifying Key Entities
I outlined core entities such as:

-Users: Store user data for a personalized experience.
-Products: Include details like name, price, stock availability, and category.
-Feedbacks: Track feedbacks made by users.

2-Defining Relationships

-Connected customers to their orders to maintain a history of purchases.
-Linked orders to products to track what was bought.

3-Ensuring Workflow Clarity

This diagram will help my team understand the purpose of each entity and its connections, promoting better collaboration and minimizing confusion during development.

By visualizing the relationships and flow of data, we’re laying the groundwork for a robust, efficient database system that supports seamless operations.

Here’s the ER diagram I designed—let me know your thoughts or any suggestions for improvement!


100daysofcode lebanon-mug

Day 7 of 100daysofcode : A Deep Dive into Authentication

Today’s focus was on a crucial aspect of user authentication. I built an authentication flow using the MERN stack (MongoDB, Express, React, Node.js). Here’s a breakdown of what I accomplished:

1-Backend (Node.js/Express):
-User Registration: Created API endpoints for user registration, receiving user data (username, password).
-Password Hashing (bcrypt): Instead of storing passwords directly in the database (which is a major security risk), I used bcrypt to hash passwords. Hashing transforms the password into a one-way string of characters, making it virtually impossible to reverse engineer the original password even if the database is compromised.
-JWT (JSON Web Tokens): After successful login, the server generates a JWT. This token is a compact, self-contained way to securely transmit information between parties as a JSON object. It contains information about the user (e.g., user ID) and is digitally signed, ensuring its integrity.
-Protected Routes: Implemented middleware to protect specific API routes. Only requests with a valid JWT in their header are allowed to access these routes.

2-Frontend (React):
-User Interface: Created forms for user registration and login.
-API Calls: Used axios to make API requests to the backend for registration and login.
-Token Storage: After successful login, the JWT is stored in the browser (local storage).
-Authorization: Included the JWT in the Authorization header of subsequent API requests to access protected resources.

3-Database (MongoDB):
-User Model: Created a schema to store user information, including the hashed password.

Why is this important?

Authentication is essential for securing web applications. It verifies the identity of users, preventing unauthorized access to sensitive data and functionalities. Using bcrypt for hashing and JWT for authorization are industry best practices for building secure authentication systems.

4-Example (Simplified flow):

  1. User submits login credentials on the React frontend.
  2. The frontend sends a request to the backend.
  3. The backend verifies the credentials and generates a JWT.
  4. The backend sends the JWT back to the frontend.
  5. The frontend stores the JWT.
  6. For subsequent requests to protected routes, the frontend includes the JWT in the Authorization header.
  7. The backend verifies the JWT before granting access.

100daysofcode lebanon-mug

Day 8 of 100daysofcode : CRUD Operations

Today, I delved into CRUD operations (Create, Read, Update, Delete) and how they power the interaction between the frontend and backend in my outdoor adventure gear store project. Here’s a closer look at how each operation works and connects the two sides:

1-Create (Adding New User):
-Frontend: I built a Sign-up form using React. When a user fills in regististration details like username, email, phone number, and password, the form data is validated and submitted.
-Backend: A POST request is sent to the server’s /api/users endpoint. The backend (Node.js and Express) processes the request, validates the data, and inserts a new user document into MongoDB.
-Database: MongoDB generates a unique ID for the user and stores it with all the submitted details.

2-Read (Displaying Products):
-Frontend: Users can browse products on the store’s product page. I used React to dynamically display product data in cards with options to filter and search.
-Backend: When the frontend sends a GET request to /api/products, the server queries MongoDB for the product list. The results are sent back as JSON.
-Integration: React uses the fetched data to render a responsive UI, ensuring users see updated products immediately.

3-Update (Editing Product Details):
-Frontend: Admins can select a product to edit, triggering a pre-filled form with the product’s current details. Upon submitting the updated data, a PUT request is sent to /api/products/:id.
-Backend: The server retrieves the product by its ID, updates the necessary fields in the MongoDB document, and responds with the updated product data.
-Integration: The frontend reflects the changes immediately, ensuring the UI stays in sync with the database.

4-Delete (Removing Products):
-Frontend: Admins can click a Delete button on a product card, confirming their action through a dialog box. This triggers a DELETE request to /api/products/:id.
-Backend: The server locates the product in MongoDB using its ID and removes it from the database.
-Integration: The frontend dynamically removes the deleted product from the displayed list without requiring a page refresh.

Key Learnings:

Properly structured API endpoints are crucial for seamless communication between the frontend and backend.
Using state management in React ensures data updates are reflected in real time.
Error handling at both the frontend and backend ensures users are notified of any issues.

CRUD operations are the backbone of any dynamic application, and building them has deepened my understanding of how the frontend and backend collaborate to manage data. It’s exciting to see how each part fits together!
100daysofcode lebanon-mug

Day 9 of 100daysofcode : Google Sign-In Integration

1-Objective:
Integrate Google Sign-In functionality into a MERN stack application to simplify user authentication.

2-Frontend Setup:
Utilized the @react-oauth/google package for seamless Google authentication.
Configured the GoogleOAuthProvider with the client ID.
Handled the sign-in success and failure scenarios to capture the credential and parse essential user data.

3-Backend Configuration:
Used google-auth-library to validate the ID token provided by Google.
Implemented a dedicated endpoint to handle Google Sign-In requests.
Verified the token and created or retrieved user data from the database based on the Google ID.
Managed the response with a JSON Web Token (JWT) for session management.

4-Challenges and Solutions:
Resolved dependency issues during setup by ensuring compatibility with React versions.
Updated the Google Cloud Console to include proper redirect URIs and localhost configurations.
Ensured error handling for invalid tokens or missing user information.

5-Outcome:
Successfully enabled users to log in using their Google accounts.
Enhanced the user experience by reducing friction in the sign-up process.

6-Reflection:
Learned the importance of securing sensitive operations like token verification.
Gained confidence in integrating third-party APIs and handling potential issues during development.
100daysofcode lebanon-mug

Day 10 of 100daysofcode : Product Display with Sidebar, Pagination, and Search!

Today, I focused on building and refining the product display functionality of my e-commerce app. Here’s a detailed breakdown of the progress I made:

1-Fetching Data from the Backend

-Utilized Axios to fetch product data dynamically from the backend API.
-Implemented error handling to display appropriate messages if data retrieval fails.
-Ensured all data fields, including product name, category, rating, quantity, and price, are accurately displayed on the frontend.

2-Sidebar Functionality

-Designed a responsive sidebar using Bootstrap to filter products based on categories or other attributes.
-Incorporated dynamic filtering to allow users to narrow down their search without needing to reload the page.
-Ensured the sidebar is easy to use on both mobile and desktop screens, providing an intuitive experience for all users.

3-Pagination

-Added a pagination system to handle large datasets efficiently.
-Limited the number of products displayed per page for better performance and user experience.
-Included next and previous buttons, along with page numbers, to allow smooth navigation between pages.

4-Search Functionality

-Implemented a search bar to let users quickly find products by name or keyword.
-Made the search case-insensitive and optimized for speed, even with large datasets.
-Combined the search functionality with filters and pagination to ensure a seamless browsing experience.

5-Responsive Design

-Used Bootstrap grid system to ensure the layout adjusts perfectly to all screen sizes.
-Tested and polished the design for mobile, tablet, and desktop users.

6-Check out the updated product display and functionality in the picture below!

I’m excited about how the app is shaping up and would love to hear your thoughts and feedback!

#React #Bootstrap #MERN 100daysofcode lebanon-mug

1 Like

Day 11 of 100daysofcode : Embracing Agile Methodology

Agile Methodology: What It Is

Agile methodology is a dynamic approach to software development that prioritizes adaptability, collaboration, and customer satisfaction. It focuses on delivering small, functional increments of a product through iterative cycles called sprints. Each sprint typically spans 1-4 weeks and results in a usable product feature. Agile breaks away from traditional, rigid processes by encouraging continuous improvement and flexibility.

Key Principles of Agile

  1. Individuals and Interactions Over Processes and Tools: Emphasizes teamwork and communication.
  2. Working Software Over Comprehensive Documentation: Focuses on delivering functional software early.
  3. Customer Collaboration Over Contract Negotiation: Builds stronger relationships with stakeholders.
  4. Responding to Change Over Following a Plan: Adapts to evolving requirements with ease.

Why Agile Matters in Software Development

  1. Customer Satisfaction: Agile ensures regular delivery of features, keeping customers engaged and satisfied. Frequent feedback loops allow the product to evolve based on real user needs.
  2. Flexibility and Adaptability: Unlike traditional methods, Agile welcomes changes even late in the development cycle. This ensures the product stays relevant and competitive in a fast-paced industry.
  3. Early and Continuous Delivery: Agile breaks down the development process into manageable chunks, enabling quicker releases and giving teams the chance to address issues early.
  4. Enhanced Collaboration: Agile promotes open communication between developers, designers, and stakeholders. This shared ownership fosters innovation and efficient problem-solving.
  5. Risk Reduction: By delivering features incrementally, teams can identify potential issues earlier, reducing the risk of major setbacks.
  6. Higher Product Quality: Continuous testing and frequent iterations ensure that the product improves steadily, meeting high-quality standards.

Agile in Real Life

Agile is not limited to just software development; it’s widely used in project management, marketing, and even product design. Companies like Spotify, Google, and Amazon use Agile to stay ahead of the competition, constantly innovating and adapting to market demands.

Closing Thoughts

Agile methodology is more than a process—it’s a mindset that encourages teams to embrace change, collaborate effectively, and deliver exceptional value. By adopting Agile, you can ensure that your projects remain customer-focused, efficient, and ready to meet the challenges of modern software development.

100daysofcode lebanon-mug

Day 12 of 100daysofcode : The Importance of Node.js and Express.js

Today, I explored the importance of Node.js and Express.js, two key tools in modern web development. Here’s what I learned:

  1. What is Node.js?

Node.js is a runtime environment for JavaScript, built on Chrome’s V8 engine. It enables developers to run JavaScript on the server side, making it possible to create full-stack applications using a single language.

  1. Why is Node.js so Popular?

2.1. Non-blocking Architecture:
-Node.js uses an event-driven, non-blocking I/O model.
-This makes it lightweight and efficient, especially for applications that require high concurrency (like real-time apps).
2.2. Cross-platform Compatibility:
-Node.js works seamlessly on major operating systems (Windows, macOS, Linux).
2.3. Large Ecosystem:
-The npm ecosystem provides over 1.5 million libraries for everything from authentication to database management.
2.4. Scalability:
-Node.js is ideal for building scalable applications that handle heavy traffic, such as APIs, streaming platforms, and gaming apps.

  1. What is Express.js?

Express.js is a web application framework for Node.js. It simplifies the process of building web servers and APIs.

  1. Why Use Express.js?

4.1. Simplifies Routing:
-Express.js makes it easy to define routes and handle HTTP requests (GET, POST, etc.).
4.2. Middleware Support:
-Middleware functions in Express allow you to handle requests, responses, and errors efficiently.
4.3. Flexibility:
-You can easily integrate third-party libraries to enhance your application.
4.4. Speed of Development:
-Express minimizes boilerplate code, making development faster and more organized.

  1. Node.js and Express.js Together:

When combined, Node.js and Express.js provide a powerful backend stack for building:

-RESTful APIs: Manage CRUD operations seamlessly.
-Real-time Applications: Perfect for chat apps, collaboration tools, and live updates.
-Dynamic Websites: Easily render content on the server side.

  1. Where Are They Used?

Companies like Netflix, Uber, PayPal, and LinkedIn rely on Node.js and Express.js for their applications, especially for their scalability, speed, and reliability.

  1. Key Takeaways:

-Node.js: The runtime that brought JavaScript to the server, making it possible to build efficient, scalable, and real-time applications.
-Express.js: A lightweight framework that simplifies server-side application development with Node.js.
100daysofcode lebanon-mug

Day 13 of 100daysofcode : The Importance of Gantt Charts in Project Management

Managing projects can feel overwhelming, especially when you’re juggling multiple tasks, deadlines, and team members. This is where Gantt charts come in—a simple yet powerful tool that helps you organize your project visually.

A Gantt chart is like a timeline that breaks your project into smaller tasks. Each task is represented by a bar, showing when it starts and ends. These bars are arranged along a calendar, making it easy to see the order of tasks and how long each one will take. Arrows or lines between tasks show dependencies—meaning which tasks need to be completed before others can begin.

Why Are Gantt Charts Important?

  1. Clear Project Overview: Gantt charts give you a bird’s-eye view of your project. You can see all the tasks, their deadlines, and how they connect, which helps you stay organized.
  2. Improved Time Management: With a clear timeline, you can plan your work better and avoid last-minute rushes. It also helps you prioritize tasks that are more urgent.
  3. Better Team Coordination: Everyone on the team can see the project timeline, understand their responsibilities, and know how their work affects others. This improves communication and reduces confusion.
  4. Tracking Progress: Gantt charts make it easy to track which tasks are done, which are in progress, and which are delayed. This helps you adjust your plan if something isn’t going as expected.
  5. Identifying Dependencies: You’ll know which tasks depend on others, so you can avoid bottlenecks or delays caused by missing a step.

Example: Using ClickUp for Gantt Charts

ClickUp is a friendly tool that includes a Gantt chart feature. It allows you to:

  1. Create Tasks Easily: Add tasks and set start and due dates with just a few clicks.
  2. Drag and Drop Adjustments: If a deadline changes, you can adjust your Gantt chart by dragging tasks to new dates.
  3. Track Progress Visually: Completed tasks are marked on the chart, so you always know how much work is done.
  4. Set Dependencies: You can link tasks to show which ones need to be finished before others can start.

For example, if you’re working on a software project, you might have tasks like “Design UI”, “Develop Backend”, and “Test Features.” Using a Gantt chart in ClickUp, you can see the order of these tasks, assign deadlines, and adjust as needed if one step takes longer than expected.

Below is a simple example that illustrate how we use Gantt chart in ClickUp:

100daysofcode lebanon-mug

Day 14 of 100daysofcode : SOLID Principles in Software Development

Today, I’m diving into SOLID principles, a cornerstone of clean and maintainable software design. Let’s break them down with more details and relatable real-life examples:

  1. What Are SOLID Principles?

SOLID is an acronym for five design principles that help developers write scalable, robust, and maintainable code. Here are the principles:

1.1. S - Single Responsibility Principle (SRP):
-Definition: A class should have only one responsibility or reason to change.
-Real-life example: Imagine a library system. A class that handles book inventory should not also handle user membership. If the library decides to change its membership policy, it shouldn’t affect how books are managed.
1.2. O - Open/Closed Principle (OCP):
-Definition: Software entities should be open for extension but closed for modification
-Real-life example: Consider an online shopping platform where new payment methods (like Apple Pay or Google Pay) are introduced. Instead of modifying the existing payment processing system, you can extend it by adding new modules for each payment method.
1.3. L - Liskov Substitution Principle (LSP):
-Definition: Subtypes must be substitutable for their base types without altering the correctness of the program.
-Real-life example: In a ride-sharing app, a base class Vehicle could have subtypes like Car, Bike , or Electric Scooter . Any vehicle should work seamlessly within the app’s logic, regardless of its type.
1.4. I - Interface Segregation Principle (ISP):
-Definition: A class should not be forced to implement interfaces it does not use.
-Real-life example: Think of a smart home system. A light bulb controller interface should not require methods to control a thermostat. Each device should have its own specific interface.
1.5. D - Dependency Inversion Principle (DIP):
-Definition: High-level modules should not depend on low-level modules; both should depend on abstractions.
-Real-life example: In an e-commerce platform, the order processing system (high-level module) should depend on an abstraction of a payment gateway rather than directly on a specific provider like PayPal. This allows for easily swapping providers without affecting the rest of the system.

  1. Benefits of Applying SOLID Principles:

2.1. Improved Code Quality: Makes code cleaner and more understandable.
2.2. Ease of Maintenance: Reduces the cost and complexity of modifying code.
2.3. Enhanced Scalability: Supports the addition of new features without disrupting existing ones.
2.4. Minimized Bugs: Promotes writing predictable and robust systems.

By integrating these principles into your development practices, you’ll build software that’s easier to manage and scale in the long run.

100daysofcode lebanon-mug

Day 15 of 100daysofcode : The Power of Planning - Avoiding Coding Chaos

Today’s lesson comes from a hard-earned experience: the critical importance of planning before you start coding. Early in my coding journey, I jumped into a project, full of enthusiasm, without a clear plan. Let’s just say it was a learning experience !

I was so eager to bring my idea to life that I skipped the planning phase entirely. I started writing code immediately, adding features as they popped into my head. It felt great initially, like building something from scratch. However, as the project grew in complexity, things started to unravel.

The Conflict:

The biggest problem I encountered was when I tried to integrate a new, seemingly simple feature. Because I hadn’t thought about the overall architecture, my existing code was completely incompatible with the new functionality. I was forced to refactor large portions of the codebase, a task that was significantly more difficult and time-consuming than if I had planned for it from the beginning. It was a frustrating reminder that coding without a roadmap can lead to a tangled mess.

The Lesson:

This project taught me a vital lesson: Planning is the foundation of successful software development. Before writing a single line of code, it’s essential to:

  1. Clearly Define the Scope: Determine exactly what your project will and won’t do. Setting boundaries early prevents scope creep and keeps your project manageable.
  2. Design the Architecture: Think about how the different parts of your project will interact. A simple diagram or even a list of components can be incredibly helpful. Consider data flow and how information will be stored and accessed.
  3. Anticipate Future Needs: Imagine how your project might evolve. What features might you want to add later? Planning for potential future expansions will influence your initial design choices and prevent costly rewrites down the line.
  4. Develop Scenarios/User Stories: Describe how users will interact with your project. Think about the steps they’ll take, the information they’ll need, and the outcomes they’ll expect. This helps uncover potential usability issues and edge cases early on.

Example of Scenarios:

Let’s say I was building a simple cart management tool. Some example scenarios I should have considered are:

“As a user, I want to be able to add new items to the cart, specifying their name, quantity, and price…”
“As a user, I want to be able to generate a report of all items in the cart.”
“As a user, I want to be able to update the quantity of an existing item.”

By planning and writing these scenarios, I would have identified the need for a database, search functionality, reporting capabilities, and update mechanisms before I started writing code. This would have saved me from having to drastically restructure my project later.

Moving Forward:

Now, I always take the time to plan before I start coding. It might seem like it slows me down initially, but it actually saves me a lot of time and frustration in the long run. Planning isn’t just about preventing conflicts; it’s about creating cleaner, more maintainable, and ultimately more successful projects.

100daysofcode lebanon-mug

Day 16 of 100daysofcode : The Importance of Data Flow Diagrams (DFDs) in Software Development

Hey everyone! Today, let’s talk about Data Flow Diagrams (DFDs) and why they’re so important in the software field. If you’re new to software development, this is a great concept to understand early on!

What is a Data Flow Diagram (DFD)?

A DFD is a visual representation of how data moves through a system. It shows:

  1. Processes: What happens to the data (e.g., calculations, transformations).
  2. Data Stores: Where data is stored (e.g., databases, files).
  3. External Entities: Sources or destinations of data (e.g., users, other systems).
  4. Data Flows: The paths data takes between processes, stores, and entities.

Think of it as a map that shows how information travels and gets processed in a system.

Why Are DFDs Important?

  1. Clarity and Understanding: DFDs help developers, stakeholders, and team members understand how a system works without diving into code.
  2. Identify Issues Early: By visualizing data flow, you can spot inefficiencies, missing processes, or redundant steps before coding begins.
  3. Communication Tool: It’s a great way to explain complex systems to non-technical stakeholders.
  4. Blueprint for Development: DFDs act as a guide for developers, ensuring everyone is on the same page about how data should flow.
  5. Documentation: They serve as a reference for future updates or debugging.

Example of a Simple DFD

Imagine a login system:

  1. External Entity: User enters credentials.
  2. Process: System validates the credentials.
  3. Data Store: Checks against the user database.
  4. Data Flow: Returns success or error messages to the user.

Tips for Beginners:

  1. Start with a Level 0 DFD (high-level overview) and break it down into more detailed levels.
  2. Use tools like Lucidchart, Dia, or even pen and paper to create DFDs.
  3. Keep it simple and focus on the flow of data, not the implementation details.

DFDs are a foundational tool in software development, helping you design better systems and communicate effectively. If you’re just starting out, practicing DFDs will make you a better problem-solver and system thinker!

100daysofcode lebanon-mug

Day 17 of 100daysofcode : The Importance of Git & GitHub

In modern software development, Git and GitHub are essential tools that streamline collaboration, version control, and deployment.

  1. What is Git?

Git is a distributed version control system (VCS) that helps developers track changes in code, collaborate efficiently, and manage multiple versions of a project.

  • Version Control – Keeps track of changes, allowing rollbacks if needed.
  • Branching & Merging – Developers can work on separate features and merge them without affecting the main project.
  • Collaboration – Multiple contributors can work on a project simultaneously.
  • Efficiency – Git operates locally, making it fast and reliable.
  1. What is GitHub?

GitHub is a web-based hosting platform for Git repositories. It enhances Git’s capabilities by providing cloud storage, team collaboration tools, and integration with CI/CD pipelines.

  • Remote Code Storage – Access your projects from anywhere.
  • Pull Requests & Code Review – Helps maintain high-quality code with team collaboration.
  • Issue Tracking & Project Management – Organize tasks and track bugs effectively.
  • CI/CD Integration – Automate testing, deployment, and workflow management.
  • Open Source Contributions – Showcase skills, contribute to projects, and build a portfolio.
  1. Why Are Git & GitHub Important?
  • Collaboration – Teams can work on the same project without conflicts.
  • Backup & Security – Prevents data loss by storing code in a remote repository.
  • Transparency & Code Review – Maintains quality through feedback and version history.
  • Automation & Deployment – Simplifies DevOps workflows with GitHub Actions.
  • Community & Learning – Millions of developers use GitHub, making it a great place for networking and skill-building.
  1. How to Get Started?

*Stage, commit, and push changes:
git add .
git commit -m “Your commit message”
git push origin main

*Create a new branch for feature development:
git checkout -b feature-branch

*Merge changes using a pull request on GitHub.

  1. Conclusion:
    Mastering Git and GitHub is a must for every developer. Whether working solo or in a team, these tools ensure smooth collaboration, version tracking, and project security. Start using them today!

100daysofcode lebanon-mug

Day 18 of 100daysofcode : The Future of AI-Powered Search – Why DeepSeek is a Game-Changer

The way we search for information has evolved significantly over the years. From simple keyword-based searches to AI-driven contextual understanding, search technology is becoming more intelligent, accurate, and efficient.

In the software industry, AI-powered search is a critical component of applications, ranging from enterprise knowledge management to chatbots, recommendation systems, and data retrieval. One of the most promising advancements in this field is DeepSeek, an AI model that is challenging industry leaders like OpenAI’s GPT models, Google’s Bard (Gemini), and Meta’s Llama.

  • Why AI-Powered Search is Essential in Software Development

Search is no longer just about looking up keywords—it’s about understanding intent, context, and relevance. Here’s why AI-powered search is revolutionizing software:

  1. Beyond Keyword Matching – True Semantic Understanding

Traditional search engines rely on keyword matching, often returning irrelevant results if the exact words don’t match. AI models, especially DeepSeek, utilize natural language processing (NLP) to understand **meaning, synonyms, and context, leading to smarter search results.

  1. Faster & More Accurate Information Retrieval

AI models like DeepSeek analyze massive datasets in real-time, providing results instantly. This is particularly useful for:
2.1. Developers searching for code snippets and documentation
2.2. Businesses retrieving internal data across millions of records
2.3. E-commerce platforms offering precise product recommendations

  1. Personalization & Adaptive Learning

AI-driven search systems learn from user behavior to provide personalized results. For example, if a user frequently searches for specific technical topics, the AI adapts, prioritizing relevant sources in future searches.

  1. Multimodal Search – Text, Image, Voice & Video

Search is evolving beyond text. AI now enables image-based search (like Google Lens), voice assistants (Siri, Alexa), and even video-based search. Models like DeepSeek process different modalities, making search more accessible and efficient.

  • Why DeepSeek Outperforms Other AI Search Models

DeepSeek is making headlines because it is challenging the dominance of models like GPT-4 and Gemini (Bard). Here’s why DeepSeek is ahead of the game:

  1. Stronger Context Understanding

Unlike traditional AI models, DeepSeek doesn’t just generate responses, it deeply analyzes queries, understanding multi-step logical reasoning better. This makes it highly effective for complex queries, problem-solving, and advanced technical searches.

  1. Better Mathematical & Logical Capabilities

DeepSeek outperforms GPT-4 in math and logic-based tasks, making it highly valuable for software engineers, scientists, and analysts who rely on AI for coding, debugging, and calculations.

  1. More Efficient Knowledge Retrieval & Search Optimization

DeepSeek excels at retrieving relevant, concise, and accurate information, reducing the need for long, unnecessary explanations. This is critical for businesses that need instant access to data, code documentation, and structured knowledge.

  1. Cost-Effective & Open-Source Alternative

Unlike proprietary AI models (like OpenAI’s GPT), DeepSeek is more open and affordable, making it an attractive choice for developers, startups, and businesses looking to integrate AI without high costs.

  1. Competitive with Industry Leaders

Benchmarks suggest DeepSeek is competing closely with GPT-4, Claude, and Gemini in language understanding, problem-solving, and search optimization. With continuous improvements, it’s becoming a powerful AI tool for software development and knowledge retrieval.

  • The Future of AI-Powered Search

As AI search models like DeepSeek continue to evolve, we can expect:

  1. Even faster and more accurate results in software development, research, and e-commerce
  2. AI-powered assistants that deeply understand user intent and respond intelligently
  3. Multimodal search becoming standard, allowing voice, image, and video-based AI interactions
    100daysofcode lebanon-mug

Day 19 of 100daysofcode : Implementing Pagination with a “Load More” Button in Node.js

Today, I tackled pagination by implementing a “Load More” button for a product category in my Node.js backend!

Here’s what I did:

  1. Backend:
  • Built an API endpoint in Node.js that fetches 6 products at a time for a specific category.
  • Used query parameters (page and limit) to control which products are returned.
  1. Frontend:
  • Added a “Load More” button that fetches the next 6 products when clicked.
  • Updated the UI dynamically without reloading the page.
  1. Why Pagination Matters:
  • Performance: Fetching only 6 products at a time reduces load on the server and speeds up the initial page load.
  • User Experience: Users can explore more products without being overwhelmed by a long list.
  • Scalability: This approach works seamlessly even with thousands of products.

100daysofcode lebanon-mug