<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: wathika</title>
    <description>The latest articles on DEV Community by wathika (@wathikaeng).</description>
    <link>https://dev.to/wathikaeng</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1627904%2Fb40c28ca-8778-4e13-bd9f-ed18cc0d56b0.jpeg</url>
      <title>DEV Community: wathika</title>
      <link>https://dev.to/wathikaeng</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wathikaeng"/>
    <language>en</language>
    <item>
      <title>Building a healthcare appointment system</title>
      <dc:creator>wathika</dc:creator>
      <pubDate>Mon, 28 Jul 2025 15:01:00 +0000</pubDate>
      <link>https://dev.to/wathikaeng/building-a-healthcare-appointment-system-1031</link>
      <guid>https://dev.to/wathikaeng/building-a-healthcare-appointment-system-1031</guid>
      <description>&lt;p&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🏥 HealthCare Appointment System&lt;/strong&gt;&lt;br&gt;
A full-stack clinic booking system that allows patients to schedule appointments with doctors, and enables doctors to manage their availability and appointments. Designed for small to medium-sized clinics seeking to digitize and streamline operations.&lt;/p&gt;

&lt;p&gt;🚀 Tech Stack&lt;br&gt;
Backend: Python 3.12, Django + Django REST Framework (DRF)&lt;/p&gt;

&lt;p&gt;Database: PostgreSQL&lt;/p&gt;

&lt;p&gt;API Testing: Postman&lt;/p&gt;

&lt;p&gt;Version Control: Git + GitHub&lt;/p&gt;

&lt;p&gt;Frontend: React&lt;/p&gt;

&lt;p&gt;Deployment:&lt;/p&gt;

&lt;p&gt;Backend: render.com&lt;/p&gt;

&lt;p&gt;Frontend: vercel.com&lt;/p&gt;

&lt;p&gt;👥 1. User Registration and Roles&lt;br&gt;
Users can register as one of the following:&lt;/p&gt;

&lt;p&gt;Patient&lt;/p&gt;

&lt;p&gt;Doctor&lt;/p&gt;

&lt;p&gt;Admin (limited to only 2 per clinic)&lt;/p&gt;

&lt;p&gt;All newly registered users are set to inactive by default. They must be activated by an admin for security purposes.&lt;/p&gt;

&lt;p&gt;National ID is the primary login credential and also used to uniquely identify users in the system.&lt;/p&gt;

&lt;p&gt;Upon activation:&lt;/p&gt;

&lt;p&gt;A PatientProfile, DoctorProfile, or AdminProfile is automatically created based on the selected role.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Margarita11@gmail.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"full_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Ruben Hoppe Iv"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"national_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"858523627"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"phone_number"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2547858523627"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"role"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"patient"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"profile_pic"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://shorturl.at/cA9tj"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"doctor_profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="nl"&gt;"patient_profile"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"age"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
                &lt;/span&gt;&lt;span class="nl"&gt;"medical_history"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="w"&gt;
            &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔐 2. Authentication &amp;amp; Access Control&lt;br&gt;
JWT authentication is implemented using SimpleJWT.&lt;/p&gt;

&lt;p&gt;The access token is valid for 1 hour, and the refresh token lasts 1 day.&lt;/p&gt;

&lt;p&gt;The token payload includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;email
role
exp &lt;span class="o"&gt;(&lt;/span&gt;expiry&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can access the user's role directly via: &lt;code&gt;request.user.role&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Role-based permissions:&lt;/p&gt;

&lt;p&gt;Doctors: Can update availability, view/cancel appointments, and view all patients.&lt;/p&gt;

&lt;p&gt;Patients: Can schedule, view, and cancel appointments. Also able to browse all doctors for booking.&lt;/p&gt;

&lt;p&gt;Admins: Can activate/deactivate users and manage system settings.&lt;/p&gt;

&lt;p&gt;📆 3. Appointment Booking&lt;br&gt;
Patients can book appointments using a selected doctor, date (calendar input), and time (24-hour format).&lt;br&gt;
The system performs several checks before confirming:&lt;/p&gt;

&lt;p&gt;Is the doctor available?&lt;/p&gt;

&lt;p&gt;Is the appointment time in the future?&lt;/p&gt;

&lt;p&gt;If both are valid, an appointment is created with the status scheduled.&lt;/p&gt;

&lt;p&gt;⚙️ 4. Doctor Availability&lt;br&gt;
Doctors can toggle their availability status (True/False).&lt;/p&gt;

&lt;p&gt;Patients can only book appointments with available doctors.&lt;/p&gt;

&lt;p&gt;If a doctor is marked as unavailable, they will not receive new bookings.&lt;/p&gt;

&lt;p&gt;📋 5. Appointment Management&lt;br&gt;
🧑 Patient Actions:&lt;br&gt;
View upcoming and past appointments.&lt;/p&gt;

&lt;p&gt;Cancel appointments before the scheduled time.&lt;/p&gt;

&lt;p&gt;👨‍⚕️ Doctor Actions:&lt;br&gt;
View all appointments where they are assigned.&lt;/p&gt;

&lt;p&gt;Mark appointments as completed when done.&lt;/p&gt;

&lt;p&gt;Example appointment response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"success"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"appointment_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2025-08-23"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"appointment_time"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"08:00:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"scheduled"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"created_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2025-07-28T17:26:29.745662+03:00"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"patient"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"doctor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🧑‍💼 6. Admin Controls&lt;br&gt;
The system allows only one or two admins (enforced via the AdminProfile model).&lt;/p&gt;

&lt;p&gt;Admins can:&lt;/p&gt;

&lt;p&gt;Activate or deactivate user accounts.&lt;/p&gt;

&lt;p&gt;Manage clinic-wide settings (e.g., appointing doctors, enforcing limits).&lt;/p&gt;

&lt;p&gt;View system activity logs (future enhancement).&lt;/p&gt;

&lt;p&gt;🔒 7. Security &amp;amp; Validation&lt;br&gt;
DRF permissions restrict access based on user roles.&lt;/p&gt;

&lt;p&gt;Key validations include:&lt;/p&gt;

&lt;p&gt;Preventing bookings in the past.&lt;/p&gt;

&lt;p&gt;Ensuring doctor availability before assigning appointments.&lt;/p&gt;

&lt;p&gt;Enforcing unique constraints on National ID, email, and phone number.&lt;/p&gt;

&lt;p&gt;📦 Links&lt;br&gt;
🧑‍💻 GitHub: github.com/Boonerd/healthcare-appointment-system&lt;br&gt;
Postman testing: &lt;a href="https://www.postman.com/wathika/workspace/healthcare-system-appointment/collection/34083824-b0f81078-d6c9-4172-a254-106883c2c60b?action=share&amp;amp;creator=34083824" rel="noopener noreferrer"&gt;https://www.postman.com/wathika/workspace/healthcare-system-appointment/collection/34083824-b0f81078-d6c9-4172-a254-106883c2c60b?action=share&amp;amp;creator=34083824&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>UNI NOTES PROJECT: A Collaborative Platform for Sharing School Notes</title>
      <dc:creator>wathika</dc:creator>
      <pubDate>Tue, 17 Sep 2024 15:53:31 +0000</pubDate>
      <link>https://dev.to/wathikaeng/introducing-the-uni-notes-project-a-platform-for-sharing-school-notes-257k</link>
      <guid>https://dev.to/wathikaeng/introducing-the-uni-notes-project-a-platform-for-sharing-school-notes-257k</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcoerkdbb6n4n7j1tirdk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcoerkdbb6n4n7j1tirdk.png" alt="Image description" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Defining the Purpose of UNI NOTES PROJECT&lt;/strong&gt;&lt;br&gt;
The UNI NOTES PROJECT is a web platform designed to help students share, view, and download school notes seamlessly. Whether you missed a class or are looking for study materials, this project makes it easy to collaborate and access notes. With features like search and commenting, it fosters a more interactive and supportive learning environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Team Members and Roles&lt;/strong&gt;&lt;br&gt;
This project was a solo endeavour. As the sole developer, I was responsible for everything, from design and development to deployment and maintenance. The project took roughly two months, broken into weekly sprints focused on specific features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Who Was UNI NOTES PROJECT Created For?&lt;/strong&gt;&lt;br&gt;
This platform is aimed at students, primarily those in higher education, looking for an efficient way to exchange study materials. Teachers and educators can also use the platform to distribute supplementary notes and encourage collaboration among students.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Personal Focus and Challenges&lt;/strong&gt;&lt;br&gt;
My focus was on building a platform that was simple to use, while ensuring it could handle scalable traffic and secure data management. The engineering challenge was in balancing the load between multiple servers to ensure smooth performance, while also focusing on user interface and experience with React and Flask.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why I Chose This Project: A Personal Story&lt;/strong&gt;&lt;br&gt;
I’ve always believed in the power of collaboration when it comes to learning. Back in high school, I wasn’t the best at taking notes. My classmates, however, excelled at this. I vividly remember how we used to share photocopies of notes to help each other study for exams. I benefited tremendously from this collaboration, and it gave me the idea to recreate a modern version of that experience through the web.&lt;/p&gt;

&lt;p&gt;After university, I noticed the same thing: students struggled to catch up when they missed classes or needed better notes. This inspired me to create the UNI NOTES PROJECT to ensure no student feels left behind due to a lack of access to materials. This project allows students from anywhere, regardless of geography or background, to benefit from shared resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary of the Project’s Accomplishments&lt;/strong&gt;&lt;br&gt;
&lt;u&gt;UNI NOTES PROJECT&lt;/u&gt; was successfully deployed and includes essential features for note sharing and access:&lt;/p&gt;

&lt;p&gt;Core Features: Upload, view, and download notes.&lt;br&gt;
Search Functionality: Users can search for notes based on keywords or tags.&lt;br&gt;
Scalability: Load balancing with Nginx ensures smooth performance even under heavy load.&lt;br&gt;
Below is the architecture diagram that illustrates how data flows through the application:&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Frontend:&lt;/u&gt; Built with React, using Axios for API communication.&lt;br&gt;
&lt;u&gt;Backend: &lt;/u&gt;Powered by Flask, interacting with a MySQL database.&lt;br&gt;
Nginx: Handles load balancing to ensure traffic is evenly distributed across multiple servers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Features Completed:&lt;/strong&gt;&lt;br&gt;
User Authentication: Only authorized users can upload or download notes.&lt;br&gt;
Responsive Design: The platform is mobile-friendly, allowing access from any device.&lt;br&gt;
Search and Commenting: Facilitates interaction and makes it easy to find specific notes.&lt;br&gt;
Most Difficult Technical Challenge&lt;br&gt;
One of the biggest technical hurdles I faced was optimizing database performance as the platform scale. Here’s how I tackled it:&lt;/p&gt;

&lt;p&gt;Situation: When the application started handling a higher volume of users, I noticed that database queries were slowing down the entire system.&lt;br&gt;
Task: I needed to optimize the MySQL database to ensure efficient queries while maintaining data integrity.&lt;br&gt;
Action: After researching various optimization techniques, I decided to index the most frequently queried fields (like tags and titles) and rewrite several SQL queries for efficiency. I also implemented database connection pooling to manage concurrent connections more effectively.&lt;br&gt;
Result: These optimizations significantly improved query speed and reduced server response time, even under heavy load. The system now handles traffic more gracefully without slowing down or crashing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I’ve Learned&lt;/strong&gt;&lt;br&gt;
This project taught me a lot about building and scaling a full-stack application. Here are some key takeaways:&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Technical Lessons:&lt;/u&gt; Proper indexing and query optimization are crucial for database performance. Also, handling load balancing with Nginx has given me insights into scaling web applications for higher traffic.&lt;br&gt;
&lt;u&gt;What I’d Do Differently:&lt;/u&gt; I would spend more time initially planning database architecture. A well-optimized database schema can save a lot of headaches later on.&lt;br&gt;
Self-Discovery: I learned that I thrive under challenges that require both deep technical problem-solving and creative design. Working solo on such a comprehensive project gave me confidence in my ability to manage all aspects of development.&lt;br&gt;
About Me&lt;br&gt;
I’m a full-stack developer with a passion for building platforms that promote collaboration and learning. With experience in Flask, React, and MySQL, I focus on creating scalable, secure applications. You can find more of my work and connect with me through the following links:&lt;/p&gt;

&lt;p&gt;GitHub Repository for UNI NOTES PROJECT&lt;br&gt;
&lt;a href="https://github.com/wathika-eng/classnotes" rel="noopener noreferrer"&gt;https://github.com/wathika-eng/classnotes&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading about the UNI NOTES PROJECT! I look forward to hearing your thoughts and feedback.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Python phase 3 moringa revamp</title>
      <dc:creator>wathika</dc:creator>
      <pubDate>Fri, 14 Jun 2024 20:02:45 +0000</pubDate>
      <link>https://dev.to/wathikaeng/python-phase-3-moringa-revamp-3e12</link>
      <guid>https://dev.to/wathikaeng/python-phase-3-moringa-revamp-3e12</guid>
      <description>&lt;p&gt;What I've Learned in Four Weeks: From Python Basics to SQLAlchemy&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Introduction&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Over the past four weeks, I've embarked on an exciting journey to master Python programming. Starting from the basics, I gradually delved into more advanced topics, culminating in the use of SQLAlchemy for database interactions. In this blog post, I will share my learning journey, highlighting key concepts and showcasing some code samples to illustrate what I've learned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Week 1: Getting Started with Python&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
My journey began with the fundamentals of Python. During this week, I focused on understanding the syntax and basic constructs of the language.&lt;/p&gt;

&lt;p&gt;Key Concepts&lt;br&gt;
Variables and Data Types: I learned about different data types such as integers, floats, strings, and booleans.&lt;br&gt;
Control Structures: I explored if-else statements, for and while loops, and how to use them to control the flow of my programs.&lt;br&gt;
Functions: I understood the importance of functions for code reusability and modularity.&lt;br&gt;
Code Sample: Basic Python&lt;/p&gt;

&lt;p&gt;`def greet(name):&lt;br&gt;
    return f"Hello, {name}!"&lt;/p&gt;

&lt;p&gt;print(greet("World"))`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Week 2: Data Structures and Libraries&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
In the second week, I focused on Python's built-in data structures and some essential libraries.&lt;/p&gt;

&lt;p&gt;Key Concepts&lt;br&gt;
Lists, Tuples, and Dictionaries: I learned how to store and manipulate collections of data.&lt;br&gt;
List Comprehensions: I discovered a concise way to create lists.&lt;br&gt;
Libraries: I got introduced to libraries like math and datetime.&lt;br&gt;
Code Sample: List Comprehensions&lt;/p&gt;

&lt;p&gt;&lt;code&gt;squares = [x**2 for x in range(10)]&lt;br&gt;
print(squares)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Week 3: Object-Oriented Programming (OOP)&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
The third week was dedicated to understanding the principles of object-oriented programming in Python.&lt;/p&gt;

&lt;p&gt;Key Concepts&lt;br&gt;
Classes and Objects: I learned how to define classes and create objects.&lt;br&gt;
Inheritance: I explored how to inherit attributes and methods from other classes.&lt;br&gt;
Polymorphism and Encapsulation: I understood how to design flexible and reusable code.&lt;br&gt;
Code Sample: OOP in Python&lt;/p&gt;

&lt;p&gt;`class Animal:&lt;br&gt;
    def &lt;strong&gt;init&lt;/strong&gt;(self, name):&lt;br&gt;
        self.name = name&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def speak(self):
    raise NotImplementedError("Subclasses must implement this method")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;class Dog(Animal):&lt;br&gt;
    def speak(self):&lt;br&gt;
        return f"{self.name} says Woof!"&lt;/p&gt;

&lt;p&gt;dog = Dog("Buddy")&lt;br&gt;
print(dog.speak())`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Week 4: Working with Databases using SQLAlchemy&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
In the final week, I delved into SQLAlchemy, a powerful ORM (Object-Relational Mapping) library for Python, which allowed me to interact with databases seamlessly.&lt;/p&gt;

&lt;p&gt;Key Concepts&lt;br&gt;
Engine and Sessions: I learned how to set up the engine and create sessions to interact with the database.&lt;br&gt;
Models and Schemas: I explored how to define models and map them to database tables.&lt;br&gt;
CRUD Operations: I practised performing Create, Read, Update, and Delete operations using SQLAlchemy.&lt;/p&gt;

&lt;p&gt;Code Sample: SQLAlchemy Basics&lt;/p&gt;

&lt;p&gt;&lt;code&gt;from sqlalchemy import create_engine, Column, Integer, String&lt;br&gt;
from sqlalchemy.ext.declarative import declarative_base&lt;br&gt;
from sqlalchemy.orm import sessionmaker&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Create an engine
&lt;/h1&gt;

&lt;p&gt;engine = create_engine('sqlite:///example.db', echo=True)&lt;/p&gt;

&lt;h1&gt;
  
  
  Define a base class for declarative class definitions
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;Base = declarative_base()&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Define a model
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;class User(Base):&lt;br&gt;
    __tablename__ = 'users'&lt;br&gt;
    id = Column(Integer, primary_key=True)&lt;br&gt;
    name = Column(String)&lt;br&gt;
    age = Column(Integer)&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Create the table
&lt;/h1&gt;

&lt;p&gt;Base.metadata.create_all(engine)&lt;/p&gt;

&lt;h1&gt;
  
  
  Create a new session
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;Session = sessionmaker(bind=engine)&lt;br&gt;
session = Session()&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Add a new user
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;new_user = User(name='Alice', age=30)&lt;br&gt;
session.add(new_user)&lt;br&gt;
session.commit()&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Query the database
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;users = session.query(User).all()&lt;br&gt;
for user in users:&lt;br&gt;
    print(user.name, user.age)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
The past four weeks have been incredibly rewarding. Starting from the basics of Python, progressing through data structures and OOP, and finally mastering SQLAlchemy has equipped me with a solid foundation for future projects. Each step has been a building block, and I am excited to continue expanding my knowledge and applying these skills to real-world applications.&lt;/p&gt;

&lt;p&gt;If you're just starting with Python, I encourage you to take it one step at a time and enjoy the learning process. Happy coding!&lt;/p&gt;

</description>
      <category>python</category>
      <category>backenddevelopment</category>
      <category>dsa</category>
      <category>learning</category>
    </item>
  </channel>
</rss>
