teleren/devto huggingface dataset:
npm workspaces: npm run and exec
Tags: npm, cli, javascript, node
Published: 2021-03-24 12:43:15

---
title: npm workspaces: npm run and exec
published: true
description: Workspaces support for both run and exec commands landed today in npm@7.7.0
tags: npm, cli, javascript, node
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/gsakxx23s4xeh0e5dyuv.png
---

### I bring good news!

Workspaces support for both `npm run` and `npm exec` landed today in **[npm@7.7.0](https://github.com/npm/cli/releases/tag/v7.7.0)**, it adds the new `-w` and `-ws` config options that allows for running scripts in workspaces from the top-level folder, e.g:

assuming a file structure:

```
.
├── package.json ->  { "workspaces": ["packages/*"] }
└── packages
    ├── a
    │   ├── index.js
    │   └── package.json
    ├── b
    │   ├── index.js
    │   └── package.json
    └── c
        ├── index.js
        └── package.json
```

It's now possible to run a script in a given workspace. In order to run one of the scripts available in the workspace named `a`, at location: `./packages/a/` you may run from the root of your project, either of the following:

- `npm run <script-name> -w a`
- `npm run <script-name> -w ./packages/a`

It also supports the `test|start|stop|restart` top level comands, so if you're using any of these you can just add `-w <workspaces-name>` and it should work as expected, e.g:

- `npm test -w a` (will run the tests of workspace `a`)

In case you want to run a script against **all** the configured workspaces, there's a `workspaces` configuration option that enables just that:

- `npm test -ws`

Lastly it's also possible to run scripts in a group of workspaces by using the path to their parent folder as the `workspace` config value. That means running `npm test -w ./packages` will run tests in all workspaces nested at the `./packages` location.

### Want to learn more about it?

We updated the docs, see:

- `npm run` docs: https://docs.npmjs.com/cli/v7/commands/npm-run-script#workspaces-support
- `npm exec` docs: https://docs.npmjs.com/cli/v7/commands/npm-exec#workspaces-support
- `workspaces` docs: https://docs.npmjs.com/cli/v7/using-npm/workspaces

You may also want to check out the changelog:

- https://github.com/npm/cli/releases/tag/v7.7.0
Five untold skills of a software engineer
Tags: skills, technology, software, engineering
Published: 2021-03-24 12:02:50

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jt8lrrqjqqbqgjp3av11.png)

Today there are multiple programming languages, frameworks, libraries and innovative technologies. They either get popular or fade away. But today I’m going to talk about few of the top untold skills in tech industry that don’t fade away with time.

1) Communication skills — Communication is by far one of the important skill to possess. It is very important for you to articulate your problems/ideas/solutions when you work in teams. It allows others to visualize the subject you are see. You ability to communicate the problems/ideas/solutions can lead to better understanding amongst others and the overall productivity of the team.

2) Ability to find solutions — As a software engineer we often spend time on stackoverflow looking solutions to our problem. Your ability to reference similar type problem on stackoverflow and connect it to your problem to get your solution is very important. I have often seen junior developers unable to connect the dots to their problem with similar related problems online. Eventually end up impacting the delivery of the product.

3) Being humble — Be humble to very one around you. Your team, house cleaning staff, support staff everyone has a role to play and cumulatively you are trying to achieve your deliverable goals. It is important to be humble.

4) Asking help — In tech if you are asking for some help, is often perceived as incompetency and can lead to imposter syndrome. On the other side don’t be a leech and ask for help without even trying once. That is way more bad. Striking a perfect balance is important, knowing when you really need help and when you just need more time to figure out.

5) Documentation — Last but not the least, have the ability to document well. Sometimes we have see great technologies being sidelined because of poor documentation. Poor documentation can make a good technology difficult understand. New adopters, hobbyists, enthusiasts may start to avoid the technology for the same reason.

Above are five skills I feel every software engineer should know. Do let me know in the comments section which other skills you feel are important but less spoken skills needed as a software engineer.

Thank you folks. Please do check my other articles on https://softwareengineeringcrunch.blogspot.com 

If you like my article, you can support me by buying me a coffee ->
 <a href="https://www.buymeacoffee.com/sn04" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>
Daily Developer Jokes - Wednesday, Mar 24, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-03-24 12:00:20

---
title: "Daily Developer Jokes - Wednesday, Mar 24, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Wednesday%2C%20Mar%2024%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258a3e5534.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Why did the developer ground their kid?

___A:___ They weren't telling the truthy
 -->
Introduction
Tags: typescript, functional
Published: 2021-03-24 11:59:56

Hello and welcome!

After watching the talk ["Domain Modeling Made Functional" from Scott Wlaschin](https://fsharpforfunandprofit.com/ddd/), I got inspired to write a series of articles about Domain Driven Design (DDD for short) in TypeScript. This talk is about DDD using Functional Programming (FP), so I chose to use the [fp-ts](https://github.com/gcanti/fp-ts/) ecosystem because it's the most mature FP stack in TypeScript, as far as I know. Plus, I've already used `fp-ts` occasionally so I have some experience with it.

First, I'll introduce a simple domain (as a case study) and a naive type definition. I'll try to describe the flaws of this initial type, and I'll also share some concepts we'll use later to design a better model that fits the domain.

The objective is to **define a type that lets us understand the domain constraints and logic without looking at the code implementation**.

We are going to write both the type and the implementation. To do so, I'll present 2 solutions:
- One using [fp-ts](https://github.com/gcanti/fp-ts/) and [newtype-ts](https://github.com/gcanti/newtype-ts/)
- Another one using [fp-ts](https://github.com/gcanti/fp-ts/) and [io-ts](https://github.com/gcanti/io-ts/)

The code I'm sharing in these articles is available on the [ruizb/domain-modeling-ts](https://github.com/ruizb/domain-modeling-ts) GitHub repository.

Alright, let's go!
My Journey to a career in technology
Published: 2021-02-19 22:39:39

I'm currently enrolled in the AWS Re/start program with [NCI](https://newcollegeinstitute.org/), which started on December 9, 2020. It's a 12 week course that prepares the students for the AWS Cloud Practitioner Certification, as well as touching on the following core concepts in:

* Linux
* Networking
* Security
* Databases
* Programming
* Python

We finish up learning about AWS services. The date of the exam has been set, which takes place the 4th of March.

It's been quite a grind. Class starts from 9am to 5pm Monday through Friday. I also work at least 30 hours a week at a UFF Amazon fulfillment center. I take as much time as I can when I'm not in class or working to study. 

We are pretty fortunate to have a great professor, Mr. [Dunieski Otano](https://www.dunieskiotano.com/). He likes to inspire his students, ignite the spark, and encourages us to keep the fire burning when it comes to following our passion. There has been a lot of hands on training. As students we have learned to create infrastructure using the AWS console, CLI, Cloudfront, and even Terraform. 

Ever since I started the course I have been looking forward to class each day. I find cloud technology to be really interesting and exciting. There's so much more to learn and I'm pretty happy to have started down this path. 

I'll create some more posts about the details of what I have learned and how I can apply it to some projects. I believe that it's important to apply fresh knowledge to exercises to solidify it into memory. 

It feels pretty good to finally create my first post. I look forward to being a part of this community and sharing my knowledge and experience.
How did you choose your database (and changes over time)? At what costs?
Tags: discuss, database, devops, nosql
Published: 2021-03-24 11:49:10

And limitations?

How did you choices change over time? Like SQLite => MongoDB => PostgreSQL => OrientDB (or other non-Document NoSQL) => Spanner (or other NewSQL)

About costs, I am talking not only about paychecks, but also data integrity / security.

I hope this will be more thoughtful than NoSQL vs SQL debate (and subsequent NoSQL hate / discrimination...).
How do you fullstack?
Tags: discuss, webdev, devops, database
Published: 2021-03-24 11:35:04

Especially if you are a one-man team.

<small>I also wanted to ask how your personal project involves multiple men, but let's ask that later...</small>

How strongly typed should it be between the layers?

What about the actual validation between the layers?

Do you monolithic, or multiple functions? Again, security between the pieces?

What about the database? How did NoSQL (MongoDB Atlas, for example), become RDBMS? (Where I see it as much safer and feature-rich, and aggregation frea)
15 Tips For Being A Great Programmer
Tags: programming, coding, flutter, codenewbie
Published: 2021-03-24 11:16:01

**1.Delete unused code**
No need to save useless code, delete the code whenever it's necessary.

**2. Learn to read other’s code**
you should read others’ code as well to become a great programmer. When you will try to understand someone else’s code your thinking capabilities will increase. you can goto GitHub. and check open-source codes.

**3.Pair program**
Pair programming allows you to play the role of both teacher and student.

**4.Get involved in the community**
Surrounding yourself with like-minded people will motivate you to push through the lows. create coders community, join discord server of coders and connect with great developers on Twitter/LinkedIn.

**5.Learn by doing**
Don’t just watch tutorials or just read books, make projects while learning.

**6.Keep learning**
The more you learn the more you earn ,That’s very true,you have to learn daily.every day new technology is coming you should be updated with all these.

**7.Be open-minded**
Technology changes, and it changes quickly. Don’t oppose new technology; learn it and then form an opinion.

Checkout my website for complete post [click here](https://codingboy.in/15-tips-for-being-a-great-programmer/)
Single element circle progress loader
Tags: codepen, css, webdev
Published: 2021-03-24 11:13:27

<p>A circle progress loader for modern browsers, using only a single element and no SVG. Making use of CSS variables, mask-image and conic-gradient. The only downside is that there's no smooth transition on the outer ring. (But you could use two variables for the actual progress with decimals and a rounded value for display and update the progress more frequently.)</p>

{% codepen https://codepen.io/Connum/pen/gOgpGog %}
SDC Day 8
Published: 2021-03-24 11:12:30

I solved my issue! I used EXPLAIN ANALYSE in my query to show me exactly what was happening with my query. I learned that a majority of the cost was from the ORDER BY clause. I suspect this is because it is highly inefficient to sort the photos as I'm aggregating them from the photos table. Once I removed the clause and added some indexes, I got the read speed down to a millisecond! Now I just need to figure out how to add a skus object to each style similar to how I added photos.
How to Inject Document in Angular
Tags: angular, javascript, typescript, webdev
Published: 2021-03-24 11:08:59

Jared Youtsey | ng-conf | Oct 2020

Sometimes we just need to directly work with the DOM directly. I find this particularly so when doing things like scrolling to an element. How do you correctly leverage the `document` object in Angular?

```
import { DOCUMENT } from '@angular/common';
@Component({...}) // could be a service too!
export class MyComponent {
    constructor (@Inject(DOCUMENT) private document: Document) {}
}
```

That’s it. Now, why write an article on something so simple? For starters, the best way to learn something is to teach it. Done. In addition, I’ve been doing full-time Angular development since the early alphas of Angular 2. I consider myself a guru-level Angular developer. However, I’m honest enough to admit that I still don’t know everything. One of my team members pointed this out in a code review. So, I learned something new today! Thanks, Ananthan!

Angular is evolving constantly. New features are added all of the time. As a developer, I love that I’m still learning new things and getting new features from the Angular team.

Be open to learning from anyone, anytime.

## **ng-conf: The Musical is coming**
ng-conf: The Musical is a two-day conference from the ng-conf folks coming on April 22nd & 23rd, 2021. Check it out at [ng-conf.org](https://www.2021.ng-conf.org/)
SDC Day 7
Published: 2021-03-24 11:08:23

This styles endpoint is proving to be much more difficult than I anticipated. I was able to get an array of photos inside each style, but how will I get the skus in as well? It's also crazy because after coming the queries into one, my response time went from 2 minutes to 6! This long response time has really slowed down my progress with testing. I need to figure out what's causing my query to run so slowly.
Wednesday Links - Edition 2021-03-24 
Tags: java, jvm, kotlin, spring
Published: 2021-03-24 11:06:27

Why Lambdas are lazy in Java? (13 min) 🧐
https://blogs.oracle.com/javamagazine/understanding-java-method-invocation-with-invokedynamic

Spring Native dry run (11 min read) 👩🏼‍💻
https://blog.frankel.ch/kick-spring-native-tires/

How to differ -0.0 from 0.0 on JVM (30 s read) 🤨
https://twitter.com/shipilev/status/1374380878273519620?s=19

Be aware using Comparables in HashSets (1 min read) 💥
https://twitter.com/tagir_valeev/status/1373826680452681730?s=19

Again about Fallacies of Distributed Computing (4 min listen) 🕸
https://256.nurkiewicz.com/37

How code base size matters and how to speed things up? (17 min listen) 📉
https://jmmv.dev/2021/03/build-time-slis-slos.html

Avoid abusing @Profile in Spring application (9 min) 🍃
https://reflectoring.io/dont-use-spring-profile-annotation/

Troubleshooting deadlocks (4 min) ☠️
https://blog.ycrash.io/2021/03/13/chaos-engineering-deadlock/

Handling exceptions properly in Kotlin's coroutines (9 min) 🐛
https://www.netguru.com/codestories/exceptions-in-kotlin-coroutines
SDC Day 6
Published: 2021-03-24 11:05:16

It's time to start optimizing my queries! The first thing I wanted to do was reduce my products endpoint to use a single query with the features in an array. I was able to store all the features into individual objects using json_build_object. I then used array_agg to concatenate all these objects into the same array and attach the array to the product. I then started doing the same thing to my styles endpoint but am having difficulties.
Why won't your website thumbnail hasn't updated when trying to share on LinkedIn
Tags: webdev, seo
Published: 2021-03-24 10:59:19

The issue is cached data. You need to purge. Go to [Post inspector](https://www.linkedin.com/post-inspector), copy over your website UR and hit inspect. You should now see your updated website thumbnail.

![](https://media.giphy.com/media/ipfEdUr83aNoO4aBKQ/giphy.gif)
SDC Day 5
Published: 2021-03-24 10:55:55

I spent this day building out the endpoints for my API. I was able to get the data to match exactly to the API I used during FEC. The toughest endpoint was definitely styles. It was difficult because of the nested one-to-many relationship that it requires. I need a list of styles for a product id and another list of photos and skus for each style! What I did was use Promise.all to start a query for each style's photos. In the then() block I would then loop over the results and attach them to the associated styles. I repeated this process for the skus. There must be a better way...
Nevertheless, Andikha Dian Nugraha Coded in 2021!
Tags: wecoded
Published: 2021-03-24 10:28:58

<!-- ✨This template is only meant to get your ideas going, so please change/add/remove these prompts as you wish! We also encourage you to create your own title if you’d like! ✨ -->

## My most recent achievement was…

## Advocating for myself looks like…

## My biggest goal is…

## My advice for allies to support underrepresented folks who code is...

<!-- Once your post is published, it will not appear on the /t/shecoded page until an admin approves it. This is an extra step to ensure there is no abuse on this important tag. --!>
Salesforce vs AWS Salary
Tags: aws, salesforce, startup, cloud
Published: 2021-03-24 10:28:12


Among Amazon AWS and Salesforce, mostly young developers usually worried about which technology is most reliable for career scope who are just beginning their careers 

To expect the best career inclinations, you must know about both technology Salesforce and AWS, as per the career perspective. 

#Salesforce career opportunities

The Salesforce certification program acknowledges you with the basics of marketing automation and sales collaboration. The various Salesforce jobs and their average salaries are: 

There are a lot of Salesforce jobs there in the market. Let's have a quick overview of their average salaries; 

- Salesforce Administrator: ranges between $40000 to $95000 per year.
- Salesforce Developer: around $90000 to $125000 annually.
- [Salesforce Consultant](https://www.bacancytechnology.com/salesforce-consulting-service): around $55000 to $125000 annually.
- Salesforce Certified Sales Cloud Consultant: approx $150000 per annum

#AWS Career Opportunities

It would be best if you got certifies as an AWS developer, architect, SysOps administrator, and DevOps engineer in the realm of AWS. 

Well, in AWS there are also various jobs available. have a quick overview on AWS developer's average salaries; 

- AWS Certified Solutions Architect- average salary in the US is $148,456 per annum.
- AWS Certified DevOps Engineer's average salary $137,724 annually.
- AWS Certified Solutions Architect- an associate's average salary is $130,883 per year.
- AWS Certified SysOps Administrator- average salary $130,610 per annum.
- AWS Certified Developer- annually $130,272 for an associate.

I hope this blog delivers related information about Salesforce and AWS salary-related Questions. For a more detailed comparison, read- [Salesforce vs AWS](https://www.bacancytechnology.com/blog/salesforce-vs-aws).
Drag and Drop Card using HTML & TailwindCSS | Sortable JS
Tags: html, css, tailwindcss, javascript
Published: 2021-03-24 10:00:32

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/883tt715rrytnxzvvoy1.png)

####Knowledge
Hello Everyone, thanks for watching once again we bring the video on the web development topic of Creation on ***Drag and Drop card using HTML & TailwindCSS*** and use of ***Sortable Js*** library to make that animated drag-drog & sortable effect & many more, so stay tuned! if you are interested in watching the full tutorial step by step Please watch the below-given video !!!

{% youtube wPn_p84jXVE %}

####Outline ⏱ 
0:00 : Intro
0:11 : Preview
1:14 : Title
2:03 : Table Layout
2:37 : Table
3:20 : Card#1
5:28 : Card#2
6:01 : Card#3
6:28 : Card#4
7:05 : Card#5
7:36 : Sortable js
9:12 : Body Animations

Thanks For watching! I Hope You Might Like it!
Javascript Interview Questions : Optional chaining (?.)
Tags: javascript, react, webdev
Published: 2021-03-24 09:53:20

**1) What is chaining operator?**
Ans ) According to MDN official docs, The optional chaining operator (?.) permits reading the value of a property located deep within a chain of connected objects without having to expressly validate that each reference in the chain is valid


*Note :*  The optional chaining ?. stops the evaluation if the value before ?. is undefined or null and returns undefined.


**2) In which version of Javascript optional chaining is intoduced?**

Ans ) ECMAScript 2020

**3) Example**

lets we have one object like below

```
const user = {
  name: 'Test User',
  address: {
    city: 'mumbai',
  }
};
```

if we try to access user.address.city => We will get mumbai but  if we access something like this

user.jobtitle.name => this will gives as error as jobtitle is not a property of user and we are trying to access name property of undefined so earliar to ?. operator we need to do something like below to avoid this kind of error
```
if(user.jobtitle && user.jobtitle.name) {
   // code related to use of user.jobtitle.name
}
```

This code can be minimized like below with the help of ?. operator

```
if(user.jobtitle?.name) {
  // code related to use of user.jobtitle.name
}
```


Official Documentation

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining

checkout more such questions

{% youtube Eb6HXDGQoTI %}
Show off your VSCode Setup 👩🏻‍💻💯
Tags: watercooler, discuss, productivity
Published: 2021-03-24 09:43:20

---
title: Show off your VSCode Setup 👩🏻‍💻💯
published: true
description: Weekly VSCode Setup Show off and Few others Resources 
tags: watercooler, discuss, productivity 
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f660ncesrh7iqeebqcrx.jpg
---

After ***[the last edition](https://dev.to/xenoxdev/show-off-your-vscode-setup-5no)***, which I loved a lot btw let's do it again this month too. 

{% twitter 1374655131325767680 %}

![Screenshot 2021-03-24 at 2.56.15 PM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5807gp916wz5glwdooop.png)

𝗧𝗵𝗲𝗺𝗲: Deepdark Material Theme
𝗙𝗼𝗻𝘁: Dank Mono
𝗣𝗲𝗮𝗸𝗰𝗼𝗮𝗸 𝘁𝗵𝗲𝗺𝗲: #f22e60 colour code 

 
 So tell me what's your current VSCode theme and font look like? I'm Curious. Also, share your 3 personal favourite VSCode plugins.

![](https://media.giphy.com/media/yvqRaXlOsc068DDTzt/giphy.gif)
What's your the weirdest Ruby Gem you have worked with?
Tags: ruby, rubygems, question, fun
Published: 2021-03-24 09:42:10

---
title: What's your the weirdest Ruby Gem you have worked with?
published: true
description: Your the weirdest experience about Ruby Gem
tags: ruby, rubygems, question, fun
//cover_image: https://direct_url_to_image.jpg
---

Hello,

Ruby gems are cool and powerful but some of them could be weird. What's yours?

Cheers.