My Journey to Mastery - Backend

Hello, my name is Mary Mutuku. I am in my final month as a Software Engineering student at ALX with a keen interest in solving complex problems. My journey in tech started a few years ago and it has been a challenging one but a highly rewarding one in matters, growth. This post is to share a recent backend challenge I faced and how I overcame it. I would also want to use this post to share my excitement for the HNG internship.

Why HNG Internship?

The HNG Internship is a fantastic opportunity for budding developers like me to learn, grow, and network with industry professionals. The program offers a structured environment to enhance my skills and tackle real-world projects. I'm eager to dive into this journey, learn from the best, and contribute to exciting projects.


Backend Challenge

Recently, as my final project at ALX, I have been working on an assessment and revision platform. The challenge here was to create a robust system for tutors to set tests, and students to do the tests, where answers would be evaluated and detailed analytics provided for both the student and the tutor.

  1. Research :

    Inorder to build a platform that is scalable, secure, and efficient, I delved into research where I analyzed similar existing platforms focusing on the best practices for handling data and ensuring security.

  2. Planning:

    I created a detailed plan outlining the systems architecture, data flow, and key functionalities such as user authentication, user management, test and assessments, user-result management, and tutor-test management.

  3. Implementation:

    Database - Designed and normalized a database schema to handle users, tests, test categories, questions, and user-test results using postgreSQL.

    Authentication - I implemented a JWT-based authentication using Django and simple JWT to secure user sessions and protect sensitive data.

    Concurrency Handling - Utilized Django channels to manage real-time interactions and WebSocket connections, this ensured smooth handling of concurrent users.

    Efficient Data Processing - Used Celery for background tasks such as evaluating large volumes of assessment responses asynchronously.

    Sample Code

# models.py
from django.db import models
from django.contrib.auth.models import User

class Test(models.Model):
    title = models.CharField(max_length=255)
    created_by = models.ForeignKey(User, on_delete=models.CASCADE)
    created_at = models.DateTimeField(auto_now_add=True)

class Question(models.Model):
    test = models.ForeignKey(Test, related_name='questions', on_delete=models.CASCADE)
    text = models.TextField()

class PossibleAnswer(models.Model):
    question = models.ForeignKey(Question, related_name='possible_answers', on_delete=models.CASCADE)
    text = models.CharField(max_length=255)
    is_correct = models.BooleanField(default=False)

class Response(models.Model):
    question = models.ForeignKey(Question, related_name='responses', on_delete=models.CASCADE)
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    selected_answer = models.ForeignKey(PossibleAnswer, on_delete=models.CASCADE)
    submitted_at = models.DateTimeField(auto_now_add=True)
  1. Challenges

    My greatest challenge was designing the database especially the questions and possible answers schema. I had to ensure that the relationships between tests, questions, possible answers, and responses were accurately represented.

This experience taught me invaluable lessons about designing scalable systems, the importance of security in handling user data, and the benefits of asynchronous processing.

Solving this backend challenge was a rewarding experience, and I'm excited to continue learning and growing through the HNG Internship. I encourage everyone to check out the HNG Internship and HNG Hire pages to learn more about this fantastic program.

Thank you for reading, and I look forward to sharing more of my journey with you!

0
Subscribe to my newsletter

Read articles from Mary Nzembi Mutuku directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Mary Nzembi Mutuku
Mary Nzembi Mutuku