teleren/devto huggingface dataset:
LinkedIn Easy Apply wasn’t made to get you a junior dev job
Tags: career, codenewbie
Published: 2021-08-10 19:40:43

LinkedIn Easy Apply wasn’t made to help you get a job, it was made to make LinkedIn look better to people paying them for job listings. The number one metric for any job board is “Applications per ad”, which sounds sensible doesn’t it? You put a job advert out in to the world and you want as many applicants as possible to give you the best chance of finding the right person. 

This sounds sensible, but it’s wrong. Too many applications is almost as bad as no applications.

### Your Easy Apply application:

- will look like everyone else’s Easy Apply application, you won’t stand out at all.
- won’t be tailored to the role.
- could easily get caught in the “delete 50% of these because there are too many applications”.
- will trick you into thinking you are making lots of good applications because “LinkedIn made this feature, it must work and be great”.

In the case of a post with many vacancies, like Amazon warehouse operators then this could be a valid strategy, however for the roles we care about in software development, this is rarely the case, usually it’s one or two vacancies. 

In this situation it’s more effective for everyone involved to have a small number of applicants who are all a great fit for the role, rather than 100s, many of whom are not suitable. 

### Why did LinkedIn make Easy Apply?

This is one of those classic cases where the incentives for LinkedIn, their users (you) and their customers (the hiring companies) don’t align:

- LinkedIn want to show a customer that they got “great value for money” by getting lots of applicants.
- Users want to apply to as few jobs as possible to get a job.
- Companies want a small number of high quality applications.

It looks like the users and the companies have he most aligned incentives so why did LinkedIn make the feature? 

LinkedIn made Easy Apply because they control the platform and they call the shots, they say “we’ll find you great candidates” the subtext they don’t say is that they will also find you hundreds of bad candidates by making it so easy to apply but it will look like great value for money any way!

### What you should do instead

Next time you find yourself hovering on Easy Apply, don’t!

Instead apply directly to the company with a slightly tailored CV/Resume that highlights where your skills and experience align with the job specification and cover email that does the same with a few sentences and a couple of bullet points highlighting the most relevant bits from your CV.
Tips for better programming in distributed teams 🚀
Tags: bestpractices, nextjs, codequality, remote
Published: 2021-08-10 19:22:57

I've been working remote and freelance for the last 18 years, and my experience told me that working remotely with a distributed team is easier if you set a standard, using some basic and simple rules. 🤓 Remember that you have to work with different people that have different ways of coding.

>**Code can always work, but can you maintain it across the years?**

This is the important part for me: maintain the development and release new features without rewriting it.

Those are simple tips, for best practices, in long term developments with distributed teams:

##1. Comments 💬
Always comment on your code, even if you think that you understand it. Because tomorrow you're not available and some  colleague has to continue it.
 
##2. Variables 📛
Try to set a standard for variable names, don't let your team use any names. Please, I beg you, don't use variables that do not refer to your entity.
Ex: let's suppose you've a list of books
don't declare:
 ```
let list = [] 
```
instead, refer to your entity first and the variable:
 ```
let book_list = [] 
```

##3. Use absolute paths ⚓
To avoid mistakes, don't use relative paths! use absolute paths for better understanding of the code. It's cleaner to read and easy to follow.

####Example for Frontend dev / Next.js
In next.js > 9.4 you can use absolute path like this:
```
import { MyComponent } from '@/components/elements' 
```

instead of doing this:
```
import { MyComponent } from '../../components/elements' 
```

You've to add the paths to your tsconfig.json:
```
{
  "compilerOptions": {
      "baseUrl": ".",
      "paths": {
         "@/components/*": ["components/*"],
         "@/classes/*": ["classes/*"],
         "@/styles/*": ["styles/*"]
      }
    }
}
```


+info:  [Next.js official docs](https://nextjs.org/docs/advanced-features/module-path-aliases) 

#### VS CODE tip: 
If you see and error about module location not found, try:

a. add to .vscode/settings.json 
 ```
"path-intellisense.mappings": {
    "src": "${workspaceRoot}/src"
  }
```
b. Reload Visual Studio Code with Cmd/Ctrl + Shift + P and type "reload window".
 

####Example for Backend dev 

Also if you're a backend developer, you can set up constants to the absolute path and use them inside your code.

 ```
const PATH_TEMPLATES = '/var/www/public_html/templates/'; 
```

Did you find these tips helpful? follow me for more.
I would 💜 to 👀 and 🤓 from your tips, write me!
🤔 Any YouTuber Make HTML/CSS Video Tutorials? 😍
Published: 2021-08-10 19:21:29

Hello 👋,

In July 2020, Me & my friend released Frontendor UI Library that lets developers construct gorgeous landing pages quickly and easily by Copy-Paste method. 

We are looking for creators who can make a video tutorials showcase Frontendor and in return we offer 40% For Every Customer ( ≈ $23 / Sale ).

** Of course, before all this we can give you a full access to give it a try then decide **

If you believe that we can Make More Success Together 🙌. Please contact us in the live chat.
https://frontendor.com

Thanks for reading 😎 You are awesome.
How to bulk insert documents into  a MongoDB collection
Tags: mongodb
Published: 2021-08-10 19:48:22

---
title: How to bulk insert documents into  a MongoDB collection
published: true
date: 2021-08-10 19:09:58 UTC
tags: MongoDB
canonical_url: https://donaldfeury.xyz/how-to-bulk-insert-documents-into-a-mongodb-collection/
series: "Small Bytes of MongoDB"
---

Not only can you [insert a single document into a collection](https://donaldfeury.xyz/how-to-insert-a-single-document-into-a-mongodb-collection/) with the `insert` method, it can also take in an array of documents for bulk insert operations.

The example below will insert all the documents in the given array into the collection called `podcasts`:

```
db.podcasts.insert([
	{
		"name": "Tech Over Tea",
		"episodeName": "#75 Welcome Our Hacker Neko Waifu | Cyan Nyan",
		"dateAired": ISODate("2021-08-02"),
		"odyseeURL": "https://odysee.com/@TechOverTea:3/tech-over-tea-ep75:5",
		"youtubeURL": "https://youtu.be/cc8ZTzi_fzg"
	},
	{
		"name": "Tech Over Tea",
		"episodeName": "Neckbeards Anonymous - Tech Over Tea #20 - feat Donald Feury",
		"dateAired": ISODate("2020-07-13"),
		"odyseeURL": "https://odysee.com/@TechOverTea:3/neckbeards-anonymous:5",
		"youtubeURL": "https://youtu.be/DzXLZpRS0xU"
	},
	{
		"name": "Tech Over Tea",
		"episodeName": "#34 The Return Of The Clones - feat Bryan Jenks",
		"dateAired": ISODate("2020-10-19"),
		"odyseeURL": "https://odysee.com/@TechOverTea:3/the-return-of-the-clones:a",
		"youtubeURL": "https://youtu.be/f4omYp7j05U"
	}
])

```

There is also a method called `insertMany` that specifically only takes an array of documents as an argument, unlike `insert` which can operate on a single document as well as an array of documents.

More recent versions of MongoDB will give a deprecation warning when using `insert` and will want you to use `insertMany` when doing bulk inserts.

```
db.podcasts.insertMany([
	{
		"name": "Tech Over Tea",
		"episodeName": "#75 Welcome Our Hacker Neko Waifu | Cyan Nyan",
		"dateAired": ISODate("2021-08-02"),
		"odyseeURL": "https://odysee.com/@TechOverTea:3/tech-over-tea-ep75:5",
		"youtubeURL": "https://youtu.be/cc8ZTzi_fzg"
	},
	{
		"name": "Tech Over Tea",
		"episodeName": "Neckbeards Anonymous - Tech Over Tea #20 - feat Donald Feury",
		"dateAired": ISODate("2020-07-13"),
		"odyseeURL": "https://odysee.com/@TechOverTea:3/neckbeards-anonymous:5",
		"youtubeURL": "https://youtu.be/DzXLZpRS0xU"
	},
	{
		"name": "Tech Over Tea",
		"episodeName": "#34 The Return Of The Clones - feat Bryan Jenks",
		"dateAired": ISODate("2020-10-19"),
		"odyseeURL": "https://odysee.com/@TechOverTea:3/the-return-of-the-clones:a",
		"youtubeURL": "https://youtu.be/f4omYp7j05U"
	}
])

```
Understanding a New Code Base From Scratch
Tags: webdev
Published: 2021-08-10 19:09:53

I was recently attributed an opportunity to examine a **code base** and add some functionality to it. 

In the end, let's just say it started off great. Then I struggled. 

I'm still trying to figure this out, yet I'm learning so much along the way. 

The whole process is  similar to solving a coding challenge. 

Here are some key hind-sights from my experience:

##Explore
#####1. When presented with a new code base, don't feel overwhelmed.
Take a deep breath and count to 4. Make the thing run locally and play with the app first and foremost. This should take no more than 20 min to get up and running. Explore and discover all that the app has to provide. 

##Define the problem
#####2. Figure out what functionality or expectations you have for how this app should run. 
What do you need to add or remove from the functionality? This is the part where you find and define the problem. It should be clear to you what components or services will need to be modified or added. 

##Plan your actions
#####3. The clearer you understand your problem the easier it will be to execute a solution. 
You will find the code of interest that needs changing and modify it. I've had to do a lot of trial and error on this. A lot of the time was spent on this step. I spent time looking at syntax, documentation, APIs, and examples for how to implement my plan. 

##Review and Test
#####4. Save and commit changes. 
Review the app again. Test your functionality and look. When testing, think of all cases from user perspective that could be used on the app.

##Iterate
#####5. Do it all over again. 

From bird's eye view perspective, I hope this process can be helpful for you in solving your programming challenges. 

The code was built in Angular and the backend was built with Java and Maven. So language was Typescript, JavaScript, and Java. 

Is there anything I missed?
👋 Virtual Timekeeper
Tags: javascript, webdev, html, frontend
Published: 2021-08-10 19:09:27

An easy to use online timekeeper buddy built in JavaScript.

I managed a virtual competition where I poorly allocated time and could not properly allocate time to each competing team, and this was the inspiration for this project.

Like, Follow, and let's collaborate.
[https://codepen.io/asombachinonso/full/PomXvge]

![👋 Virtual Timekeeper](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfubckbl5bgwmp2kqwde.png)
🧑🏽‍💻 Developer Day Helps Developers Build the Future of Identity
Tags: devops, programming, security
Published: 2021-08-10 18:55:35

### What is `#DeveloperDay`? Developer Advocate Ben Dechrai explores the lineup and shares his thoughts from a delegate's perspective.

#### <br>

You’ve probably heard by now that [Okta and Auth0 have joined forces](https://auth0.com/blog/developers-explore-okta-auth0/). As a developer advocate for Auth0, I’m really excited to see how we can combine our forces to make identity even better for the developer community.

You might not be aware that I’m a huge fan of creating events that directly address the needs of developer communities. From the first conference I ran in 2004 to the user group meetings that are still going to this day, you can imagine my excitement when I heard we (Auth0 and Okta) were going to run an online event together!

This time, members of my team are taking the lead, so I'll be in the same boat as many of you experiencing Developer Day as it happens, so I thought it might be helpful to share my thoughts on the event and what I’m looking forward to the most.

Hit up the [community forum](http://community.auth0.com/) if I miss something that’s important to you &mdash; there’s so much for everyone, I’m sure you’ll help others out too.

## What Is Developer Day?

[Developer Day](https://www.okta.com/developerday/) creates a space for all developers to discover how the identity space is evolving, learn best practices in privacy and security, and gain insights from developer experiences. It brings speakers from across these sectors right to your desktop, and best of all &mdash; it’s free!

> Speaking of free, did you know you can also <a href="https://auth0.com/signup" data-amp-replace="CLIENT_ID" data-amp-addparams="anonId=CLIENT_ID(cid-scope-cookie-fallback-name)">sign up for a free Auth0 account</a> at any time? Why not try it out today?

![Developer Day speakers Cassidy Williams, Alyssa Miller, and Kapehe](https://images.ctfassets.net/23aumh6u8s0i/12g1Ga4gP8X04Xn0H0nnFt/5b4ae4b06847a028d9a784a46ec48b26/cassidy-alyssa-kapehe.png)

More specifically, it’s a one-day, single-track, virtual event, and while I’m proud to see some of my colleagues’ names in the speaker list, the lineup also features the likes of **Cassidy Williams** (Director of Developer Experience at Netlify), **Alyssa Miller** (Hacker, Researcher, and Security Advocate), and **Kapehe** (Developer Relations at Sanity.io, and yes, you might remember she used to [work at Auth0](https://auth0.com/blog/authors/kapehe-jorgenson/) too).


[Read more...](https://auth0.com/blog/developerday-helps-developers-build-the-future-of-identity/?utm_source=content_synd&utm_medium=sc&utm_campaign=event)
Using React Query with Supabase
Tags: react, supabase, reactquery, webdev
Published: 2021-08-10 18:54:35

If you are using Supabase in React, it's a good idea to combine it with [React Query](https://react-query.tanstack.com). Let's first have a look at how you fetch data in Supabase.

```js
const { data, error } = await supabase
  .from('todo')
  .select('id, name')
  .eq('done', false);
```

This call queries the `todo` table, selecting the `id` and `name` columns and filters for those to-dos that are not `done`. If `error` is not null, something went wrong, and `data` is `null`. Otherwise, data is an array of objects representing the rows that matched the query.

Since a potential error is returned, the promise we await here never rejects. But the query function we use in `useQuery` is supposed to either resolve data or throw an error. If we simply wrap the query from above in a `useQuery` call, React Query cannot detect if the call failed:

```js
// ⛔️ silently swallows a potential 'error'
useQuery(
  ['open-todos'],
  () => supabase
          .from('todo')
          .select('id, name')
          .eq('done', false)
);
```

To write a `useQuery`-conform query function, we can explicitly throw an error if one occurs:

```js
useQuery(
  ['open-todos'],
  async () => {
    const { data, error } = await supabase
      .from('todo')
      .select('id, name')
      .eq('done', false);

    if (error) {
      throw new Error(`${error.message}: ${error.details}`);
    }

    return data;
  }
);
```

Since all calls to Supabase follow the same pattern, we can introduce a small function to reuse this explicit handling of errors:

```js
function useOpenTodos() {
  return useQuery(
    ['open-todos'],
    () => supabase
            .from('todo')
            .select('id, name')
            .eq('done', false)
            .then(handleSupabaseError)
            .then(({ data }) => data)
  );
}

function handleSupabaseError({ error, ...rest }) {
  if (error) {
    throw error;
  }
  return rest;
}
```

This way, you don't have to write the same boilerplate for every `supabase` call and can effectively make use of the benefits of React Query's data management.
My look into Python Decorators.
Tags: python
Published: 2021-08-10 18:52:09


The concept of Python decorators is unclear to many people, even though it's simple. For this reason, you can consider Python decorators as high-level functions in Python which that takes another function as its argument and returns another function as a return value.

Python decorators show how the Python programming language packs several features in your small and beneficial package. Decorators can be applied to classes and functions to make programming fascinating. They can speed up the performance, shorten and completely change the dynamics of what the code can do.

The explanation may look abstract, but if we take an example, it will be manageable. Let's demonstrate these by writing two different functions and using them to explore the concept of Python decorators.

For instance, if we take our function above, we can decorate it as shown in the snippets below.

```py
def umbrella_function(function):
   
    name = 'Jerim Kaura'
    def inner_function():
        print(name)
        function()
    return inner_function

def another_function():
    print('I am a computer science student')

x = umbrella_function(another_function)

x()
```

**Output:**

```bash
Jerim Kaura
I am a computer science student
```

In the example above `umbrella_function()`was a decorator but when we say `x = umbrella_function(another_function)` the function `another_function()` got decorated and the returned function was assigned to  the variable `x`.

To decorate a function in Python, we use the `@` symbol alongside the name of the decorator function and place it immediately above the function definition. For instance,

```py
@umbrella_function
def another_function():
    print('I am a computer science student')
```

The above is the same as 

```py
def another_function():
    print('I am a computer science student')

x = umbrella_function(another_function)
```

### Passing parameters to decorators
Sometimes we may need to define a decorator function that accepts parameters. We can achieve this by passing the parameters to the wrapper function, which we then pass to the function that is being decorated.

```py
def umbrella_function(function):
   
    def inner_function(args1, args2):   
        print("Arguments passed are: {0}, {1}".format(args1,args2))     
        function(args1, args2)
    return inner_function

@umbrella_function
def another_function(name, age):
   print ('So, {name} is {age} years old and she is a {occupation}'
   .format(name = name, age = age, occupation = 'programmer'))

another_function('Jerry', 18)
```

**Output:**

```bash
Arguments passed are: Jerry, 18
So, Jerry is 18 years old, and she is a programmer
```

### Further reading
To learn more about Python decorators, consider checking out how the concept is discussed in the [Python's Decorator Library](https://wiki.python.org/moin/PythonDecoratorLibrary)
Learn CSS by Playing Games - No Nightmares
Tags: css, beginners, webdev, showdev
Published: 2021-08-10 18:15:24

Every frontend developers nightmare is not able to positioning or align an element where it needs to be and when you try to do something UI starts to break.

Flexbox and CSS Grid Layout are really good and easy way to solve the issues related to aligning, position and bringing responsiveness to the webpage.

But the problem is we humans can't remember all the properties of Flexbox and Grid, but we can train ourselves to remember by doing it again and again. But it is no fun and we often get bored and google each and every time to figure out how a text is aligned.

What if there is a way to master CSS in a fun way, what if it was a game. Most of the developers faced same issue when it comes to tutorials, they are no fun. So some of the smart developers came up with some of the following Games to master CSS.

<u>Here is the list:</u>
<ol>

<li> <a href="https://flexboxfroggy.com/">Flexbox Froggy</a> - Game to master Flexbox</li>
<li> <a href="http://www.flexboxdefense.com/">Flexbox Defense</a> - Game to master Flexbox</li>
<li> <a href="https://flukeout.github.io/">CSS Diner</a> - Game to master CSS selectors</li>
<li> <a href="https://mastery.games/flexboxzombies//">Flexbox Zombies</a> - Game to master Flexbox (Must Try)</li>
<li> <a href="https://cssgridgarden.com/">Grid Garden</a> - Game to master CSS Grid Layout</li>
</ol>
There is one more game to master CSS Grid but I didn't try since was little bit priced high
<ol start=6>
<li> <a href="https://gridcritters.com/"> Grid Critters</a> - Game to master CSS Grid</li>
</ol>
<p>
These are some of the quick list of CSS games, there are lot of such games to master many of the technology.
<br/>
Let me know if I missed any.
</p>

Photo by <a href="https://unsplash.com/@pankajpatel?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Pankaj Patel</a> on <a href="https://unsplash.com/s/photos/css?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Day 168
Tags: 100daysofcode, programming
Published: 2021-08-10 17:41:35

Day 168/200 of  #100DaysOfCode 

- Solved two problems on Codewars. And another two on HackerRank.

1 - I need more speed! (6 kyu)
2 - Simple Substitution Cipher Helper (6 kyu)

1.Sales by Match
2. Repeated String
DSA and Languages
Tags: algorithms, cpp
Published: 2021-08-10 17:34:20

As a beginner we generally get confused about which language we should choose in order to have a safer career, I was also confused about the same in my freshman year. My journey as a programmer started in my first-year of college, many people learn programming since their school days and this confusion is quite lesser in them. But for people like me it is very much seen among us, and then students waste a lot of time switching over languages and not learning the core concepts of it. They just want to learn as many languages they can, and end up learning none completely.

In my first-year I also did the same the I tried to learn all the languages and stuffs as much as I can in shorter span of time, however I was having a good grip in one language so learning the other language was quite easier for me.
But we need to understand the fact that language doesn't actually matter in each and every language you will almost use the same approach to solve a problem, they are just syntactically different. Our main focus should be that are we able to solve problems in any programming language be it C C++ Java Python anything. When you know one language completely learning other becomes easier for you, try solving problems as much as you can in any language of your choice.

And avoid wasting time on switching over languages, use the platforms like Leetcode Hackkerrank CodeChef to practice your skills, and don't try to cheat in that because that's not going to help you.
Short Intro!
Tags: ux, productdesign, uxdesign, webapps
Published: 2021-08-10 17:28:50

Hello, my name is Luis from Caracas, Venezuela. I am actually searching for new experiences or opportunities to work with remote and collaborate team in the fields of Product Design, UX Design disciplines or web apps. Check out my profiles, I would like to hear from you. Thanks!

https://www.linkedin.com/in/lteranux/
https://dribbble.com/lteranux