teleren/devto huggingface dataset:
Hacktoberfest: From Community To Society
Tags: html, hacktoberfest
Published: 2022-11-11 02:13:28

## About Hacktoberfest
Hacktoberfest is a month long event that commemorate annually, where developers across all level expertise from various region and various language celebrates by pushing, giving feedback to open source software.

## Throwback From Past Event
Hacktoberfest 2021 was my first attempt participating on this event. During that period, I accomplished over 7 pull requests to [Bellshade](https://github.com/bellshade) organization. Bellshade is a open source community that urges Indonesia beginner developer to learn and contribute to open source software.

The organization has various topic - from Assembly to Python - that everyone across any level of expertise are able to contribute by submitting their code or review the pull requests. Last year my submissions was commited to Python repository, where I covered about basics to intermediate Python topics and it's data structures implementation.

## The Spirit Of Giving

> One year later since my first attempt on participating Hacktoberfest, I realized that Hacktoberfest light the **spirit of giving what we have**, apart how small and simple they are.

When this article was written, I was an senior in my college. Indonesia college student are required to participate in community service as part of their credit. The community service lasts for 45 days. During that period, we are required to plan and execute various topics of action plan. 

We undergo the community service at Jambuwer village, located at hill of Kawi mountain in Malang. There are 4 elementary schools and a junior high school available there, and I was curious how far the junior high school students have learned there. The teacher told us that learning materials are made the same for all classes, because if learning follows the existing curriculum, students will not be able to take part in learning at all. The junior high school has 5 available PCs which are usually use for practicum. **I seek this is as opportunity to introduce website to them**.

The learning material I gave isn't that complicated. I covered about _what is web_, _how web works_, and _components of web_. At the end of each session, we code together, make a simple website with simple tags. They are very passionate when they were coding!.

## Aftermath
In my opinion, what I gave to them doesn't look significant, compared what I can give to developer community. However, I am sure that what I gave to them is a form of what Hacktoberfest value holds : **The Spirit Of Giving**
Project based tutorial caution
Tags: beginners, selftaught, tutorial, community
Published: 2022-11-10 14:53:21

Being self-taught, it didn't take me long in my journey to end up exposed to a project-based tutorial. Regardless of the fact that some are extremely high quality, I almost immediately realized that the tutorial is only as good as your approach to it. 
Once I engaged in the community (which took me longer than it should have), I was able to confirm what before was a personal realization. Project based tutorials can HURT just as much as it could potentially help.
Coming from a background of education and emergency medical services, I know very well that digesting information and knowing the "why" rather than the "how" is precisely the difference between being competent vs being capable.
Tired of seeing some good mates with amazing portfolios struggling to code real time has led me to write this post. Enough with the copy and paste. You're wasting what is likely good material by taking the wrong approach. 
Here's my humble advice. When watching tutorials (especially project based) try your best to learn the concept, rather than "code-along" as its usually advised.
Coding along doesn't have to mean "copy line by line". As a matter of fact, don't even code the SAME project. Come up with your own project that utilizes the same concepts and as you progress through the tutorial, implement the concepts learned.
That will ensure, that you're not memorizing the project, but rather digesting the information being given, and reenforcing the knowledge by true application. 
That is how you increase acquired knowledge and is then able to reproduce the skills learned in any scenario. Example: If watching a tutorial on how to fetch data from a particular API, at the end of the tutorial you should be able to feel relatively comfortable with fetching data from ANY API. 
To conclude, therefore, project-based tutorials are simply tools. The final outcome of using a tool comes with your decision on how to use it.
Good luck on your journey
Improving Izyum development experience
Published: 2022-11-11 01:56:45

This week my task was to add different capabilities to my project that significantly improve the development experience, especially for the open-source project with many contributors. 

## CONTRIBUTING.md
The first thing I added was a [CONTRIBUTING.md](https://github.com/Myrfion/izyum/blob/main/CONTRIBUTING.md) file where I located all info that I used to have in [readme.md](https://github.com/Myrfion/izyum/blob/main/README.md) file about how to install the tool for development setup.

## Code formatter
The first thing I added was a code formatting tool that will help to have common code formatting across the whole app. The most used formatting tool in the javascript world is the [prettier](https://prettier.io/) and I used it many times before so I decided to stick with it again. The installation and setup process was straightforward. I ended up using the such config: 
```
{
  "semi": false, 
  "singleQuote": true,
  "arrowParens": "avoid" 
}
``` 
Then I added the command in package.json that enforces prettier formatting and described how to use it to the CONTRIBUTING.MD, on top of this I added the settings.json config for the vscode environment so people could have a "format on save feature"

## Code Linter
Linter is a tool that helps to use the single code style in the application codebase. For example, linter can make sure that the developer uses `let` variables only in case it is mutated after the declaration and in the other case, it throws an error. [ESlint](https://eslint.org/) is an industry-standard tool for such purposes in the JS/TS world so I used it. Again, the installation process was pretty easy with npm, even for my typescript environment. I found the config in the internet that seems to be widely used and ended up using it:
``` 
{
  "root": true,
  "parser": "@typescript-eslint/parser",
  "plugins": ["@typescript-eslint"],
  "extends": [
    "eslint:recommended",
    "plugin:@typescript-eslint/eslint-recommended",
    "plugin:@typescript-eslint/recommended"
  ]
}
```

## Result
As a result, I improved the development experience of my project and make formatting and code style consistent. When I was done I squash the commit and [merged it](https://github.com/Myrfion/izyum/commit/fb38d42e92c1704b7ef561996b5e82afbcb6fdf4) in the main branch.
Cannons and Jumpers
Tags: gamedev, godot
Published: 2022-11-11 01:45:52

Added the Cannon and Jump abilities to the game!

Here is the cannon. Try to visualize a person climbing into a clown/circus cannon and being blasted through the wall to enter the room next door. The sprite will always aim for the top corner of the room they are currently in to avoid other sprites from slipping through:
![Cannon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xuc3grl7377gj06rpx9x.gif)

Jumping will be for getting over obstacles or holes in the floor:
![Jumping](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xvwzhucc463w94f58ul7.gif)

I'm starting to regret my method of creating holes in rooms with shaders. Each time I need to pass something through a hole, I need to override the normal game physics.. which causes a lot of headache to smooth out for a noob like me. 

I'm far enough along where a project/scrum board will be useful. For most of my projects over the last couple of years I've been using [Trello](http://trello.com), it does a good job of keeping me on track:
![Trello](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m5sck98exh51prlq8r8t.jpg)

Next up:

- Blocker - Sprite will stand still and act as a wall causing other sprites that bump into it to reverse direction.
- Main Menu - Probably something simple to launch a couple of levels
- Backend level formatting - Right now I have a dictionary with each room's size and position and then I add doors and sprites to rooms in separate steps. Eventually I want this to be all one big JSON file that my level editor will generate.
Pure CSS Tab using :target and :has()
Tags: css, csstarget, csstrick, frontend
Published: 2022-11-11 01:39:02

When the CSS `:target` was introduced for the very first time, I was so excited that first I made a [package of modals](https://tanimmahbub.github.io/css_modal/) with different sizes and positions, and then I made a [popup slider](https://tanimmahbub.github.io/css-popup-slider/gallery.html) using the same CSS `:target`

After that, I tried to make a tab the same way, without any effect, just `display: none;` to `display: block;` but, the problem was- how can I display the first tab since the CSS `:target` doesn't work until the trigger is clicked.

Years passed, then a few days ago I came to learn about the `:has()` selector and it was just crazy. After going through the basic of `:has()` selector I found the solution for my CSS Tab that I started years ago.


![The :has() selector solution](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ayo94w38zjami51b842.png)

Now I have one issue left, the `active` state for the tab-buttons. I tried to fix it using `:has()` selector with `a:visited` (the same way in image) but the `a:visited` state doesn't change once its visited. So, waiting for the solution for this. 

The browser-support is not there yet for `:has()` including Firefox and some other browsers. But Chrome supports it, hoppiing it'll be better soon.

We know that there is a _radio-way_ (`[type="radio"]`) to make CSS Tab, I'm just trying to make another way, and now after almost 80% to perfection I'm sharing the idea with you. Let me know your thoughts.

{% codepen https://codepen.io/Tanim_Mahbub/pen/OxzLBv %}


- [CSS Popup Slider](https://github.com/TanimMahbub/css-popup-slider) repository
- [CSS Modal](https://github.com/TanimMahbub/css_modal) repository
Installing SPVM::Numpy - Python/NumPy Porting to Perl
Tags: perl, spvm, python, numpy
Published: 2022-11-11 01:07:27

<a href="https://metacpan.org/pod/SPVM::Numpy">SPVM::Numpy</a> is a <a href="https://metacpan.org/pod/SPVM">SPVM</a>-based <a href="https://perldoc.perl.org/">Perl</a> module.

<a href="https://metacpan.org/pod/SPVM::Numpy">SPVM::Numpy</a> can be installed as a Perl module.

```
cpanm SPVM::Numpy
```

If your system doesn't have Perl, Perl is needed to be installed.

See <a href="https://en.perlzemi.com/blog/20180820153471.html">Perl Download and Installation on Perl ABC</a> to install Perl on Windows/Mac/Linux/Unix.

## What Is SPVM?

<a href="https://metacpan.org/pod/SPVM">SPVM</a> is a static typed language that can be used from <a href="https://perldoc.perl.org/">Perl</a>. <a href="https://metacpan.org/pod/SPVM">SPVM</a> is the essential part of the Python/numpy porting to Perl. If you haven't heard of Perl's SPVM. Please see also <a href="https://metacpan.org/pod/distribution/SPVM/lib/SPVM/Document/Language.pm">SPVM Language Specification</a>. 

## How potential dose SPVM have?

Growth is expected in the fields of Bio Tech, AI/ML, Apple/iPhone/iPad Apps, Google/Android Apps, IoT Device, Connected Car, Smart Device, Smart Home, etc.

This is because SPVM can produce an executable file that supports cross platforms and make easy to calculate arrays and bind C/C++ and Nvidia/GPU/cuda.

## This project really needs contributors, sponsors, investors.

This project really needs contributors. I am looking for contributors, sponsors, investors.
Introdução as HOFs - .some() e .every()
Tags: javascript, beginners, braziliandevs, codenewbie
Published: 2022-11-11 00:56:54

## Tabela de Conteúdo

- [some](#some)
- [every](#every)
- [Links Úteis](#links-úteis)

## .some()

### O que faz?

A HOF `.some()` irá verificar se ao menos um elemento do Array cumpre as condições estabelecidas.

- [❌] Modifica o Array original

### Sintaxe

O `callback` esperado deve retornar `true` ou `false`, para que então se possa fazer as verificações.

O `.some()` irá iterar sobre o Array até que um elemento cumpra a condição passada, retornando `true`. Caso nenhum elemento cumpra a condição, o `.some()` retornará `false`.

```js
Array.some(callback);
Array.some((element, index, arr) => { });

Array.some((e) => {
  return e > 10; // verifica se ao menos um elemento é maior do que 10
});
```

```js
const numbers = [10, 2, 32, 13, 21];

const haveSomeGreaterThanTen = numbers.some((number) => {
  return number > 10 // verifica se ao menos um número é maior do que 10
});

console.log(haveSomeGreaterThanTen); // true
```

### Tradução - JavaScript -> Português

Podemos traduzir essa HOF com a seguinte expressão:

- _“Existe pelo menos um elemento que cumpre X condição?”_

<br />

<small>[Voltar ao topo](#tabela-de-conteúdo)</small>

---

## .every()

### O que faz?

A HOF `.every()` irá verificar se todos os elementos do Array cumprem as condições estabelecidas.

- [❌] Modifica o Array original

### Sintaxe

O `callback` esperado deve retornar `true` ou `false`, para que então se possa fazer as verificações.

O `.every()` irá iterar por todo o Array verificando se todos os elementos cumprem a condição passada, retornando `true`. Caso algum elemento não cumpra a condição, o `.every()` retornará `false`.

```js
Array.every(callback);
Array.every((element, index, arr) => { });

Array.every((e) => {
  return e > 10; // verifica se todos os elemento são maiores do que 10
});
```

```js
const cities = ["São Paulo", "Rio de Janeiro", "Curitiba"];

const areAllCitiesString = cities.every((city) => {
  return typeof city === 'string'; // verifica se todas as cidades são do tipo string
});

console.log(areAllCitiesString); // true
```

### Tradução - JavaScript -> Português

Podemos traduzir essa HOF com a seguinte expressão:

- _“Todos os elementos cumprem X condição?”._

<br />

<small>[Voltar ao topo](#tabela-de-conteúdo)</small>

---

## Links Úteis


### .some()

- [Documentação MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some)
- [Documentação W3Schools](https://www.w3schools.com/jsref/jsref_some.asp)
- [YouTube Tecnologia em Vídeo](https://www.youtube.com/watch?v=GXpBfDW4lT8)

### .every()
- [Documentação MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every)
- [Documentação W3Schools](https://www.w3schools.com/jsref/jsref_every.asp)

<br />

<small>[Voltar ao topo](#tabela-de-conteúdo)</small>
How do you share config secrets for development & production?
Tags: webdev, discuss, node, watercooler
Published: 2022-11-11 00:53:41

If you develop an application that requires a bunch of config (e.g., tokens for third party dependencies like auth0, launch darkly, open telemetry, etc), database password, aws access keys, or any other type of sensitive information: 

How do you share all of that config across your team? If someone new wants to contribute, how do you get them all of the secrets so they can run your app? What tools or workflow do you use to achieve this? What are your best practices so you don't have secrets everywhere?
Export your streaming data for deeper data exploration and compliance needs
Tags: devops, monitoring, observability
Published: 2022-11-11 00:34:04

Here’s the scoop on the latest New Relic product innovations, partnerships, and events:


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

**Export your streaming data for deeper data exploration and compliance needs**

You can now use NerdGraph to export streaming data through Amazon Kinesis Firehose. Deepen your data exploration and meet your compliance needs by exporting your data as it’s being ingested.

[Learn More](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-streaming-export/?utm_source=devto&utm_medium=community&utm_campaign=global-fy23-q3-dev_to_techupdates)


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


**Join our webinar: Up-Level Uptime, Kubernetes Config for Cost and Performance**

Join us November 16 at 10 AM PST/1 PM EST for this practical 30-minute demo with a special focus on how to improve performance, uptime, and reliability. This is the first step to understanding and analyzing your data with New Relic.

[Register Now](https://newrelic.com/events/2022-11-16/k8s-ops?utm_source=devto&utm_medium=community&utm_campaign=global-fy23-q3-dev_to_techupdates)

**End-of-Life Announcements: New TLS standard requirements**
As part of our commitment to security and evolving regulatory Transport Layer Security (TLS) standards, we are updating our TLS requirements for all inbound connections to version 1.2 or above on February 1, 2023. Want to know more, ask a question, or leave a comment? Check out this Explorers Hub post.

[Learn More](https://discuss.newrelic.com/t/tls-1-0-1-1-to-be-disabled-for-all-inbound-connections-on-feb-1st-2023/188451?utm_source=devto&utm_medium=community&utm_campaign=global-fy23-q3-dev_to_techupdates)

**Support tip of the week: Use NerdGraph to recover lost dashboards**

Sometimes we get a little over-zealous in our cleaning and delete things that later we realize really did bring us joy. If that’s ever happened to you while cleaning up your dashboards, don’t fear! You can leverage the amazing NerdGraph to get it back.

[Learn More](https://discuss.newrelic.com/t/relic-solution-using-nerdgraph-to-recover-a-deleted-dashboard/142855?utm_source=devto&utm_medium=community&utm_campaign=global-fy23-q3-dev_to_techupdates)



---

_Join the [New Relic Slack community](https://get.newrelic.com/MzQxLVhLUC0zMTAAAAGHlVlC-d2ZVCwNLc_hpcLD836-j2gmD6sZkxkygeaaSTPg-4QlmIY6omb5Gt1rHHzeU1xsqJc=) to continue the conversation with hundreds of other developers using New Relic._

_Not an existing New Relic user? [Sign up for a free account](https://newrelic.com/signup/?utm_source=devto&utm_medium=community&utm_campaign=global-fy23-q3-dev_to_techupdates) to get started!_
Unit testing in Go
Tags: opensource, ssgo, testing, go
Published: 2022-11-11 00:30:05

Hey there! Thanks for checking in again! This week, I've been trying to implement unit testing for my Open Source project [SSGo](https://github.com/devils2ndself/SSGo). Let me tell you more about how I did it.

## Gathering prerequisites

In my unit tests, I wanted to check HTML parsing capabilities of SSGo; however, my code was not structured properly for that.

HTML parsing was not enclosed in a separate function, rather it was a part of a big GenerateHTML function, which created needed files, read from existing files and generated HTML. I needed to first refactor the code a bit.

I separated ParseText and ParseMarkdown functions for parsing .txt and .md files respectively, which also allowed to fix a couple of bugs and inconsistencies in code.

Now, it was time to finally write some tests.

## Choosing the testing tools

I saw a [very interesting blog post](https://bmuschko.com/blog/go-testing-frameworks/) regarding testing frameworks in Go, which helped me pick from a formed list.

It is very handy that Go has it's own built-in testing tool, which runs every file that ends with `_test.go`. It also allows for coverage reports and individual test runs.

All you have to do to run the tests is run `go test <package_name>` and that's it!

I also used `github.com/stretchr/testify` package for easier assertions using `Equal` function.

## Tests I implemented

There is actually not much I could test before performing the refactoring of my code because almost every function had file i/o in it, which is not the best when dealing with unit tests.

So, after I refactored a part of my code, I made some tests for `ParseText` and `ParseMarkdown` general and edge cases.

I also made a couple of tests for `GetNameAndExt` function that separates the file name and its extension.

It was also important to document everything for coming developers, so I mentioned everything in [CONTRIBUTING.md](https://github.com/devils2ndself/SSGo/blob/master/CONTRIBUTING.md). Come check it out if you want :)

After I was done, I squashed all my commits into [one](https://github.com/devils2ndself/SSGo/commit/9f25af0576db112f69f894bec71bbf8a25c5f187) and merged it to master.
DSA by Mitul in C++, Python, and Java : Bubble sort
Tags: dsa
Published: 2022-11-11 00:27:17

**Bubble sort (Sinking sort)**

We repeatedly compare adjacent values and swap if is in an incorrect order.
So, here you can see some values which needs to be sorted. First we will compare 1st 2 values ,

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

Here 5<9 thus we will not swap. Let's move to the next pair then.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p8zdeco4g14xkabjpl48.png)
As 9>3, thus it will swap

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pusv5dipvve40px329ic.png)
Again move to the next pair

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1c3vdsditw5n4d9fqhkl.png)
As 9>1, so swap them.

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

This process will go untill the last element.
So, after complete iteration the biggest value will move to the right

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z5ruqm7n8qe0tuva9fxi.png)
Let's start the 2nd iteration:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zfzt1enmssautxrbg7kt.png)
After the 2nd iteration 8 & 9 will be sorted

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2e5nkq4aho91bfi145uk.png)
After 3rd iteration we will have:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0y9cetzaefvrprvmfh4s.png)
After 4th,

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bh7c17pweodxl7cw4u5n.png)
This process will continue and finally we will have:

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

All sorted in the ascending order.
Code for Bubble sort:
```
def bubbleSort(customList):
    for i in range(len(customList)-1):
        for j in range(len(customList)-i-1):
            if customList[j] > customList[j+1]:
                customList[j], customList[j+1] = customList[j+1], customList[j]
    print(customList)
```

**Complexity Analysis**

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

**When to use Bubble Sort?**
1. When the input is already sorted.
2. Space is a concern.
3. Easy to implement.

**When to avoid Bubble Sort?**
Average time complexity is poor.