teleren/devto huggingface dataset:
It is great to see what Wasm Builders is becoming
Tags: webassembly, forem
Published: 2022-05-05 18:33:53

In case you missed it, we recently spotlit [Wasm Builders](https://dev.to/devteam/if-youre-interested-in-webassembly-and-dont-get-enough-depth-here-on-dev-read-this-pfl).

Wasm Builders exists to offer depth in WebAssembly, where DEV can offer some discovery and breadth. It's also _owned and operated_ by people who have a stake in WebAssembly and care deeply about this technology.

{% embed https://www.wasm.builders/ %}

Since that post, nearly 1,000 people have signed up, and the feed has become a tremendous resource the pulse of WebAssembly — yes, there are only a few posts a week, but they are all part of a growing knowledge base. It's great to see!

We are on a mission to improve DEV as an engine for community and discovery, while also ensuring we provide the building blocks for a more expansive ecosystem, and it is great to see momentum in this regard. We don't operate Wasm Builders, but we are partners in the operation [via Forem](http://forem.com/).

If you are curious about WebAssembly, check out this space. It is quickly becoming the best central resource for this branch of specialization in an up-and-coming technology.

Happy coding!

***

One last thing. You’ll notice **"Sign up with Forem"** as an option on these Forems. This is a service we now offer to most seamlessly navigate the ecosystem and manage your identity. We want you to be able to **bring your full self without having to bring your full data**, so making this distributed ecosystem as straightforward as possible in the long run is really important. Create a [Forem account](https://account.forem.com/) and connect it with your DEV account [via your settings](https://dev.to/settings). 🙂
Babel ES6+ Base Project Example
Tags: javascript, webdev, node, beginners
Published: 2022-05-05 18:19:23


# Dev Stack:
[![My Skills](https://skillicons.dev/icons?i=js,html,css,tailwind,vscode,npm)](https://skillicons.dev)

## Getting Started

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kursadlclnkiz7w4ctgd.png)
- Clone the project and install all dependencies
```sh
git clone [https://github.com/rafaelrferreira/es6-base-project.git]
npm install
```
## Building Stuff

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/unvdugjj7ifrqddl39kn.png)
```sh 
npm run dev
```

## Running local webserver
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y0klehs4ruw49n38t7nx.png)
```sh
npm run server
```

## Running tests and code coverage

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/689njpt95qno8zxb7ib8.png)
```sh
npm test
```
Release 0.23.1 of Spellcheck (GitHub) Action - a bug fix release
Tags: release, opensource, githubaction, spelling
Published: 2022-05-05 18:16:19

---
title: Release 0.23.1 of Spellcheck (GitHub) Action - a bug fix release
published: true
description: A bug fix release for handling paths with spaces
tags: release, opensource, githubaction, spelling
//cover_image: https://direct_url_to_image.jpg
---
A bug fix release of the [Spellcheck GitHub Action](https://github.com/marketplace/actions/github-spellcheck-action) have just been made available.

The issue was that the action did not handle paths with spaces in them. The action has been modified to support quotes for handling the spaces, there are a few limitations though. At the same time backwards compatibility has been kept.

The examples with spaces are lifted from the issue [#84](https://github.com/rojopolis/spellcheck-github-actions/issues/84) from Mike Starov who reported the issue.

Now for some examples to outline the limitations (lifted from the documentation):

No spaces, quotes not required:

```yaml
source_files: README.md CHANGELOG.md notes/Notes.md
```

No spaces, quotes not required, double quotes used for complete parameter:

```yaml
source_files: "README.md CHANGELOG.md notes/Notes.md"
```

This might actually work, but it is not recommended and might it might break, instead using proper quoting.

No spaces, quotes not required, double quotes used for single parameters:

```yaml
source_files: "README.md" "CHANGELOG.md" "notes/Notes.md"
```

This would also work using single quotes

Spaces, quotes required, single quotes used:

```yaml
source_files: 'Managed Services/Security Monitor/README.md' 'Terraform/Development Guide/README.md'
```

Spaces, quotes required, double quotes used:

```yaml
source_files: "Managed Services/Security Monitor/README.md" "Terraform/Development Guide/README.md"
```

Spaces, quotes required, intermixed quotes, will not work:

```yaml
source_files: README.md CHANGELOG.md notes/Notes.md
```

## Change Log

### 0.23.1, 2022-05-05, bug fix release, update not required

- Addressing issue [#84](https://github.com/rojopolis/spellcheck-github-actions/issues/84) via PR [#90](https://github.com/rojopolis/spellcheck-github-actions/pull/90) from @jonasbn. With the introduction of use of optional quotes, do note the limitations outlined in the [documentation](https://github.com/rojopolis/spellcheck-github-actions#specifying-sources-files-to-check) - thanks to @xsaero00 for the bug report
What Skills Make a Great Software Engineer?
Tags: programming, api, discuss, career
Published: 2022-05-05 17:48:13

My take on this article that gained a lot of reaction from the community "What Skills Makes a Great Software Engineer?" https://dev.to/simeg/what-skills-do-you-think-makes-a-great-software-engineer-1b14

This is based on my two decades of experience in the tech industry as an engineer. I built all kinds of products, including fintech, mobile app catalog for Palm, cloud/security for VMware, container orchestration for my first startup, and now doing API security for Apisec, my new startup.

Disclaimer: I'm not trying to disagree with the original write-up but instead just built on top of it.

The article emphasized soft skills like being freindly, a learner, and a team player. I agree these are important. 

First, let me classify there two kinds of works in product organizations:
Type-1/easy-work (I'm trying to avoid A-player and 10x): develop minor enhancements, minor integrations, simple tools, and basic UI functionality.
Type-2/hard-work: develop the core engine, intellectual property, security, UX, internet scaling, on-premises, databases, black-box, B2B, etc.

Most products require both kinds of work. Type-1 work is usually driven by the market, including your customers, support, sales, marketing, etc.
 
Type-2 kind of work is different. It requires engineers with deep problem-solving experience, solving micro problems and as well designing the entire system a certain way. An excellent example is no-code, AI, cloud, infrastructure-as-code, security-as-code platforms, and scaling. 
These things are hard to build, maintain, and extend and require seasoned and excellent engineering skills developed over a long time.

We recently published a free API security testing site on GitHub. If you have an API, you can get an instant security testing report [EthicalCheck](https://apisec-inc.github.io/pentest/)

I love to hear your thoughts. Feel free to ask questions or leave comments.
React Tricks Miniseries 6: How to use useEffect properly
Tags: react, hooks, useeffect, theeasydev
Published: 2022-05-05 17:42:12

The useEffect hook in react is probably the most complex hooks to write correctly and understand properly.

Without going too much into the semantics of how useEffect works, i will offer a brief explanation just enough to demonstrate how to use it correctly.

useEffect is a react function that runs the code inside it asynchronously. But by default it is **not** asynchronous. By default it runs your code when the component mounts and it runs it only once. The dependency array that you see at the end is there to say "whatever variable(s) you put inside, i will execute the entire code inside me again, every time that variable(s) changes value". This is where it becomes asynchronous, only once you put a variable in the dependency array.

```javascript
useEffect(() => {
  //get posts info from database
  //get posts info again everytime a new comment is added/edited
},[comments]) 
```

By putting the variable comments (which can contain the posts comments array) inside the dependency array, we tell react we want to refetch the posts data, everytime a comment is added or edited.

Now there are 2 concepts many developers leave out or are not aware of.

##Cleanup
Cleanup functions are meant to unsubscribe from the useEffect. Meaning when the component unmounts from the virtual dom, we want to stop fetching the posts data. If we don't do anything about it, react will run into errors, and warn you in the console about unsubscribing from the useEffect. So to solve that we can use a simple cleanup function. 

This is where we can use a nifty trick. Instead of figuring out what to return to stop the subscription, we can simply return our original code in the useEffect and it will automatically get destroyed everytime the component unmounts.

```javascript
useEffect(() => 
  //get posts info from database
,[comments]) 
```

Note how by removing the curly braces, effectively **returning** the original code, react will unsubscribe any listeners inside the useEffect. No need for returns. Our code is kept cleaner and shorter.

##Conclusion
By returning our original code inside our useEffect, we can achieve a cleaner cleanup and unsubscribe listeners inside our useEffect.

Did you know this trick or just learned  it now? Let me know in the comments!
Day-81 Training At Ryaz
Tags: javascript, webdev, beginners, programming
Published: 2022-05-05 17:41:10

- Date:5/05/2022
- Day:Thursday

today, I started at about 10:30 am as I was started with resolving errors of the biding project so, I started with it as it was having error of Argument passed in must be a single String of 12 bytes or a string of 24 hex characters so, I started with resolving it but after several attempts like I searched it on stack overflow so it suggested to change the string to number data type but I was unable to do it so, today I get on call with my mentor so, i discussed the same problem so, he suggested some useful changes but the path changed but error remained as same and after several attempts I was not able to resolve it so, this way I to stuck in this problem so, I pushed it onto my git repo so, my mentor suggested to review it once and the java script course was kept hold while I was involved in resolving issues. so, this way my day ended up and I would try o fix it out by tomorrow.
LeetCode Daily Challenge Series #1
Tags: datastructures, computerscience, algorithms
Published: 2022-05-05 17:32:40

## Problem Statement
Implement a last-in-first-out (LIFO) stack using only two queues. The implemented stack should support all the functions of a normal stack (push, top, pop, and empty).

## Solution

Before implementing any code, let's think about how to proceed. There are 2 ways to solve this problem:

- #### Using 2 queues: We can use 2 queues to implement a stack. We can process this in 2 ways -
<ol>
<li>Making push method expensive</li>
<li>Making the pop method expensive</li>
</ol>

The decision is based on the application. In our case, either one is fine.

##### Expensive Push method:
Push the element into Queue2 while rest of the elements are stored in Queue1. After this, <i>pop</i> elements from Queue1 and <i>push</i> into Queue2. Swap the names of Queue1 and Queue2.
If we repeat this process each time a new element is added, we will have the elements in the order we would expect to pop from a stack. Thus, we have achieved our stack.

##### Expensive Pop method:
Each time we have to pop - <i>Dequeue</i> all elements from Queue1 except the last element and <i>enqueue</i> into Queue2. <i>Dequeue</i> the last element from Queue1 and store it (this is the *result* that we will return). Swap the names of Queue1 and Queue2. Return the stored element. Thus, we will have the LIFO order while popping.

- #### Using 1 queue: It is possible to achieve the above behaviour using just 1 queue.
<ol>
<li>
Take the length of the queue, *say n*
</li>
<li>
*Enqueue* the element
</li>
<li>
Run a loop till *n*. Dequeue the element from the queue and enqueue it. This will make the new element the first element in the queue. 
If we keep following this every time we push a new element in the queue, we will have the elements in the proper order as we expect from a queue.
</li>
<li>
Since, we have corrected the ordering of the elements in the queue, **pop** operation should be as simple as dequeue and return the element.
</li>
</ol>

### Code
Here is python implementation of class handling the stack using a single queue.


```
from collections import deque

class MyStack:

    def __init__(self):
        self.q1 = deque()
        

    def push(self, x: int) -> None:
        size = len(self.q1)
        self.q1.append(x)
        for i in range(size):
            el = self.q1.popleft()
            self.q1.append(el)

    def pop(self) -> int:
        return self.q1.popleft()
        

    def top(self) -> int:
        return self.q1[0]

    def empty(self) -> bool:
        return len(self.q1) == 0
``` 

**Note:** Here we are using *deque* collection from python, but we are using it as a normal queue only. We have not used any of the double-ended properties of *deque*
Do nothing: fix problems 🪠
Tags: career
Published: 2022-05-05 17:27:13

Sometimes a project can feel like flushing a toilet and yelling "go down, go down whilst making dramatic hand motions towards the earth"

It's pointless, the yelling and hand waving didn't do much to solve the problem but damn did it make you smile afterwards.

## Do nothing 🐢
I want to remind you that not all problems need any involvement from you and actually doing nothing can be an extremely proactive stance.

## How did I conclude this? 🍫
Yesterday I implemented some bugfix, got it tested and ended up rewriting it today to do the opposite finally to be told it was alright how it was initially 😶😶😶💢😡😤.

Despite my original protest I still did the work, cost me the day, had I done nothing.. well I could have enjoyed the sun and protested more but I might have come out of it even worse so who's to say? Should I have done nothing, could I have?
JavaScript Exercises
Tags: javascript, devjournal, theodinproject, codenewbie
Published: 2022-05-05 17:19:48

##Introduction
With Etch A Sketch done, I was glad to finally be able to move on. I honestly thought it might take me a full month to complete that project. Thankfully, I was done in just over a couple weeks and now I've moved on to learning about object oriented programming (OOP) concepts, as well as working through more JavaScript Exercises found [here](https://www.theodinproject.com/lessons/foundations-fundamentals-part-5#practice). 
###Calculator Exercises
The first set of functions that had to be made will tie into the final project in Foundations which is building a calculator. I had to create functions for adding, subtracting, multiplying, powers, and factorials. The first few were pretty simple, but factorials gave me a bit of a hard time. I spent about an hour trying to figure out how to manipulate the code to not decrement _n_ while decrementing _n-1_. Once I figured that part out, it was quite simple to put together and I had a blast figuring it out.

Today I will be working on palindromes, and I have a pretty good idea of how to go about this one which seems easy enough just to reverse the string and store it in a new variable after stripping all whitespace and punctuation and then compare that to the original that is stripped of punctuation and whitespace. 

If I get palindromes done fairly quickly, I'll get going on the Fibonacci sequence and try to implement that into code. I briefly looked at the Fibonacci sequence in my Discrete Mathematics class this past semester, but I don't really know the ins and outs of it in detail so, that one might give me a hard time. Once these exercises are done though, I'll be free to start the final project of Foundations before I move on to deciding which path to take. 
##Conclusion
As I get closer and closer to the end of the first part of The Odin Project, I'm thinking more and more about which end path to take. Ruby on Rails, or NodeJS. My first instinct was NodeJS from the get-go, but there are some interesting projects on the RoR side that I'm taking a liking to. I probably will stick with JavaScript and NodeJS because honestly, it seems like that would be a more useful stack for me given my market which I've never seen a job opening for RoR but have seen hundreds for JavaScript. 

For now though, I'll focus back on the task at hand which is to solve these algorithms. The exercises are fun. I enjoy the test driven development as a means to check my work and see how I'm progressing, and whether my work is done or not. I hope each and every one of you are well and healthy. That's going to do it for this one, 'til next time...<u>be good!</u> 

Photo by Markus Spiske: https://www.pexels.com/photo/black-laptop-computer-turned-on-showing-computer-codes-177598/
Picking up from where I left off
Tags: beginners
Published: 2022-05-05 17:19:14

At the end of 2021 I left my job due to the unstable and toxic work environment mixed with my declining mental health. I entered 2022 with positivity and a fresh new outlook on life I hadn't had since I graduated from college three years ago. That's when I started the journey I'm now, learning to become a web developer. However, just like any journey, there were some roadblocks that set me back. I tried to pursue this new career without addressing the most important thing that: my mental health. 


I had been seeing a therapist already when I started this journey but that simply wasn't enough. Once I realized I couldn't progress any further until I got myself the help I needed, I sought medical treatment to deal with my mental health and I am all the better for it. After taking some time off from learning to heal, I'm ready to jump back in and pursue my career dreams!
5 websites to take your front-end skills to the next level
Tags: webdev, beginners, programming, codenewbie
Published: 2022-05-05 17:14:30

## 1. Frontend Mentor

![Frontend Mentor](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kkqgl6o0xvqoj20fbuff.png)
_[Frontend Mentor](https://www.frontendmentor.io/) is a platform that offers front-end challenges such as professional web designs. These allow you to practice building websites in a realistic workflow. Taking these challenges will help you improve your skills, gain experience creating websites, and build up an incredible project portfolio. It also has a huge developer community, so it's a wonderful way to meet other developers!_

## 2. Daily UI

![Daily UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ynh4ppo94hlbjbujxok.png)
_[Daily UI](https://www.dailyui.co/) is a design challenge to inspire and challenge designers around the world. You'll design 100 different user interface elements for mobile and web. This project was built to provide a fun engaging way to improve your skills as a designer, earn rewards, and get feedback from others._

## 3. 100DaysCSS Challenge

![100DaysCSS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3vd802y47lt6bbtcuxho.png)
_[100DaysCSS](https://100dayscss.com/days/1/) challenge is designed to help you improve your CSS abilities. After completing this challenge, you will be a CSS pro._

## 4. Codewell

![Codewell](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lcehhrtyi5o6i4jv124o.png)
_[Codewell](https://www.codewell.cc/) is used to improve your HTML and CSS skills by practicing on real design templates.
With Codewell, you can browse high quality Figma templates that you can use to sharpen your HTML and CSS skills._

## 5. CSSBattle

![CSSBattle](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0sfdpx8w9zmtudrr6p1v.png)
_[CSSBattle](https://cssbattle.dev/) is a CSS Code Golfing game that can be played online. Players from all around the world compete to see who can visually reproduce "Targets" with the shortest amount of CSS code and get to the top of the scoreboard._

> So those are the top five websites I use to improve my frontend development skills, please leave yours in the comments, and if you want more posts like this, please follow me.
Releasing my first NPM Package to the registry
Tags: npm, node, machinelearning, timeseries
Published: 2022-05-05 16:53:13

Recently, I found out that npm doesn't contain a js package for the necessary error evaluation used in time series/machine learning. Then I created my first npm package called time-series-error in npm registry to facilitate that requirement. Go ahead to the following link and check it out in your node applications. 
https://www.npmjs.com/package/time-series-error

Currently it is stable under the v2.0.5. I hope to implement more error metrics widely used in time-series/machine learning domain.

If you have any suggestions or improvements to make, feel free to add an issue item in the GitHub repository stated here.
https://github.com/SahanDisa/time-series-error
The hardest challenge, The simplest answer.
Published: 2022-05-05 16:52:26

You are reading this because you thought the title was interesting, right? _Or maybe you miss-clicked?_

Anyways, every developer has experienced challenging challenges. Every developer has persevered though a challenge and solved it, weather that be with the help of others, or on their own. 

I'm creating this post because I'm in the mood to read about simple issues that you or your team had, but took you forever to figure out what was wrong. We are all human after all.

Did it take a team of 20 people to find the missing semi-colon when it was on the line that was last edited? Did it take five hours to figure out why the background was blue when you defined it as !important on the first line of your CSS file? (Don't use !important BTW!)

What stories do you have? What stories have you been told?
How do you do 'creativity'?
Tags: watercooler, webdev
Published: 2022-05-05 16:35:51

---
title: How do you do 'creativity'?
published: true
description: 
tags: #watercooler #webdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3i42lbv71o1hujj9lvrz.jpg
---

Or to formulate it more specifically: 

> What are your rituals to enter a state that enables you to craft beautiful things?

I figure there are concepts like [flow (the zone)](https://en.wikipedia.org/wiki/Flow_(psychology)), meditation or just the kiss of the muse while walking in the wild. On the other hand, there's creative death valleys and dead-locks. 

How to you bridge these ups and downs? 

And are you using tools that help you, like swipe-files or Pocket? If so, I'd like to invite you and share them 🧙.
How to loop through array of objects with different length of key pair?
Published: 2022-05-05 16:07:31

Hello Guys, I'm a newbie to **javascript** and i would like your help to solve this problem. I need to count the total of comment in this array. But the object in this array has different length of key pair. how do i looping through this array of object? Really appreciate any help, been stuck in this problem for hours.

```
const comments = [
    {
        commentId: 1,
        commentContent: 'Hai',
        replies: [
            {
                commentId: 11,
                commentContent: 'Hai juga',
                replies: [
                    {
                        commentId: 111,
                        commentContent: 'Haai juga hai jugaa'
                    },
                    {
                        commentId: 112,
                        commentContent: 'Haai juga hai jugaa'
                    }
                ]
            },
            {
                commentId: 12,
                commentContent: 'Hai juga',
                replies: [
                    {
                        commentId: 121,
                        commentContent: 'Haai juga hai jugaa'
                    }
                ]
            }
        ]
    },
    {
        commentId: 2,
        commentContent: 'Halooo'
    }
]
```