teleren/devto huggingface dataset:
Petit à Petit - Beginning my Software Engineering Journey.
Published: 2023-10-22 15:21:22

Studying Petroleum Engineering in KNUST has always been a dream way back in High School. I studied hard to see the dream develop flesh. So much flesh I began to realize what it really entailed. With zero creativity, slow innovation and strict learning curve immediately I knew I wasn't going enjoy working in the oil and gas sector for long.

**Why choose Software Engineering**

Bringing something to life, developing money making solutions to business challenges, seeing my ideas come to life and designing custom applications is my innate talent. 

Software Engineering provides the exact opportunity to be develop these abilities. Today, my journey to becoming a software engineer begins. 

**Internet has been a great help.**

Combing various materials on the internet, I chance upon a site that provides me with a sample roadmap to guide me on this new adventure. https://roadmap.sh/ is amazing so far. 

In addition to the resources provided by roadmap.sh, I signed up for a few courses on Cousera. I will be studying both strictly and daily to ensure results. 

**YouTube is my School.**

I can't do without YouTube. Supersimple(https://supersimple.dev/) is my first tutorial video on HTML/CSS and it has been incredibly super. Currently building a YouTube clone as a project.

Software Engineering already promises to be an amazing field. Learning Chinese in conjunction though.
#01 AWS Fundamentals - Availability Zones and Regions
Tags: aws, tutorial
Published: 2023-10-22 15:11:03

#01 Availability Zones and Regions


![Regions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mste7pvyh1fwx2i41o5o.png)

Global Infrastructure is split between regions and availability zones. Currently, there are 31 regions and 99 availability zones. But this will change all the time. 

**1. What is a region?**

A region is simply a location or we can be called it a geographical area. So it could be Northern Virginia, Sydney, etc. 

**2. What is an availability zone (AZ)?**

We can think of the availability zone as a data center. In the availability zone, there may be several different data centers. But they are very close. 

Each region consists of 3 or more availability zones.

![Azs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/br0kae1d4gueixhb2i0w.png)

So in this region, there are 3 availability zones: we've got availability zone A, availability zone B, availability zone C, et cetera, et cetera.

**3. Edge locations**

Edge locations are basically just endpoints for AWS, they are used for caching content. Typically this consists of things like CloudFront. CloudFront is AWS' content delivery network. 


**Summary**

- **A region** is a physical location in the world that consists of 3 or more availability zones.
- **An availability zone** is one or more discrete data centers, each with redundant power, networking, and connectivity. 
- **Edge locations** which are endpoints for AWS that are used for caching content.
- **CloudFront:** which is Amazon's content delivery network.
The Complete Guide to Time Series Models
Published: 2023-10-22 15:08:08

Time is the most important factor which ensures success in a business. It is difficult to keep up with the pace of time but through methods of prediction and forecasting such as time series models this is achievable.
It involves working on time-based data to derive hidden insights to make informed decision making. The goal of a time series model is usually to make a forecast for the future.
To be able to come up with a time series model, certain aspects of a time series are considered such as: 
Is it **stationery**?
Is there a **seasonality**?
Is the target variable **autocorrelated**?

Moving on, many of the ways to build a model include:
**Moving average** - it's a model that states the next model is simply the mean of all the past observations.
**Exponential smoothing**- uses similar logic to moving average but a less importance is assigned to each observation.
**Double exponential smoothing**- used when there is a trend in the time series.
**Triple exponential smoothing**- This method extends double exponential smoothing by adding a seasonal smoothing factor. Of course, this is useful if you notice seasonality in your time series.
**Seasonal autoregressive integrated moving average (SARIMA.)**
Now, SARIMA is the combination of simpler models that create a complex model that can present a time series exhibiting non-stationery properties and seasonality.
It does involve:
the autoregression model AR(p), basically a regression of the time series onto itself.
the moving average model MA(q)
order of integration
then finally seasonality S where S is the season's length.
All this combines to get the SARIMA.

To put this Time Series Models into use, it is applied in:
1) Determining patterns.
2) Detecting anomalies.
3) Forecasting future trends.
Challenges with Terraform Cloud Login and Gitpod Workspace Integration
Published: 2023-10-22 15:06:18


## Challenges with Terraform Cloud Login and Gitpod Workspace Integration

![a](https://cdn-images-1.medium.com/max/4000/1*LWncJiFaK4rFYiIO5wx69g.png)

Logging into Terraform Cloud within a Gitpod workspace can be a bumpy ride. When attempting to use terraform login, the browser-based wiswig view doesn't always generate the token as expected. Fortunately, a workaround exists: manually creating a token in Terraform Cloud. This short note explores the common issues faced in integrating Terraform Cloud login with Gitpod workspaces and provides a practical solution: creating your token in Terraform Cloud.

![Terraform cloud architecture](https://cdn-images-1.medium.com/max/2306/1*xzTE91BiU9diE_enQLXDjQ.png)

## Issues with Terraform Cloud Login and Gitpod Workspace

When attempting to run terraform login it will launch bash a wiswig view to generate a token. However it does not work expected in Gitpod VsCode in the browser.

1.The workaround is manually generate a token in Terraform Cloud

    <https://app.terraform.io/app/settings/tokens?source=terraform-login>

2.Then create open the file manually here:

    touch /home/gitpod/.terraform.d/credentials.tfrc.json
    open /home/gitpod/.terraform.d/credentials.tfrc.json

3.Provide the following code (replace your token in the file) :

    {
      "credentials": {
        "app.terraform.io": {
          "token": "YOUR-TERRAFORM-CLOUD-TOKEN"
        }
      }
    }

4.terraform login:

![a](https://cdn-images-1.medium.com/max/3830/1*crXgznPdlNIOaje17SsH5Q.png)

* yes

* Ctrl+O

![a](https://cdn-images-1.medium.com/max/3806/1*3RfUGxPMeDJijsmnsWUlDA.png)

choose P

![a](https://cdn-images-1.medium.com/max/3816/1*YT0G6mFlmad12OFamQfQjg.png)

Ctrl+click to link

![a](https://cdn-images-1.medium.com/max/3834/1*hlR5xAOuLC7TkYCLmtOeaw.png)

5.Gentrate token

![a](https://cdn-images-1.medium.com/max/3812/1*I0yQ80Mbwo-yA5EuoNNfHg.png)

6. go to >> /home/gitpod/.terraform.d/credentials.tfrc.json

![a](https://cdn-images-1.medium.com/max/3810/1*P2YFmYseGQNlXBlNuS1eww.png)

7.Here’s an example of the JSON structure for **credentials.tfrc.json**:

    {
      "credentials": {
        "app.terraform.io": {
          "token": "YOUR_API_TOKEN"
        }
      }
    }

add the key

![a](https://cdn-images-1.medium.com/max/3828/1*GBeFzRGdqZYPEZM3XodYSQ.png)

![a](https://cdn-images-1.medium.com/max/2922/1*e4Lb4t3ygcqMtKplDm1cjQ.png)

In conclusion, tackling Terraform Cloud login issues, especially in Gitpod workspaces, requires adaptability. The workaround of manually generating a token in Terraform Cloud is a practical solution, ensuring uninterrupted access to Terraform’s powerful infrastructure management tools. Stay agile and resourceful to make the most of this valuable DevOps asset.
Web Application Security 101
Tags: webdev, beginners, programming, security
Published: 2023-10-22 05:49:17

🔒 Is your web application secure? 5 common vulnerabilities you need to know! 🔒

Online applications hold sensitive information, making security a top priority. 🌐

But, many web apps have security flaws that hackers can exploit. 😨

1️⃣ Injection Attacks: Malicious code can be injected into your app, exposing sensitive data. Protect your app by sanitizing user input! 👩‍💻

2️⃣ Cross-Site Scripting (XSS): Attackers insert harmful code into your app, stealing user information. Prevent this by cleaning up user input and implementing CSP. 🛡️

3️⃣ Broken Authentication & Session Management: Weak passwords and session hijacking can compromise user data. Use strong password restrictions and multi-factor authentication. 🔐

4️⃣ Security Misconfiguration: Improper configuration of web servers and frameworks can lead to vulnerabilities. Stay up-to-date with security patches and configure your servers securely. ⚙️

5️⃣ Cross-Site Request Forgery (CSRF): Users can be tricked into performing actions without their consent. Prevent this by using CSRF tokens. 🎟��

Remember, web application security is essential for protecting sensitive data! 💻

What steps are you taking to secure your web applications? Share your tips below! 👇

Read full article - [here](https://developnsolve.com/web-application-security-101)
GitHub — aungkohtat/terraform-beginner-bootcamp-2023
Tags: terraform, terraformcloud, aws, github
Published: 2023-10-22 15:04:40


## GitHub — aungkohtat/terraform-beginner-bootcamp-2023

***This article is part of my cloud journey with terraform beginner bootcamp by Andrew Brown.***

**TerraTowns** serves as a centralized platform where terraformers can explore and link up with each other’s self-hosted personal websites (TerraHouse), reminiscent of the Geocities style of 2023. The terraformers utilize Infrastructure as Code (IaC) to launch their **TerraHouse**, a Content Management System (CMS) that empowers them to create their own personal websites and integrate them into the TerraTowns network.

Week 0 — PreweekWeek 1 — Build

![a](https://cdn-images-1.medium.com/max/2768/0*SsMlZyuVqITKfEmY.png)

![a](https://cdn-images-1.medium.com/max/3310/0*hWFMECMRS3Ddm73x.png)

Week 2 — ConnectWeek 3

![a](https://cdn-images-1.medium.com/max/3280/0*wiAgjeJV95A2S1Wg.png)

![a](https://cdn-images-1.medium.com/max/3280/0*t3Hs3tiOc6xg3lXp.png)

![a](https://cdn-images-1.medium.com/max/3828/0*h-l-VrwIJ_vJqnQG.jpg)

![a](https://cdn-images-1.medium.com/max/2340/0*McvG9MSnwSlLUH4H.jpg)

![a](https://cdn-images-1.medium.com/max/2276/0*7STmCS8uxjZmYO8-.jpg)

![a](https://cdn-images-1.medium.com/max/3840/0*-sn7G1H_95pd_Gp2.jpg)

![a](https://cdn-images-1.medium.com/max/3834/0*oC2CVh-xOyTKBGz2.jpg)

*Originally published at [https://github.com](https://github.com/aungkohtat/terraform-beginner-bootcamp-2023.git).*
I was wrong about CSS this whole time!
Tags: webdev, beginners, css, programming
Published: 2023-10-22 14:35:07

Recently, I developed an Image Gallery Application (like unsplash.com). When I started this project, my mindset was to finish it without any errors. So, I jumped right in and planned how to split and develop it. Up to this point in time, I had ignored the styling part while developing applications. I would jump straight into the logic of the application. But until this point, I have never tried to do my best in CSS. 

At first, based on the requirements, I thought that the development process would take around 4-5 hours. But after starting to style the application, I realized that I was wrong this whole time. I didn't even cared about CSS this whole time. Even when I developed applications that had styling in them, I had followed some kind of tutorial or reference videos.

But after making these many mistakes, I realized the importance of CSS and how it affects everyone's perspective of viewing any content. Even though the application is blazingly fast or have good functionalities, it will not be enough. An average user of the website will evaluate the website based on its appearance too.

From now on, I will be learning CSS and including it in every project. Throughout this Image Gallery application development, I have learned a lot in CSS.
Tortoise and Hare Algorithm
Tags: algorithms, beginners, learning, python
Published: 2023-10-22 14:24:17

We all would have heard about the tortoise and hare story right? Well, there's an algorithm inspired by this story. 

## What is this Algo?
Floyd's Cycle Detection Algorithm, often referred to as the "tortoise and hare" algorithm, is used to detect the presence of a cycle in a linked list. This algorithm is named after American computer scientist Robert W. Floyd, who described it in 1967. It's a simple yet efficient technique that works by using two pointers to traverse the linked list at different speeds.

Yes, it works like the story. There will be two pointers running simultaneously within the same linked list. If the linked list has a cycle (i.e if the tail is connected to another node) the two pointers will meet together at some point. If not, the pointers will never meet.

First of all, what do I mean by a cycle in a linked list? Refer the below images: image 1 is a linked list without cycle (i.e tail node is not connected to any other node) and image 2 is a linked list with cycle because the tail node (-4) is connected to another node (2) in the list. Floyd's algo is efficient in detecting cycles in the linked lists.


![Linked list without cycle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qy95dpl6y3xouydlim2k.png)

![Linked list with cycle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fnqrqi0ueq2pi4mazei3.png)

## Implementation with python
Below is the implementation of Floyd's algo with python. The `detect_cycle` method takes in head (LinkNode object) and traverses through the list and checks if the Linked List has a cycle.

```python
class ListNode:
    def __init__(self, val):
        self.val = val
        self.next = None

def detectCycle(head):
    # Initialize two pointers, slow and fast, both initially at the head of the linked list.
    slow = head
    fast = head

    # Step 1: Detect the cycle (Floyd's algorithm)
    while fast and fast.next:
        # Move the slow pointer one step at a time.
        slow = slow.next
        # Move the fast pointer two steps at a time.
        fast = fast.next.next

        # If the slow and fast pointers meet, it indicates the presence of a cycle.
        if slow == fast:
            return True  # Cycle detected

    # If the fast pointer reaches the end of the list (or becomes None), there is no cycle.
    return False  # No cycle found
```

See you in the next one. Until then, Sayonara!
How to make a dynamic menu in rust 📃
Tags: rust, programming, tutorial, terminal
Published: 2023-10-22 14:21:34

In this article I am going to show you how to make a dynamic menu in Rust. First of all, let's add a lightweight keyboard event handler, I'll use [k_board](https://crates.io/crates/k_board).

`cargo add k_board`

Then let's put together the program logic and match the results after receiving the enter as a parameter.

```rust
use std::io::Write;

fn main() {
    let mut option: u8 = 0;
    show_option('*', ' ');
    for key in k_board::Keyboard::new() {
        match key {
            k_board::Keys::Up => option =  0 ,
            k_board::Keys::Down => option = 1,
            k_board::Keys::Enter => break,
            _ => {}
        }
        match option {
            0 => show_option('*', ' '),
            1 => show_option(' ', '*'),
            _ => {}
        }
    }
    clear_screen();
    println!("Enter the text you want to print");
    let mut text: String = String::new();
    let _ = std::io::stdout().flush();
    std::io::stdin().read_line(&mut text).expect("Error");
    clear_screen();
    match option {
        0 => {
            println!("{}", text);
        }
        1 => unsafe {
            printf("%s\0".as_ptr(), text.as_ptr());
        },
        _ => {}
    }
}

fn clear_screen() {
    std::process::Command::new("clear").status().unwrap();
}

fn show_option(op1: char, op2: char) {
    clear_screen();
    println!(
        "{} print in RUST\n{} print in C",
        op1, op2
    );
}

extern "C" {
    fn printf(format: *const u8, ...) -> i32;
}

```
Is Next.js Frontend or Backend?
Tags: discuss, nextjs, react, webdev
Published: 2023-10-22 14:03:16

Next.js is a React framework designed to simplify the development of server-rendered React applications. It combines the power of React with server-side rendering capabilities, resulting in fast-loading, SEO-friendly web applications.

There is a clear distinction between frontend and backend development. The frontend is what users directly interact with, while the backend handles operations behind the scenes. Next.js, however, blurs these lines by operating in both domains.

In the frontend aspect, Next.js behaves like any other React framework. It allows you to build reusable components, [manage state](https://bluesockets.com/react/react-state-management/), and handle user interactions seamlessly.

On the backend side, Next.js interacts closely with backend functionalities. It enables you to fetch data from APIs, connect to databases, and perform server-side computations during the rendering process.

I spoke more about this in an article I wrote recently. The article also touches on Next.js' file-based routing system and dynamic pages which provides a clear and intuitive approach to route management.

If you're interested in learning more about how Next.js bridges the gap between frontend and backend development, check out the [full article](https://bluesockets.com/next/is-next-js-frontend-or-backend/) here. It's a great read for anyone looking to enhance their web development skills with Next.js.

What are your thoughts? Is Next.js a Frontend or Backend framework or is it both?
Placeholder Contributor
Tags: hack23contributor
Published: 2023-10-22 13:50:37

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->

### Intro
<!-- Share a bit about yourself as a contributor. Is this your first Hacktoberfest, or have you contributed to others? Feel free to embed your GitHub account by using {% embed LINK %} -->

### Highs and Lows
<!-- What were some of your biggest accomplishments or light-bulb moments this month? Did any problems come up that seemed impossible to fix? How did you adapt in those cases?  -->

### Growth
<!-- What was your skillset before Hacktoberfest 2023 and how did it improve? Have your learning or career goals changed since working on these new projects? -->
Create a Function app with a Webhook to provide a Hello message with your name
Tags: webdev, cloudcomputing
Published: 2023-10-22 13:33:51

Step 1: Go to your search bar on your Azure Portal and search for function app


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pd20c8jwm4044bv0dhx5.png)

Step 2: Click on function app and click on create.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggs6s86ltpxtrszjeq9w.png)

Step 3: Add your resource group and give your function app a name and for your runtime stack, use .NET. Leave the rest as default and click on review+create, the deploy.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w4wgiujr2wcywf9lnhzb.png)

Step 3: After the deployment has been successful, go to the resource and create a new function.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lkkbctehz5jb461js3gl.png)

Step 4: Select the http trigger and create the function.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1a0h78xxdiivpbivgdgf.png)

Step 6: After the function must have been created, click on code + test then scroll through the code to give you a clue as to what you are going to be doing. Here, line 20 tells us what to do.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7x32g07bivcbz4gtn8pg.png)

Step 7: Go to the get function url and copy the link. Paste the link in your browser and add "&name=yourname" to the ending of the link.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u46soud5vy6g3ljwc0yx.png)
License approval differences of the FSF and the OSI
Tags: opensource
Published: 2023-10-22 13:13:00

---
title: License approval differences of the FSF and the OSI
published: true
description: Are there actually significant distinctions between the Free Software Foundation (FSF) and the Open Source Initiative (OSI) in terms of the licenses they approve?
tags: opensource
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-10-22 13:10 +0000
---

Are there actually significant distinctions between the Free Software Foundation (FSF) and the Open Source Initiative (OSI) in terms of the licenses they approve?

As I’ve not seen anyone do a satisfactory page about this I felt it was time I tried to tackle the topic. At this point I won't claim it to be "comprehensive" but I hope at least it makes a good enough start.

Much as I don't like when people post here on Dev with just a link to the whole article being somewhere else, I also don't want to maintain two copies while I might still be making minor corrections.

So with that apology here is a link to the full article:
- [How many and of what nature are the license approval differences of the FSF and the OSI ?](https://geraldew.wordpress.com/2023/10/22/how-many-and-of-what-nature-are-the-license-approval-differences-of-the-fsf-and-the-osi/)

There are certainly other things to cover, presumably in a later posting. At the least, an updated and thorough listing from both organisations and cross-match would seem a next step. Also I suspect there are licenses that either organisation has judged, about which the other has given no public opinion.

Oh, and to not tease, in short my finding was that: there are **not** significant distinctions between the FSF and OSI approvals.