Yusuf Akdoğan Self Introduction - bounswe/bounswe2025group2 GitHub Wiki

About Me

Profile Picture

Yusuf Akdoğan

🎓 Computer Engineering Student at Boğaziçi University
💻 Programming Languages: C, C++, Java, Python, GNU Assembly
Technology I Use Most Frequently: Java
🌐 Current Interest: Web Development

📬 Contact Me

LinkedIn
GitHub

📧 Email: [email protected]

Hobbies & Interests

🎮 Playing games
📖 Reading web novels and webtoons
📺 Watching anime

Weekly Efforts

Week 1 (13/02/25 - 20/02/25)
Task Duration Issues
Adding an introduction wiki page 30 minutes #7
Increasing familiarity with markdown 1 hour #7
Research about git and github 1 hour #18
Creating some parts of an introduction to github page 3 hours #18
Reviewing Issues 1.5 hours #13, #19, #23

Attended meetings

Week 2 (20/02/25 - 27/02/25)
Task Duration Issues
Creating Use Case Scenaro about User Registiration 2 hours #33
Reviewing Issues 30 minutes #32
Adding Some Elicitation Questions 15 minutes elicitation questions discussion page

Attended meetings

Week 3 (27/02/25 - 06/03/25)
Task Duration Issues
Scenario about Leaderboard and Goals 1 hour #34
Reviewing Issues 30 minutes #36

Attended meetings

Week 4 (06/03/25 - 13/03/25)
Task Duration Issues
Reviewing Issues 1 hour #53, #50

Attended meetings

Week 5 (13/03/25 - 20/03/25)
Task Duration Issues
Making a Sequance Diagram about User Registration and Login 3 hours #61
Reviewing the issues 30 minutes #67, #78

Attended meetings

Week 6 (20/03/25 - 27/03/25)
Task Duration Issues
Adding the weekly efforts 2 hours #76
Reviewing Issues 30 minutes #71
Week 7 (27/03/25 - 03/04/25)
Task Duration Issues
Updated user scenarios 5 and 6 1 hour #77
Created mockups for registration and leaderboard 4 hours #88
Week 8 (03/04/25 - 11/04/25)
Task Duration Issues
Backend and Django Research 6 hours No issue opened
  • From now on the meetings will be done on saturdays so will weekly reports end
  • Meeting 11
Week 9 (11/04/25 - 19/04/25)
Task Duration Issues
Updating Sequence Diagram Based On Class Diagram Changes 1 hour #105
Backend implementation for notifications 6 hours #110
Week 10 (19/04/25 - 26/04/25)
Task Duration Issues / PRs
Reviewed meeting notes 12 10 minutes #130
Added backend meeting notes 2 30 minutes #131
Backend implementation for profile API 7 hours #147
Pull Request for profile API 30 minutes #153
Reviewing issues and PRs 1 hour #132, #152
Week 11 (26/04/25 - 03/05/25)
Task Duration Issues / PRs
Backend implementation for Comments and Subcomments 7 hours #169
Pull Request for Comments and Subcomments 30 minutes #172
Reviewing issues and PRs 4 hours #166, #170, #145, #164, #175
Week 12 (03/05/25 - 10/05/25)
Task Duration Issues / PRs
Weekly effort tables update 1 hour #199
Profile Settings backend implementation 5 hours #148
Reviewing issues and PRs after Profile Settings 1 hour #issue-206, #corresponding-pr-207
Week 13 (10/05/25 - 14/05/25)
Task Duration Issues / PRs
Implement Challenges in backend 6 hours #198
Adding Notifications for comments and subcomments 2 hours #229-249
Implement Mentor logic in backend 7 hours #245
Checked requirements 3 hours #274
Reviewing issues and PRs 3 hours #214, #200, #197, #227, #232, #233, #195
External API Doc

Geocoding Integration in Challenge

Purpose

As part of the project requirement to integrate an external API, I chose to use Nominatim’s Geocoding API (by OpenStreetMap). The goal was to automatically resolve user-provided location names into geographic coordinates (latitude and longitude), which are used to tag challenges with a specific physical location.


Utility Function: geocode_location

def geocode_location(query):
    url = "https://nominatim.openstreetmap.org/search"
    params = {
        "q": query,
        "format": "json",
        "limit": 1,
    }
    headers = {
        "User-Agent": "ChallengeApp/1.0 ([email protected])"
    }

    try:
        response = requests.get(url, params=params, headers=headers)
        response.raise_for_status()
        data = response.json()
        if data:
            return float(data[0]["lat"]), float(data[0]["lon"])
    except:
        return None, None
  • Input: A location query string (e.g., "İstanbul, Sarıyer, Boğaziçi University").
  • Output: A tuple of (latitude, longitude) if found, otherwise (None, None).
  • API Used: Nominatim OpenStreetMap API.
  • Reason for Custom Header: To comply with Nominatim usage policy which requires a valid user-agent string.

Usage in ChallengeSerializer

class ChallengeSerializer(serializers.ModelSerializer):
    is_active = serializers.SerializerMethodField()

    class Meta:
        model = Challenge
        fields = '__all__'
        read_only_fields = ['coach', 'created_at', 'is_active']

    def get_is_active(self, obj):
        return obj.is_active()

    def create(self, validated_data):
        ...
        location = validated_data.get('location')
        if (not validated_data.get('latitude') or not validated_data.get('longitude')) and location:
            lat, lon = geocode_location(location)
            validated_data['latitude'] = lat
            validated_data['longitude'] = lon
        return super().create(validated_data)

    def update(self, instance, validated_data):
        ...
        location = validated_data.get('location', instance.location)
        lat = validated_data.get('latitude', instance.latitude)
        lon = validated_data.get('longitude', instance.longitude)
        if (lat is None or lon is None) and location:
            lat, lon = geocode_location(location)
            validated_data['latitude'] = lat
            validated_data['longitude'] = lon
        return super().update(instance, validated_data)
  • When creating or updating a challenge, if the user provides a location name but no latitude or longitude:

    • The system calls geocode_location() to fetch the coordinates automatically.
    • This ensures that all location-tagged challenges are geospatially consistent even if the user only provides a place name.

Benefits

  • Improved user experience: Users can simply type a location name instead of looking up coordinates.
  • Reliable location tagging: Ensures coordinates are consistently derived from the same geocoding service.
  • API usage: Fulfills the requirement to integrate and utilize an external API in the project.
⚠️ **GitHub.com Fallback** ⚠️