teleren/devto huggingface dataset:
Full-Cycle Developers
Tags: devops, operations
Published: 2021-06-16 19:08:59

---
title: Full-Cycle Developers
published: true
date: 2021-06-12 00:00:00 UTC
tags: devops,operations
canonical_url: https://jhall.io/archive/2021/06/12/full-cycle-developers/
---

A friend recently turned me on to Netflix’s 2-year old blog post [Full Cycle Developers at Netflix — Operate What You Build](https://netflixtechblog.com/full-cycle-developers-at-netflix-a08c31f83249). I love this term (and the full article is pretty good, too)!

This term helps encapsulate the goal of the [U-Shaped Cell](https://jhall.io/archive/2021/04/27/the-u-shaped-cell/) I’ve talked about before.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
JavaScript Quick Tip: Quickly Filter Out All Falsy Values From An Array
Tags: javascript, typescript
Published: 2021-06-11 23:37:23

Working with arrays in a functional way has mostly become the default when working with JavaScript these days. Why should you use a traditional imperative loop, like for, for..of, while, do..while, etc., when you can use map, filter, and forEach?

These functional methods have one caveat, though: You can never throw from them without aborting the whole pipeline.

```JavaScript
someArray.map((value) => {
  if (someConditionMet) {
    throw new Error('...'); // this is not the best idea...
  }
  // ...
  return someValidValue;
});
```

So what do you do then? Well, you can return null to mark that you have an invalid result.

```JavaScript
someArray.map((value) => {
  if (someConditionMet) {
    return null; // now the pipeline can continue
  }
  // ...
  return someValidValue;
});
```

That's fine. If you don't want your pipeline to abort, you can continue using null values as a marker for "this didn't work out".

But what if you want to get rid of those values afterward? Perhaps something like this?

```JavaScript
someArray.map((value) => {
  if (someConditionMet) {
    return null; // now the pipeline can continue
  }
  // ...
  return someValidValue;
}).filter((value) => value);
```

This leaves you only with valid values, which is perfectly fine, but we can make this even shorter.

## The Code

JavaScript has first-class functions. You can pass any function reference to any other function that expects a function as this particular argument. And the Boolean constructor is actually the function responsible to define truthy and falsy.

```JavaScript
const array = [1, null, undefined, 0, 2, "", 4];

const result = array.filter(Boolean);
```

When the filter step of this pipeline has run, you only have all truth values left, and can continue working with them without having to handle special cases like null or undefined.

## The Whole Tip As An Image

If you like visual content more, or if you want to store it for later, I put all this into one image for you. I hope you like it!

![A picture showcasing the above code](https://cdn.hashnode.com/res/hashnode/image/upload/v1623430761783/YZiXOTzyD.png)

## Before You Leave

If you would love to read even more content like this, feel free to visit me on [Twitter](https://twitter.com/intent/follow?screen_name=oliverjumpertz) or [LinkedIn](https://www.linkedin.com/in/oliverjumpertz/).

I'd love to count you as my ever-growing group of awesome friends!
Apply Labels to Molecule Platform Containers
Tags: ansible, docker, containers, molecule
Published: 2021-06-11 23:37:13

I've recently found myself in need to apply labels to containers that are spun up as part of my Molecule tests. I was unable to quickly dig up any documentation around this use case, so I thought it might be useful to write this up so others don't find themselves in the same position.

For those who aren't familiar with Molecule, it is an Ansible testing framework that allows you to specify any number of scenarios to test your Ansible roles/collections/etc. as well as the environment that they will run against. The main configuration of a Molecule test is done in the `molecule.yml` file for a given scenario and tends to look something like this.

```
---
dependency:
  name: galaxy
driver:
  name: docker
platforms:
  - name: app
    image: dummy-app:v1.0.0
    command: "run.sh"
    pre_build_image: true
provisioner:
  name: ansible
verifier:
  name: ansible
scenario:
  name: default
  test_sequence:
    - lint
    - syntax
    - create
    - converge
    - destroy
```

## Defining Your Environment

As you can see from the above, the section for setting up your environment is contained under `platforms`.  In my case, I was spinning up a number of containers and the app itself uses container labels to do some service-discovery. Without them, my tests fail because the app itself isn't able to find what it is looking for.

#Adding Labels

To remedy this, I started making some educated guesses due to the lack of documentation (or lack of my ability to find the documentation). Ultimately I ended up with something like this:

```
platforms:
  - name: app
    image: dummy-app:v1.0.0
    command: "run.sh"
    pre_build_image: true
    labels:
      - hello: world
```

After running my `default` scenario with `molecule test`, I was able to see that my container spun up with the appropriate labels! As you can see, all Molecule expects is a list of key-value pairs under the `labels` key. While this is a watered down example (`hello: world`), if you find yourself using more complex keys (special characters, etc.), I've found that you tend to be more successful by wrapping your key-values in quotes.

Hopefully this saves some others some time and as always, feel free to reach out with any questions (or if you have a better way of handling this yourself!).
Aprendizado contínuo: uma necessidade do presente
Tags: learnability
Published: 2021-06-11 23:24:30

As mudanças tecnológicas trazidas pela aplicação das tecnologias da informação e comunicação no cotidiano começa a impactar as relações de trabalho, não importa o quão consolidado seja sua profissão, mudanças dramáticas estão em pelo curso com a adoção de novas tecnologias e ferramentas.

O conceito de aprendizado contínuo, ou "lifelong learning", também esta se transformando, passado de uma aspiração ocasional a uma necessidade de carreira. Aprender novas habilidades não é mais um diferencial, assim como não é mais algo que você faz apenas quando está em busca de uma grande transformação profissional.

Não importa qual é seu cargo ou plano de carreira, para se manter em alta, competitivo e relevante no mercado de trabalho, é preciso firmar um compromisso com o aprendizado contínuo.

Jonas Prising, presidente e CEO da recrutadora ManpowerGroup, em seu artigo intitulado "O modelo de emprego para a vida toda está morto" afirma:

> “Vamos precisar de uma nova geração de trabalhadores que tem fome de aprender e quer se manter no ritmo das mudanças. Eles vão ser pioneiros e encontrar novas maneiras de combinar negócios e tecnologia para aumentar sua produtividade. Vão atualizar os velhos modelos de trabalho. Organizações de todo tipo de indústria vão procurar mentes curiosas, flexíveis e orientadas a dados. Vão querer pessoas que têm a habilidade comprovada de aprender continuamente e continuar relevantes em seus campos de expertise. São pessoas que vão buscar ativamente oportunidades em que suas habilidades transferíveis podem ser aplicadas.”
O CEO define o atual momento pelo conceito de learnability, ou seja, a capacidade de aprendizado e de adaptação de suas habilidades para continuar empregável ao longo de toda a vida profissional. "Em um mundo que muda rapidamente, a learnability é como [você pode] se manter relevante, seguir em frente e subir."

Porque o aprendizado contínuo importa?
A atual conjuntura enfatiza a criatividade, velocidade e eficiência no mercado de trabalho, nos leva a seguinte conclusão: abordagem menores, mais rápidas e mais inteligentes rumo ao aprendizado são necessárias, tanto para empresas quanto para profissionais.

Isso significa que será impossível ter alguma estabilidade, visto que tudo vai esta sempre mudando? Não! E que não vai mais haver empregos de tempo integral no futuro, apenas trabalhadores independentes? Não! E caso você queira uma longeva carreira de décadas numa empresa, isso agora não mais existe? Também não é este o caso.

Significa apenas que para ter sucesso em qualquer cargo, será preciso abraça a ideia de life long learning, que, na prática, significa ser alguém proativo, flexível e de interesses diversos quando o assunto é conhecimentos e novas habilidades, abandonando a mentalidade de que você já domina o que precisa para executar seu trabalho.

Somente quando entendermos que, a cerca de conhecimento ou de jeitos de trabalhar, o mundo atual esta mudando, e só se manterá relevante, competitivo e em alta no mercado de trabalho quem internalizar os conceitos de life long learnig.
Testing Global State Libraries With React 18 Alpha Concurrent Rendering
Tags: javascript, react, redux
Published: 2021-06-11 22:44:43

##### What are tearing and branching

## Introduction

The React team announced [The Plan for React 18](https://reactjs.org/blog/2021/06/08/the-plan-for-react-18.html) with various features. Among them, concurrent rendering is one of my interests
because I have been developing various global state libraries and there are known issues called "tearing" and "branching".

Tearing is an undesirable behavior in which two components render with different values for same global state.

Branching is a desirable behavior in which a component renders with a stale value for a state in a transition update.

Both are subtle behaviors and would not be required in most moderate apps.

Nevertheless, out of curiosity, I made a small experimental tool to test the behavior of various libraries in concurrent rendering.

## Tool

It's called "Will this React global state work in concurrent rendering?"

<https://github.com/dai-shi/will-this-react-global-state-work-in-concurrent-rendering>

It runs a tiny counter app for each library and test behaviors.

There are 6 tests.

- with useTransition
  - test 1: updated properly with transition
  - test 2: no tearing with transition
  - test 3: ability to interrupt render
  - test 4: proper branching with transition
- with intensive auto increment (EXPERIMENTAL)
  - test 5: updated properly with auto increment
  - test 6: no tearing with auto increment

Test 5 and test 6 are something tried to distinguish useMutableSource behavior, but it doesn't work totally as expected yet.

## Results

![screenshot1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vi1vcwrf42xpl4vqr9zt.png)

How do we read this table?

Test 1 is to see if all counts are updated properly. Three libraries fail with this. 
I assume they are somewhat batching updates too aggressively.

Test 2 is one of the goals. There are two libraries fail, but as you see redux with useMutableSource passes. I expect any library with useMutableSource would pass this.

Test 3 is to see if time slicing is effective. Failing this means, it doesn't get the benefit of concurrent rendering.

Test 4 is another goal. Branching would only work with React state and most global state libraries use module state, failing this test is rather expected.

Test 5 and test 6 are experimental. They show some differences. What can be said at this moment is React state passes both tests.

## Closing notes

This was a short post to present my recent experiment with React 18 alpha. I thought it's better than a tweet to explain how I see the results. Please note that they are just the results as of writing and they may not be accurate. Tests can be wrong. If you are interested, please clone the repository and try it by yourself.

----
Originally published at [https://blog.axlight.com](https://blog.axlight.com/posts/testing-global-state-libraries-with-react-18-alpha-concurrent-rendering/) on June 10, 2021.
Day 386 : Machine
Tags: hiphop, code, coding, lifelongdev
Published: 2021-06-11 22:35:22

_liner notes_:
- Professional : Got a bunch of small things done today to get ready for the weekend. Reviewed a PR. Made a small change to a tutorial and created a PR. Spoke with the engineering team to get some information to help out with some community questions. Good day.

- Personal : Last night, I got the part of the side project where people can sign up to do lightning talks / show and tell. Got the Twitter and GitHub login to show if you aren't logged in because I need that information if you want to come onto the show. Just don't want any random person jumping on a live stream. At least this way, I can check out their profiles beforehand. Once they send the request, it disables the form so no more changes can be made unless they cancel the request. Came out pretty good. I'll also be able to approve the request from the dashboard. If I approve it, it will place a count down timer on their request form to let them know when we will be live, if not, I can provide a reason and that will show up on the form. Had to really think things through to get it all working the way I wanted.

![A cove with tall red clay walls and a waterfall flowing into a pond in Mooney Falls, AZ, USA](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g9gxxq6yuxmaj3gjaf3j.jpg)

So, I've been keeping an eye on the release of a laptop for the past couple of months. It's a pretty powerful machine and comes with two screens which will help with doing the radio show and this new project I'll be launching soon. I have tabs that link to the manufacturer's official product page, different online retailers, and a Reddit forum. Something told me to check the sites as I was finishing up work for the day. Sure enough, there was an update to the Reddit post about 5 minutes earlier say that the laptop was for sale on a site I didn't even have bookmarked! I've heard of the online store before, but never thought to look there. Long story short, fingers crossed, it should be arriving late next week. The laptop I'm replacing with this new one will go to my Mom. I take pretty good care of my machines and get the latest parts when I buy them because I know I'll be holding on to them for a while. I think the laptop I have now is about 4-5 years old. And it will come just in time for the launch of my new project and will be a big help when doing the live broadcasts. Speaking of side projects, I want to get the tutorials section of the site put together. Not too much logic. I want to be able to input tutorials from the dashboard and have them show up on the work session page. Hope to get that working tonight. Also want to go through tracks for the radio show tomorrow. Going to try and make it a goal to watch the first episode of "Loki".

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube EPYQISOcbWU %}
Recipe Book (Hash Map Practice)
Tags: python, beginners, github, bash
Published: 2021-06-11 22:02:59

Hello again!

This is my second self Python project. My focus was implementing a hash map in my program. The categories are not very large so I am sure an array would have been fine, but I wanted to use a data structure to gain experience in it.

My program allows you to make/edit/remove various recipe categories, add/edit/remove recipes, in addition to searching all recipes according to a specific ingredient or tag. Users can also add/edit/remove specific ingredients, steps, tags, or change the category that the recipe is associated with. I originally planned on allowing each recipe to be linked to multiple categories, but that created issues with editing or removing them. If this was for an actual program, I am sure I would have kept this feature, but decided to remove it for this practice project.

I have been trying to write my code on paper before typing it to help organize my thoughts and prevent needing to edit large amounts of code. Most of the script portion was written during a camping trip with my family. It is much more relaxing than staring at a computer the whole time.

As always, I would love for you to give my project a look and let me know both what looks good and what can be improved upon. 

https://github.com/TheHamhams/recipie-book

Happy coding!
Configurar zsh en VSCode
Published: 2021-06-11 21:31:29

Una de las gratas sorpresas al instalar [Manjaro Linux](https://manjaro.org/), es que no tuve que instalar _zsh_ ni _oh-my-zsh_. ¡Viene 'into the box'!

En Konsole tiene este aspecto:
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vuvdslxtom4fjssvdlaa.png)
 
Sin embargo, al instalar **VSCode**; el terminal con _zsh_ se rompen los iconos.
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3abutpo7aind45pbjt5d.png)
 
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xjcg5vzjd350kv9rppvp.png)

Para ello se debe configurar la fuente apropiada.

Primero, buscamos en las fuentes instaladas la que corresponda para **'Nerd Font'**. Notaremos que el nombre completo es: `NotoSansMono Nerd Font`.
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xihh4eb7ci3x1z828y60.png)

Luego, en VSCode nos dirigimos a `'settings'` y ubicamos `'Terminal>Integradated: Font Family'`. Ahí, debemos especificar la fuente a usar.
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ciw62bzv42dfzb453cvh.png)

Finalmente, abrimos un nuevo terminal y veremos el resultado:
![alt text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bkwb2e87nmjtipld7242.png)
Working with Sprite Sheets in Unity
Tags: unity3d, tutorial, gamedev
Published: 2021-06-11 21:22:14


Sprites are a vital part of working on a game in Unity. Part of that is how do you go about slicing a sprite that contains multiple images within it. I’m going to spend some time going through a basic example of how to split a sprite and hook it up to an animation 2D platform game! Let’s get started!

{% youtube AQXs_w_IaxU %}

To start you are going to need to acquire a sprite sheet from somewhere. [Here is a link to where I acquired the platform character for this project](https://kenney.nl/assets/platformer-characters).
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t7jic13nw3vngha2gxhq.png)
 

Once imported into Unity, you are going to need to splice the sprite. You can do this in a number of ways, but I suggest starting by seeing if Unity can automatically figure out each of the images. To do this, use automatic mode as pictured below.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yfwq7c16fldqx9izuxw4.png)
 

Once finished, you will see a light grey box around each of the images in the sheet. Hit Apply and let Unity work the magic behind the scenes to cut each image into a usable asset. You will know it is done when you can expand the sheet and see each image appended. Something like this:
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qvagop9t3kvxjmc1hbpx.png)
 
At this point, you can start making your animations for your character. In my basic example, this just involved swapping the sprites on each possible state to be the correct image.

__Pro tip:__ Expose lots of variables within your Animator so that it’s easy to tell your player how to move!
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ridzxlkjb3vvnalmb4vz.png)
 
And then you’re done! You now have an easy way to control your player in code so that you can make a cool game!
___
I hope this tip helps! Follow me on twitter for more tech tips!
Master The Skills Of Missing Data Imputation Techniques In Python(2020) And Be Successful
Tags: python, computerscience, datascience, machinelearning
Published: 2021-06-11 20:42:01

https://medium.com/analytics-vidhya/a-quick-guide-on-missing-data-imputation-techniques-in-python-2020-5410f3df1c1e

Most machine learning algorithms expect complete and clean noise-free datasets, unfortunately, real-world datasets are messy and have multiples missing cells, in such cases handling missing data becomes quite complex.

Therefore in today’s article, we are going to discuss some of the most effective and indeed easy-to-use data imputation techniques which can be used to deal with missing data.

Topic: Master The Skills Of Missing Data Imputation Techniques In Python(2020) And Be Successful

#machinelearning #python #deeplearning #datascience #algorithms #artificialintelligence #bigdata #statistics #dataanalysis #data #ai
Day 89 of 100 of Days of SwiftUI
Tags: swift, 100daysofcode
Published: 2021-06-11 20:34:09

I just complete day 89 of 100 days of SwiftUI. Today I worked on implementing a count down timer for the flash zilla app. I added colours to swipe to choose feature giving them more context. I also made the app more accessible for people with colour blindness by adding buttons to interact with the app instead of swiping.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebgdbdce74jc9xx5qx9d.png)
Node URL Shortener
Tags: node, postgres, redis, fastify
Published: 2021-06-11 19:49:08

I recently ended up creating a URL shortener using NodeJS, Fastify, Postgres and Redis for study purposes. If you think it might be useful for you, if only for study purposes too, come take a look: 

https://github.com/pinceladasdaweb/node-url-shortener
Switching frontend frameworks? 🥔
Tags: javascript
Published: 2021-06-11 19:48:03

I joined Dyson, we switched to Vue from flight.js

I joined ForgeRock they switched from React to Vue

I spoke to other companies for the interest, they switch from Vue to React.

It stems from the whole: "what do you like?" question, the illusion that your choice will matter in the long run 🤫 (it won't)

And yet we do these grand gestures, telling our product managers that this will be the greatest thing since the switch to X from Y, X and Y are awfully similar.

The greatest thing I ever did for the company, I learned how to write tutorials and docs, even edit videos and record tutorials. Your problem 99% of the time is not the codebase, the standards, the CDCI, your problem is, as you churn through staff, the newbies become veterans, bearing no affections towards code not created by them, therefore it is not their job, not my job. But if only Steve wrote some tutorials, videos explaining the decisions, maybe just then 💡. This would allow connections to be formed, improvement to be made, love to be shared.

🥔 Your stack is a potato