teleren/devto huggingface dataset:
What causes bugs?
Tags: bugs, softwaredevelopment, culture, qa
Published: 2022-09-18 20:10:51

---
title: What causes bugs?
published: true
date: 2022-09-14 00:00:00 UTC
tags: bugs,softwaredevelopment,culture,qa
canonical_url: https://jhall.io/archive/2022/09/14/what-causes-bugs/
---

Here’s something I’ve been thinking about lately: **What causes bugs?**

I don’t mean in micro sense in which the answer might be “typos” or “confusing logic” or “incorrect copy/paste.”

I mean from a business standpoint.

What behaviors, structures, or cultural traits lead to bugs?

Here are a few I’ve thought of.

- Deadlines
- Inexperienced developers
- Developers not writing their own tests
- Developers not being responsible for their own software deployments
- A development team not responsible for fixing its own bugs
- A long delay between bug creation and bug fixing

What would you add to the list? Do you disagree with any of these? Should I explain any of these more completely?

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Commit using ssh Tunel
Tags: git, mercurial, ssh
Published: 2022-09-13 23:25:39

Scenario is 

Machine 1: VPS Cloud :  Folder with repositories /media/repos

Machine 2: host with VSCODE remote ssh on raspberry

Machine 3: Raspberry running the project.

The Machine 3 do not have internet access or vpn limitation and needs to push an committed code to VPS cloud but cant reach the Machine 1.

Ideia is use the Machine 2 as bridge between he machines, but in reall its a ssh local tunneling.

**On machine 2:**

```
ssh -L 0.0.0.0:8888:*:22 -C -N -l userName vpsURL.com
```
basically we are open a port 8888 and redirect to VPS on 22 port.

**On machine 3** raspberry

```
hg push ssh://user@IP_MACHINE_2:8888//media/repos/projectPath

```

This command is pushing originally for machine 2, but the ssh will forward to VPS cloud.

Works with git also.
CNC Technology: The Impact of CNC Technology on Modern Manufacturing
Tags: modernmanufacturing, cnctechnology
Published: 2022-09-13 23:01:05

---
title: CNC Technology: The Impact of CNC Technology on Modern Manufacturing
published: true
description:Let’s see what’s CNC technology all about and how it makes the process of modern manufacturing better.
tags: #modernmanufacturing #cnctechnology
---
Today, the CNC technology is reaching new heights. CNC companies are exploring different [strategies for branding](https://www.digitalsilk.com/types-of-branding-strategies), they are being more visible and are keeping the touch with trends. New technologies are developing as we speak.
It’s possible today to take raw materials and develop a product by using a programmed pattern. This is a process that is brought to us by professionals in the field of CNC technology who developed a CNC machine. This computer numerical control device brought a lot of benefits to the manufacturing process and it is definitively a step forward in comparison to traditional machine manufacturing. Let’s see what’s CNC technology all about and how it makes the process of modern manufacturing better.
##How CNC Technology Increases Efficiency
Although automation as a practice can be the subject of discussion in some industries, when it comes to manufacturing we’re facing a pretty obvious situation. Machines are more efficient than humans in the manufacturing process (at least a significant part of that process) since they can do the same thing continuously, without taking a break.
##How CNC Technology Improves Accuracy
[CNC machining](https://www.emachineshop.com/custom-cnc-machining-most-popular-methods-and-materials/) is what makes making multiple versions of the same product possible, and these products are exactly the same. The addition of CNC technology is what helps each product to come out the same (if we use the same operation to create each product, of course). This is something that makes a significant difference and helps companies to grow.
##CNC and Safety
The main cause of workplace injury in manufacturing was the manufacturing (and design) of small parts. This is why automation and removing the human element from the process of creation is something that has a positive impact on safety.
##Computer-controlled Machines and Supervision
When employing computer-controlled machines, supervision is restricted. A great benefit of this technology is that supervision is needless, and once programmed machines can even be left to run on their own, except for a few tools that will need to be replaced occasionally.

Computer Numerical Control machines are making great changes in manufacturing. The implementation of these machines in the manufacturing process is a great example of the successful automation of one industry. These machines are crucial for modern manufacturing as the most popular industrial option among plenty of manufacturing technologies of today.
Концепции Aleo | Записи
Published: 2022-09-13 22:57:50

Запись - это фундаментальная структура данных для кодирования активов пользователя и состояния приложения.

Каждая запись аккаунта содержит информацию, которая определяет владельца записи, ее хранимое значение и состояние приложения. Аккаунт Aleo может создать [транзакцию](https://developer.aleo.org/concepts/transactions/) для потребления записи и создания новой записи на ее месте. Записи на Aleo шифруются по адресу владельца записи, что обеспечивает полную конфиденциальность всех записей на Aleo.

## Компоненты записи
Запись Aleo преобразуется в следующий формат:

Параметр - `owner`
Тип - адрес

Параметр - `gates`
Тип - u64

Параметр - `data`
Тип - Map<Identifier, Entry>

Параметр - `nonce`
Тип - группа

**Owner**

```
aleo1r0dry2tlhjt0yplctz85692kjpqsadn7xgxsmrehkasykjxynypqza3fpl
```

Владелец записи является адресом аккаунта и указывает сторону, уполномоченную проводить запись.

**gates**

```
4130
```
Gates записи определяют количество кредитов Aleo, хранящихся в записи.

**Data**

```
[ RECORD BYTE MAP ]
```
Data записи кодируют произвольную прикладную информацию.

**Nonce**

```
3024738992072387217402876176731225730589877991873828351104009809002984426287group
```

## Дополнительные сведения

**Шифрование записей**
Когда в ходе транзакции создается запись, она надежно шифруется в транзакции и сохраняется в реестре. Это позволяет пользователям безопасно и конфиденциально передавать данные записи и активы друг другу через публичную сеть. Расшифровать эти записи могут только отправитель и получатель с соответствующими ключами доступа аккаунта.
How to get the number of elements in an array or the length of the array in Go or Golang?
Tags: go
Published: 2022-09-13 22:09:56

---
  title: How to get the number of elements in an array or the length of the array in Go or Golang?
  published: true
  tags: Go
  date: Wed Sep 14 2022 03:39:56 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/get-number-of-elements-in-array-or-length-go-golang
  cover_image: https://melvingeorge.me/_next/static/images/main-c0ec1572bf19b1323fb03c67956fe1d8.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/get-number-of-elements-in-array-or-length-go-golang)
  
To get the number of elements in an array or the length of the array, you can use the `len()` built-in function and then pass the array variable or the array itself to the function in Go or Golang. The function returns the number of elements in the array.

### TL;DR

```go
package main

import "fmt"

func main(){
    // a simple array
    name := []string{"John Doe", "Lily Roy", "Roy Daniels"}

    // get the length of the array
    // using the `len()` function and pass the
    // `name` variable as an argument to it
    nameLength := len(name)

    // log the value of `nameLength` variable
    fmt.Println(nameLength) // 3 ✅
}
```

The length in the array refers to the number of elements currently present inside the array. The length of an array is not to be confused with the capacity of an array. Capacity refers to the total number of elements the array can hold.

For example, let's say we have an array called `name` with `string` type values of `John Doe`, `Lily Roy`, and `Roy Daniels` like this,

```go
package main

func main(){
    // a simple array
    name := []string{"John Doe", "Lily Roy", "Roy Daniels"}
}
```

Now to get the length of the `name` array we can use the `len()` function and then pass the `name` variable as an argument to the function. Let's also make a new variable to hold the value returned from the function.

It can be done like this,

```go
package main

func main(){
    // a simple array
    name := []string{"John Doe", "Lily Roy", "Roy Daniels"}

    // get the length of the array
    // using the `len()` function and pass the
    // `name` variable as an argument to it
    nameLength := len(name)
}
```

Finally, let's log the value of the `nameLength` variable to the console to see the length of the array.

It can be done like this,

```go
package main

import "fmt"

func main(){
    // a simple array
    name := []string{"John Doe", "Lily Roy", "Roy Daniels"}

    // get the length of the array
    // using the `len()` function and pass the
    // `name` variable as an argument to it
    nameLength := len(name)

    // log the value of `nameLength` variable
    fmt.Println(nameLength) // 3 ✅
}
```

As you can see that the value of `3` is logged which proves that the `name` array contains `3` elements.

We have successfully got the number of elements in the array. Yay 🥳!

See the above code live in [The Go Playground](https://go.dev/play/p/s8zojCEWq7P).

That's all 😃!

### Feel free to share if you found this useful 😃.

---
Get Know How to Enter the Metaverse
Tags: metaverse
Published: 2022-09-13 22:01:44

Metaverse is being talked about a lot on various platforms. Metaverse is a virtual space that uses augmented reality and virtual reality technology to interact. This application has made many people curious about how it works and how to enter the metaverse.



**How to Enter the Metaverse via Some Popular Platform** 

The term metaverse was popularized by Facebook CEO Mark Zuckerberg and is predicted to become the future virtual world. As a result, many people are starting to learn how to enter the metaverse to experience the power of this technology.

There are several platforms that you can choose to enter the metaverse. Here are some popular platforms that can be a way to enter the metaverse:

Read more [on Medium](https://medium.com/@dailyabay/get-know-how-to-enter-the-metaverse-8d06626c136b)


Connect with me, you can find me here

[Moch Akbar Azzihad M](https://dailyabay.com) / [Facebook](https://www.facebook.com/dailyabay/) / [Instagram](https://www.instagram.com/dailyabay/) / [Twitter](https://www.twitter.com/dailyabay/)
Build Your Own Custom Factor
Tags: security, productivity, programming
Published: 2022-09-13 21:36:06

> Original post written by [Geoffrey Goodman](https://auth0.com/blog/authors/geoffrey-goodman/) and [Oliver Wang](https://auth0.com/blog/authors/oliver-wang/) for Auth0 blog.

### Customers can now add custom prompts or factors in their post-login flow.

### <br>

We are excited to share that our customers that use Actions -  Auth0’s flagship extensibility product - can now add custom prompts or factors in their post-login flow. This enables developers and partners to confidently record the completion of a factor upon returning after a custom redirect. Auth0 delivers more tools, features, and options for developers to give them the support and capabilities they need to customize their customer’s experience through pro-code flexibility.

We have introduced a new method to the API of post-login Actions when continuing the flow after a successful custom redirect. This method allows a customer and/or partner to store the completion of that custom factor right in the user’s session. What is powerful about this is that they can then check whether that customer record is in a user session in each login and skip that prompt if it’s there already. Because it’s stored in the user session itself, it benefits from any current and future session management features within the Auth0 product offering.

## What Is the Problem We Are Solving?

Historically, there was no good way for customers to use Actions to securely implement custom prompts or custom factors in a user-friendly way. They could use user metadata or application metadata, but those objects exist across all user sessions. There was also no good way for customers or partners to see whether a user on a specific device had completed the necessary factors to login. This meant forcing users to re-perform the custom prompt or factor more often than necessary.

As an example, let's say you’re a developer for a banking app that has a special requirement to use a custom multi-factor authentication service, and you want that authentication to be associated with a user's session and or device for added security. That is where the ability to add a custom prompt enables you to build that customer experience and address that need.

## See It in the Real Example!

Let's take a look at a real example! Below is a sample Actions code for a Partner Integration implementing a custom authentication factor.

[Read more...](https://auth0.com/blog/new-actions-feature-build-your-own-custom-factor/?utm_source=devto&utm_medium=sc&utm_campaign=devto)
Installing Lunar Vim
Tags: lunarvim, vim, neovim
Published: 2022-09-13 21:22:12

## Brief description
Is a fast IDE layer for Neovim. Vim, at some point let you be focus on the code, and by that, use the keyboard as the main tool, instead of the mouse.

## Previous installed tools.
We can use the package manager [Homebrew](https://brew.sh/) to install the main tools:

```
brew install git
brew install node
brew install python
brew install neovim
brew install lua
```

Optional **Yarn** if `npm`does not work in the installation process.
```
brew install yarn
```

**[Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)**
```
curl https://sh.rustup.rs -sSf | sh
```


## Installation
Lunar Vim installation:
```
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh)
```

Asked questions:
- Would you like to install LunarVim's NodeJS dependencies?: `y`.
- Would you like to install LunarVim's Python dependencies?: `y`
- Would you like to install LunarVim's Rust dependencies?: `y`

Then we can use the command `lvim` to use it our terminal

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

## Oficial Documentation:
- [Lunar Vim](https://www.lunarvim.org/)
Match VideoName with VideoID then add in an API URL
Published: 2022-09-13 21:06:21

5 videos are uploaded on the platform, I need to ask the video name from a user to input, next find the video ID and then add it to the API URL automatically. How can I find the videoID by VideoName?

I am NOT allowed to use urllib and loops



This is my code:

response = requests.get(url,headers=hdr )

### Response: 200 OK

print("If Response=200 Script run is OK : " , response.status_code)



This is my JSON:

{

'accountId': 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',

'id': '7ea0c5e34a',

'partition': None,

'externalId': None,

'metadata': None,

'name': 'davide_quatela--people_in_frankfurt',

'description': None,

'created': '2022-09-07T21:31:52.818+00:00',...
Web Components: Fulfilling React’s Promise
Tags: react, web, components, javascript
Published: 2022-09-13 17:58:02

React has become one of the top frameworks (I mean libraries) based on the following promises. React is fast, it allows developers to create reusable components, it is not opinionated, and it is fun and easy according to its creators.

 See the videos Rethinking Best Practices
https://www.youtube.com/watch?v=x7cQ3mrcKaY&ab_channel=JSConf and
https://www.youtube.com/watch?v=DgVS-zXgMTk. This sounds great, sign me up.

The reality is that React failed to live up to any of these promises. The virtual DOM takes a lot of memory and the diffing process requires 2 virtual DOMs which is a huge memory hog. It also is slow to load and if you open multiple instances of the same website, which many people commonly do, you have to download the whole React app for each tab. 

Numerous studies have shown that web pages built in web components significantly out perform the same page built using React. Part of the reason this is the case is that web components do not use a virtual DOM. They interact with the DOM directly and they are built into the W3C specification so they work natively with browsers. Web components are fast, unlike React. 

React promises that it has reusable components. This sounds great, but the reality is that React components can only be reused in other React applications. Not only that, but even reusing React components requires a lot of rewiring. At the least you have to reset up the passing of props and functions for the new app. 

Web components are reusable just like any other web component, such as the <div> tag or a <textarea> or<iframe>. So web components can be used in React apps, Angular, Vue, Rails, or in an app that is not using any framework.

React has consistently claimed that it is not opinionated. But anyone who has tried to build anything real with React knows this is a blatant lie. The only sense in which this statement is true, is that you can probably use any backend database technology with React. However, React completely takes over every thing else. Examples of this can be found in numerous questions on Stackoverflow. The answer is almost always to rewrite a solution from another technology. 

Web components can be used with any backend or frontend technology including React. 

The last big claim is that React is fun and easy. This is complete marketing hype. React has its own DSL (Domain Specific Language), it is wordy (not DRY), and is not intuitive. React is like a child who only a mother could love. I cannot say you will find Web Components as fun and easy, but it works the same way browsers work. So it is the opposite of a DSL and very useful to learn. 

React failed to live up to any of its initial promises, however Web Components do.
my-button-ssg
Tags: javascript, html, opensource, vercel
Published: 2022-09-13 20:46:31

The first day of OSD600, the class was asked to create a **_Static Site Generator (SSG)_** as the first assignment of the course. We were given the freedom to choose what language the assignment was done in. I decided to name my project "**my-button-ssg**", as it was a simple name that represents me. I then chose my language of choice which happens to be in _**JavaScript**_. 

##my-button-ssg 
**my-button-ssg** is a program that generates HTML files based on user command-line input. For example, we have 5 .txt files provided by our professor _David Humphrey_. These are chapters reading from the book "Sherlock-Holmes". With a simple command, **my-button-ssg** could convert all of these .txt files into HTML files.

## Features

1.  I make my code takes the first line of the .txt file which generally was as the title and put then to the `<title> </title>` and add it into `<h1> </h1>` to the top of the `<body>`.
2.  used my own `<footer></footer>`.

## Usage
Clone the source code from Github
Open the source file with Visual Studio Code
Install the npm package 'npm install' and yargs by `npm -i yargs`

##Options
Use the command `node server.js -h` to get help information.
Use the command `node server.js -v` to check the version.
Use the command `node server.js -i filename.txt` to convert singular file into `.\dist` folder
Use the command `node server.js -i .\foldername\` to convert contents of folder into `.\dist` folder

## Links
Click [Here](https://my-button-ssg.vercel.app/) for the DEMO link.

Link to [Repository](https://github.com/LostButton/my-button-ssg)
Hundreds of fake orders. CARDDING issue. Help.
Tags: cardtesting, cardding
Published: 2022-09-13 20:39:32

Last night we started receiving order notifications for the same client, order items, but with different credit cards. We have received over 1500 of them. Stripe said they would escalade this issue with their specialists, and email me back. But knowing how slow they are to help with anything, I'm worried some more damage could be done before they give us some help. At this point I have disactivate the Stripe plugin in Wordpress to stop this. But obviously, this will not solve the problem. 

My hosting company said that maybe if Stripe would disable the webhook embedded in our site, that could help (don't know what that means, and I wouldn't know how to do that).

I'm a junior (very junior) web developer, and at this point, this is all soooo over my head. If you have any recommendations that would help me fix this, I would greatly appreciate it.

Sincerely, 
Brigitte
How to Get a Domain Key at Logify
Tags: authentication, loginwithlogify, sso, tutorial
Published: 2022-09-13 20:37:58

**Step 1: Signup at[ logify.id](https://logify.id)**
After sign in, you will get this screen, click on Continue as individual

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



**Step 2: Register your organization**
Click on the Work tab at the top right corner.
Click Create New Organization from left navigation bar
Note: if you are not an organization, you can register with your project name.

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



Fill the organization details. Let's take an example of indeed where users go to search for jobs. Here indeed’s designated employee will register the organization.

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

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




**Step 3: Register your domain**
Click on organization name (i.e. indeed) on top left corner.

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



Click on Domain on left navigation bar
Click on Add new Domain which is at top right side.

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



Fill the form and create a Domain.

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


After domain creation, View Domain button will appear at top right corner. Click on that button to get the domain key.


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

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




This is how you will get a Domain Key which you will be using in your Projects.
Active Record Validations
Tags: rails, ruby, beginners
Published: 2022-09-13 19:53:32

Validations are used in order to ensure that the data persisted to the database is valid. 

#Why Validate?
  Validations can help ensure input data is compatible with existing data. They can help assure a valid email address or username is used. They can make sure a data set designed to be integers only stays that way.

#Common Validations
- acceptance
- validates_associated
- confirmation
- comparison
- exclusion
- format
- inclusion
- length
- numericality
- presence
- absence
- uniqueness
- validates_with
- validates_each

Sources: https://guides.rubyonrails.org/active_record_validations.html#validations-overview