DEV Community

Cover image for Tublian Internship Diaries: A Look Back at Week 3 in Open Source
Lymah
Lymah

Posted on

Tublian Internship Diaries: A Look Back at Week 3 in Open Source

Introduction

Greetings, Fantastic Readers!

I wanted to take a moment to share my journey after completing the third week in the Tublian Open-Source Internships for Software Engineers. It was, to say the least, a rollercoaster of experiences!

The repository I focused on during the third week of my Tublian internship is dedicated to developing a robust web client for OpenEdu. Powered by the dynamic combination of NEXTJS and TailWindCSS, this project aims to elevate the user experience and functionality of OpenEdu's online platform. Feel free to explore the repository for a firsthand look at the exciting developments and improvements made during this productive week!

Navigating Challenges in Task Assignment: A Tale of My Third Week

Frustrating movement of a programmer

I encountered a significant hurdle during my third week as I struggled to find issues (tasks) to work on. To compound matters, I even submitted a pull request (PR) for an issue I thought was unclaimed, only to be informed that someone had previously commented on the issue, thereby assigning it to them. Despite seeking approval before submitting the PR, the task had already been unofficially claimed.

Moreover, some repositories appeared inactive, adding another layer of complexity to my search for suitable tasks. The fear of submitting a PR that might not get reviewed further intensified my frustration. In the end, it took approximately five days before I could secure a repository to contribute to. While the experience was undeniably challenging, I persevered and eventually overcame these obstacles.

I want to extend a Big shoutout to @geoffreylgv and the Tublian team for their invaluable assistance in helping me navigate the challenges of finding tasks to work on and learn from. Their guidance and support played a pivotal role in overcoming obstacles during my journey, and I am truly grateful for their generosity and expertise. Thank you, @geoffreylgv, for coming through for me in week three!

Week 3 Contribution: Code Refactoring for Enhanced Readability

During the third week of my contributions, I focused on refactoring the code to improve its readability and maintainability. Here's the refactored code:
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'http',
hostname: 'localhost',
port: '4000',
pathname: '/i/**',
},
{
hostname:
${process.env.NEXT_PUBLIC_SERVER_URL}`,
pathname: '/i/',
},
{
hostname: 'avatars.githubusercontent.com',
pathname: '/u/
',
},
{
hostname: 'ai-res-server-development.onrender.com',
pathname: '/i/**',
}
],
}
}

module.exports = nextConfig
`

Challenges Faced

In my blog post detailing the challenges encountered during my third week, one significant hurdle was the syntax error I faced while running the build process for the client project. The error stemmed from attempting to use ES module syntax in the next.config.js file, leading to an unexpected token 'export' during compilation.

The specific error message read:

`C:\Users\user\WebClient-OpenEdu\next.config.js:27
export default nextConfig;
^^^^^^

SyntaxError: Unexpected token 'export'

To overcome this challenge, I had to transition from ES module syntax to CommonJS in the
next.config.js file.` The correction involved changing the line:
[The error](
The comment from the reviewer

)
export default nextConfig;

to:

module.exports = nextConfig;

export default error

This adjustment resolved the syntax error, allowing the build process to proceed successfully.

Additionally, I ensured that the entire codebase, including the package.json file, adhered to CommonJS syntax. If the "type": "module" setting was present in the package.json, I removed it, as CommonJS is the default module system for Node.js.

Documenting this challenge is essential, as it highlights the importance of aligning module syntax consistently within a project, especially when dealing with tools like Next.js. It also showcases the problem-solving process and the critical role of clear communication within a development team.

Other Challenges Faced During the Journey

  1. Task Discovery Struggles:
    Navigating through the available tasks proved challenging as I initially encountered difficulties in identifying suitable issues to work on. The process of finding tasks that aligned with my skills and interests took more time than anticipated.

  2. PR Submission Hurdles :
    Submitting pull requests (PRs) posed its own set of challenges. There were instances where I submitted a PR only to discover that someone had already expressed interest in the task by commenting on the related issue. This created confusion and required additional coordination.

  3. Inactive Repositories:
    Some repositories appeared to be inactive, making it challenging to assess the responsiveness of maintainers and the likelihood of my contributions being reviewed. This uncertainty added an extra layer of complexity to the selection process.

  4. Initial Frustration with PR Merges:
    Experiencing PRs not getting merged, despite targeting what I considered to be low-hanging fruit tasks, initially led to frustration. Understanding the dynamics of task assignment and coordination became a crucial aspect of my learning curve.

  5. Extended Search Duration:
    The process of finding a repository to contribute to took longer than expected, extending to approximately five days. This delay was due to a combination of task discovery challenges and repository responsiveness concerns.

Despite these challenges, the experience served as a valuable learning opportunity. It prompted me to refine my approach to task selection, communication, and overall contribution strategy within the Open Source environment.

Ecstatic Achievements: The PR Successfully Merged!

I am thrilled to share the joyous news that the pull request (PR) I worked on has been successfully merged! Experiencing these "over the moon" moments is incredibly rewarding, and it highlights the culmination of hard work, dedication, and collaboration. Grateful for the opportunity and excited for more contributions ahead!

[Maintainer approved the work](
The contribution got approved

)

[The moment the PR got merged!](
The PR got merged.

)

In conclusion, the third week of my Tublian Open-Source Internship was a dynamic journey marked by both triumphs and challenges. Navigating through the intricacies of contributing to open-source projects provided invaluable insights into the collaborative nature of software development. Here are key takeaways from this week's experiences:

Triumphs

  • Successful PR Merges: Celebrating the successful merging of a pull request was undoubtedly a highlight. Witnessing contributions become a part of the project was not only gratifying but also a testament to the collaborative spirit within open-source communities.
  • Code Refactoring: Engaging in code refactoring efforts contributed to the enhancement of code readability and maintainability. This emphasized the importance of continuous improvement in the development process.
  • Community Support: Expressing gratitude for the support received from @geoffreylgv and Tublian channels on Discord in navigating challenges highlighted the community's role in fostering a positive and helpful environment.

Challenges

Task Discovery Struggles: The initial difficulty in finding suitable tasks posed a notable challenge. The search for meaningful contributions required time and persistence.

PR Submission Hurdles: Issues related to Pull Request submissions, especially when tasks were unofficially claimed, underscored the importance of effective communication and coordination.

Module Syntax Error: Facing a syntax error during the build process due to inconsistent module syntax in the next.config.js file highlighted the significance of code consistency and adherence to project guidelines.

Key Learnings

  • Adaptability: Adapting to unexpected challenges and learning from them is a crucial aspect of the open-source journey.
  • Effective Communication: Clear communication, whether in seeking tasks or coordinating with other contributors, emerged as a vital factor in successful collaboration.
  • Consistency Matters: Maintaining consistency in code structure and adhering to project conventions play pivotal roles in the smooth integration of contributions.

As I reflect on the highs and lows of the week, I am reminded that each challenge is an opportunity for growth. The journey through open source is not just about writing code; it's about fostering a sense of community, continuous improvement, and a commitment to the collective progress of the projects we contribute to. Moving forward, these experiences will undoubtedly shape my approach to future contributions and further enrich my understanding of the open-source ecosystem.

Thank you for taking the time to delve into my blog post; your attention is incredibly valued! If you enjoyed the journey, a reaction would mean the world to me. Share your thoughts and insights with a comment đź’¬, and let's continue this conversation.

Connect with me on GithHub, Medium, Twitter, and LinkedIn for the latest updates and to stay in the loop on upcoming ventures. Let's make this journey together an ongoing exploration into the vast realms of discovery.

Hold up, if you haven't seen week one and week two of this series.

Stay tuned for more insights from the Tublian internship saga!

If you want to get started with your open-source journey, check out this OpenSauced intro course.

Once again, thank you for being a part of this exciting dawn of discovery!

Top comments (2)

Collapse
 
geoffreylgv profile image
Geoffrey Logovi

Great job @lymah and congratulations; always a pleasure assisting and working with you.

Collapse
 
lymah profile image
Lymah

Thank you, Jeffrey.