teleren/devto huggingface dataset:
Placeholder Maintainer
Tags: hack23maintainer
Published: 2023-10-31 21:26:50

## My First Hacktoberfest Journey

### Intro
This was my first time participating in Hacktoberfest, and it was an incredible experience. As a Bachelor of Software Engineering student at The Open University of Sri Lanka, I was eager to dive into the world of open source and contribute to various projects. You can find me on [LinkedIn](https://www.linkedin.com/in/mnfriham) if you'd like to connect.
 {% embed https://github.com/rihamnazeer/ %}

### Project
During Hacktoberfest, I hosted a repository that aimed to provide a platform for beginners to make their first contributions to open source. The goal was to create a welcoming and educational environment where newcomers could learn about the contribution process and gain practical experience. You can check out the repository {% embed https://github.com/rihamnazeer/Pearl-Of-The-Indian-Ocean.git %}.

To ensure a smooth process for reviewing and merging pull requests, I set up clear guidelines for contributions, documented the project's structure, and established a systematic review process. I wanted to make it as easy as possible for first-time contributors to get involved and understand the open-source ecosystem.

## Highs and Lows
One of the biggest highs of this Hacktoberfest was seeing newcomers make their very first pull requests. It was a rewarding experience to guide them through the process and witness their excitement when their contributions were accepted. These were truly light-bulb moments, as they showcased the power of open source to educate and empower individuals.

However, there were challenges along the way. Some contributors encountered issues that seemed impossible to fix, often due to inexperience with Git or the project's codebase. In these cases, I adapted by providing detailed feedback, conducting code reviews, and offering mentorship to help contributors overcome obstacles. It was a valuable learning experience for both me and the contributors.

### Growth
Before Hacktoberfest 2023, my skill set was primarily focused on web development, including HTML, CSS, JavaScript, and frameworks like React. However, during this Hacktoberfest, I had the opportunity to work with a wide range of technologies, from Dart and Java to Python and Ruby. This diversity of languages and technologies broadened my knowledge and improved my problem-solving skills.

As a result of hosting a project and assisting newcomers, my project goals have evolved. I am now more committed to creating a welcoming space for beginners in open source and providing them with the guidance they need to become successful contributors. This experience has reinforced my belief in the importance of inclusivity in open source and mentorship for those just starting their journey in software development.

In conclusion, my first Hacktoberfest was an enriching experience that not only allowed me to expand my skills but also reinforced my commitment to fostering a supportive and educational environment in open source. I'm excited to continue this journey and help others get started in the world of open source.
Ditch Your VPN Subscription: Create Your Own Pay-As-You-Go VPN on GCP in Minutes!
Tags: terraform, devops, cloud, gcp
Published: 2023-10-31 21:21:36

## Introduction

This guide walks you through the process of setting up a Virtual Private Server (VPS) with OpenVPN on Google Cloud Platform (GCP) using Terraform. Unlike traditional VPN services like NordVPN that require a monthly subscription, this setup allows you to pay only for the minutes you actually use. Plus, you can easily tear down and spin up your VPN server as needed, offering unparalleled flexibility.

## Why Choose This Approach?

- **No Monthly Subscription**: Only pay for what you use, down to the minute.
- **Quick Setup and Teardown**: Easily spin up or tear down your VPN server whenever you need it.
- **Full Control**: You have complete control over the server, its security settings, and its location.

## Pre-requisites

- Terraform installed on your machine.
- A Google Cloud Platform (GCP) account with necessary permissions to create resources.
- Git (Optional, for cloning the repository)

## Step 1: Clone the Repository

First, clone the repository containing the Terraform scripts.

```bash
git clone https://github.com/kwisser/create-cloud-compute-engine-ovpn-server
cd create-cloud-compute-engine-ovpn-server/infrastructure
```

## Step 2: Choose a Zone for Your VPN Location

Select a suitable zone for deploying the VM instance. The choice of zone can affect the latency and speed of your VPN. You can find a list of available regions and zones on [GCP here](https://cloud.google.com/compute/docs/regions-zones).

## Step 3: Execute Terraform Scripts

Navigate to the `infrastructure` directory and initialize Terraform. This will download the necessary provider plugins.

```bash
cd infrastructure
terraform init
```

Now, plan and apply the Terraform configuration. This will show the resources that will be created and apply the changes, respectively. You will have to enter the following variables:

- `project_id`: Your GCP project ID
- `name`: Name of your VM instance
- `machine_type`: Machine type (e.g., `f1-micro`)
- `zone`: Zone (e.g., `us-central1-a`)
- `vm_username`: Your username

```bash
terraform plan
terraform apply
```

Upon successful execution, a `client.ovpn` file will be generated in the user directory. This file can be used to connect to the VPN server from a client machine.

## Credits

The OpenVPN installation script is sourced from [angristan/openvpn-install](https://github.com/angristan/openvpn-install).

## Support & Contributions

For issues or contributions, feel free to open a pull request or create an issue in the repository.

---

Enjoy the flexibility and cost-effectiveness of your own pay-as-you-go VPN server on GCP!

You can find the full code in the GitHub repository {% embed https://github.com/kwisser/create-cloud-compute-engine-ovpn-server %}.
Things that can make you feel bad as a developer
Tags: programming, healthydebate, php, beginners
Published: 2023-10-31 21:08:09

I may add to the title "but you should embrace it."

## Code legacy isn't bad. It's inevitable.

Indeed, even your brand new feature will be code legacy in a few months :)

Note that it does not mean you cannot update old code with new patterns, as long as it makes sense for the business.

## You will break things

I know what you're probably thinking. It's unlikely if you test your code correctly.

Untested code is considered as _pure evil_ by an extensive range of developers. 

Of course, you should test your code, but even with the best tools and several layers of automated tests and validations, unexpected bugs may still happen.

At the end of the day, you write your own tests.

IMHO, code quality means those bugs remain rare, and you're able to fix them quickly when it happens (e.g., rollback + hotfix).

In a nutshell, test your code, but don't get a false impression of safety.

## The comfort zone is _the dead zone_

What can go wrong?

You may fail at some point. OMG, and so what?

Remember, nobody cares. More seriously, most people won't blame you, except if you repeat the same mistakes again and again.

So fail, learn, succeed, repeat...

## You will love Stack Overflow

There are memes for that, and it's sometimes called SODD, which means "Stack Overflow Driven Development."

Of course, it's bad, especially if you copy/paste solutions without understanding what it does.

However, most beginners do that (and they're not the only ones). 

The good news is that it often works, as there are common issues and vendors in this industry. 

The bad news is that "non-contextualized" solutions can introduce unexpected bugs in your application.

## You have an ego

There are various threats to your mental health, starting with your own ego.

This one is very hard to catch, because you're probably humble, with a good mindset, but you still have an ego.

"Egoless" does not mean "no ego," like "serverless" does not mean there's no server behind the scene. You just don't see it.

Just admit it, and don't let it speak too loud or beat you up.

## You can learn everything for free, but buy some books

I'm definitely not saying nobody can learn this job without buying technical books.

Although, it's a great investment in my experience, as the quality is usually high.

## Survivor bias and magic formula

People are very different. There's no magic formula.

Most technical writers share their tips in the hope it will be useful for others. Nothing more.

Besides, this industry is constantly changing.
Creating a Movie Portal with AI: Using Laravel & Nuxt.js
Tags: ai, laravel, vue, api
Published: 2023-10-31 21:05:25

**W**elcome to this tutorial where we will be diving deep into the creation of a movie portal leveraging the power of AI. Using Laravel for the backend and Nuxt.js for the frontend, we'll craft an application that turns your story ideas into movie-centric data.

**App Preview on Youtube [too short video]**
[Preview](https://www.youtube.com/watch?v=R8wHCRn-vYA)

**Overview of the Movie Portal:**

**Frontend View:** The main feature is a form page. This page includes a textarea where you can type in your story / idea. Once submitted, an AI API will process this story.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ie5zit3pl5vque4n3kx.jpg)
_AI Form_

**AI's Response: The AI will generate:**
1. A movie title related to the story
2. A short description related to the story
3. AI Generate Image related to the story

**Data Storage**: The subsequent page will display the generated information. Upon a final submission, this data will be saved in the database, redirecting you to the movie portal's homepage. Like this


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6pdoi7lm47artk8sivmb.jpg)

**We'll divide our tutorial into the following tasks:**

[Creating the API # [Tutorial-1]](https://dev.to/kamruzzaman/building-a-movie-portal-api-with-laravel-using-the-service-pattern-35i3)
[Configure AI Prompt # [Tutorial-2]](https://dev.to/kamruzzaman/setting-up-ai-prompt-in-nuxtjs-16e6)
[Designing the UI # [Tutorial-3]](https://dev.to/kamruzzaman/laravel-api-integration-in-nuxtjs-b89)
[Setting up on an Linux Server # [Tutorial-4]](https://dev.to/kamruzzaman/deploy-a-nuxtjs-app-and-laravel-api-on-a-linux-server-54bh)

Let's embark on this exciting journey!
Purge a glue table from cli
Tags: aws, glue, dataops
Published: 2023-10-31 21:00:44


Sometimes you want to purge a glue table from s3 and delete all files and versions. Lately i had to do this often so i created this small script to do this.

It shows a list of glue tables for the current aws account and with selecting the number will delete the files and the table from glue.



```python
import boto3
import argparse
import awswrangler as wr
from pprint import pprint


def get_glue_tables():
    tables = [
        {
            "name": table["Name"],
            "database": table["DatabaseName"],
            "path": table["StorageDescriptor"]["Location"][5:],  # Remove "s3://" prefix
        }
        for table in wr.catalog.get_tables()
    ]
    return tables


def display_menu(options):
    print("Select a table:")
    for i, option in enumerate(options, 1):
        print(f"{i}. {option['database']:30} {option['name']:10} {option['path']}")

    print("0. Exit")

    while True:
        choice = input("Enter the number of your choice: ")
        if choice.isdigit():
            choice = int(choice)
            if 0 <= choice < len(options):
                return choice
            print("Invalid choice. Please enter a valid number.")
        else:
            print("Invalid input. Please enter a valid number.")


def display_sure():
    while True:
        choice = input("Sure to delete? (yes/no): ").strip().lower()
        if choice == "yes":
            return True
        elif choice == "no":
            return False
        print("Invalid input. Please enter 'yes' or 'no.")


def bucket_action(table, delete=False):
    path = table["path"]
    bucket_name, subfolder = path.split("/", 1)

    s3 = boto3.client("s3")

    def process_object(version):
        if delete:
            resp = s3.delete_object(
                Bucket=bucket_name,
                Key=version["Key"],
                VersionId=version["VersionId"],
            )
            print(".", end="")
        else:
            print(
                f"Object key: {version['Key']}, Version ID: {version['VersionId']}"
            )

    response = s3.list_object_versions(Bucket=bucket_name, Prefix=subfolder)

    for version in response.get("Versions", []):
        process_object(version)

    while response.get("IsTruncated"):
        response = s3.list_object_versions(
            Bucket=bucket_name,
            Prefix=subfolder,
            KeyMarker=response.get("NextKeyMarker"),
            VersionIdMarker=response.get("NextVersionIdMarker"),
        )
        for version in response.get("Versions", []):
            process_object(version)

    if delete:
        print("Deleting glue table")
        wr.catalog.delete_table_if_exists(
            database=table["database"], table=table["name"]
        )


while True:
    tables = get_glue_tables()
    option = display_menu(tables)
    if option == 0:
        break

    selected_table = tables[option - 1]
    bucket_action(selected_table)

    if display_sure():
        bucket_action(selected_table, delete=True)
```
Announcement: System Design Case Studies Newsletter
Tags: webdev, programming, beginners, career
Published: 2023-10-31 20:52:00

I want to inform you that I started a [weekly newsletter](https://newsletter.systemdesign.one/) on system design case studies.

Consider subscribing to the [system design newsletter](https://newsletter.systemdesign.one/) to excel in system design interviews and software architecture. 

Also get the powerful template to system design on sign up for FREE.
You need to understand networking as a SWE!
Tags: webdev, beginners, devops, learning
Published: 2023-10-31 20:28:26

Networking is among the key beginner fundamentals necessary if considering a breakthrough in any software engineering related role. From the various protocols to understanding how the internet works, you cannot ignore Networking. The internet is the biggest network ever, and since most software communicate or interact with their users through the internet, it is essential to have core understanding of core networking concepts.
The tech world and roles are so versatile and with new technology such as cloud cropping up, they are set to increase. Most of these roles require core understanding of networking concepts which define how communication happens across the internet. Below I share some key concepts of networking you need to understand critically well:

### 1. Protocols
A network is only but an interconnection of computers that can communicate to each other, but it does not define how this happens. Protocols are the set of rules that govern communication over a network. A lot of protocols exist for different purposes. Some of the common ones include TCP, UDP, IP, FTP, and HTTP among many others.
### 2. OSI (Open Systems Interconnection) model
It is impossible to discuss networking without mentioning the OSI model. The OSI is a conceptual framework that standardizes telecommunication into seven distinct layers with different functionality. Understanding what happens at each layer is critical for designing robust systems whether hardware or software.
### 3. IP addressing And Domain Name Server (DNS)
IP address is the unique identifier that makes networking possible. Every device connected to a network is identified using its IP address or a domain name. Domain names are also unique and are resolved using a DNS. A famous interview question is to describe what happens when you enter a URL in a browser. It is a great high-level demonstration of how the internet works using IPs and domain names.

Networking is very broad with so much to learn including the various devices, routing, and network managements. With the advent of cloud technology and container orchestration, understanding core network fundamentals is critical in resolving a lot of issues. As a beginner software engineer looking to break into tech, irrespective of the role, whether cloud architect, DevOps, or Machine Learning, mastering networking is a necessity.
Summing it all up for Release 2.0
Tags: programming, opensource, testing, typescript
Published: 2023-10-31 20:28:22

In the dynamic realm of open-source collaboration, every contribution is a brushstroke that enhances the canvas of innovation. Recently, I had the privilege of enriching the README of the Minimalist Tracker project on GitHub. This minimalist gem, designed for efficiency, now boasts a revamped guide on cloning the repository. Clear, step-by-step instructions empower developers, both seasoned and newcomers, to dive into the codebase with confidence.

Switching gears, my journey continued with a contribution to the timelydiff function, a crucial time difference calculator. Error handling received a facelift, offering clearer messages for invalid inputs. The cherry on top? Users can now personalize the date format, adding a layer of flexibility to this indispensable tool.

But why stop there? I leaped into the world of vibrant GitHub projects, injecting magic into the code. A playful toggle button, smooth navigation, and a revamped news section transformed the user experience. These additions aim to make every visit to the project a delightful adventure, because, in the world of coding, fun matters!

In the realm of diagramming tools, we embarked on a quest to make Mermaid 2.0 your artistic playground. Styling your diagrams is now a breeze with new options for colors, fonts, and stroke widths. No more settling for the default look; customize it to match your style.

The quest didn't end there. We streamlined the installation process of 'khroma,' ensuring seamless compatibility with TypeScript. Simplicity became our mantra as we tidied up the code, making it more accessible and understandable.

But we didn't forget the nitty-gritty details. Git hooks, those silent heroes of version control, received attention. A quick fix ensures a hiccup-free workflow during commits, keeping your creative journey smooth and uninterrupted.

In a nutshell, Mermaid 2.0 is a celebration of creative freedom. Your diagrams, your style – that's the heart of our adventure. With every stroke of code, we invite you to explore and embrace the artistic potential within the world of Mermaid. Happy diagramming, fellow coders! 🚀🎨
Looking for help on Mistral-7B
Tags: ai, llm, help, discuss
Published: 2023-10-31 20:20:38

Hey guys,
I am shifting my code from GPT to Mistral

I am facing some problems related to embedding model and engine whereas GPT has both of them publicly available.

Any help, tip or idea shared will be beneficial for me.

I also dropped a comment in the discussion of GitHub repo for Mistral-7b. 

I am trying to get the help as soon as possible for finish things up at my end.

https://github.com/OpenNMT/CTranslate2/issues/1501#issuecomment-1787965398

Looking forward to your help.. Thank you!!
Maze Game : Terminal Based
Tags: python, terminal, beginners, codenewbie
Published: 2023-10-31 20:16:25

[Game Link from Github](https://github.com/Lovell1207/Terminal-Game/tree/master)
This is a Terminal based, maze game. This game is a project task for codecademy. The requirements includes input, git versioning and a blog post.

The game is a maze that consist of rooms with each having 4 doors, 3 leading to other rooms. The goal is the find the room with the prize at which point you will win. This is also based on luck.

The code makes use of classes with class variable and instance variable. The game works on a loop until the prize is found. Limitation has been set to prevent the user from entering wrong inputs and from going too far into the layers(dimensions). 

Please provide any feedback, Thank you!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/77pwnjmz831l84dfpcr1.png)
Contributing to timelydiff
Tags: javascript, opensource
Published: 2023-10-31 20:16:01

"I recently contributed to a GitHub project by improving a function called `timelydiff`. This function calculates and formats the time difference between a given timestamp and the current time. First, I made sure to handle errors more effectively, providing clearer messages if someone tries to use the function with invalid input.

Additionally, I added a cool feature: now users can choose the date format they prefer! Whether it's the default format, 'dd/mm/yyyy', or 'mm/dd/yyyy', they have the power to customize. This makes the function more flexible for different use cases.

To make these changes, I created a new 'enhance-timelydiff' branch, where I made my improvements. After testing everything to make sure it works smoothly, I committed my changes and pushed them to the GitHub repository. If others find these enhancements useful, they can easily review and integrate them into the main project. It was a small contribution, but it adds more clarity and customization to the code!"
Placeholder Contributor
Tags: hack23contributor, hacktoberfest, devops
Published: 2023-10-31 20:14:30

##✨My Hacktoberfest 2023 Journey ✨


### Intro
Hello, I'm excited to share my first Hacktoberfest journey in 2023! I'm currently pursuing a Bachelor of Software Engineering degree at The Open University of Sri Lanka. Despite being new to Hacktoberfest, I'm enthusiastic about contributing to open-source projects and expanding my skillset. You can find more about me on my [LinkedIn](https://www.linkedin.com/in/mnfriham).
{% embed https://github.com/rihamnazeer %}

### Highs and Lows
During Hacktoberfest 2023, I experienced some significant accomplishments as well as encountered a few obstacles. One of my proudest moments was successfully contributing to a project that I had been following for a while. It was a true "aha" moment when my pull request was accepted, and my code became part of that project. Witnessing my work make a positive impact was truly gratifying.

However, it wasn't always smooth sailing. I faced a particularly challenging bug in one project that initially appeared insurmountable. I dedicated several days to debugging and research, but the solution remained elusive. In moments like these, frustration can set in, but I adapted by seeking help from the project's community. It turned out that many others were also grappling with the same issue, and through collaborative efforts, we eventually discovered a solution. This experience underscored the value of persistence and teamwork.

### Growth
Before Hacktoberfest 2023, I possessed a robust skillset in specific areas, but my goal was to broaden my horizons. I aimed to enhance my understanding of diverse programming languages and frameworks. Over the course of the month, I made contributions to projects written in various languages, such as React, Python, JavaScript, and even delved into some Rust. This diversification not only elevated my coding skills but also enabled me to appreciate the unique strengths and challenges of different programming languages.

In terms of my learning and career objectives, Hacktoberfest has amplified my passion for open-source software development. It has illuminated the fact that by harnessing collective efforts, we can achieve remarkable results. Consequently, I am contemplating dedicating more of my time to open-source projects in the future. Additionally, I am keen on expanding my knowledge in the realm of DevOps. The practices and tools associated with DevOps are increasingly pivotal in modern software development, and I believe that gaining expertise in this domain will be a valuable asset to my career.

In conclusion, Hacktoberfest 2023 proved to be an invaluable learning experience and an excellent opportunity to connect with fellow developers. I eagerly anticipate witnessing the continued growth and evolution of the projects I contributed to, and I'm already looking forward to the next Hacktoberfest!