teleren/devto huggingface dataset:
Top 5 Websites You'll Love as a Developer👨‍💻
Tags: webdev, javascript, programming, productivity
Published: 2023-06-25 10:19:22

There are many websites out there that can make our jobs as developers easier, today, I would like to share my top 5 favorites. Please feel free to comment on any websites you've found useful in the comments below.

## Dev Docs

Dev Docs is a collection of multiple API documentation in a searchable interface. I've found it extremely helpful while trying to find a perfect API for my projects.


![Dev Docs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g431gl8v4r4shpp6gnaa.png)
Check it out: [https://devdocs.io/](https://devdocs.io/)

## Roadmap

Roadmap is a website that allows you to get a personalized roadmap based on what type of developer you are. Roadmap also provides additional educational content for you to further improve your skills as a developer.

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


Check it out: [https://roadmap.sh/](https://roadmap.sh/)

## Code Beautify

Code Beautify is a free online tool that allows you to format your code and do simple tasks like converting a decimal into a Hexidecimal number. 


![Code Beautify](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uohzycp134j7m4ywmx1t.png)

Check it out: [https://codebeautify.org/](https://codebeautify.org/)

## CodeCademy

CodeCademy is a free website that allows you to learn skills developers need to know in an orginanized way. CodeCademy also teaches you simple projects which you can do to build a portfolio.

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

Check it out: [https://www.codecademy.com/](https://www.codecademy.com/)

## Codepen

Codepen is a community of developers who share and test their front-end code. Codepen is where you can find cool frontend projects and animation all for free.


![Codepen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/93obh6dy91owcc4mmnoj.png)

Check it out: [https://codepen.io/](https://codepen.io/)


I hope you enjoyed this article and found it useful! Consider checking out and bookmarking some of the above tools you found useful.
An open invitation
Published: 2023-06-24 21:12:08



A few months ago I tweeted out an open invitation for anyone new to contributing to open source.

::social-post{link=https://twitter.com/danielcroe/status/1630239320375463937 datetime=2023-02-27T16:11:57.000Z social=twitter}
If you're new to contributing to open source or [@nuxt_js](https://twitter.com/nuxt_js), and want to, let me know. I'd be really happy to have an informal chat, pre-PR review, etc. ❤️
::

When people messaged me, I sent through a link so they could book a short call at a time that worked for them.

I was honestly astounded at how many people wanted to chat. People I had never met or encountered. And even people I 'knew' from online. Some wanted to contribute but were entirely new to open source. Some had ideas they wanted the chance to implement. A couple wanted me to 'pitch' Nuxt to them.

## What I learned

1. I had mixed feelings that _so many_ people wanted to talk - at first. Seeing virtually every free day I had be booked for the next month was a little daunting.

1. Looking back at those calls, I don't regret a single one. A number of people I'd now consider valuable contributors to Nuxt messaged me - and we had a chance to talk for the first time. And I think there were plenty of folk who would be assets to any project.

1. I've summarised [a few thoughts](https://roe.dev/blog/contributing-to-nuxt) about contributing to Nuxt that came out of these calls.

1. I absolutely want to have an open-door policy in future.

## An open invitation

So here's the deal. If you want to have a 10-minute chat about anything, then I would love to talk to you.

Particularly, if you want to be involved in open source and you feel you lack _experience_ or _background_, please let me know. I will make time for you and I know others will too.

https://cal.com/danielroe/intro

## Consultancy

I also want to make it easy for people to engage me a professional basis. I am fairly limited in terms of the time I have, but I'm happy to make it easy to book an hour's call.

https://cal.com/danielroe/consult
Beginners series learning Javascript
Tags: webdev, javascript, beginners, tutorial
Published: 2023-06-25 10:11:27

Hi, my name is Dennis. I am a front-end web developer and a Technical writer.
Are you getting started with learning javascript to power up your skills? if this is you, then you have found the right place to hold on to for a while. A journey of a thousand steps starts with a single step. It is even worthier when the journey is heading to the right direction. I will be creating a series of javascript tutorials from beginner level to advanced level. After completing this series, you will write javascript lines with confidence.
Lets embark on this exciting journey of growth together.

## Prerequisites
This series do not require you to have previous knowledge with javascript. However, you should already have prior knowledge of working with HTML AND CSS. 

## Where to learn?
I will be writing and publishing the articles here.


*Written by Dennis Mbugua(eikev)*
 Follow me on [Twitter](https://twitter.com/eikev_dennis)
AI Rubiks Cube Solver [3*3]
Tags: javascript, ai, programming, github
Published: 2023-06-25 09:50:56

🧩 Solving the Puzzle: Introducing the AI Rubik's Cube Solver 🤖

Are you tired of endlessly twisting and turning your Rubik's Cube, only to end up frustrated with a jumbled mess? Well, fret no more! We're excited to introduce our latest creation: the AI Rubik's Cube Solver. This groundbreaking project combines the power of artificial intelligence and advanced algorithms to conquer the enigmatic Rubik's Cube with unmatched precision and speed.

With the AI Rubik's Cube Solver, you can bid farewell to countless hours of manual solving and welcome a new era of effortless puzzle-solving mastery. This intelligent solver harnesses the capabilities of machine learning and pattern recognition to analyze the current state of the cube and devise the most efficient series of moves to achieve the desired solution.

We believe in the power of collaboration and community driven projects, which is why we've made the AI Rubik's Cube Solver an open source endeavor. We invite developers, enthusiasts, and curious minds to explore the project on GitHub
Together, we can push the boundaries of Rubik's Cube-solving and unlock new possibilities.

So, if you're ready to embark on a thrilling journey of Rubik's Cube mastery, dive into the world of the AI Rubik's Cube Solver. Unleash the potential of artificial intelligence, challenge the boundaries of puzzle-solving, and experience the joy of effortlessly solving the Rubik's Cube like never before.

GitHub Repository: [Check Out Here](https://github.com/suhasasumukh/AI-Rubiks-Cube-Solver)
Follow me on Twitter for Daily insight on AI: [Suhas on Twitter](https://twitter.com/suhasasumukh)

Join us on this exciting adventure and discover a new era of Rubik's Cube-solving possibilities. Let's conquer the cube together! 🚀🧩
Ai isn't replacing your job - trust me, we've been here before.
Tags: ai, developers, career, job
Published: 2023-06-25 09:20:42

As someone who has weathered several transitions in the technology landscape, I've learned that change, though often intimidating, brings with it a wealth of opportunities.

I remember the early days of my career in web development when tools like HTML, CSS, and JavaScript frameworks were emerging. Many viewed these as threats to traditional coding roles. I recall the apprehension surrounding Dreamweaver in 1997. There was a sense that using such a tool, rather than coding HTML by hand, was somehow 'cheating.'

But in reality, these technologies didn't 'steal' jobs. They transformed them. They opened up new avenues for creativity, efficiency, and complexity in our work, enabling us to transition from hard coding to crafting more intricate, interactive sites. 

Today, AI stands in a similar position. It's seen as a potential job-stealer, an automator of tasks that might leave us, developers, out of work. But if my experiences have taught me anything, it's that such innovations don't eradicate roles - they redefine them.

To the developers early in their careers, I would say this: Embrace these changes. Upskill. Adapt. AI isn’t here to replace you, but to augment your capabilities. Much like HTML, CSS, and JavaScript frameworks, AI will allow you to do more, to innovate further.

Remember, with every significant tech innovation, new roles emerge. The rise of web development tools gave birth to roles like UI/UX designers and frontend developers. Similarly, AI is creating exciting new positions like AI ethicists, data scientists, and machine learning engineers.

These technologies also democratise their respective fields. Just as HTML, CSS, and JavaScript have made the web more accessible, AI has the potential to do the same, making expertise more widely available and breaking down barriers.

Yes, fears are natural with change, but history shows that innovation typically creates as many opportunities as it disrupts. Embracing AI and adapting to its growth could lead to a richer, more diverse tech landscape.

Lastly, remember this: Technology is a tool designed to augment our capabilities, not replace them. HTML, CSS, JavaScript frameworks, and now AI, all serve to amplify our abilities to create, to solve problems, to make a difference.

As you shape your future, learn from those who have navigated past transitions. AI, like the web tools before it, is a tool in your hands. Use it wisely to create, innovate, and open up new possibilities for your career.
How to build microservices with Docker - Introduction
Tags: docker, microservices, tutorial
Published: 2023-06-25 09:07:59

Hello everyone,
Microservices are very popular these days, and rightly so. They offer a lot of flexibility and freedom to the developers. So, I decided to learn them and share my knowledge with you. I hope you know, in theory, what microservices are. If you're not familiar with the concept, [this video](https://www.youtube.com/watch?v=CdBtNQZH8a4) is an excellent place to start.
I've decided to break my journey into a series of 3-4 posts, and this is the first part.
I'll add everything to Github, so you can check out the repo [here](https://github.com/saini-g/microservices-shop).

## Overview

Let's start with a brief summary of the entire project that we'll be building. We'll make a simple e-commerce application and the high level design will look like this:


![Application architecture diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aldng23d7xar7s07pmqb.png)


As you can see, there are 4 main services:
- **Products:** Used to list and search for products.
- **Orders:** Used to place new orders. This is protected by the auth server so users can't place orders unless they're logged in.
- **Notifications:** Used to notify users when a new order is placed.
- **Auth:** Used to check user authentication before placing orders.

The other components in the architecture are:
- **NGINX server:** Acts as the API gateway, reverse proxy, and load balancer.
- **NATS broker:** [Nats.io](https://nats.io/) is a messaging platform used to build distributed systems. Here we'll use it to facilitate communication between different services by publishing messages.

I'll dive into each individual component in later parts of this series, but I've tried to keep the services as minimal and simple as possible and put the main focus on the organisation and orchestration part of the entire microservices application.
So, you'll notice that the functionality offered by each service is not very sophisticated, but it gets the idea across.

## Tech Stack

- Node.js
- Python
- Docker, docker-compose
- Nginx

This is it for the introduction. The next part onwards we'll get our hands dirty with the code.
I hope you'll enjoy this series and learn something new.

Feel free to post any questions you have in the comments below.

Cheers!
Jest worker encountered 4 child process exceptions, exceeding retry limit
Tags: jest
Published: 2023-06-25 09:06:07

I ran across to this error while I was writing test code with Jest, being stunned by repeated long error messages in console ending with this test failure report.

![Jest error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nsyjxcwrzopbenyfkchq.png)

While there might be several other reasons why this error might occur, in my case it was very simple - **<u>mishandled async error</u>**.

All you have to do is to check if you have any Promise not handled asynchronously.


## Error reproduced
```
// user.controller.spec.ts
it('should throw Error if invalid user type.', () => {
  const result = controller.signup(signupForm, { type: 'invalid' });
  expect(result).rejects.toThrowError();
});

// user.controller.ts
async signup(form, query) {
  if (is<UserType>(query.type)) {
    throw new BadRequestException();
  }
  return true;
}
```

method `signup` throws an error asynchronously, and this is not handled in test code. For some reason, Jest considers test has gone wrong and retries it again in its other workers.

This error, can be suppressed if --maxWorker flag is set to 1 when running the test. However, this does not solve the problem from the ground, and one way to deal this issue is looking at async handling.

## Solution
In the case above, only two words are added.

`aysnc` and `await` to where it should be.
```
it('should throw Error if invalid user type.', async () => {
  const result = controller.signup(signupForm, { type: 'invalid' });
  await expect(result).rejects.toThrowError();
});
```

## P.S.
However, it's quite weird as this error does not always appear in similar situations. Seems like it is affected by other test cases.
All the ducks. Two twenty two
Tags: perl, python, theweeklychallenge
Published: 2023-06-25 08:30:30

## Weekly Challenge 222

Sorry for no post last week. I was planning to do it while on holiday in the beautiful [Coffs Harbour](https://www.visitnsw.com/destinations/north-coast/coffs-harbour-area/coffs-harbour) in Northern NSW, Australia. Unfortunately, I got called up on Saturday evening to debug a production issue at work.

[challenge](https://theweeklychallenge.org/blog/perl-weekly-challenge-222/), [My solution](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-179/sgreen)

## Task 1: Matching Members

### Task

You are given a list of positive integers, `@ints`.

Write a script to find the total matching members after sorting the list increasing order.

### My solution

This is relatively straight forward, I hope. Create a sorted list `ints_sorted`, and then use list comprehension (Python) and grep (Perl) to count the number of values that are same.

In python we use:

```python
sum(1 for x in range(len(ints)) if ints[x] == ints_sorted[x])
```

While the Perl solution is:

```perl
scalar( grep { $ints[$_] == $ints_sorted[$_] } ( 0 .. $#ints ) )
```

They both do the same thing. Count from 0 to one less than the length of the array, and compare the value at each position of the list. The pythonic way is to use `sum(1...`. In Perl, `scalar` returns in the number of items in a list, while `grep` will eliminate items that aren't equal.

### Examples

```bash
$ ./ch-1.py 1 1 4 2 1 3
3

$ ./ch-1.py 5 1 2 3 4
0

$ ./ch-1.py 1 2 3 4 5
5
```

## Task 2: Last Member

### Task

You are given an array of positive integers, `@ints`.

Write a script to find the last member if found otherwise return 0. Each turn pick 2 biggest members `(x, y)` then decide based on the following conditions, continue this until you are left with 1 member or none.

1. if `x == y` then remove both members
1. if `x != y` then remove both members and add new member (`y-x`)

### My solution

These are the steps I took

* Sort the list (array in Perl) `ints`.
* Loop while there is more than one item in the list
    * Remove the two last values, called `x` and `y`.
    * If `x` and `y` are different, add the difference between them to the `ints` array, and sort it again
* Print the last number if there is one, otherwise print `0`.

### Examples

```bash
$ ./ch-2.py 2 7 4 1 8 1
1

$ ./ch-2.py 1
1

$ ./ch-2.py 1 1
0
```
Cash App Fee Calculator Overview
Tags: cash
Published: 2023-06-25 08:18:01

1. Introduction
Cash App, developed by Square, has become a popular peer-to-peer payment platform that allows users to send and receive money quickly and conveniently. While Cash App offers a user-friendly interface and several useful features, it's important to be aware of the fees associated with different types of transactions. The Cash App fee calculator is a valuable tool that can help you estimate the fees before initiating any transfer or transaction.

2. Understanding Cash App Fees
Cash App charges fees for various types of transactions, including sending money, receiving money, and cashing out. It's crucial to understand these fees to avoid any surprises when using the app. The fees may vary based on factors such as transaction type, location, and payment method. Common fees include:

Standard Transfer Fee: This fee applies when you transfer money from your Cash App balance to your linked bank account. It is usually a percentage of the transferred amount.
Instant Transfer Fee: If you need immediate access to your funds, you can use the instant transfer feature, which incurs a slightly higher fee.
Cash Out Fee: When you withdraw money from your Cash App balance using an ATM, a fee is charged.
3. How Does the [Cash App Fee Calculator](https://allfeescalculator.com/cash-app-fee-calculator/) Work?
The Cash App fee calculator is designed to provide you with an estimate of the fees associated with your transactions. It takes into account factors such as transaction type, amount, and location to calculate the applicable fees accurately. By using this calculator, you can make informed decisions about the best way to send or receive money through Cash App.

4.  Benefits of Using the Cash App Fee Calculator
Using the Cash App fee calculator offers several benefits:

Transparency: The calculator helps you understand the fees involved, allowing you to plan your transactions accordingly.
Cost Optimization: By knowing the fees in advance, you can choose the most cost-effective way to send or receive money.
Accurate Estimates: The calculator provides accurate fee estimates, helping you avoid any surprises.
5. Step-by-Step Guide to Using the Cash App Fee Calculator
Here's a step-by-step guide on how to use the Cash App fee calculator:

Step 1: Visit the Cash App website or open the app on your mobile device.
Step 2: Navigate to the fee calculator section.
Step 3: Enter the transaction details, including the transaction type, amount, and location.
Step 4: Click on the "Calculate" button to generate the fee estimate.
Access Git(Github/Gitlab .. ) using multiple accounts on the same system.
Published: 2023-06-25 07:44:20

Often you need to use multiple GitHub/GitLab accounts from the same system and you use the command line to do this. But while trying this you will face so many errors as you can only add one user to use git services, so below are the steps.

Step 1:

Install the Git command-line tool on your system, if it is not already installed.

The link to download git is as follows, you can choose your package according to your OS

https://git-scm.com/download

Step 2:

Generate an SSH key for each of the GitHub accounts you want to use. You can do this by running the following command, replacing “email@example.com” with the email address associated with your GitHub account:

Note: You can see .ssh folder in C:\Users\[Your Username]\.ssh

if not exists then it will automatically create .ssh folder

ssh-keygen -t rsa -b 4096 -C “email@example.com”

Step 3:

When prompted, enter a file in which to save the key. It is recommended to use a different file for each key, so you can easily distinguish between them. For example, you might use “id_rsa_account1” for one account and “id_rsa_account2” for another.

Ex: C:\Users\[Your Username]\.ssh \id_rsa -> C:\Users\[Your Username]\.ssh \id_rsa_account1

Step 4:

Follow the prompts to enter a passphrase for the key. This passphrase will be used to encrypt the private key, so make sure to choose a strong and unique passphrase.

You can even not give any passphrase

Two files will be generated for each key

Id_rsa_account1

id_rsa_account1.pub

Step 5:

Once the key has been generated, copy the public key (.pub) and paste it in your github account ssh section.

[In Github go to settings > SSH and GPG > New SSH key > Add Title of your choice > In key section paste the public key ]

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


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


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


Step 6:

Repeat the steps above for each of the GitHub accounts you want to use.

Step 7:

Create a config file in the same directory (.ssh)

### account 1

Host github.com-account1

HostName github.com

User git

IdentityFile ~/.ssh/id_rsa_account1

### account 2

Host github.com-account2

HostName github.com

User git

IdentityFile ~/.ssh/id_rsa_account2

Step 8:

Now Initialize a git repository in any of the desired location.

Then add all the required files that need to be committed

Then commit those files with an appropriate commit message

Then while adding the remote repo Take the ssh URL and change github.com to github.com-account1

Ex: git remote add origin git@github.com-account1:dummy-proj/dummy-proj.git

You can do the same for git clone too.

Note:
To change your default account
git config user.name “account1”
git config user.email “account1@gmail.com”

Links:
https://github.com/SharathHebbar/Data-Science-and-ML/tree/main/articles/github-multiple-accounts
Kubeflow Installation
Published: 2023-06-25 07:37:31

Installing the Kubeflow pipeline(locally) in the Windows system
Installing Kubeflow Pipeline (KFP) on Windows can be a bit challenging since KFP is primarily designed to run on Linux-based systems. However, you can set up a Windows-based development environment and run KFP using a Docker container.
The following steps will help you to install Kubeflow pipelines for windows system
**Step 1: Install Docker Desktop**
Docker Desktop: https://docs.docker.com/desktop/install/windows-install/
**Step 2: Install Minikube**
Minikube installation link: https://minikube.sigs.k8s.io/docs/start/
Open up your PowerShell in Administrator mode and type in this command
Download and run the installer for the latest release
```
New-Item -Path 'c:\' -Name 'minikube' -ItemType Directory -Force
```
```
Invoke-WebRequest -OutFile 'c:\minikube\minikube.exe' -Uri 'https://github.com/kubernetes/minikube/releases/latest/download/minikube-windows-amd64.exe' -UseBasicParsing
```
Add the minikube.exe binary to your PATH.
Make sure to run PowerShell as Administrator.
```
$oldPath = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine)
if ($oldPath.Split(';') -inotcontains 'C:\minikube'){ `
[Environment]::SetEnvironmentVariable('Path', $('{0};C:\minikube' -f $oldPath), [EnvironmentVariableTarget]::Machine) `
}
```
**Step 3: Install K8s**
Kubectl commands
https://www.kubeflow.org/docs/components/pipelines/v1/installation/localcluster-deployment/
To deploy the Kubeflow Pipelines, run the following commands:
```

Set PIPELINE_VERSION=1.8.5
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/cluster-scoped-resources?ref=$PIPELINE_VERSION"
kubectl wait - for condition=established - timeout=60s crd/applications.app.k8s.io
kubectl apply -k "github.com/kubeflow/pipelines/manifests/kustomize/env/platform-agnostic-pns?ref=$PIPELINE_VERSION"
```
Verify that the Kubeflow Pipelines UI is accessible by port-forwarding:
```
kubectl port-forward -n kubeflow svc/ml-pipeline-ui 8080:80
```