teleren/devto huggingface dataset:
Microservice architecture for software development
Tags: webdev, programming, architecture
Published: 2022-12-25 10:08:10

Microservice architecture is a software design pattern that decomposes a large, complex system into a set of independent, self-contained services that communicate with each other over well-defined interfaces. This approach is becoming increasingly popular in the software industry due to its many benefits, including:

**1.Modularity:** Microservices are designed to be self-contained, with each service responsible for a specific set of functionality. This makes it easier to develop and maintain the system, as changes to one service are less likely to affect the rest of the system.

**2.Scalability:** Microservices can be scaled independently of each other, allowing the system to handle increased workloads without having to scale the entire system. This makes it easier to manage resource utilization and cost.

**3.Flexibility:** Microservices can be developed and deployed independently, allowing the system to be more flexible and adaptable to change. This makes it easier to add new features and capabilities to the system.

**4.Reliability:** Microservices are designed to be fault-tolerant, with each service able to operate independently of the others. This makes the system more resilient to failures, as the rest of the system can continue to operate even if one service goes down.

**5.Reusability:** Microservices can be reused in multiple applications, allowing developers to build new systems faster and more efficiently.

However, microservice architecture also has its challenges, including:

**1.Complexity:** Microservice architecture can be more complex to design and implement than traditional monolithic architecture, as it requires more coordination between the different services.

**2.Testing:** Testing microservices can be more difficult, as each service must be tested independently and in combination with the other services.

**3.Deployment:** Deploying microservices can be more challenging, as each service must be deployed and managed separately.

**4.Monitoring:** Monitoring microservices can be more difficult, as there are more components to keep track of.

Despite these challenges, microservice architecture is becoming increasingly popular in the software industry due to its many benefits. It allows developers to build scalable, flexible, and reliable software systems that can adapt to changing requirements and workloads. If you are considering using microservice architecture for your next software project, it is important to carefully evaluate the benefits and challenges to determine if it is the right fit for your needs.

Thank you for reading my article! If you enjoyed it and would like to support my work, please consider buying me a coffee at **[Buy Me a Coffee](https://www.buymeacoffee.com/giasuddin)**. You can also learn more about me and my work by visiting my **[Giasuddin Bio ](https://bio.link/giasuddi)**and following me on LinkedIn and Twitter. Thank you for your support!
Justify-content in Flex Box
Published: 2022-12-25 14:44:35

Simply we can say that justify contet set items horizontal.
but with it has also few property.
`.flxbox{
  justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly | start | end | left | right;
}`

## Flex-star (default) :
 Item are set on star (left side of page). If we use `row-revers` but we want that item should be start from left side. so we use `justify-content: flex-start`.

`justify-content: flex-start;`
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l4pdc3rxsq3s687hbvy6.png)

## flex-end:
Item are set on end (right side of page)
`justify-content: flex-end;`

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


## flex-center:
This property set out item on center of the page 
`justify-content: center;`

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

## space-between:
Items are evenly distributed in the line; first item is on the start line, last item on the end line.
`justify-content: space-between;`


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

## space-around:
To create evenly space around items 
`justify-content: space-around;`

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

## space-evenly: 
Items are distributed so that the spacing between any two items (and the space to the edges) is equal.
How to use knowledge of OOP in Go
Published: 2022-12-26 16:06:23

Using the Simple Knowledge of OOP to Build simple classes for the following “objects” in Go 

## The following Objects are use

1. Car
2. Product
3. Store

> The Car class can have any car attributes you can think of.
The Product class should have attributes of a product i.e (the product, quantity of the product in stock, price of the product). A car is a product of the store, but there can be other products so the attribute of the car can be promoted to the Product. The Product class should have methods to display a product, and a method to display the status of a product if it is still in stock or not.

> The Store class should have attributes like
Number of products in the store that are still up for sale
Adding an Item to the store
Listing all product items in the store
Sell an item
Show a list of sold items and the total price

Kindly [Click Here](https://github.com/sunday4me/Backend_Golang_S_S_E_Project) to view the complete Project and how to Implement the simple OOP in Golang
useReducer for dummies(kid friendly)
Tags: javascript, beginners, react, webdev
Published: 2022-12-27 08:17:52

Imagine that you are in charge of keeping track of the snacks in your house. You have a bunch of different snacks that you like to eat, and you want to be able to **keep track of how many of each snack you have left.**

To do this, you could use a react reducer. Here's how it might work:

The react reducer is a special function that helps you keep track of your snacks. It takes in two things: **the current state of your snacks** (i.e. the number of each snack you have left), and **an action** (e.g. "eat a snack" or "buy more snacks").

1. When you want to **eat a snack**, you dispatch an action to the reducer that tells it what snack you want to eat. The reducer then **checks to see if you have any of that snack left**. If you do, it returns a new state that has one fewer of that snack (so you now have one fewer of that snack). **If you don't have any of that snack left, it returns the current state without any changes.**

2. When you want to **buy more snacks**, you dispatch an action to the reducer that tells it what snack you want to buy more of. **The reducer then adds more of that snack to your supply and returns a new state that includes the additional snacks.**

This way, **you can use the react reducer to keep track of your snacks and make sure you always have enough to eat**. You can use the actions to tell the reducer what to do (e.g. eat a snack, buy more snacks, etc.), and the reducer will take care of updating your snack supply and returning a new state based on the actions you dispatch to it.

**QUICK CATCHUP SUMMARY**
 --**_WHEN WE EAT A SNACK, THE SNACK COUNT WILL REDUCE, WHEN WE BUY A SNACK, THE SNACK COUNT WILL INCREASE_**


Code example:

```javascript
const snackReducer = (state, action) => {
  switch (action.type) {
    case 'EAT_SNACK':
      const newState = { ...state }; // create a copy of the current state
      newState[action.snack]--; // decrease the count of the specified snack by 1
      return newState;
    case 'BUY_SNACKS':
      const newState = { ...state }; // create a copy of the current state
      newState[action.snack] += action.count; // increase the count of the specified snack by the specified count
      return newState;
    default:
      return state;
  }
}

```
To use this reducer, you would need to initialize the state with the initial counts of each snack that you have. For example:

```javascript
const initialState = {
  chips: 10,
  cookies: 5,
  crackers: 20
}
```


Then, you can dispatch actions to the reducer using the dispatch function, like this:

```javascript
dispatch({ type: 'EAT_SNACK', snack: 'chips' });
dispatch({ type: 'BUY_SNACKS', snack: 'cookies', count: 10 });

```
This should give you a basic understanding of how you can use a react reducer to keep track of your snack supply!
What are some rules to follow for good app architecture in Flutter App?
Tags: app, flutter, architecture, rule
Published: 2022-12-27 08:29:39



**RULE: Avoid singletons**

If you want your code to be testable, there are various alternatives to singletons:

- constructor arguments (doesn't scale well with deep widget hierarchies)
- InheritedWidget or Provider
- Service locators

**RULE: Zero (or very little) business logic in the widgets.**

Widgets should be as dumb as possible and only be used to map the state to the UI.

Small exceptions: sometimes I include some simple currency, date, or number formatting code in my widgets if it makes life easier.

**RULE: No Flutter code (including BuildContext) in the business logic.**

Your view models/blocs/controllers are used to update the widget state in response to events.

By ensuring that these classes don't have any UI code in them, they can be easily unit tested.

**RULE: Navigation code belongs to the widgets**

If you try to put your navigation code in the business logic, you'll have a hard time because you need a BuildContext to do so.

Solution:
- emit a new widget state
- listen to the state in the widget and perform the navigation there

**RULE: Show dialogs and snackbars in the widgets**

Same as above. When we need to show an alert dialog because something went wrong, this is what we should do:

- emit a new error state
- listen to the state in the widget and use the context to show the alert dialog

**RULE: Do UI validation in the widgets***

*This may be a controversial one.

FormState and TextEditingController depend on the widget lifecycle, so they shouldn't go in the view models/blocs etc.

Keep them in your widgets and offload everything else to the business logic.
Настройка ssh на linux для GitHub.
Tags: github, ubuntu, ssh
Published: 2023-03-06 06:11:23

Всем привет. Чтобы клонировать свои репозитории на удаленные сервера нужно выполнить всего несколько шагов. Приятного чтения.

## 1 - Создание ключ пары
Для начала вам нужно сгенерировать два ключа для ssh, один публичный и один приватный.
```
ssh-keygen -t ed25519
```
Нажимаем enter несколько раз.
После этого в вашей домашней директории появится папка **.ssh**, переходим в нее
## 2 - Создание конфигурации
Создаем в папке **.ssh** файл **config**
```
nano config
```
В нее вставляем вот такой конфиг:
```
Host github.com
 HostName github.com
 IdentityFile ~/.ssh/id_ed25519
 IdentitiesOnly yes
```
А теперь сохраняем файл. Если вы никогда не пользовались nano то вам сюда [*тык*](https://losst.pro/kak-sohranit-fajl-v-nano-linux)

после копируем данные с id_ed25519.pub с помощью cat

```
cat id_ed25519.pub
```
после получаем вот такой текст

```
ssh-ed25519 AAAAC3N...LpPG kesio@pc
```

копируем его и идем в github, заходим в настройки, ищем пункт 
 `SSH and GPG keys`

далее нажимаем на `New SSH key` в поле title пишите для вас удобное название подключения и в нижнее поле тот самый ключ.

Готово! теперь у вас подключен ваш github аккаунт к пк/серверу.
5 Ways to make money as a frontend developer
Tags: webdev, javascript, react, programming
Published: 2022-12-28 08:17:40

As a frontend developer, you have a range of options when it comes to making money. Here are some strategies you can consider:

**Freelance or contract work**: One way to make money as a frontend developer is to offer your services on a freelance or contract basis. This can be a good option if you want the freedom to work on a variety of projects and to set your own rates. To find freelance work, you can search online job boards, reach out to companies directly, or join a freelance platform like Upwork or Fiverr.

**Full-time employment**: Another option is to work as a full-time frontend developer for a company. This can be a good option if you want the stability and benefits that come with a regular job. To find full-time employment, you can search job listings online, network with industry professionals, or apply directly to companies that interest you.

**Start your own business**: If you want to be your own boss, you can consider starting your own business as a frontend developer. This could involve offering web design or development services to clients, or creating your own products or tools that you can sell. To get started, you'll need to create a business plan, build a portfolio, and market yourself to potential clients.

**Sell your skills online**: Another option is to sell your skills online through platforms like Udemy or Skillshare. This can involve creating courses or tutorials that teach others how to code or use specific technologies. To be successful, you'll need to create high-quality content and market your courses effectively.

**Contribute to open-source projects**: If you enjoy working on open-source projects, you can contribute to these projects and make money through donations or sponsorships. This can be a good way to build your skills and reputation as a developer, as well as to make some extra money.

Overall, the key to making money as a frontend developer is to build a strong skillset, market yourself effectively, and be open to a variety of opportunities. By staying up to date with the latest technologies and continuously learning and improving your skills, you'll be well-positioned to succeed in this field.
What Is Password Salting & How It Improves Security?
Published: 2024-06-22 09:01:36

---
title: What Is Password Salting & How It Improves Security?
published: true
date: 2022-12-26 18:30:00 UTC
tags: 
canonical_url: https://mojoauth.com/blog/what-is-password-salting
---

What if I tell you Password Hashing is not that secure, and attackers have workarounds to attack hashed passwords as well? Harsh but true, however, the real question is what to do to make password-based authentication more secure if hashing passwords is not enough. The answer is Password Salting, to make it much more difficult for attackers to crack the passwords, even if they manage to get access of the hashed passwords.
Decentralized Storages
Tags: cloud, security, storybytes
Published: 2022-12-29 12:40:11


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8gd3cwkz6gzxfth9w5tr.png)A team’s success is a recipe that has to be enjoyed once the dish is served. But what is that recipe? What are the ingredients? How about the quantity and the preparation time? Well, if that were easy, we would have only high-performing teams. One ingredient that we in Web and App Studio believe in to create a high-performing team is the need for Psychological Safety. Paul Santagata from HBR reveals, “There’s no team without trust”, and he couldn’t be more correct. But what is psychological safety, and why is it important? Psychological safety is the conviction that you won't suffer the consequences of the mistakes that have occurred. If we get to our unsafe zone, our thinking brains shut off, and our primal instincts take over, leading to nothing productive. And that's why psychological safety is so important. Psychological safety empowers employees to take risks and speak their minds. Team members who are quick to point the finger at one another when something goes wrong, team members who have different values or beliefs than others, and teams with a conflict-ridden culture are all signs of poor psychological safety. So rather than developing a compete-with-each-other mindset, we must never forget that it’s the team vs the problem. Blame can become a curiosity. Ask for feedback to improve on your own. When people feel connected to each other, they know that they're safe to step outside of their comfort zone. And yes, Feeling safe is a fundamental human need. Once this is covered, any performance will scale higher.
Transfer a domain between AWS accounts
Tags: aws, route53
Published: 2022-12-29 19:29:27

It is easy to transfer a domain from one AWS account to another AWS account with the help of AWS CLI.

These commands are done with AWS CLI in bash.

```bash
# Make sure that you have the AWS CLI installed
aws --version
```
We will use the command [route53domains](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53domains/index.html) and its sub commands to do the transfer.

Three things are needed for the first step, the __domain name__ to transfer, the __account id__ that should have the domain name and the __credentials__ (perhaps as an AWS CLI profile) of the owner of the domain.

```bash
aws route53domains transfer-domain-to-another-aws-account \
    --domain-name example.com \
    --account-id 111122223333 \
    --region us-east-1 \
    --profile DomainOwner
```

Note that it's important that this is done in the __us-east-1__ region since the route53 service is global. The error message would look like this otherwise.

```bash
Could not connect to the endpoint URL: "https://route53domains.eu-west-3.amazonaws.com/"
```

If the transfer was successful, then there would be a response with an __operation id__ and a __password__.

```bash
# the response depending on you output preference
984188c3-1238-457c-a4ab-c6cc064f043d    =xfdf%/fj/5nr=
```

Command for checking the status of the transfer.

```bash
aws route53domains get-operation-detail \
    --operation-id 984188c3-1238-457c-a4ab-c6cc064f043d \
    --profile DomainOwner
    --region us-east-1
```

The last step is to accept the transfer with the account that should receive the domain, which means that we need the credentials for that account when running the AWS CLI commands. The __domain name__ and the __password__ from the first command will also be needed here.

```bash
aws route53domains accept-domain-transfer-from-another-aws-account \
    --domain-name example.com \
    --password =xfdf%/fj/5nr= \
    --profile DomainReceiver
    --region us-east-1
```

All done, the last command will also get an __operation id__ in the response that could be used to check the status with the sub command __get-operation-detail__ as described above, remember to use the correct profile.

Resources:

- [route53domains](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53domains/index.html)
- [Route53 Developer guide](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-transfer-between-aws-accounts.html)
Permanently Change CMD Font Color Using (.reg) Files.
Tags: windowscmd, technology, cmdtipsandtricks, changecmdfontcolor
Published: 2022-12-31 14:39:58

---
title: Permanently Change CMD Font Color Using (.reg) Files.
published: true
date: 2022-12-30 04:01:35 UTC
tags: windowscmd,technology,cmdtipsandtricks,changecmdfontcolor
canonical_url: 
---

> We all have gone through the trouble of manually changing the CMD font color using the **color** command. And even then, when you restart CMD; it all resets to default white. But, no worries! There’s a fix to this!

With This guide, I’ll be teaching you how you can change your CMD font color permanently; without any effort. And, it turns out that its not that hard!

![A Command Line Interface Example](https://cdn-images-1.medium.com/max/800/1*Ct3VsstKC5vAhCUm1JjM3w.jpeg)
_Image Credits: TechRepublic_

### **Step 1**

Firstly, we have to head over to this [**GitHub Page**](https://github.com/TabbySL/Permanent-CMD-Font-Color-Change) and fetch the necessary files. All you have to do, is click the Green color **_“Code”_** button, and then select **_‘Download ZIP’._**

Use the image below as reference;

![](https://cdn-images-1.medium.com/max/373/1*FCGdjJvmFq_PsmZcc1eNTA.jpeg)
_Downloading the Repository As a ZIP file._

### **Step 2**

Now that you have downloaded the Repository, it should appear in your **‘Downloads’** folder, or whichever folder you have selected for downloads to appear.

Now, double-click on the _.zip_ file that you downloaded, and there will be a folder in it. Clicking on that folder will lead you to a list of registry(_.reg_) files, which you can select one color that you like from the list.

![Selecting a color from the list](https://cdn-images-1.medium.com/max/1019/1*r1kAcCv1cexD9F--5w5pqg.png)
_Selecting a color that you like For your CMD to be._

### **Step 3**

Alright! Now that you have a color selected, you can Double click on the file with your chosen color. You will be prompted with 2 messeges; click yes for both of them.

Finally, you will get a popup, saying **‘Key values were sucessfully added to the Registry’** This means, that the color was sucessfully changed, and now you can open your CMD prompt, and Enjoy your new font color!

![](https://cdn-images-1.medium.com/max/751/1*6yoLmlCpyh1bmc8eBpuwrA.png)
_CMD Font color has been Sucessfully changed!_

And now, you dont have to bother about changing the color manually — ever again! Just click on the color you want, and it will last forever! (unless you reset your computer or something… lol)

Also, you might have noticed the ‘Bright-White’ (.reg) registry file too. Well, as you know; the CMD has a bit of a dull white font color by default. Its not complete white, but kinda like a shaded grey. So, when you click that (.reg) file, it will change the font color to complete White — which, I personally prefer. ; )

I hope the guide explained ‘ **How to change the CMD font color permanently’** very well. If you are stuck somewhere, you can also watch this Video, in which I explain it in a Screen-Recording;

[https://youtu.be/aiV7ezXJLvI](https://youtu.be/aiV7ezXJLvI)
React+Node Projects for Resume Building and Learning Suggestions
Tags: fullstack, react, node, discuss
Published: 2022-12-31 16:06:09

I was looking for some React + Node projects to learn from and fill my resume with.
Came across this https://www.youtube.com/watch?v=BCkWFblNLKU and his channel has many other common projects with similar stack.
The initial 2 minutes of the video will give an idea about the project and tech used in the project.

Is it a good idea to do this way in order to learn and have good projects on your resume? Thank you in advance for any suggestions/recommendations.

Note: I have less than one year experience in web dev looking for full stack roles in Canada. I do have some basic knowledge of MERN stack as I have build simpler apps with it, but trying to look for something a bit advance here.
Performance Testing Concepts & Terms
Published: 2023-04-23 03:46:42

This article describes key concepts in building an approach to Performance Testing.  Performance testing involves evaluating how a system performs under a specific workload. This can help determine if the system is able to handle the expected number of transactions and if its configuration is suitable.

Key Concepts

**Load testing** involves putting a system or application through a defined transaction model, either through scripts or by simulating a large number of users. The model typically consists of various functions, such as common transactions or transactions that require a high amount of system resources, such as searches and report retrieval.

---

**Stress testing** involves putting a system under abnormal or extreme workload in order to observe its behaviour. This can help identify if the system will crash or experience timeouts when subjected to high levels of transactions. For example, stress testing might involve seeing if a database connection times out before the application crashes when subjected to a high volume of transactions.

---

Response Times

These are the duration it takes to complete a transaction. There are different levels of transactions  For user-facing transactions 


```
<pre class="mermaid">
graph LR
    A[Start] --> B[Step 1]
    B --> C[Step 2]
    C --> D[Step 3]
    D --> E[End]
</pre>
```


`<pre class="mermaid">
graph LR
    A[Start] --> B[Step 1]
    B --> C[Step 2]
    C --> D[Step 3]
    D --> E[End]
</pre>`