teleren/devto huggingface dataset:
How to deal with stubborn employees. (as a senior developer)
Tags: career, leadership, management
Published: 2019-11-24 03:55:21

---
title: How to deal with stubborn employees. (as a senior developer)
published: true
description: How to lead everyone in your team, even if at first they don't want to be led by you.
tags: career, leadership, management
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ylbdd89s11feax45a3zc.jpg
---

Everyone knows someone stubborn.

If you don't, I have some bad news for you. :)

Regardless of how wrong or right you think you are, if you're not willing to acknowledge others' opinions and compromise as appropriate, you're going to have a hard time getting things done.

> "Talent wins games, but teamwork and intelligence wins championships."
> 
> – Michael Jordan

As a senior developer / manager, you might have to deal with stubborn employees, or **you might be the stubborn one**. Either way, not properly addressing the issue can greatly affect your team dynamic.

Let's look at this scenario:

*You are the team lead at a company, and Jerry is a hardworking frontend developer that has been working at this company for 10 years. Recently, the company hired a senior frontend developer to take lead of the development process. As time goes on, Jerry becomes increasingly passive-aggressive, thinking that he is more suited for the job than this senior developer. He now refuses to listen to anyone in his team except the team lead, causing a lot of development blocks and causing many workflow issues.*

As the team lead, you realise that if this continues to drag on, this will be very detrimental to the entire team. So you decide to come up with a plan to deal with this type of behaviour.

Although it may be tempting to call Jerry out in front of the whole team for his attitude, this may cause more problems than it solves.

At the end of the day, Jerry is still a human being, and human beings have feelings. It's not in your best interest to bring others down like that.

Instead, consider:

* Conducting code reviews within a team meeting or group setting where you (as the team lead) are present. This may help to keep his attitude in-check, whilst also ensuring that necessary quality control is completed.
* Orchestrating pair programming sessions to further encourage teamwork. This may help the issue and associated resentment to organically dissolve.
* Talking to Jerry personally, and asking him if something's bothering him. In many cases, it is a combination of various issues and factors that causes behavioural symptoms, and where the employee is willing to discuss and open up, this can be a suitable method of encouragement and counselling.

Feedback is very important, and it is important that employees correctly perceive their role within the team. In the case of Jerry, by respecting emotional/professional boundaries whilst also being firm on code quality and delivery, you will slowly gain the respect of all your employees, including Jerry.

Thanks for reading! What do you guys think? How would you handle this kind of situation?
Ping to dev.to (ASIA -> NYC) is faster than reasonable 
Tags: discuss, fastly
Published: 2019-11-24 02:50:42

I wondered why dev.to is so fast. I read all available posts there is about dev.to

Today, I pinged dev.to and response time was < 60ms. The server location showed NYC, fastly. I tried pinging linode, vultr, digital ocean NYC data-centers and non of them showed < 200ms. Mostly between 200-300ms. I even pinged my empty new fresh NYC server and it was still above 200ms.

To be extra sure if dev.to really has NYC servers, I pinged from one of my NYC server and dev.to has multiple NYC IPs and all ~1ms.

How come fastly or dev.to response so fast? Where no others can't. What I'm missing? Is fastly really that fast? It doesn't even reasonable to response from NYC when I'm far in asia
Performance Testing IPFS Protocol
Tags: jmeter, performancetesting, ipfs
Published: 2019-11-25 20:34:22

---
title: Performance Testing IPFS Protocol
published: true
date: 2019-11-24 02:17:13 UTC
tags: JMeter,Performance Testing,IPFS
canonical_url: 
---

# Performance Testing IPFS Protocol 

Recently I stumbled upon IPFS project while browsing in GitHub. I read the documentation and was able to quickly spin up it in my Windows laptop and started sharing my files to my wife. In this blog post, I will share the details about what is IPFS, how to get started, and performance testing IPFS protocol in Apache JMeter.

# What is IPFS?

I don’t want to rephrase any thing about IPFS; below is from Wikipedia.

"The InterPlanetary File System (IPFS) is a protocol and peer-to-peer network for storing and sharing data in a distributed file system. IPFS uses content-addressing to uniquely identify each file in a global namespace connecting all computing devices."

TLDR; A peer-to-peer hypermedia protocol designed to make the web faster, safer, and more open.

You can share your files and folders with anyone over IPFS, just like sharing a file in cloud, but IPFS works differently.

[Continue reading more at my blog Performance Testing IPFS Protocol](https://qainsights.com/performance-testing-ipfs-protocol/#more-6662 "Performance Testing IPFS Protocol")

The post [Performance Testing IPFS Protocol](https://qainsights.com/performance-testing-ipfs-protocol/) appeared first on [QAInsights](https://qainsights.com).
I made a Vue App to play around with Backdrop Filters
Tags: css, codepen, showdev, vue
Published: 2019-11-24 02:00:21

`backdrop-filter` is a pretty neat tool in CSS that allow you to add filters to elements behind the target element. That differs from the `filter` property, which applies a filter to the targeted element itself. They both use the same filter types, so once you've learn one you can apply the same knowledge to the other.

`backdrop-filter` works on most modern browsers except Firefox (see [Can I Use](https://caniuse.com/#feat=css-backdrop-filter)). You should be able to enable it in Firefox by setting the `layout.css.backdrop-filter.enabled` preference to `true` in about:config, but I couldn't get it to work. 

Here's the pen, feel free to play around with it to make your own combination of filter styles! I built it in Vue, and you can add as many filter layers as you want, remove them and move them around to get all sorts of effects. Try scrolling the page to see how `backdrop-filter` affects different parts of the background:

{% codepen https://codepen.io/LegendOfLuis/pen/XWWwWWx %}

You can learn more about `backdrop-filter` in the [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter).
CSS flexbox: how to use flex-shrink and flex-grow for responsive layout
Tags: css, html, saas, webdev
Published: 2019-11-24 01:36:36

It took me a while to figure out flexbox, espcially `flex-shrink` and `flex-grow`. 
Here is a cheat sheet that I made based on developing experience, and I hope it will help you.

##Responsive for all elements
Clean and easy - 

```css
.parent{

  display: flex;
}

.child{
  flex: 1 1 PERCENTAGE;
}
```

### All elements have fixed width
This can be used on carousel slideshow.

```css
.parent{
  display: flex;
  flex-wrap: nowrap;
}
.fixed-elements{
  flex: 0 0 FIX_WIDTH;
}
```
**_Note_**
If you set code as `flex: 1 1 FIX_WIDTH`, and then expect fixed width elements...
It won't happen. `flex-basis` has lower priority than `flex-grow` and `flex-shrink`. Flexbox is going to try any possibilities to make responsive layout:woman_shrugging:.
### Fixed width on one element, others are still responsive

```css
.parent{
  display: flex;
  flex-wrap: nowrap;
}
.fixed-element{
  flex: 0 0 FIX_WIDTH;
}
.other-elements{
  flex: 1 1 PERCENTAGE;
}
```
### What does those numbers mean
Let's talk about what exact those numbers mean on `flex-shrink` and `flex-grow`.
They are all **relative** numbers, which means it will depend on their siblings. 

**flex-grow**
0 - The element will give up the chance to grow if there is space available.
1 - The element will grow if there is space available. 
2 or more - The element will look for other siblings `flex-grow`'s value, and do the math.
  for example, if `div_1 ==1`, `div_2==2`, then `div_1` is 1/3 of the width, and `div_2` is 2/3.

**flex-shrink**
0 - The element will give up the chance to shrink, and the content won't be wrapped either.
1 - The element will shrink if there is not enough space
2 or more - same as `flex-grow`, the element will sum up all siblings' `flex-shrink` value, and do the math. 

**_Note_**
The default number in IE11 is 0 while other browsers are 1. So make sure to reset the number to 1 if your code needs to be shown on IE... 

### Examples
{% codepen https://codepen.io/mingyena/pen/wvvOLdm %}
Day #3 of #30DaysOfWebPerf
Tags: webperf, sitespeed, webdev
Published: 2019-11-24 00:52:50

---
title: Day #3 of #30DaysOfWebPerf
published: true
description: How impactful are fast sites?
tags: web performance, site speed, webdev, discuss
---

{% twitter 1198393474740973568 %}{% twitter 1198393481053425664 %}{% twitter 1198396443263811584 %}{% twitter 1198396444077481984 %}{% twitter 1198398142535700480 %}{% twitter 1198396444765351936 %}{% twitter 1198398143689158656 %}{% twitter 1198396445428047874 %}{% twitter 1198396449064550400 %}{% twitter 1198398144641290240 %}{% twitter 1198399856483528704 %}{% twitter 1198399862695329792 %}{% twitter 1198399863802580992 %}{% twitter 1198401272086351873 %}{% twitter 1198401273155899392 %}{% twitter 1198401957473349632 %}
Writing DEV articles in VSCode
Tags: blogging, writing, vscode, tools
Published: 2019-11-24 00:46:34

---
title: Writing DEV articles in VSCode
published: true
description: In this article, I'll show you the extensions and tools I use to write DEV articles in VSCode!
cover_image: https://i.imgur.com/vmGe5YQ.png
tags: blogging, writing, vscode, tools
---

When I started writing this weekly blog on dev.to, like 3 months ago, I didn't know what tools to use, so I just turned to the one I use and like the most these days: **VSCode**. 

Since then, I've been customizing my blogging workspace to include all the tools I need to write my articles *fast and comfortably* in VSCode and then copy-paste them to DEV.

In this article, I'll show you the extensions and tools I use to write DEV articles in VSCode:

## 1. Markdown extension

I use an extension called [Markdown all in one](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one) that adds markdown support to VSCode. 

One of its most powerful features is *auto-preview*, which allows us to write markdown and preview it on the side:

![VSCode screenshot with the editor split in two. Markdown code on the left and preview on the right](https://i.imgur.com/a8VRB8c.png)

This extension includes other cool features, for example, you can automatically create a table of contents, and also use shortcuts like `Ctrl + B` to toggle bold text.

## 2. Spell checker extension 
To keep my writing **free of spelling mistakes** I installed [Code spell checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker). This extension catches common spelling errors and gives you suggestions to fix them by pressing `Ctrl + .` over the misspelled word.

> **Pro tip**: This extension is also useful to avoid spelling mistakes when you're *coding* at the speed of light 😂

## 3. Emoji extension 😉
I like to add emojis to my articles every now and then, and this extension is great for that: [:emojisense:](https://marketplace.visualstudio.com/items?itemName=bierner.emojisense).

Just write `:` and start writing the name of the emoji and the extension will **display emoji options** like so:

![](https://i.imgur.com/RPDB9R9.png)

## 4. Git
I sometimes write my articles from different devices. Maybe I start working on my laptop and then finish the article on my desktop PC. That's why I use `git` to **keep my work synced on all my devices** within a Blog repo that contains all of my articles and even cover images and other resources.

## 5. VSCode workspaces
Extensions can be **enabled for a specific workspace** if you don't need them *all the time*. I created a Blogging workspace in VSCode to setup extensions that I will only use on my articles. For example, I don't normally use emojis while coding, so I disabled that extension for every other workspace:

![Screenshot of VSCode "enable extension" menu with the "Enable (Workspace)" option selected)](https://i.imgur.com/ilMqkcP.png)

# Thoughts? 💬
Was this post useful? What tools do you use for your DEV articles?
Kubernetes: Despliegue en Azure
Tags: azurekubernetesaks
Published: 2019-11-24 16:05:16

---
title: Kubernetes: Despliegue en Azure
published: true
date: 2019-11-24 00:00:00 UTC
tags: azure kubernetes aks
canonical_url: https://carlos.mendible.com/2019/11/24/kubernetes_despliegue_en_azure/
---

Durante el mes de Octubre tuve la suerte de grabar en LinkedIn Learning mi primer curso online sobre Kubernetes. 

Aun me queda mucho por aprender y mejorar en este formato, ya que mientras grabas los cursos no recibes feedback inmediato como sí ocurre cuando das una charla o haces una presentación.

Hoy os dejo el video introductorio por aquí:

<iframe width="640" height="360" src="https://www.linkedin.com/learning/embed/kubernetes-despliegue-en-azure/aprende-a-desplegar-kubernetes-en-azure?claim=AQHHmMg2I1Gt9QAAAW6eEqUnoPyGuU_0z8q6mCr0E06K8UzawJqRB84KPKs8EmpqeqJRiWScVFlAFSXCxxG4i_MEVhhfUrmm0V3M71bMtU__k8g2cnjqqlVpbf002Gf2u9_JKOkCCeSrkJFgdzM_JGOee-dtGZHmYL3Akcw9lJxQADNOFfO7iwgyRUf5t17EXlTunyDL2Dz6mYKwb4gHw7DU5-6hubeERlneXe7FOCE9yjOjUvl2p93zJiGiEuqE8951Pl8yUGUXALLFsRNwsgvx6EI2MXtNa6riq7FgsRKLT1nQo0dE-BvQMuZrF8w5xPNo6geOou090t9hGCbo9KNwePAkIv2-Jl6wdQnkeuQm0EBuC_7lEViX2CQC7FCs3unGtlllZ2C155TlGO6VfDD0w_SPDDVcCfnZQQe_oLo8DFIAkbOGBNjeMZ0bswPemokjzBULQxmDnTRP4tp3mMlQMDqxGDuFwFqGvYQe1BaQissfaYBYt6D-V3DRGn-2WjCLUz-5bbauahE0mWs6s-dFUg4p42wmrR5aFiG0iThgarOP16Ea8rmNnBV1GWA43C3w8MrCQjCuWVvFTssVsfgK9G3NEfHXhy6S3id0dLxreQH6zqOrF0pjsEBYJIoHbUyAOkdzEi7wzW2wuP4MxDKPXkktXfX5VrqUnyXckoIjQf0O6Zfpt8kpp-49N6aTu82OjJrIBYm0HMM49mfoGPa17ufznfDjLlgNJ-NMG3F_Jjo" mozallowfullscreen="true" webkitallowfullscreen="true" allowfullscreen="true" frameborder="0" style="position:absolute;width:100%;height:100%;left:0"></iframe>

**[Aprende a desplegar Kubernetes en Azure](https://www.linkedin.com/learning/kubernetes-despliegue-en-azure/aprende-a-desplegar-kubernetes-en-azure?trk=embed_lil "Aprende a desplegar Kubernetes en Azure")** de **[Kubernetes: Despliegue en Azure](https://www.linkedin.com/learning/kubernetes-despliegue-en-azure?trk=embed_lil "Comienza tu andadura en el mundo de Azure Kubernetes Service con este curso. Al terminar estarás preparado para trabajar de manera efectiva con este servicio y dar el salto a un nivel más avanzado.")** por **[Carlos Mendible](https://www.linkedin.com/learning/instructors/carlos-mendible?trk=embed_lil)**

Espero que os guste!
Angular Tip: Hide Proxy Redirect CLI Command In angular.json
Tags: angular, webdev, typescript, tutorial
Published: 2019-11-24 09:08:10

---
title: Angular Tip: Hide Proxy Redirect CLI Command In angular.json
published: true
date: 2019-11-24 00:00:00 UTC
tags: Angular,webdev,typescript,tutorial
canonical_url: https://www.leonelngande.com/angular-tip-hide-proxy-redirect-cli-command-in-angular-json/
---

Wouldn’t it be great if instead of doing `ng serve --proxy-config proxy.conf.js` you simply use `ng serve` and the Angular CLI takes care of the proxy redirect command? Well, you can.

In the CLI configuration file, `angular.json`, add the `proxyConfig` option to the serve target:

```
...
"architect": {
  "serve": {
    "builder": "@angular-devkit/build-angular:dev-server",
    "options": {
      "browserTarget": "your-application-name:build",
      "proxyConfig": "src/proxy.conf.js"
    },
...
```

Now we can call `ng serve` to run the dev server with this proxy configuration, neat 🙂.

You can read more on this in the [Angular Docs](https://angular.io/guide/build#proxying-to-a-backend-server), happy coding!
YPSKA #12 Immer
Tags: state, javascript, immutability
Published: 2019-11-23 22:51:20

Immutability is kind of hard in JavaScript, at least it takes a bit of work to make it happen. 

To make it easier, there's of course a library for that, [Immer](https://github.com/immerjs/immer). Immer uses something called producers to update state and also keep that new state immutable. The basic idea is like this:

```
const newState = produce(oldState, draft => {
   // modify state
});

```

So you pass in the old state and a function that takes a "draftState" and makes modifications to it. The returned state is really a read-only object produced by **Object.freeze()**.

If you need immutability in your JavaScript/TypeScript, check out Immer.


Less than ten minutes margin from missing a day in this series ;-)
Smart newsletter for Frontend developers
Tags: javascript, typescript
Published: 2019-11-23 22:06:35

I’m Dmitry and I’m a founder of SparkySpot, a new platform working tirelessly to help peoples in IT find a new job hassle-free.

I also a frontend developer with 10 years of experience and I know how rapidly the industry is growing, how often do technologies change and how difficult it is to find time to learn something new that does not fit into your main development stack.

And as a part of SparkySpot, I've created a smart weekly newsletter that helps stay up to date with all parts of the front-end without spending a lot of time.

Here how it works. Once a week you got an email that covers one specific topic or technology and let you dive into it with 5 steps:

1. About and general information
2. Where can I use
3. Dive into
4. Useful links and resources
5. Getting started with the practical task

And over the next week, you have time to go throw these steps which are cover all necessary information, contain links for useful articles, libraries, and examples and let you start with the practical task.

Here is upcoming topics:

1. Static site generators
2. CSS Architecture
3. Front-end performance
4. PWA
5. Testing JavaScript
6. Server-Side Rendering(SSR)
7. Mobile applications
8. Web Security for Frontend
9. GraphQL
10. Firebase

You can subscribe here https://sparkyspot.com/week-of-code

And let me know if you want to cover any topic or technology and I'll add it to the list.
All Wrapped Up
Tags: xojowrappersclasses
Published: 2019-11-23 21:53:27

---
title: All Wrapped Up
published: true
description: A quick blog about the importance of creating wrappers
tags: xojo wrappers classes
---

## Wrap it up and ship it out!

No. I know Christmas is around the corner but I'm not talking about gift wrapping. 

Any programming language you work on, will have great built in classes for your common tasks. e.g. Database access, File System, web services...etc.

You can use these directly in your other classes perfectly fine and safely. I personally Wrap these up in my own class with it's own properties and Methods...

## ...And Heres Why!

As I highlighted recently, I've just started using Xojo for work. On my first project I happily wrapped up my `PostgreSQLDatabase` calls into my own class called `DBConnection` as I learned how to use them. I exported this class so I could re-use it. My class saved the `PostgreSQLDatabase` object to it's own private variable and called methods from there.

I made a wrapper method in this, called`SelectData` which mapped directly to Xojo's `SQLSelect`, which returns a `Recordset`.

#### The Method

```vb
public Function SelectData(Sql As String) As RecordSet
    Return Self.CurrentConnection.SQLSelect(Sql)
End Function
```

It's that simple!! So I hear ya...

>Why Is that Useful??

>Can't you just call that directly in your code??

>How many coffee breaks did you take whilst writing that??

Well I'll answer them now!

### Xojo API 2.0

In the update there was a new Data Type called `RowSet` and with it a slightly renamed method for selecting data from a database. 

The advantage in this new data type is with error catching. The `Recordset` had "Silent Errors" where the software you are building would just carry on as if the select data had produced no data.

## The Change

```vb
public Function SelectData(Sql As String) As RecordSet
    Return Self.CurrentConnection.SelectSQL(Sql)
End Function
```
### Can ya see it?? 

...it's subtle. 

We've basically gone from..
```vb
Self.CurrentConnection.SQLSelect(Sql)
```
to

```vb
Self.CurrentConnection.SelectSQL(Sql)
```

so to answer the question, Why is that useful?

If everywhere in my code, I had called `SQLSelect(Sql)`, to get data from my database, I would've had to have found them all to change it.

In my case the only change I made was the one you've just seen. 

## In Conclusion

Wrapping up the code meant I could make that change in function name in one spot rather than various spots throughout my program.
Download File from Blob-Storage .net core Azure Function C#
Tags: blobstorage, azurefunctions, netcore, webapi
Published: 2019-11-23 21:28:56

Couple days ago I tried to use Azure Function to build an API manipulating "blob storage operations CRUD", I having investigated a solution to solve the download operation, since the majority internet solutions I found work it locally but while deploy my function the Web server needs the grant permission path to Create File and download locally which generated the error:"Access to path is denied". Then I Solved download via HTTP response whit Azure function V2, C# .net core 2.1 This is the basic code it works me, I hope it helps you...


using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
using Microsoft.WindowsAzure.Storage.Auth;
using System.IO;
using System.Net.Http.Headers;
using System.Net.Http;
using System.Net;

namespace BloApi
{
    public static class BlobOperations
    {
        [FunctionName("DownloadBlob")]
        public static async Task<HttpResponseMessage> DownloadBlob(
          [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "DownloadBlob/{name}")] HttpRequest req, string name)
        {
            StorageCredentials storageCredentials = new StorageCredentials("Storage",
                "CamEKgqVaylmQ.....ow2VHlyCww==");
            CloudStorageAccount storageAccount = new CloudStorageAccount(storageCredentials, true);
            CloudBlobContainer container = storageAccount.CreateCloudBlobClient().GetContainerReference("BlobContainer");
            var blobName = name;
            CloudBlockBlob block = container.GetBlockBlobReference(blobName);
            HttpResponseMessage message = new HttpResponseMessage(HttpStatusCode.OK);
            Stream blobStream = await block.OpenReadAsync();
            message.Content = new StreamContent(blobStream);
            message.Content.Headers.ContentLength = block.Properties.Length;
            message.StatusCode = HttpStatusCode.OK;
            message.Content.Headers.ContentType = new MediaTypeHeaderValue(block.Properties.ContentType);
            message.Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
            {
                FileName = $"CopyOf_{block.Name}",
                Size = block.Properties.Length
            };
            return message;
        }
    }
}
Chart board | CSS Only | CubicBezier
Tags: codepen
Published: 2019-11-23 21:06:26

See all my pens here:
https://codepen.io/KaioRocha/pens/public

And my youtube channel:
https://www.youtube.com/channel/UCKeyLthQnPEKnXa5stCPxYQ/videos

{% codepen https://codepen.io/KaioRocha/pen/MWWdgGE %}
JavaScript: Map an array of objects to a dictionary
Tags: javascript, typescript, data
Published: 2019-11-23 20:45:39

The easiest way for converting an array of objects to a dictionary in JavaScript / TypeScript:
```javascript
let data = [
  {id: 1, country: 'Germany', population: 83623528},
  {id: 2, country: 'Austria', population: 8975552},
  {id: 3, country: 'Switzerland', population: 8616571}
];

let dictionary = Object.assign({}, ...data.map((x) => ({[x.id]: x.country})));
// {1: "Germany", 2: "Austria", 3: "Switzerland"}
```