teleren/devto huggingface dataset:
Getting Started with AWS and Terraform: A Hands-On Guide for Beginners
Tags: aws, terraform, awscloud, upskilling
Published: 2024-01-17 17:16:11

In my earlier blog post, I shared my journey to obtaining the AWS Cloud Practitioner Certification. Now, let's take the next step and get hands-on experience with AWS by using Terraform. If you're new to both the cloud and Terraform, this guide is designed to be a great starting point for you.

**<u>Setting Up Your Environment</u>**
Before diving into the technical details, it's essential to set up your environment. Here are some resources to help you get started:

**Free AWS Account**: If you don't have an AWS account yet, you can create a free account. This will give you access to a variety of AWS services without incurring any charges. [AWS Free Tier](https://aws.amazon.com/free/)

**Install Visual Studio Code**: We'll be using Visual Studio Code as our code editor. You can download it from this link [VS Code](https://code.visualstudio.com/Download).

**Install Terraform**: Terraform is an infrastructure as code tool that we'll use to provision AWS resources. Follow the steps in the video to set up Terraform on your local machine. [Installing Terraform](https://www.youtube.com/watch?v=ljYzclmsvF4)

**Install AWS CLI**: The AWS Command Line Interface is a powerful tool for interacting with AWS services. You can install it by following the steps in this video. [Install AWS CLI](https://www.youtube.com/watch?v=u0JyzUGzvJA)

**Configure AWS CLI for Terraform**: To seamlessly integrate AWS CLI with Terraform, follow the instructions in this video. [Configure AWS CLI](https://www.youtube.com/watch?v=XxTcw7UTues)

You may also need WSL - Windows Subsystem for Linux

<u>**Important Terraform Commands for Beginners**</u>
Now that your environment is set up, let's explore some essential Terraform commands that every beginner should be familiar with:

`terraform init`: Initializes the Terraform configuration. Run this command before doing anything else.

`terraform fmt`: Formats the Terraform code for consistent styling.

`terraform validate`: Checks the validity of the Terraform code.

`terraform plan`: Describes the changes that Terraform will make. Always run this command before applying changes.

`terraform apply`: Applies the changes described in the Terraform plan. Use the `-auto-approve` flag to skip confirmation.

`terraform destroy`: Destroys the resources created by Terraform. Like apply, use the `-auto-approve` flag to skip confirmation.

`terraform show`: This command is used to display the current state or a saved plan.

`terraform state`: This command allows you to perform operations on the Terraform state. 

To document and share my hands-on practice with AWS and Terraform, I created Git repositories.

In the upcoming posts, I'll delve into various basic topics to help you build a solid foundation in AWS and Terraform. Stay tuned for more detailed insights and hands-on tutorials. Happy coding!
Beyond UUIDs: The Rise of ULIDs for Enhanced Sorting and Efficiency
Tags: uuid, database, programming, productivity
Published: 2024-01-17 16:44:29

In the contemporary digital landscape, the efficient generation of unique identifiers is crucial, particularly in distributed systems where traditional databases with auto-incrementing keys show their limitations. ULIDs (Universally Unique Lexicographically Sortable Identifiers) shine here, offering a robust and efficient solution.

ULIDs provide a 128-bit structure, split into a 48-bit timestamp recording time in milliseconds and an 80-bit randomness portion. This combination ensures uniqueness and lexicographic sorting, facilitating indexing and data retrieval.

Here’s how it looks:

ulid() // 01ARZ3NDEKTSV4RRFFQ69G5FAV

ULID generates 2 parts:

1. Timestamp: int of 48 bits with UNIX timestamp in milliseconds

2. Random: Random string of 80 bits


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

## Conclusion

ULIDs outperform traditional UUIDs in systems where write efficiency and sortability are critical. Their design makes them ideal for modern applications requiring scalability and peak performance.

[ULID specification](https://github.com/ulid/spec)

For implementations and practical examples, the developer community offers a variety of libraries across different programming languages, ensuring that ULIDs can be seamlessly integrated into any new or existing project.
Multiplication Without Multiplication Operators
Tags: interview, leetcode, algorithms, programming
Published: 2024-01-17 16:40:03


A problem I learned about from the book Cracking The Coding Interview is how to multiply two numbers without using multiplication and division operators. I decided to write down what I learned from the solution since I find it to be a fascinating solution.

### Naive Approach

The most straightforward method involves repeatedly adding the multiplicand by the value of the multiplier (e.g., for 3 * 5, it would be calculated as 5 + 5 + 5). However, while this naive approach is conceptually simple, it is not the most efficient solution, as it necessitates the use of the addition operator multiple times. In exploring more optimized strategies, we aim to minimize the frequency of addition operations and enhance computational efficiency.

### Divide and Conquer

To minimize the use of addition operations, we use a divide-and-conquer approach. Calculating half of the multiplication and then doubling the result (e.g., 4 * 5 = (2 * 5 + 2 * 5)) becomes the key strategy. This involves dividing the smaller half successively until reaching one or zero. For each division, we calculate the multiplication by dividing the smallest multiplicand in half and doubling the result.

```js
function minProduct(a, b) {
    let bigger = a < b ? b : a;
    let smaller = a < b ? a : b;
    return minProductHelper(smaller, bigger);
}

function minProductHelper(smaller, bigger) {
    if (smaller === 0) {
        return 0;
    } else if (smaller === 1) {
        return bigger;
    }

    let s = smaller >> 1; // Divide by 2
    let side1 = minProductHelper(s, bigger);
    let side2 = side1;

    if (smaller % 2 === 1) {
        side2 = minProductHelper(smaller - s, bigger);
    }

    return side1 + side2;
}

```

This technique will only work if the result of half of the multiplication is an even number. If it's an odd number, we will do the same thing we did for the first half. We divide it until we reach zero or one and then double it.

In conclusion, the divide-and-conquer technique provides a fascinating solution to multiply two numbers efficiently without using multiplication and division operators. It shows the beauty of algorithmic thinking and helps to explore unconventional computational strategies.
Create a portfolio website without coding. Why not??
Tags: portfolio, nocodedevelopment, webdesign, figmaplugin
Published: 2024-01-19 03:06:47

---
title: Create a portfolio website without coding. Why not??
published: true
date: 2024-01-17 16:36:34 UTC
tags: portfolio,nocodedevelopment,webdesign,figmaplugin
canonical_url: https://bunhere.medium.com/create-a-portfolio-website-without-coding-why-not-519fe2a9ad78
---

![figma to code](https://cdn-images-1.medium.com/max/1024/1*jIhBwpGQ6XxI7m6Xb_kwow.png)
_figma to code_

### Introdution

With the rapid development of AI, developers have been facing the question of whether AI can replace developers. The answer to this question depends on the perspective of each individual.

In this article, I will focus on the fact that, thanks to a few AI tools, it is now possible for anyone to create a website, not just developers. You can be a designer, or simply have the skills to use Figma.

Using Figma, you only need to have good aesthetic sense and a good layout for the interface to create your own portfolio website.

### Some Figma Plugins

Readmore here: [Figma to Code](https://bunhere.medium.com/create-a-portfolio-website-without-coding-why-not-519fe2a9ad78)

### Conclusion

Here is a product created using DhiWise, with some manual source code edits.

![demo](https://cdn-images-1.medium.com/max/1024/1*X__4W1FrFyZNe9mEXjZ5TA.png)

Demo: [figmatocode.bunhere.com](https://figmatocode.bunhere.com)

Source code demo: [BunDemo — Figma to code](https://github.com/loanngo99/figma-to-code-demo)

I am always looking for feedback on my writing, so please let me know what you think._ ❤️
callback in JavaScript
Tags: javascript, beginners, programming
Published: 2024-01-17 16:28:19

**Callbacks:**

Definition:

A callback is a function that is passed as an argument to another function and is executed after the completion of a specific task. Callbacks are commonly used in asynchronous operations, such as handling events, making API requests, or reading files.


```javascript
function fetchData(callback) {
  setTimeout(() => {
    const data = 'Callback Example Data';
    callback(data);
  }, 1000);
}

function processData(data) {
  console.log('Processing data:', data);
}

fetchData(processData);
```

In this example, `fetchData` is a function that simulates an asynchronous operation. It takes a callback function (`processData`) as an argument and invokes it once the operation is complete.

Callback Hell (Callback Pyramids):
Callback hell refers to the situation where multiple nested callbacks create code that is hard to read and maintain. This occurs when dealing with deeply nested asynchronous operations.
Setting up docker on Amazon Linux
Published: 2024-01-17 16:27:28

```
yum update -y
yum install docker -y
docker service start
#auto start on boot
chkconfig docker on
```

docker compose

```
sudo ldconfig
yum install zlib -y
curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
```

```
echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc
source ~/.bashrc
```
5 Benefits of Joining La Fitness Union, NJ, for Your Fitness Journey
Tags: fitness, gym, tutorial, learning
Published: 2024-01-17 16:27:20

Joining LA Fitness in Union, NJ, offers access to a variety of fitness equipment and facilities, personalized training services, multiple convenient locations, and the option to bring guests. With LA Fitness, you can achieve your fitness goals with ease and enjoy a seamless fitness journey.

Plus, the gym offers complimentary guest passes for newcomers to experience the facilities and amenities.[Read More:](https://www.fewminute3.com/2024/01/5-benefits-of-joining-la-fitness-union.html)
Remove merged branches from your local machine
Tags: git, developer, programming, tutorial
Published: 2024-01-17 16:26:56


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


## Remove merged branches from your local machine

If you work with a remote Git repository, you might encounter a situation where you still have branches on your local machine, but those branches have been removed from the remote repository.

* Open a bash terminal (if you are on Windows you will have git bash. CMD, and PowerShell will not work).

* Run the following command:
```bash
    git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -d
```

Let’s break down the command:

git fetch -p: This command fetches the branches and their commits from the remote repository to your local repository. The -p or --prune option removes any remote-tracking references (i.e., origin/branch-name) to branches that have been deleted on the remote repository.

`&&`: This is a logical AND operator. In the context of command-line operations, it means “execute the following command only if the previous command succeeded.”

`git branch -vv`: This command lists all local branches and their upstream branches. If a local branch’s upstream branch has been deleted, it will show [gone] next to it.

![An example where `deleted-branch` is deleted, `only-local-branch` was never pushed to the remote repository, and `main` and `test-branch` are both local and remote.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4i2d56rhqqwhju4g2qyb.png)
*An example where `deleted-branch` is deleted, `only-local-branch` was never pushed to the remote repository, and `main` and `test-branch` are both local and remote.*

`|awk '/:gone]/{print $1}'`: This part of the command pipes (|) the output of the previous command to awk, a text processing utility. The awk command is programmed to match lines containing `:gone]` and print the first field ($1) of those lines, which is the branch name.

![The result of command so far given me only `deleted-branch`](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/th99z8egahzsaja9om72.png)
*The result of `git fetch -p && git branch -vv | awk ‘/: gone]/{print $1}’` given me only `deleted-branch`*

`| xargs git branch -d`: This part of the command pipes the output of the previous command (i.e., the names of the branches to be deleted) to xargs, which executes the git branch `-d` command for each input. The `git branch -d` command deletes a branch.

So, in summary, this command fetches updates from the remote repository, identifies local branches whose upstream branches have been deleted, and deletes those local branches.

## Bonus

This is the error if you try to run it **during** a merge

![A screenshot showing the error message error: The branch 'branch name' is not fully merged.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w15hc9rp7tqkzcamz6wy.png)
Streamlining Operations with Logistics ERP Software
Published: 2024-01-17 16:22:50

In today's fast-paced business landscape, efficient logistics management is critical for success. Logistics Enterprise Resource Planning (ERP) software has emerged as a powerful solution, revolutionizing the way companies handle their supply chain, inventory, and transportation operations. This article provides a comprehensive guide to [Logistics ERP Software](https://www.sflworldwide.com/logistics-erp-software), exploring its features, benefits, and its impact on streamlining business operations.

**I. Understanding Logistics ERP Software**
Logistics ERP Software is a specialized system designed to integrate and streamline various logistics and supply chain management processes within an organization. It acts as a central hub that connects different departments, enabling real-time collaboration and data sharing. From procurement to order fulfillment, Logistics ERP Software addresses the complexities of modern supply chains.

**II. Key Features of Logistics ERP Software**
1. Inventory Management
2. Order Processing
3. Supply Chain Visibility
4. Transportation Management
5. Vendor Management

**III. Benefits of Logistics ERP Software Implementation**
1. Improved Efficiency
2. Cost Savings
3. Enhanced Visibility
4. Customer Satisfaction
5. Regulatory Compliance

**IV. The Impact on Streamlining Business Operations**
1. Integration Across Departments
2. Real-time Data Accessibility
3. Forecasting and Planning
4. Automation of Repetitive Tasks
5. Scalability
Google Play Deletes 100,000 Apps Every Month – More Than It Adds
Tags: googleplay, appdev, discuss, data
Published: 2024-01-17 16:21:59

Hey there! It's Ksusha from [AppstoreSpy](https://appstorespy.com), bringing you the real scoop on what's happening with apps. We've been watching Google Play get rid of a ton of apps, and things are getting pretty intense. This quick read is your guide to understanding why apps are disappearing.

**How Many Apps Got Deleted?**

We looked at the numbers from 2022 to 2033. Here's how many apps were born and how many got removed:

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

In the last half of the year, more apps were removed than new ones were added—over three times more.
Also, we compared releases in Google Play per month in 2022 and 2023:


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

In December 2023, the number of releases decreased by 2.5 times.
Additionally, we compared the number of released apps in the App Store and Google Play in 2023:


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

The average number of apps released on Google Play is 2.2 times greater than that on the App Store. In December, the App Store catches up with the number of released apps on Google Play due to mass removals of apps.

**Why Does Google Play Remove Apps?**

Last year, Google Play made some rules about how apps should be made, updated, and promoted. Here are the main points:
Breaking the Rules: If your app messes with the rules about content, security, or advertising, it might get removed.

**Not Safe:** If your app has problems with safety or behaves badly, Google Play will kick it out to protect users.
**Bad Ads:** If your ads lie or break the rules, your app might disappear.
**Forbidden Stuff:** If your app has things it shouldn't, it could vanish.
**Privacy Issues:** If your app doesn't respect user privacy, it might be shown the door.

Apps can get removed by fancy computer programs or because users or developers complain. If your app is in trouble, Google Play will tell you why and how to fix it.

Things are tough, but it also means there will be more good and quality apps that will help us, not just junk.

In short, keep your app safe by following Google Play's rules, making it secure, and being honest with ads and privacy. It's like survival of the fittest in the app world.
First Game - Hey Fellow Devs!
Tags: webdev, javascript, gamedev, beginners
Published: 2024-01-17 16:15:44

So I recently remembered, that **dev.to** exists, and I had made an account on it. I want the first post to be of a game that I created using Javascript. Its a pretty simple card-matching game. 

Just wanted to put it there to you all, and I want to be active here, creating things on the way. Have a look at it and place your comments. Creating this project in my college days, I learned many things from youtube as well. 

The game is themed out of avengers when it was all the hype. Themes, fonts and music. all of it.

Webapp link: (https://avengersmatch.netlify.app/)
**Enjoy!!**
Welcome Thread - v259
Tags: welcome
Published: 2024-01-17 16:00:00

![Heart with glasses on waving and selling Hello!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n94kl4rq1dhou3h1cm7j.gif)

---

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

3. Come back next week to greet our new members so you can one day earn our [Warm Welcome Badge](https://dev.to/community-badges?badge=warm-welcome)!
DAY12: Python day 17
Published: 2024-01-17 15:54:24

**Creating my own class**
- By convention, we use PascalCase for classes, snake_case for everything else
- `__init__()` function to create a constructor(initialize) for a class: must have a `self` parameter
- setting default value inside `__init__` function
- adding method to class using `def` keword: also requires `self` parameter

```
class User:

    def __init__(self, user_id, username):
        self.id = user_id
        self.username = username
        self.followers = 0
        self.following = 0

    def follow(self, user):
        user.followers += 1
        self.following += 1

user_1 = User("001", "angela")
user_2 = User("002", "matthew")


user_1.follow(user_2)
print(user_1.following)
```
Project proposal: « Open Source Undefined - Overview of the Digital Bazaar »
Tags: opensource, openeducation, openscience
Published: 2024-01-17 15:53:54

What is « open source » ? It depends on who answers. Proposal of the project « Open Source Undefined: Overview of the Digital Bazaar » to explore this complex question.

**Initial project proposal:** https://github.com/Open-Models/Brique/discussions/442
**Project website:** [open-source-undefined.org](https://open-source-undefined.org)

A project for building a knowledge base on this confusing and controversial notion to fuel the debate on the meaning of « open source ».

There are many confusion factors with this concept: Is it about the sharing of source code only or collaboration is part of it ? Are licences necessary ? Is it something about software or related to the source of digital resources ? Where is the boundary between open and closed ? Is the Open Source Definition a definition of open source ?

Confusion factors leading to conflictual situations and divergent interpretations. So the answers on the meaning of open source differ.

Clear and exhaustive answers don't seem to exist: is open source still undefined ?

We don't know, we're not sure, there are disagreements, this seems to be potential answers on the meaning of open source. Clarifying the imprecision is perhaps the most precise way to fully understand the concept.

The intent with the project is to gather knowledge, resources and reflections to discuss and to grasp the meaning of open source with and for people facing this confusion, a work at the intersection of research and education.

An attempt to build robust knowledge on the meaning of « open source », to provide an open resource to understand this idea of open source.

The content section is still empty, but you can find some resources for now:
- Article curation around people’s reflections on open source meaning: https://open-source-undefined.org/resources/open-source-reflections.html 
- A Zotero library to store articles (~180 resources actually): https://www.zotero.org/groups/5352918/open_source_undefined/library

With the democratisation of open source comes the democratisation of the confusion surrounding open source, let's try to build a tool to fill some of the gap.

Why questioning the meaning of open source matters? We may be considering almost nothing of what open source could be, profoundly limiting our ability to use and collaborate with digital technologies.

Do we still don't know what open source could be?