teleren/devto huggingface dataset:
Library / Package selection
Published: 2023-06-06 10:47:00

---
title: Library / Package selection
published: True
description: How to select a library or package?
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4zygpfzc1v6tanku2zns.png
# Use a ratio of 100:42 for best results.
published_at: 2023-06-06 10:47 +0000
---

## Introduction
When you are making software as a team, or on your own, you know you can't make everything yourself. There are plenty of people working hard on something you might be able to use. 

Sometimes the number of solutions for 1 challenge you're facing, are available in large amounts, sometimes there's only one. How do you know which solution to select? (The apples and pears dilemma.)

## The scorecard
It is always a bit of a puzzle, so I tend to make a scorecard to give me a better idea. Points (1-10) are given to particular data. Depending on what you think is important for a solution, you can use a weighted scoring system. 
You totalise the outcome and now you can compare.

Even if you only have 1 solution, if you do this every time, it gives you a rough idea how useful the solution is for you, and if another one appears on the horizon, it's easy to compare later on.

## My scoring list
- Popularity
- Age
- Stability/regular updates/clear releases
- Roadmap
- Documentation
  - examples present?
- Does it seem trustworthy?
- Other publications present?
- Open issues
  - look at age too
  - average time to react/solve
  - are beginner questions anwered quickly?
- Latest version
  - checkout and find out testcoverage
  - do your regular linting
  - review code
- Questions/answers on fora (stackoverflow/reddit/...)
  - are there a lot of unanswered questions?
- Micro-version
  - use it in a small program in how you would need it
  - is it easy to use?

## Adapter, when in doubt
Often I see myself looking at several potential solutions which are strong candidates. Or I see a newcomer around the corner, which is tempting to try out. Or you find out that the solution isn't that trustworthy anymore.

Most of the time, I find myself making use of the Adapter pattern, which means that my software doesn't need to change if I decide to change a solution. The advantage is that if I choose a solution now, but later on there's a better one, fast one, simpler one, you name it, I can always switch without to much of a hassle.
FaaS: Function as a Service (server-less architecture)
Tags: cloud, cloudcomputing, azure, aws
Published: 2023-06-06 10:46:53

Function as a Service (FaaS) is a cloud computing model that falls under the umbrella of serverless architecture. It enables developers to build and deploy individual functions or pieces of code without the need to manage or provision the underlying infrastructure. In FaaS, developers focus solely on writing and uploading their code, and the cloud provider takes care of running and scaling the functions in response to incoming events or requests.

The key idea behind FaaS is to abstract away the traditional server-centric model of application development and allow developers to focus on writing modular, event-driven functions that execute in response to specific triggers. These triggers can include HTTP requests, database events, file uploads, timers, and more.

When an event occurs, the FaaS platform automatically provisions the necessary resources to execute the corresponding function and then scales down or removes those resources once the function has completed. This on-demand scaling and resource management ensure efficient resource utilization and cost-effectiveness.

FaaS platforms typically offer features such as automatic scaling, load balancing, monitoring, and logging, allowing developers to focus on writing business logic rather than managing infrastructure. Examples of popular FaaS platforms include AWS Lambda, Azure Functions, Google Cloud Functions, and IBM Cloud Functions.

FaaS has several advantages, including:

1. Cost efficiency: With FaaS, you only pay for the actual execution time of your functions, as opposed to continuously running and maintaining servers.

2. Scalability: FaaS platforms automatically scale your functions to handle varying workloads without requiring manual intervention.

3. Reduced operational overhead: Since the underlying infrastructure is abstracted away, developers can focus on writing code and rely on the FaaS platform for managing infrastructure and operations.

4. Faster time to market: FaaS enables developers to quickly deploy and iterate on individual functions, accelerating the development and deployment cycles.

5. Flexibility: FaaS allows you to mix and match functions written in different programming languages, making it easier to leverage existing code and choose the right tool for the job.

Overall, FaaS and serverless architectures provide a powerful paradigm for building scalable and cost-efficient applications, allowing developers to focus on writing code while abstracting away the complexities of infrastructure management.
How to Configure Wishlist in Magento 2
Tags: magento, magento2, magento2tutorial
Published: 2023-06-06 10:43:40

Customers often require some time to contemplate their options before making a purchase while shopping. While providing features like recently viewed or compared products is useful, having a wishlist on your Magento 2 store can prove highly advantageous. A wishlist enables customers to add items they find interesting to a personalized list, facilitating easy return and purchase at a later time. Moreover, this feature allows customers to share their wishlists with friends, potentially boosting demand for your products and expanding your customer base. As a store owner, understanding **_How to Configure Wishlist in Magento 2_** is crucial for effectively establishing and managing wishlists on your online store.

For more information , please visit this :- **_[https://webguru.dev/how-to-configure-wishlist-in-magento-2/](https://webguru.dev/how-to-configure-wishlist-in-magento-2/)_**
Sbercoffe: The Unique Telegram Username That Can Boost Your Business or Personal Brand"
Published: 2023-06-06 10:34:59

@sbercoffe is a Telegram username that has long become a brand for all coffee lovers. This is not just a username, it is a unique and powerful tool in the hands of the owner. 

The owners of this name get unlimited opportunities to create a unique profile on Telegram and other platforms. They also receive significant advantages in promoting their businesses on social networks, using a name that is a real treasure for anyone who wants to stand out among competitors. 

[@sbercoffe](https://getgems.io/collection/EQCA14o1-VWhS2efqoh_9M1b_A9DtKTuoqfmkn83AbJzwnPi/EQBhRJk4yptJ8r6l6VjrijQd462BwdTbwXIkhJ__aBvcsOu4) is a brand name that is easy to remember and associated with high quality and luxury. This name, combined with your potential, can turn your business into a thriving company that competes with major competitors. 

If you want to acquire this unique username for your Telegram profile, then you are already taking the right step towards developing your business or personal brand. Don't miss your chance to join the select group of @sbercoffe owners and start your path to success. 

Hurry up because such a chance is rarely given. Don't miss the opportunity to become the owner of a unique Telegram username that will become a real advantage for your profile on social networks and beyond.
I will sell a qualitatively developed brand NFT
Published: 2023-06-06 10:32:34

[](https://getgems.io/collection/EQCA14o1-VWhS2efqoh_9M1b_A9DtKTuoqfmkn83AbJzwnPi/EQBhRJk4yptJ8r6l6VjrijQd462BwdTbwXIkhJ__aBvcsOu4)
Join us now on Lenra, a unique place to create a cross-platform app that scales automatically to follow your users growth.
Tags: github, opensource, cli, programming
Published: 2023-06-06 10:06:00

Hey, you! Yeah, you...
Have you ever wanted to make a difference in the world, but you don't have the money or the resources to do it? 
Well, I'm here to tell you that you can still make a difference without breaking the bank. How, you ask? By contributing to our open source project, of course!


[Contributing to Lenra](https://github.com/lenra-io), an app creation platform,  isn't just about making a difference. It's also about learning new skills. Whether you're a developer, a designer, or just someone who's interested in tech, you can learn a lot from collaborating with others on our project.

[Lenra](https://www.lenra.io/) offers a range of benefits that can help developers simplify the app development and hosting process, while ensuring the privacy and security of user data.


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

Here are some insights : 

1.  **Faster app development:** Lenra provides an all-in-one platform with optimized dev tools, which can help developers accelerate the development process and reduce time-to-market[\[1\]](https://www.lenra.io/).
2.  **Simplified app hosting:** Lenra offers a range of hosting services that can simplify app deployment and management, including automatic scaling and reduced carbon footprint[\[2\]](https://www.lenra.io/usecases.html).
3.  **Enhanced data privacy:** Lenra is GDPR-compliant and offers a range of security features, including malware protection and a Single Sign-On (SSO) system, which can help ensure the privacy and security of user data[\[3\]](https://www.lenra.io/).
4.  **Ethical development:** Lenra is a Big Tech-free platform with sober code, hosted within the European Union, which can help developers support ethical development practices[\[4\]](https://www.lenra.io/manifesto.html).
5.  **Open-source and transparent:** Lenra is an open-source platform that allows anyone to take ownership of the platform, and offers transparency in its development and operations[\[5\]](https://www.lenra.io/).

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hxskmpripwccaq9tysfa.png)
Contribute now and take your part of the new world ;)

#### Sources:

1.  <https://www.lenra.io/>
2.  <https://www.lenra.io/usecases.html>
3.  <https://www.lenra.io/>
4.  <https://www.lenra.io/manifesto.html>
5.  <https://www.lenra.io/>
1-Commit Per Pull Request Workflow
Tags: commit, git, workflow
Published: 2023-06-06 10:01:11

## Software development workflow at Woovi
At Woovi we focus a lot on speed. To ensure speed while development code, we have a lot of automation set in place.
We use conditional build to make sure we only test and build what is needed, providing a fast feedback loop for our developers, [Fast CI/CD for Monorepos] (https://dev.to/woovi/fast-cicd-for-monorepos-4l91)
We split tests in many containers to make tests run even faster, [Test Splitting in CI/CD](https://dev.to/woovi/test-splitting-to-speed-up-your-cicd-1n6j).
We use domain driven design to decouple our code, [DDD in Monorepos](https://dev.to/woovi/domain-driven-design-using-a-monorepo-afg).
We have automated tests, feature flags, and we use continuous integration for our Git branching model, [How to ship faster to production](https://dev.to/woovi/how-to-ship-faster-to-production-2e1f)
We also don't have required code review, [
What developers merge when nobody is looking](https://sibelius.substack.com/p/what-developers-merge-when-nobodys)
All these enable our developers to iterate faster with small commits and pull requests. 
One developer can have more than 100 commits per day.


## One Commit Per Pull Request Workflow
We are decoupling our monolithic architecture in well-defined domains in our monorepo, each domain has their own package with its public interface.
We are using codemods to help us move code from one package to another, this codemods can modify more than 100 files at the same time, but they are safe as we have many tests around them.
As we share the same monorepo, to avoid having git conflicts all the time, we work in small commits, usually 1 commit per pull request.

Here is how works in practice a workflow to change some code change in Woovi monorepo
- write your backend/frontend code
- manually test it once
- write automated tests to validate the code works as expected and handle know edge cases
- when done, get the latest version of main branch - `git pull origin main`
- create a new branch - `git checkout feat/webhook`
- add your code to git - `git add .`
- commit files - `git commit -m "feat(webhook): awesome webhooks"`
- open pull request - `gh pr create --fill` 

This is Woovi 1-commit per pull request workflow

## In Summary
At Woovi, we are crafting and rethinking every aspect of each process that affects our operational work. This tiny optimization does not make sense for small scale, but it payoffs a lot at scale


---
Woovi
[Woovi](https://www.woovi.com) is a Startup that enables shoppers to pay as they like. To make this possible, Woovi provides instant payment solutions for merchants to accept orders.

If you want to work with us, we are [hiring](https://woovi.com/jobs/)!
Ternary Operator and Logical &&
Tags: react, reactnative, javascript, codereview
Published: 2023-06-06 09:58:24

Some time ago, I put a comment during a code review which led to a bug in our React Native App.

I suggested a fellow developer to replace ternary operator with logical `&&` in favour of writing shorter, more readable code. **BIG MISTAKE**. 

Besides the fact that shorter code is not always better. There is also a subtle difference between the two statements below:

`mightExist && <p>DEFAULT</p>` and `mightExist ? <p>DEFAULT</p> :  null`

which we didn't realise immediately.


### Ternary Operator

A simplified representation of the code snippet what was reviewed is this:


```
export default function App() {
  const arr = [];

  return <div className="App">{arr.length ? <p>NOT EMPTY</p> : null}</div>;
}
```

`arr.length` is 0 which is `falsy` and the above JSX renders an empty `div`.


### Logical &&

It was suggested to use logical && instead of ternary operator above.

```
export default function App() {
  const arr = [];

  return <div className="App">{arr.length && <p>NOT EMPTY</p>}</div>;
}
```

`&&` operator short circuits to return the value of the first **falsy** operand it encounters. If all operands are falsy, it will return the last **truthy** value. 

Keeping that in mind, the above JSX renders a div which has 0 inside it. This is definitely not the behaviour we are expecting and could have been avoided. 


### React Native

While the above would lead to a `0` being printed unintentionally on React Apps, for React Native apps it had bigger implications.

```
export default function App() {
  const arr = [];

  return <View className="App">{arr.length && <Text>NOT EMPTY</p>}</View>;
}
```

In React Native, text strings must be rendered inside [`Text`](https://reactnative.dev/docs/text) components. The above JSX violates this, since 0 is inside directly a child of [`View`](https://reactnative.dev/docs/view) component. This would break the UI and app would crash incase the error is not handled.

### Notes

The above bug went unnoticed also because the name of the variable which held the value `arr.length` was not self explanatory and it didn't occur to us immediately that the value could be 0. This shows why appropriate naming of variables is very important for effective development.
Staff Augmentation Services
Tags: staffaugmentation, itstaffaugmentation, staffagmentation, staffing
Published: 2023-06-06 09:53:29


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

We Help You In Hiring [IT Staff Augmentation](https://companybench.com/c/staff-augmentation)
Company Bench makes available a range of software developers on an immediate basis. you need to do is add your requirements and have a developer on board! software platform. Based on your needs and preferences, a UiPath Developer helps you optimize the RPA technology to obtain the goals.

Save Hiring Cost
Company Bench prevents you from spending a fortune on hiring professionals for specific jobs. We help you cut down your hiring costs at least by 50% by providing you with software developers immediately.

Avail Of A Wide Range Of Skills
Hire developers who have mastered technologies and skills such as Salesforce, Node, React, Python, Swift, Angular, Android, Java, DevOps, ML, Data Engineering, and many more.

Ensure Risk-free Hiring
We allow you to pay no cost if you are no longer satisfied with the services within two weeks.
Open Kubernetes with OKD
Published: 2023-06-06 09:36:54

---
title: Open Kubernetes with OKD
published: true
description: Getting started with OKD
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3kvpeni6jowf3mlpc516.png
---
OKD is a great foundation to build open cloud-native applications and platforms. 
Here is a demonstration and [repository](https://github.com/CaravanaCloud/okd-pod) to help you get started!

{% youtube GeordD-69zQ %}
Create a Network File Share(NFS) in ubuntu machine and use it in your local machine
Tags: nfs, localpc, ubuntu
Published: 2023-06-06 09:30:24

// Install NFS server on other machine

```
sudo apt-get update
sudo apt-get install nfs-kernel-server
```

**Update the etc exports:**
Update the below home directory path which you want to share.

```
sudo nano /etc/exports
/home/jobayeer/Desktop/shared   *(rw,sync,no_subtree_check)
```
**Now update all exports and allow from all host for now: **

```
sudo exportfs -a
```

**Edit allow hosts config like below:**

```
sudo nano /etc/hosts.allow
ALL: ALL
```
**Now restart the server:**

```
sudo systemctl start nfs-kernel-server
```



**Use it on your own machine : **

```
sudo apt-get update
sudo apt-get install nfs-common

sudo mkdir /mnt/nfs_share


sudo mount 192.168.2.56:/home/jobayeer/Desktop/shared /mnt/nfs_share
```
I don't Know why laravel doesn't regonize that the user that sending reqeust it logged in ?? Help
Tags: javascript, react, laravel, php
Published: 2023-06-06 09:14:58

this is react code
const token = sessionStorage.getItem("token")
      const response = await 

```
axios.post("http://127.0.0.1:8000/api/cours", values, {
        headers: {
          Accept: "application/json",
          "Content-Type": "application/json",
          Authorization: `Bearer ${token}`
        }
```
and this laravel block code 

```
 public function store(CoursFormRequest $request)
    {
        if (!auth()->check()) {
            return $this->error("", "user is not loged in", 401);
        }
        $request->validated($request->all());
        $cours = new Course();
        $cours->title = $request->title;
        $cours->description = $request->description;
        $cours->Duration = $request->duration;
        $cours->language = $request->language;
        $cours->price = $request->price;
        $cours->category = $request->category;
        $cours->user_id = Auth::user()->id;
        $cours->image = "test";
        $cours->save();
        return new CoursResource($cours);
    }
```
and this the route :
Route::group(["middleware" => ["auth:sanctum"]], function () {
    Route::resource("/cours", CoursController::class);
});

the problem is with the Auth::user()->id 
i get cannot read id on null 
So helpp
Shell Scripting Explained
Tags: shell, scripts, linux, devops
Published: 2023-06-06 09:08:36



## What is it?
Shell scripting is a powerful tool used in the world of Tech. It allows users to automate tasks and run several commands at once, making it an essential skill for system administrators, DevOps engineers, and software developers.

## Benefits
One of the main benefits of shell scripting is its ability to simplify complex processes. With shell scripting, users can _**automate repetitive tasks**, **create custom commands**, **keep history of configurations**, and even schedule scripts to run at specific times_. This can save time and increase efficiency, especially when working with large amounts of data or complex systems.


## Real World Uses
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zgv67s1199897ycoehi4.png)
In the real world, shell scripting is used in a variety of scenarios. For example, system administrators use shell scripts to manage servers, automate backups, and perform maintenance tasks. DevOps engineers use shell scripting to deploy applications, manage cloud infrastructure, and automate testing. Software developers use shell scripting to build and package applications, manage dependencies, and automate build processes.

## Wrapping up
Finally, shell scripting as you can see is an essential skill for anyone working in the world of Tech. Its ability to automate tasks and simplify complex processes makes it a valuable tool in a variety of real-world scenarios. In the following blogs, we will explore in detail how to write effective shell scripts and explore some common use cases.
Looking for a new job
Tags: devops
Published: 2023-06-06 09:04:46

Hi All,

please help me in getting a job

i can work on full time or part time job or contract job

i have very 7+ years of experience in devops and total 10 years of experience 

presently im not working 

im married with 2 small kids have 

plse help me getting a job


Thanks
Mohd Rashid
rashidmd777@gmail.com
+91-8801151520
How to Remove a File from Git and Add it to `.gitignore`
Tags: webdev, javascript, git, programming
Published: 2023-06-06 08:57:59


If you no longer want to include a file in Git version control and want to add it to the `.gitignore` file, you can follow these steps:

1. Remove the file from Git version control using the `git rm` command:

   ```shell
   git rm --cached file.txt
   ```

Replace file.txt with the name or path of the file you want to remove. The `--cached` flag ensures that the file is only removed from Git tracking but is still present in your local file system.

Commit the removal:

```shell
git commit -m "Remove file.txt from Git tracking"
```

This commits the removal of the file from Git's history.

Add the file to the `.gitignore` file:

Open the `.gitignore` file in a text editor and add a new line specifying the file or pattern you want to ignore. For example:

```
file.txt
```

Save the .gitignore file.

Commit the changes to the .gitignore file:

```shell
git add .gitignore
git commit -m "Add file.txt to .gitignore"
```

This commits the changes to the `.gitignore` file, effectively ignoring the specified file.

After following these steps, Git will no longer track the specified file, and it will be ignored in future commits. However, please note that this process does not delete the file from your local file system; it only removes it from Git's version control.


Follow me for more captivating JavaScript content! Stay updated with the latest articles, tutorials, and coding tips by following my account.

Best
HASH
What are Dev.to credits ???
Tags: beginners, community, tutorial, writing
Published: 2023-06-06 08:37:45

Ever went to your Dashboard and found credits lying around ?
## why should I bother about them 🤔
As dev.to is an Exponentially growing community of developers around the globe listings helps you with everything a developer may need to grow him/her and his/her work, dev.to credits can be used to create a Community Listing for the following categories -

- Conference CFP (1 Credit)
- Available for Hire (1 Credit)
- Education/Courses (1 Credit)
- Job Listings (25 Credits)
- Offering Mentorship (1 Credit)
- Seeking a Mentor (1 Credit)
- Stuff for Sale (1 Credit)
- Upcoming Events (1 Credit)
- Miscellaneous (1 Credit)
- Products/Tools (5 Credits)

## How do we earn credits ?
- either you can Buy them or Earn badges to win credits
- you are rewarded with 5 credits for each badged earned
- click on [badges](https://dev.to/badges) to learn how to get one 
- I have 3 badges hence 15 credits !
![badges](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2hztlakn5ld4w3n6abol.png)