teleren/devto huggingface dataset:
Refactor All The Time Instead of "Tech Debt Day"
Tags: cicd, technicaldebt, refactoring
Published: 2024-01-08 15:02:05

---
title: Refactor All The Time Instead of "Tech Debt Day"
published: true
description: 
tags: cicd,technicaldebt,refactoring
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-01-08 15:01 +0000
---

You don't negotiate with Product Owners on time  on technical debt vs. time on features. You refactor all the time, while  building the features. Product Owners not giving you time aren't the  ones at fault for the technical debt, you the coder are, for allowing  the code to become a mess over time.

Learn  Continuous Integration, Test Driven Development, and how to work in  small batches. If you're on a legacy code base, same approach for new  code, and additional acceptance tests for old code.

This  article is written extremely well, with wonderful context, even  utilizing mob programming, describing exactly what you shouldn't do.  Don't create a culture that condones bad code. There will always be  technical debt, but you should be tackling it all the time, not  deferring to some negotiated time period.

https://blog.alexewerlof.com/p/tech-debt-day
name input = multi digit number = digit plus digit <= 9 = answer
Tags: cpp, vscode, numerology, converter
Published: 2024-01-08 14:59:08

im lost, first half works second part i have no idea disambiguos parenthesis and expected declaration errors

#include < iostream>
#include < cctype>
#include < string>

using namespace std;

int main()
{
    cout << "Present Name." << endl;
    string named {};
    getline(cin, named);
    int sum{};
    for (auto& key : named)
    {
        if(isalpha(key))
        {
            key = toupper(key);
            sum += static_cast<int>(key - 'A' + 1);
            int second()
            {
                int num = 0;
                while(1)
                {
                    int num;
                    num += (sum % 10);
                    sum /= 10;
                    if(0 == sum)
                    {
                        if(num > 9)
                        {
                            sum = num;
                            num = 0;
                        }
                        else
                        {
                            cout << num << endl;
                            system("pause"); 
                            return 0;
                        }
                    }
                };
            }
        }
    } 
}
Fortify Your Elastic Load Balancer: Best Practices for Secure API Gateway Integration
Tags: aws
Published: 2024-01-08 14:57:50

First, let's look at this architecture:

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

**Explain**
This is a 2-tier architecture, consisting of an application layer and a database layer. The application layer and database layer are placed in a private subnet, while the ALB is placed in a public subnet and allows traffic to access them through the API Gateway.

The question here is: 

> Why use the API Gateway before the ALB, when the public ALB is already sufficient to allow traffic to enter and access the application layer?

Yes, this is a viable option. However, consider what would happen if all origins were able to access your resources. How would you block origins other than your own? The answer is that you can use the API Gateway to create CORS rules to restrict access to your resources and block the origins that you don't want to allow access to.

However, there is another problem that you will face. Traffic may not go through the API Gateway, but instead go directly to the ALB. This means that your CORS configuration will not be applied to the ALB if traffic does not go directly through the API Gateway. In this case, you will need to create a custom header by integrating resource mapping to create the custom header at the API Gateway. Then, you can create a WAF rule at the ALB to check for the custom header. If the request does not contain the custom header, it means that it did not go through the API Gateway, and the traffic will be blocked.

Now, do you have the answer to the question of why use the API Gateway?
What are your goals for week 2 of 2024?
Tags: discuss, motivation
Published: 2024-01-08 14:54:30

It's week 2 of 52 for 2024. What are you doing?

## What are your goals for this week and year? 

- What are you building? 
- What will be a good result by week's end?
- What events are happening any week? 
  * in person or virtual?
- Any special goals for the year?

Most people should be back to normal schedules this week. And meet up and conferences should be back soon too?

### Last Week's Goals
 
- [:white_check_mark:] Continue Job Search. 
   * Found some new job postings.
- [:x:] Project work
- Events
  * [:x:] Thursday Virtual Coffee (VC).
  * attended a couple weekly events that have restarted. 
- [:white_check_mark:] Run a weekly VC Slack thread similar to this post. at VC we're running a New Goals challenge for the month. I'll work with the team to modify the thread. 
- [:x:] Build LEGO set I got for Christmas. 

### This Week's Goals


- Continue Job Search. 
- Project work
- Events
  * Thursday Virtual Coffee (VC).
  * I don't know of anything this week. 
- Run a weekly VC Slack thread similar to this post. at VC we're running a New Goals challenge for the month. I'll work with the team to modify the thread. 
 


###Feedback on changes 

Wondering if with new year should I modify this series a little. Thoughts on doing any of the following.

- Make a new header for this series.
- Start a new series for 2024. Just change the name to week X of 2024?
- Use other tags. 


### Your Goals for the week and 2024

Your turn what do you plan to do this week? 

- What are you building? 
- What will be a good result by week's end?
- What events are happening any week? 
  * in person or virtual?
- Any special goals for the year?


```html
-$JarvisScript git push
```
Cloud Resume Challenge- Week 1
Tags: devops, aws, github, cloud
Published: 2024-01-08 14:53:56

## Introduction
In this piece, I'll delve into the AWS Cloud Resume Challenge, offering firsthand insights from my experience. In the ever-evolving tech scene, effectively highlighting your skills has become crucial. The challenge([Cloud resume challenge](https://cloudresumechallenge.dev/docs/the-challenge/aws/)) serves as a fantastic avenue to exhibit your proficiency in cloud technologies and craft an impactful online resume. Conceived by Forrest Brazeal, this initiative presents a distinctive chance to showcase your expertise. Come along as I lead you through the initial phases of this engaging project.


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

## Setting the Foundation with HTML and CSS:
During this stage of the project, I utilized a pre-made template([html5up](https://html5up.net/)) and made adjustments to both the HTML and CSS elements to customize it according to my preferences. To complete this task, familiarity with HTML and CSS is essential since a significant portion of the code is already in place. Your main responsibility is to edit the HTML files with your personal information. I then uploaded the modified code to ([my GitHub repository](https://github.com/Oyoh-Edmond/Cloud-Resume)) and leveraged GitHub Pages to serve and host the static content.
[My Website](https://oyoh-edmond.github.io/Cloud-Resume/)

## Upload Resume Folder to Amazon S3:
To proceed with this phase, I created an AWS account, set up an IAM group with a policy specifically tailored for this project, generated an IAM user, and then added the user to the previously configured IAM group. This series of steps enabled me to access the management console, where I initiated the creation of a bucket and uploaded the folder containing my HTML and CSS files to the S3 bucket.

## Set up CloudFront, Amazon Route 53, and Certificate Manager:
I enhanced the performance of my resume website by utilizing CloudFront, with S3 as the origin, and strengthened security by obtaining an SSL certificate through AWS Certificate Manager to ensure the website's safety. Furthermore, I configured my custom domain using Amazon Route 53 to improve the overall presentation of my resume website.

## Conclusion
I acquired valuable insights throughout the completion of the task in the first week. Despite encountering certain challenges, I managed to overcome them by engaging in troubleshooting and conducting comprehensive research. Consequently, I successfully addressed and resolved the issues that arose.
Social and phone floating on Web
Tags: guide, vn, student, beginners
Published: 2024-01-08 14:50:24

The provided code is a combination of HTML and CSS used to create a floating contact section on a webpage. This section includes clickable buttons for contacting via Zalo, Facebook, and a hotline number.

In HTML, a div element with the class float-contact is defined. Inside this div, there are three button elements, each representing a different contact method: Zalo (chat-zalo), Facebook (chat-face), and a hotline (hotline). Each button contains an a element (anchor tag) which links to the respective contact method: a Zalo chat link, a Facebook Messenger link, and a telephone link for the hotline.

The CSS part styles these elements. The .float-contact class is styled to position the contact section fixed at the bottom left of the webpage. The buttons are styled with different background colors for easy distinction: Zalo in green (#8eb22b), Facebook in blue (#125c9e), and the hotline in a pinkish-red color (#d11a59). They also have rounded corners, padding, and white text.

There's also a media query for devices with a max-width of 549px. This makes the buttons smaller and repositions the floating contact section for better visibility on smaller screens.

Overall, this code creates a user-friendly, floating contact section, making it easier for visitors to connect via different platforms directly from the webpage.

```
<style>
.float-contact {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99999;
}

.chat-zalo, .chat-face, .float-contact .hotline {
    background: #125c9e;
    border-radius: 20px;
    padding: 0 18px;
    color: white;
    display: block;
    margin-bottom: 6px;
}

.chat-zalo {
    background: #8eb22b;
}

.float-contact .hotline {
    background: #d11a59!important;
}

.chat-zalo a, .chat-face a, .hotline a {
    font-size: 15px;
    color: white;
    font-weight: 400;
    text-transform: none;
    line-height: 0;
}

@media (max-width: 549px) {
    .float-contact {
        bottom: 10px;
        left: 10px;
    }

    .chat-zalo, .chat-face, .float-contact .hotline {
        padding: 0 12px;
    }

    .chat-zalo a, .chat-face a, .hotline a {
        font-size: 12px;
    }
}
</style>

<div class="float-contact">
    <button class="chat-zalo">
        <a href="http://zalo.me/0867592210">Chat Zalo</a>
    </button>
    <button class="chat-face">
        <a href="http://m.me/vnedutradiem">Chat Facebook</a>
    </button>
    <button class="hotline">
        <a href="tel:0867592210">Hotline: 0867592210</a>
    </button>
</div>

```
Me Ajudem!
Published: 2024-01-08 14:42:17

Saudações, comunidade de desenvolvedores!
Estou com uma duvida no meu programa, espero que me ajudem
<!DOCTYPE html>
<html>

<head>
  <title>Brown Bears</title>
</head>

<body>
  <a href="./index.html">Brown Bear</a>
  <a href="./aboutme.html">About Me</a>
  <h1>The Brown Bear</h1>
  <ul>
    <li><a href="#Introduction">Introdução</a></li>
    <li><a href="#Habitat">Habitat</a></li>
    <li><a href="#meios de comunicação">meios de comunicação</a></li>
  </ul>
  <div id="introduction">
    <h2>About Brown Bears</h2>
    <p>The brown bear (<em>Ursus arctos</em>) is native to parts of northern Eurasia and North America. Its conservation status is currently <strong>Least Concern</strong>.<br /><br /> There are many subspecies within the brown bear species, including the
      Atlas bear and the Himalayan brown bear.</p>
    <a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank">Learn More</a>
    <h3>Species</h3>
    <ul>
      <li>Arctos</li>
      <li>Collarus</li>
      <li>Horribilis</li>
      <li>Nelsoni (extinct)</li>
    </ul>
    <h3>Features</h3>
    <p>Brown bears are not always completely brown. Some can be reddish or yellowish. They have very large, curved claws and huge paws. Male brown bears are often 30% larger than female brown bears. They can range from 5 feet to 9 feet from head to toe.</p>
  </div>
  <div id="habitat">
    <h2>Habitat</h2>
    <h3>Countries with Large Brown Bear Populations</h3>
    <ol>
      <li>Russia</li>
      <li>United States</li>
      <li>Canada</li>
    </ol>
    <h3>Countries with Small Brown Bear Populations</h3>
    <p>Some countries with smaller brown bear populations include Armenia, Belarus, Bulgaria, China, Finland, France, Greece, India, Japan, Nepal, Poland, Romania, Slovenia, Turkmenistan, and Uzbekistan.</p>
  </div>
  <div id="media">
    <h2>Media</h2>
    <a href="https://en.wikipedia.org/wiki/Brown_bear" target="_blank"><img src="https://content.codecademy.com/courses/web-101/web101-image_brownbear.jpg"/></a>
    <video src="https://content.codecademy.com/courses/freelance-1/unit-1/lesson-2/htmlcss1-vid_brown-bear.mp4" height="240" width="320" controls>Video not supported</video>
  </div>
</body>

</html>

Logo no começo da tag body
na lista não ordenada está dando esse erro: Você abriu a <a>tag antes da introdução e fechou depois da introdução?
Obrigado pela atenção!
Know about HTTP/1.0 & HTTP/2
Tags: beginners, tutorial, webdev, learning
Published: 2024-01-08 14:27:31

_**Hi readers!**_

## HTTP

HTTP/1 and HTTP/2 are two versions of the Hypertext Transfer Protocol, which is the foundation of data communication on the World Wide Web. They define how messages are formatted and transmitted, and how web servers and browsers should respond to various commands.


## HTTP/1.0:

> Year of Introduction: 1996

Key Features:

1. Simple and straightforward protocol.

2. Each request from the client is answered by a single response from the server, and the connection is closed after each request/response.

3. The lack of request pipelining often led to a phenomenon known as the "head-of-line blocking," where a slow-loading resource could block the loading of subsequent resources in parallel.


## HTTP/1.1:

> Year of Introduction: 1997

Key Features:

1. Introduced persistent connections, allowing multiple requests and responses to be sent over a single connection, reducing latency.

2. Request pipelining, which allows multiple requests to be sent without waiting for each response, improving performance.

3. Host header to support multiple domains on the same IP address.
Chunked transfer encoding for efficient transmission of large data.


## HTTP/2:
> Year of Introduction: 2015

Key Features:

1. Binary protocol: Unlike the text-based nature of HTTP/1.x, HTTP/2 is a binary protocol, which makes it more efficient to parse and less error-prone.

2. Multiplexing: Allows multiple requests and responses to be sent in parallel over a single connection, addressing the head-of-line blocking issue.

3. Header Compression: Reduces overhead by compressing header information.

4. Server Push: Allows the server to push resources to the client before they are explicitly requested, improving performance.

5. Prioritization: Requests can be assigned priority levels, allowing more important resources to be delivered first.

HTTP/2 was designed to address the limitations of HTTP/1.x and improve the overall performance and efficiency of web communication. It has become widely adopted, and many modern websites use HTTP/2 to provide a faster and more responsive user experience.

_Hope you find this helpful. Thanks for reading._
[20 Days of DynamoDB] Day 1 - Conditional PutItem
Tags: go, serverless, database, nosql
Published: 2024-01-08 14:17:15

For the next 20 days (don't ask me why I chose that number 😉), I will be publishing a DynamoDB quick tip per day with code snippets. The examples use the DynamoDB packages from AWS SDK for Go V2, but should be applicable to other languages as well.

*Posted: 8/Jan/2024*

The DynamoDB `PutItem` API overwrites the item in case an item with the same primary key already exists. To avoid (or work around) this behaviour, use `PutItem` with an additional condition.

Here is an example that uses the `attribute_not_exists` function:

```go
	_, err := client.PutItem(context.Background(), &dynamodb.PutItemInput{
		TableName: aws.String(tableName),
		Item: map[string]types.AttributeValue{
			"email": &types.AttributeValueMemberS{Value: email},
		},
		ConditionExpression: aws.String("attribute_not_exists(email)"),
		ReturnConsumedCapacity:      types.ReturnConsumedCapacityTotal,
		ReturnValues:                types.ReturnValueAllOld,
		ReturnItemCollectionMetrics: types.ReturnItemCollectionMetricsSize,
	})

	if err != nil {
		if strings.Contains(err.Error(), "ConditionalCheckFailedException") {
			log.Println("failed pre-condition check")
			return
		} else {
			log.Fatal(err)
		}
	}
```

With the `PutItem` operation, you can also:

- Return the consumed Write Capacity Units (WCU)
- Get the item attributes as they appeared before (in case they were updated during the operation)
- Retrieve statistics about item collections, if any, that were modified during the operation

Recommended reading:

- [API documentation](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/dynamodb#Client.PutItem)
- [Condition Expressions](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.ConditionExpressions.html)
- [Comparison Functions](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.OperatorsAndFunctions.html)
Custom Personal Safety Survival Women Alarm Window Breaker Set Girl Self Defense Keychain
Tags: news, cloud, design, performance
Published: 2024-01-08 14:16:35

Creating a [safety kit for women](https://btlsofficial.com/goodsDetails?jobsProductId=1575068225216139264&recommendProductId=2312251526230357500&hyId=kibt-fe-cj) involves assembling a collection of items that can be useful in various situations to enhance personal safety. The contents of the kit may vary based on individual preferences, lifestyle, and specific safety concerns. Here's a general list of items you might include in a safety kit for women:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/li3kdt3f5j72eh3q3bfi.png)
Personal Alarm: A loud personal alarm can help attract attention in case of an emergency or threat.

Pepper Spray: A compact pepper spray canister for self-defense against potential attackers.

Whistle: A loud whistle can be an effective signaling tool to alert others in an emergency.

Flashlight: A small, powerful LED flashlight can help illuminate dark areas and increase visibility.

Self-Defense Keychain Tool: Consider a keychain attachment with features like a pointed tip for striking, or a discreet self-defense tool.

Emergency Phone Charger: A portable phone charger or power bank to ensure your phone stays charged in case of an emergency.

First Aid Kit: Basic first aid supplies, including bandages, antiseptic wipes, pain relievers, and any necessary personal medications.

Reflective Items: Reflective gear or accessories to increase visibility, especially if you're walking or running in low-light conditions.

Personal Identification: A photocopy of important documents (ID, emergency contacts, medical information) stored in a waterproof bag.

Emergency Contact Information: A card with important phone numbers and contacts, including family, friends, and local emergency services.

Foldable Umbrella: A compact and lightweight umbrella can provide shelter in unexpected weather conditions.

Multi-Tool: A small multi-tool with features like a knife, scissors, or screwdriver can be handy in various situations.

Hand Sanitizer and Wipes: Keep personal hygiene items for cleanliness, especially when access to soap and water is limited.

Emergency Whistle: A whistle specifically designed for emergencies, which may have additional features like a built-in compass.

Personal Safety Apps: Install and set up personal safety apps on your phone that allow you to share your location with trusted contacts. [Safety keychain](https://btlsofficial.com/goodsDetails?jobsProductId=1575068225216139264&recommendProductId=2312251526230357500&hyId=kibt-fe-cj)

Remember to periodically check and update the contents of your safety kit to ensure that items like pepper spray and emergency contact information are not expired or outdated. Additionally, tailor the kit based on your specific needs and activities. Always familiarize yourself with the laws and regulations regarding self-defense items in your location.

https://btlsofficial.com/goodsDetails?jobsProductId=1575068225216139264&recommendProductId=2312251526230357500&hyId=kibt-fe-cj
Experimenting With OneTrainer - OneTrainer vs Kohya - Realism vs Stylization - Reg img effect
Tags: onetrainer, stablediffusion, training, kohya
Published: 2024-01-08 14:12:48

I feel like reg images using in OneTrainer improved realism and also lessened the overfitting as expected

OneTrainer realism looks better than Kohya meanwhile Kohya generalization looks better

Download attached images to see full resolution

[OneTrainer Stable Diffusion XL (SDXL) Fine Tuning Best Presets](https://www.patreon.com/posts/96028218)

[Massive 4K Resolution Woman & Man Class Ground Truth Stable Diffusion Regularization Images Dataset](https://www.patreon.com/posts/massive-4k-woman-87700469)

[The Very Best Workflow For SDXL DreamBooth / Full Fine Tuning — Results Of 100+ Full Trainings](https://www.patreon.com/posts/very-best-for-of-89213064)

full res 1 : https://cdn-uploads.huggingface.co/production/uploads/6345bd89fe134dfd7a0dba40/MFi59IKvsMwv-JgMxd28I.jpeg

full res 2 : https://cdn-uploads.huggingface.co/production/uploads/6345bd89fe134dfd7a0dba40/WrGkxTYOarDf8B3CrxTgO.jpeg

full res 3 : https://cdn-uploads.huggingface.co/production/uploads/6345bd89fe134dfd7a0dba40/3gecfhhaXIgQDMIUDf9Bo.jpeg


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


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


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