teleren/devto huggingface dataset:
One Tip to Make Feedback Less Terrible
Tags: feedback, career, discuss
Published: 2021-08-04 14:00:01

---
title: One Tip to Make Feedback Less Terrible
published: true
date: 2021-08-03 00:00:00 UTC
tags: feedback, career, discuss
canonical_url: https://ryanlatta.com/2021/08/one-tip-to-make-feedback-less-terrible.html
---

Feedback is something that evokes a sort of love-hate dynamic for a lot of people. On the one hand, we love the idea of feedback because it can help us grow. On the other hand, it can leave us feeling pretty raw, and sometimes people use the idea of feedback to attack us instead.

## We Can’t Fix Anything

There is a tendency when we give feedback to people to want to fix the problems we see in them. This is especially true if we’re more senior or even their boss.

The danger here is that oftentimes the people we give this feedback may not be ready to hear feedback along these lines, and it will not be a healthy session.

So, we have to realize that we aren’t fixing them because we can’t. At most, we are making an offer that we hope is regarded as a gift. We can usually help by asking if there are particular areas they’d like to focus on when we are discussing feedback.

## Supported or Challenged

I learned to alter how I do feedback after attending some introductory co-active coaching classes. Most feedback advice you’ll hear tells you to identify the topic, give specific examples, and offer a suggestion.

This isn’t the only way to do feedback and is what a lot of us ultimately don’t enjoy, and we don’t often get a lot of value out of it.

While I’m not saying that the format is wrong, there is almost no attention paid to setting up the conversation before you offer that type of feedback.

Setting up the conversation is important, and one question that I use almost every time is this:

**Do you want to be supported or challenged in this feedback?**

This is a much better question than asking if you should be honest or not. The supported or challenged question skips through the pointless question about honesty and gets right to what is important, which is what does the person need to hear right now?

Can I offer feedback that supports what they’re currently doing or one of their strengths? Of course, I can. Can I similarly offer feedback that would be a challenge for them where they are today? Yes, of course, I can.

The point is that this question helps direct the type of feedback we give, which helps it turn into more of a gift than a wound.

Next time you are in a feedback situation, use this question before you give the feedback and see what happens!

---

If you liked this post there're two more things I'd like to tell you about. First, I'd love to have you join my newsletter that everyone from first-time devs to CTOs read weekly.

Second, I just launched my first ever online class that guarantees to get more interviews, offers, and negotiate higher pay.

[You can find out about both here.](https://sleek.bio/ryanlatta)
Diferença entre Desenvolvedor Júnior, Pleno e Sênior
Tags: junior, pleno, senior
Published: 2021-08-02 23:43:58

Para quem está começando, é comum se deparar com a seguinte dúvida: os níveis júnior, pleno e sênior. A verdade é que existem muitos critérios para definir cada um deles, além de empresas utilizarem seus próprios critérios internamente, mas para acabar com essa dúvida para quem está entrando agora no mercado de trabalho, definirei alguns pontos para que você entenda a diferença na hora de se candidatar para uma vaga.

Mas já ir adiantando que a diferença está mesmo no tempo de experiência, o grau de responsabilidade e a complexabilidade das tarefas.

### Júnior
É a pessoa que acabou de entrar no mercado de trabalho, geralmente recém graduado. Tem pouca experiência e no dia a dia lida com tarefas de menor complexabilidade, sem poder de decisão dentro do time.

### Pleno
Aqui, a pessoa já tem alguns anos de experiência no mercado de trabalho, já consegue resolver problemas mais complexos no dia a dia, já que conquistou a maturidade profissional. Possui uma capacidade maior na tomada de decisão no time.

### Sênior
Essa pessoa toma a decisão. Possui anos de experiência e uma excelente maturidade profissional. Possui capacidade de ocuparem lugares de liderança, geralmente gerenciando o seu time. Participar também do planejamento.

### Qual nível estou?
É muito comum possuir esta dúvida, ainda mais quem está começando. O importante aqui é você fazer uma autoavaliação para descobrir em quem nível se encontra: Sou recém-formado? Tem quantos anos de experiência? Consigo lidar bem com tarefas complexas sozinho? Tenho autonomia para tomar decisões?

Essas são algumas perguntas que ajudarão na hora para decidir em que nível você se encontra. Contar com ajuda de profissionais que trabalharam com você também ajuda nesse processo.

**Fonte**

- Quero Bolsa
- Vagas
- Oficina da Net
- Tutano

*Foto de Christina Morillo no Pexels*
6 Helpful OS Module Methods
Tags: python, codenewbie, beginners, programming
Published: 2021-08-02 23:19:13

Hello,
I'm [Aya Bouchiha](https://t.me/AyaBouchiha),
today,
I'm going to share with you **6 useful os module method**s.
Firstly, we need to know that the os module is built-in in python, it is used for interacting with the operating system.

## getcwd()

**getcwd()**: this method helps you to get the absolute path of the current working directory as a string.

```python
import os

print(os.getcwd())
# C:\Users\AyaBouchiha\Desktop\posts
```

## os.mkdir()

**mkdir()**: lets you create a new directory if it does not exists, else it raises an error (FileExistsError)

```python
import os

os.mkdir('python') # done :)

os.mkdir('python') # error (FileExistsError)
```

## os.rmdir()

**rmdir()**: helps you to remove an empty directory.

```python
import os

# done
os.mkdir('python/newFolder')  

# done
os.rmdir('python/newFolder')  

# error (FileNotFoundError)
os.rmdir('something/does-not-exists') 

# error (NotADirectoryError)
os.rmdir('user.json') 
```

## os.remove()

**remove()**: lets you delete a file. If it does not exists, this method raises an error.

```python
import os

# done
os.remove('posts/python/test.py')

# error(FileNotFoundError)
os.remove('posts/python/test.py')
```

## os.path.isfile()

**isfile()**: returns True if the given path is a regular file, otherwise It returns False.

```python
import os


my_file_path = 'posts/python/os_module.py'
# True
print(os.path.isfile(my_file_path))

file_does_not_exists_path = 'posts/python/os_module.json'
# False
print(os.path.isfile(file_does_not_exists_path))

directory_path = 'posts/python'
# False
print(os.path.isfile(directory_path))
```

## os.listdir()

**listdir()**:  returns a list that contains all files and directories names that exist in the specified path.

```python
import os

print(os.listdir('posts/'))
# Output:
# [
#  '5_list_python_methods.md',
#  'js_resources.md',
#  'MapObject.md',
#  'os_module.md',
#  'os_module.py',
#  'python'
# ]
```


## Summary

+ **getcwd()**: returns the absolute path of the current working directory as a string.

+ **mkdir()**: creates a new directory.

+ **rmdir()**: removes an empty directory.

+ **remove()**: deletes a file.

+ **isfile()**: returns True if the given path is a regular file.

+ **listdir()**:  returns a list that contains all files and directories names that exist in the specified path.


## Suggested posts

+ [All You Need To Know About Python JSON Module](https://dev.to/ayabouchiha/all-you-need-to-know-about-python-json-module-5ef0)

+ [5 Helpful Python Random Module Methods](https://dev.to/ayabouchiha/5-helpful-python-math-module-methods-44gf)

+ [5 Helpful Python Math Module Methods](https://dev.to/ayabouchiha/5-helpful-python-math-module-methods-44gf)

+ [5 Useful Python String Methods](https://dev.to/ayabouchiha/5-useful-python-string-methods-4pe7)



To Contact Me:

+ email: developer.aya.b@gmail.com
+ telegram: [AyaBouchiha](https://t.me/AyaBouchiha)

Have a great day!
Laravel ziggy route completion for vscode
Tags: vscode, ziggy, laravel, vue
Published: 2021-08-02 23:11:52

I always felt there was a lacking for route completions when I was using `tighten/ziggy`. It became almost necessity when I decided to use inertia js. Inertia, what not to like!

Anyway, I was searching ziggy in vs code marketplace every now and then and finally decided to build my own extension.

At first this extension loads route names from `resources/js/ziggy.js`. When it finds `route()` or `$route()` in js code it shows matched suggestions from extension's cached list. My main hiccup was importing the route list. I had to transform es6 code on the fly because of ziggy's export not being supported by node js.

Another problem I was facing is `artisan ziggy:generate` command. I had to run this command every time I made a new route or changed something. This extension solves this problem too. It watches `web.php` for changes and runs the artisan command automatically. Of course this can be disabled too.

Let me know what do you think :)

Links: [Extension](https://marketplace.visualstudio.com/items?itemName=nabil.ziggy-routes), [Repository](https://github.com/nabilanam/ziggy-routes)
Electron Adventures: Episode 10: Preload Script
Tags: electron, javascript
Published: 2021-08-02 23:06:17

I was talking a lot about Electron security, and how just giving your frontend full access to your system might not be the best idea ever. So what else Electron recommends?

The current solution - and they reached that after a few iterations - is preload script.

We still have frontend and backend code, but we have third code - preload script - that initializes frontend, does any kind of highly privileged things, before handing it over to regular code.

If you do things right, frontend will have access to just the thing preload scripts setup, and nothing more. Which in our case won't help us at all, as we're writing terminal app, so the frontend is supposed to be able to literally any shell command, but this is great for more applications with more limited functionality, like a webchat app.

### Enable preload script

Let's start with app we wrote in previous episode. We need te got rid of `nodeIntegration: true` and `contextIsolation: false`.

For some reason Electron really wants preload path to be absolute path, not relative path of `file` URL:

```javascript
let { app, BrowserWindow } = require("electron")

function createWindow() {
  let win = new BrowserWindow({
    webPreferences: {
      preload: `${__dirname}/preload.js`,
    },
  })
  win.maximize()
  win.loadFile("index.html")
}

app.on("ready", createWindow)

app.on("window-all-closed", () => {
  app.quit()
})
```

### Preload script

Let's move `runCommand` to `preload.js`, and use `contextBridge` to expose it:

```javascript
let child_process = require("child_process")
let { contextBridge } = require("electron")

let runCommand = (command) => {
  return child_process.execSync(command).toString().trim()
}

contextBridge.exposeInMainWorld(
  "api", { runCommand }
)
```

`contextBridge.exposeInMainWorld` defines which extra things we expose in the frontend. In this case we told it that we want `window.api` object, with a single method `runCommand`.

It's important to note that this extra functionality will stay available even if you move to a completely different domain, so be careful.

### Use preload script

In the frontend script, we just need to change two lines - remove the `require` as it would no longer work, and call our exposed method `window.api.runCommand` instead of `child_process.execSync`:

```javascript
form.addEventListener("submit", (e) => {
  e.preventDefault()
  let command = input.value
  let output = window.api.runCommand(command)
  createTerminalHistoryEntry(command, output)
  input.value = ""
  input.scrollIntoView()
})
```

### Result

No screenshot this time, as it looks identical to previous episode, all that changes were internals.

So did we actually gain anything? Yes we did. As frontend script no longer uses weird `require` shenanigans, it's now a regular frontend code, and we can use any bundler we want with it.

So over the next few episodes we'll be exploring how to use various frontend frameworks with Electron.

As usual, [all the code for the episode is here](https://github.com/taw/electron-adventures/tree/master/episode-10-preload-script).
Dev log for Wonder Wanderer 2: Day 2 #LOWREZJAM 😁
Tags: devjournal, javascript, challenge, gamedev
Published: 2021-08-02 22:50:34

It's the second day for me on the LOWREZJAM.
I made a mental roadmap and that consist on making a character with multiple ways of movement (so, top down and 2D side-scroller) and a map with collisions.
###What did I do today?###
 I managed to do today a basic movement for the character, adding gravity, the direction and the force of it with a little drawing of a map includes, and two buttons with a fake jump (without friction) and a button that changes gravity (it's not like VVVVVV, you can use this ability to do some wall-running, but you will see). I hope to do better jumps, map collisions and some hazards next day.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hiui3l77mulhxbto3bj9.gif)
Grav CMS: Install in a subdirectory (on OpenBSD)
Tags: grav, cms, installation, openbsd
Published: 2021-08-02 22:29:36

## Summary

Installing in a subdirectory here means a website is accessed as `http(s)://<root-dir>/<TARGET>` instead of `http(s)://<TARGET>`.
All what to do in order to install [Grav](https://getgrav.org/) CMS in a subdirectory on [OpenBSD](https://www.openbsd.org/) is to configure two files: Grav's user/config/system.yaml and OpenBSD's /etc/httpd.conf.

## Tutorial

Assumed that:
Grav CMS has been already installed in __\<root-dir (as a subdirectory)\>/\<grav-dir\>__.

[Here is an example](https://obsd.solutions/en/blog/2021/08/02/grav-cms-on-openbsd-69-install-via-composer/index.html) about how to install it.

### Grav's user/config/system.yaml

Go to \<grav-dir\>.
Edit __user__/config/system.yaml:

```console
$ nvim user/config/system.yaml
```

to add `custom_base_url` whose default value is blank:

```diff
+ custom_base_url: '/<root-dir>'
```

Besides, according to [the official Grav Configuration](https://learn.getgrav.org/basics/grav-configuration), "you should never change" __system__/config/system.yaml.

### OpenBSD's /etc/httpd.conf

Edit [httpd.conf](https://man.openbsd.org/httpd.conf.5):

```console
$ doas nvim /etc/httpd.conf
```

to modify location definition:

```diff
  server "<fqdn>" {
      (...)
-     root "/(...)/<grav-directory>"
+     root "/(...)/<root-dir>" # (optional, up to env)
      (...)
-     location "*" {
+     location "/<grav-directory>/*" {
-         root "/(...)/<grav-directory>/index.php"
+         root "/(...)/<root-dir>/<grav-directory>/index.php"
          fastcgi socket "/run/php-fpm.sock"
      }
      (...)
  }
```

Then restart the server:

```console
$ doas rcctl restart httpd
```

## Conclusion

You will perhaps see the Grav site running in a subdirectory :)

![installed in a subdirectory](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t8z9xa0cr7c7gmb8zflc.png)
Day 421 : Jam
Tags: hiphop, code, coding, lifelongdev
Published: 2021-08-02 22:04:46

_liner notes_:
- Saturday : Got up early to finish putting together the radio show. Also did a little coding for my live online study group that I do on Sundays. Pretty chill day. Had fun doing the radio show as usual. The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of a NASA satellite photo showing the amount of Red Tide in the Tampa Bay with the words July 31st 2021 215 Million](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/szx6ff5z83luu8e5suis.jpg)

- Sunday : Spent the day doing https://untilit.works and getting some tasks done. Super happy that everything worked. After doing a live stream, once I hit "stop broadcast", the video recording is uploaded to the archive, a thumbnail is created, any highlight videos from viewers, and now I get some details about the video generated. During the work sessions, I did the post radio show promo work, laundry and did some research. Afterwards, I watched an episode of "Fire Force", "Kevin Can F Himself" and "Rick and Morty".

- Professional : Pretty good day today. Had a couple of pair programming sessions and helped out some folks. Responded to a question from the community. Then I worked some on a blog post I've been putting together. It was raining pretty much all day so that made me pretty tired.

- Personal : I'm pretty happy with how https://untilit.works is turning out. The code I'm writing is working for the most part. There are a couple of things I want to fix, but I think I can leave it where it is right now and work on other things like building out the inside of my van. Going to order a few more of the hydraulic lifts and when I take my next vacation, start putting together the shell. Hopefully in a couple of weeks. I want to finish up some projects so that when I come back, I'll be starting fresh.

![Overhead view of an orange rocky cliff in Sagres, Portugal that is over the ocean with some rocks sticking out of the water](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gxundfvim0k7juzm9xm7.jpg)

Going to eat dinner and watch "Fire Force" (I'm almost caught up!). I'll probably get a head start and listen to tracks for the radio show. After that, I may take a look at a bug where if someone includes hashtags in their to do list, when they click the tweet button, it doesn't show up and I think it's because the hashtags aren't being escaped in the URL and that will jam things up. I'll see if it's a quick fix. Think I'll go to bed early. I've been pretty tired.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube 1Lzl4cYH4PE %}
Como probar media queries con Chrome (o Edge)
Tags: spanish, chrome, webdev, css
Published: 2021-08-02 21:42:48

Idiomas: [🇺🇸] [English](https://dev.to/equiman/how-to-test-media-queries-with-chrome-5d8c) - [🇪🇸] [Español](https://dev.to/equimancho/como-probar-media-queries-con-chrome-4kb5)

---

Lo quieras o no, el desarrollo web moderno está directamente relacionado al diseño responsivo (responsive design). 

Tenemos media queries en todos lados inclusive [Bootstrap](https://getbootstrap.com/) y [Tailwind](http://tailwindcss.com/) tienen un sistema de rejillas para poder adaptar con mayor facilidad el contenido según la pantalla o dispositivo.

# Visor de Media Query

Algunas veces pensamos que los Media Query son difíciles de probar, pero las Herramientas de Desarrollo (DevTools) de Chrome/Edge tiene escondida una gema para lidiar y probar fácilmente esos puntos de inflexión (breakpoints).

Para activar ese superpoder debemos realizar los siguientes pasos.

1. Abrir las Herramientas de Desarrollo (DevTools) de Chrome/Edge
2. Activar la vista Mobile
3. Asegurarse de seleccionar "Responsive" en la lista de dispositivos.
4. Mostrar media queries (show media queries)

![media-queries](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gj3fen7pj43z35xiop63.gif)

# Barras de Consulta (Query Bars)

Dependiendo de la cantidad de media queries definidos en los estilos de la página vas a poder ver 4 barras de diferentes colores.

Tamaño preestablecido (Gris):
![preset](https://dev-to-uploads.s3.amazonaws.com/i/fftkagwy6tbxb1n6ao0h.gif)

Ancho máximo (Azul):
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/7ovbpktpxtxa39ygpgwu.gif)

Ancho máximo y mínimo (Verde):
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/sly1zfodefwo5h5auzft.png)

Ancho mínimo (Naranja)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/yhk81mlqklzcvrrsajkd.gif)

# Ejemplo

La página de Bootstrap nos da una excelente oportunidad para ver esta utilidad en acción porque tiene definidos múltiples tipos de de media queries.

![example](https://dev-to-uploads.s3.amazonaws.com/i/c2b2gqfc1xos5sn34tat.gif)

# Código Fuente

Además también puedes sobre el media query seleccionado hacer click con el botón secundario y ver el código fuente.

![source](https://dev-to-uploads.s3.amazonaws.com/i/6u2ck7sbxv0b7kxh4xao.png)

# Extra

Si también quieres ver todos los media query en acción al mismo tiempo te recomiendo darle una mirada a [Responsively](https://responsively.app/).

![responsively](https://dev-to-uploads.s3.amazonaws.com/i/4nbmm85xniooghsv59bu.png)

Es un increíble proyecto código abierto (open source) que nos puede hacer el trabajo más fácil en el desarrollo.

---

**That’s All Folks!**
**Happy Coding** 🖖

[![cerveza](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h4zle20oa7anpfjvap8n.png)](https://github.com/sponsors/deinsoftware)
How To Hide Your .env While You're Livestreaming
Tags: vscode, todayilearned, security
Published: 2021-08-02 21:36:23

Note: This article assumes [basic knowledge of VSCode](https://code.visualstudio.com/docs/introvideos/basics). 

Here's how to start using John Papa's VSCode extension Cloak to hide `.env` secrets, especially helpful when you're livestreaming! 

- Search 'Cloak' in VSCode extensions and install it.

![Screen Shot 2021-08-02 at 2.27.54 PM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y95iyj2gso7v0qbc9aop.png)


- Open up a .env file with your secrets in it. It should look something like this:

![Screen Shot 2021-08-02 at 2.25.47 PM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/thzrimurj7108kwagcz4.png)

- Open up your Command Palette and hit 'Cloak: Hide Secrets'

![Screen Shot 2021-08-02 at 2.28.52 PM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/npceb21uxjgdz6orjbpe.png)
 
And there you have it! Your secrets are hidden! You can un-hide them by running the 'Cloak: Show Secrets' command. ![Screen Shot 2021-08-02 at 2.29.53 PM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gt9xmtxcgo65pzpj8v11.png)

> Note: If you copy/paste, your secret will be visible in the file you pasted it in. 


PS- many thanks to @nickytonline who pointed out the usefulness of this extension!
Setting up MongoDB on Windows
Tags: mongodb, windows
Published: 2021-08-05 01:08:54

---
title: Setting up MongoDB on Windows
published: true
date: 2021-08-02 21:26:29 UTC
tags: MongoDB,Windows
canonical_url: https://donaldfeury.xyz/setting-up-mongodb-on-windows/
series: "Small Bytes of MongoDB"
---

For a full overview of MongoDB and all my posts on it, check out my [overview](donaldfeury.xyz/introduction-to-mongodb/).

MongoDB can be quickly and easily set up on Windows using the default MSI installation wizard provided by the MongoDB team.

To get the installer, follow these steps:

- Go to the [MongoDB Download Center](https://www.mongodb.com/try/download/community)
- Choose a specific version of MongoDB to install if you wish, otherwise, just leave it on the default version
- For **Platform** , choose **Windows**
- For **Package** , choose **server**
- Click the Download button

Once the installer has finished downloading, go ahead and run it.

- Choose your setup type - choose **Complete** if you don't want to choose what gets installed. If you do want to choose, select **Custom**
- For the **Service Configuration** , if you want MongoDB to be managed as a Windows Service and start automatically, tick the box for **Install MongoDB as a Service**. ( I assume MongoDB is set up as a service for this tutorial)

> You can choose to have a default Window Network User manage the service or you can customize the service setup

- If you want to install [Mongo Compass](https://www.mongodb.com/products/compass), a GUI application for interacting with your MongoDB data, you can do so as well.
- Once installation is complete, MongoDB will already be running and accessible.

Once MongoDB is running, it will be available at `mongodb://localhost:27017`. You can connect to it using various tools such as [mongosh](https://docs.mongodb.com/mongodb-shell/), [Mongo Compass](https://www.mongodb.com/products/compass), or any programming language using a module for MongoDB.