teleren/devto huggingface dataset:
Au revoir UdeS!
Tags: career
Published: 2021-12-12 13:57:42

---
title: Au revoir UdeS!
published: true
date: 2021-11-12 00:15:00 UTC
tags: career
canonical_url: https://www.benjaminrancourt.ca/au-revoir-udes
cover_image: https://www.benjaminrancourt.ca/images/pexels-alleksana-4271925.jpg
---
Après **plus de cinq années** à travailler pour le [Service des technologies de l'information](https://www.usherbrooke.ca/sti/) de l'**[Université de Sherbrooke](https://www.usherbrooke.ca/)**, j'ai décidé dernièrement qu'il était temps pour moi d'aller relever de nouveaux défis dans une autre organisation de la région. Je terminerai donc mon emploi à l'Université le vendredi 19 novembre prochain. 🙂

Ce ne fut pas une décision facile et je sais déjà qu'il va y avoir un élément qui va me manquer : les relations que j'ai avec mes **collègues**. Juste en l'annonçant à ceux-ci, plusieurs me sont revenus avec des commentaires positifs et cela m'a fait encore plus réalisé comment ils vont me manquer. 🥲

![](https://www.benjaminrancourt.ca/images/20211029_152224.jpg)
_Adieu également à mon bureau, qui ne sera prochainement plus autant décoré!_

Heureusement pour moi, je suis sûr que nous aurons l'occasion de se recroiser à quelque part! Surtout que ce n'est pas les événements en TI qui manquent à Sherbrooke : [Techno Drinks](https://www.meetup.com/fr-FR/techno-drinks/), [Agile Sherbrooke](https://agilesherbrooke.ca/) et [SociéTIC](https://societic.ca/). 🥳

Ce sera bientôt un nouveau départ! 😇

> Psst, pour ceux et celles se demandant où est-ce que je m'en va, je devrais bientôt être en mesure de vous le dire, j'attends prochainement ma lettre d'embauche officielle! 😉
DRY can be expensive
Tags: dry, wet, prematureoptimizatio
Published: 2021-11-15 11:56:16

---
title: DRY can be expensive
published: true
date: 2021-11-12 00:00:00 UTC
tags: dry,wet,prematureoptimizatio
canonical_url: https://jhall.io/archive/2021/11/12/dry-can-be-expensive/
---

If I’ve told you once, I’ve told you a thousand times: I never repeat myself.

And neither should you! Right? Don’t repeat yourself, or the [DRY principle](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) tells us this.

There are many ways to apply the DRY principle in IT systems. In code, it can be as simple as extracting a common behavior into a function that can be called from multiple places.

But when can DRY be harmful? Here are a few cases…

1. It breaks the flow of the code
2. It adds new dependencies to manage
3. Too many abstractions can be hard to follow
4. The wrong abstraction is used (often caused by premature optimization)

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Você é ocupado?
Tags: vida, digital, estilodevida, saúde
Published: 2021-11-11 23:36:53

Sim.
     Às vezes ... Você sabe do que estou falando?

O mundo nos muda.
A vida digital é "escravizadora". Mesmo.
Você consegue alguns amigos digitais, más notícias, boas notícias, alguns memes, mas você realmente tem felicidade em sua vida?
Você tem uma lista de tarefas?
Precisamos mudar isso. 
Muitas notícias não o tornam um cientista ou um "mestre da notícia". Você precisa selecionar tudo.

     Muitas informações hoje.
     O dobro amanhã.

Lembre:

     A natureza está certa! Os humanos estão errados.

*Pense!*
Expressão Lambda - Parte III (Sintaxe)
Tags: todayilearned, braziliandevs, java, tutorial
Published: 2021-11-11 23:35:23

Para finalizar a série sobre **Lambdas do Java**, vamos seguir com a tradução do trecho sobre a sintaxe de uma expressão lambda.

Uma expressão lambda em Java, consiste do seguinte:

- Uma lista separada por vírgula de parâmetros formais envolvidos por parênteses. No caso, é p

```java
(p) -> p.getGenero() == Pessoa.Genero.MASCULINO 
    && p.getIdade() >= 18
    && p.getIdade() <= 25
```

Entretanto, você também pode omitir o parênteses caso se tenha somente um parâmetro ou usar apenas o parênteses sem o parâmetro. Exemplos:

```java
//Somente o parênteses
() -> p.getGenero() == Pessoa.Genero.MASCULINO 
    && p.getIdade() >= 18
    && p.getIdade() <= 25

//Somente o parâmentro
p -> p.getGenero() == Pessoa.Genero.MASCULINO 
    && p.getIdade() >= 18
    && p.getIdade() <= 25
```

- A seta, →
- Um corpo que consiste de uma expressão única ou um bloco de declaração.

```java
//body
p.getGenero() == Pessoa.Genero.MASCULINO 
    && p.getIdade() >= 18
    && p.getIdade() <= 25
```

Se você declara uma expressão única, o **JRE** avalia a expressão e retorna o valor dela, em contra partida, você também pode utilizar uma declaração de retorno:

```java
p -> {
return p.getGenero() == Pessoa.Genero.MASCULINO 
    && p.getIdade() >= 18
    && p.getIdade() <= 25;
}
```

Uma declaração de retorno não é uma expressão, numa expressão lambda você deve envolver a declaração com {}.

Note que a expressão lambda parece muito com a declaração de um método, inclusive, você pode considerar a expressão lambda como um método anônimo - método sem nome.

Exemplo:

```java
public class Calculadora {
  
    interface IntegerMath {
        int operacao(int a, int b);   
    }
  
    public int operadorBinario(int a, int b, IntegerMath op) {
        return op.operacao(a, b);
    }
 
    public static void main(String... args) {
    
        Calculadora meuApp = new Calculadora();

//Uso da expressão lambda como função anônima
        IntegerMath adicao = (a, b) -> a + b;
        IntegerMath subtracao = (a, b) -> a - b;
        System.out.println("40 + 2 = " +
            meuApp.operadorBinario(40, 2, adicao));
        System.out.println("20 - 10 = " +
            meuApp.operadorBinario(20, 10, subtracao));    
    }
}
```

Com isso, fechamos o assunto de expressão Lambda em Java :) no próximo post, veremos a tradução sobre **Interface Funcional** que foi mencionada na [parte 2](https://dev.to/diariodeumacdf/expressao-lambda-parte-ii-quando-e-como-usar-efm)

Fonte: [Documentação Oracle](https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html)
Are you Busy? 
Tags: time, world, digital, lifestyle
Published: 2021-11-11 23:32:54

> Yes. 
Sometimes... Do you know what i talking about?

The world change us.
Digital life are "slaving". Really.
Do you can get some digital friends, bad news, good news, some pieces of memes, but do you really got happiness in your life? 
Do you got a To-do list?
We need change this. A lot of news dont turn you into a scientist or in a "master of the news". Do you need select every thing. 

> Many informations today. 
   The double tomorrow.

**Remember:**
> The nature are right! The humans are wrong.

*Just Think!*
JavaScript Bites: Ternary Operator
Tags: javascript, webdev, beginners, programming
Published: 2021-11-11 23:08:17

If you have ever been looking at JavaScript code and wondered what the heck the `?` and `:` is doing, look no further!

These two characters (?:) when used together is collectively called the ternary conditional operator, or ternary for short.  It is used to express a basic conditional operation, in the form:

```javascript
predicate ? truthy : falsey
```

The operand that comes before the `?` is the predicate, or the expression that you are basing your decision logic on.  The expression that follows the `?` will be what is executed if the predicate is *true*.  The expression after the `:` is what is executed if the predicate is *false*

## Example
Lets imagine you have an object that represents a `user`, and it potentially has a key `username` that would store that users username.  If we wanted to determine what to display in the UI, we could decide to show the username if it exists, or Anonymous if it does not.  We can quickly create a variable called username that will hold the correct value:
  
```javascript
const username = user.username ? user.username : 'Anonymous';
```

This would be opposed to writing the same functionality with a traditional `if` statement:

```javascript
let username;

if (user.username) {
    username = user.username;
} else {
    username = 'Anonymous';
}
```

Of course, the two expressions after the `?` can be anything that evaluates to a value:

```javascript
const someVal = checkSomething() ? doCoolThingSinceTrue() : doOtherLogicSinceFalse();
```

## Suggestions
This part is opinionated, but I try to avoid using multiple ternary operators chained together.  Nothing stops you from doing:

```javascript
const res = check() ? (checkTwo ? 'true checkTwo' : 'false checkTwo') : 'false check';
```
but in my opinion this causes more confusion than clarity and it would be better to write it in a more traditional if/else structure.

I usually prefer ternary if it is a quick 'inline' computation that I am passing as a parameter, or like in the original example, I am picking one of two expressions to execute at runtime and I need the result.

## Conclusion
Hopefully that helps clear up what this operator is all about and how it can be used.  If you have any questions, feel free to ask them below!
OSD600 Lab08
Tags: opensource, javascript
Published: 2021-11-11 22:56:20

## Hi There

This week lab’s goal is to test out our [SSG]( https://github.com/GMOTGIT/GMOT-SSG).
We were instructed to use a tester like [Jest]( https://jestjs.io/) to test our code and check if everything is working as intended. 

## Jest
I choose Jest for my project as I am using JS. 
It was fairly simple to use, and because I have used it before with David in previous Web courses, I knew already what I was supposed to do.

### Installing
Jest was fairly simple and intuitive, I followed the [Documentation](https://jestjs.io/docs/getting-started) to install it.
First I did: 
```
npm install --save-dev jest
```
Then I created a tester file for one of my [functions]( https://github.com/GMOTGIT/GMOT-SSG/blob/main/htmlAssembler.test.js).
In this tester file I did a series of small tests as instructed and tried to reach all conditions available in that function.

After that, I did some tests to test the core of my SSG.
Because I had a [main function]( https://github.com/GMOTGIT/GMOT-SSG/blob/main/htmlMaker.js) where the main action happened, it was fairly simple to do and I didn’t have to refactor my code.

### Testing
To run all tests at once, I did a script as mentioned on the Documentation
```
"scripts": {
    "test": "jest",
…
```

This way it run all the tests I made automatically.

![Jest Tests](https://i.ibb.co/YcYs4Kc/jest.png)

Thank you for reading!
P-PL.com - Python Multiple Choice Quiz: Just how Well Do YOU Know Python?
Tags: python, javascript, webdev, programming
Published: 2021-11-11 22:43:16

P-PL is a place where teachers and students, experts and beginners, freelancers and customers can come together to collaborate on software development.

Currently, were are seeking experts in the languages of Python and JavaScript.

Just how well do YOU know Python? Take our little 5 question quiz to find out… https://bit.ly/31J77X4

At its core, p-pl.com is a network of experts willing to connect over video chat.

As a user, you have access to video chat anyone at anytime given their schedule and expertise you are looking for.

Whether you are a software engineer looking for help on a bug or a life coach advising clients on their next big move, p-pl.com is the solution for convenient quality information.
 
As an expert and consultant, you have the option to bill for your time and expertise for every call you accept. It is YOUR time, why not get paid?
What is React?
Tags: javascript, webdev, beginners, react
Published: 2021-11-11 21:52:37

React is a frontend framework that was developed by Facebook and was first released in 2013. React is a free open-source JavaScript library that is used to build single page applications, also called SAP's. It much faster with React to load a page because only the component that has been added or manipulated has changed and that is the only part that is refreshed.  It doesn't need to reload the entire page. Its main purpose is to be simple and fast. React is used to handle the 'view' layer of the page or mobile app. 

React apps are made up of components that contain JSX and output HTML. Being structured in components lets us easily break up a large application into smaller components hence easier to tackle if something changes or if there are errors.

First you will need the latest version of NodeJs. To get the latest version go to nodejs.org and install it on your machine. Then check node -v to make sure you have the latest version. 

And finally you will install create-react-app.  I've covered how to do this in a previous blog.  

Happy Coding!
La barra de progreso de Gmail no es real: ¿por qué?
Tags: javascript, overengineering, ux, spanish
Published: 2021-11-11 22:18:32

---
title: La barra de progreso de Gmail no es real: ¿por qué?
published: true
description: El impulso inicial de las personas técnicas es hacer las cosas técnicamente correctas, aunque no agreguen tanto valor al producto final o aporten a mejorar la experiencia del usuario.
tags: javascript, overengineering, UX, spanish
cover_image: https://softskillsparadevs.com/wp-content/uploads/2021/11/gmail-load-slow.gif
---

En smitop:

> Un poco de investigación revela que la barra de carga de Gmail no es una barra de carga en absoluto! De hecho, el progreso que se muestra es controlado por una animación de CSS que hace que inicie lento, y luego se quede quieta hasta que Gmail termina de cargar. Esto vence el propósito de una barra de carga: dar un estimado del progreso, no llenarse de manera arbitraria.

Este tipo de problemas es donde muchos programadores pueden “meter el pie”. El impulso inicial de las personas técnicas es hacer las cosas técnicamente correctas, aunque no agreguen tanto valor al producto final o aporten a mejorar la experiencia del usuario.

Tomando en cuenta el caso de uso más obvio de una barra de progreso, comunicar progreso, ¿qué debería hacer Gmail para ofrecer información técnicamente correcta? Sin lujo de detalle, y vagamente en el orden adecuado:

1. Analizar la velocidad de conexión actual
2. Analizar el tamaño del bundle de JavaScript que hay que cargar desde el servidor
3. Hacer un cálculo de la transferencia de los datos de manera continua, tomando en cuenta fluctuaciones en la velocidad de la conexión.

Suena relativamente sencillo; son pocos pasos. Pero toma en cuenta a) la escala a la que opera Gmail, y b) el objetivo real de presentar una barra de navegación, que es darle seguridad a tu usuario de que estás haciendo algo. Considera las implicaciones de hacer un cambio “sencillo” a la escala de Google. Además, la idea de que realmente lo que importa es la experiencia de usuario, y no necesariamente la exactitud de la barra del progreso. Te das cuenta de que implementar una barra de progreso que muestre información técnicamente correcta, realmente no vale la pena.

Por si no te habías dado cuenta, muchas de las barras de carga que encuentras en tu día a día son completamente falsas. Hoy en día, los sistemas son tan complejos, impredecibles y con tanta entropía, que hacer una barra de carga que muestre progreso requeriría una inversión de tiempo que muy pronto deja de ser rentable para el producto.

_Este post originalmente fue publicado en [Soft Skills para Devs](https://softskillsparadevs.com/productividad/la-barra-progreso-de-gmail-no-es-real-por-que/)._
How to Reduce Waste and Increase Productivity in Software Development?
Tags: devops, programming, softwaredevelopment, technology
Published: 2022-05-16 21:46:18

---
title: How to Reduce Waste and Increase Productivity in Software Development?
published: true
date: 2021-11-11 21:56:33 UTC
tags: devops,programming,softwaredevelopment,technology
canonical_url: 
---

[![](https://cdn-images-1.medium.com/max/2600/0*9ZWVq7vmJ6dDZryk)](https://faun.pub/how-to-reduce-waste-and-increase-productivity-in-software-development-f333f363f150?source=rss-6e21f0d290d1------2)

Discover the 5S Approach inspired by Lean Manufacturing

[Continue reading on FAUN Publication »](https://faun.pub/how-to-reduce-waste-and-increase-productivity-in-software-development-f333f363f150?source=rss-6e21f0d290d1------2)
I spoke at vim conf
Tags: vim, nvim, bash
Published: 2021-11-11 21:55:52

---
title: I spoke at vim conf
published: true
description: 
tags: vim, nvim, bash
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j87ay7zunqess5108tln.png
---

I gave a talk about my workflow at vim conf and how vim works into my workflow as a team lead for an analytics team.  Nerves were high, palms were sweaty, I spoke way too fast, wasn't sure what to do with myself when the talk was done, but overall it was well recieved.  It's now live on youtube, you can see it here.

{% youtube E18m4KkJUnI %}
What is manylinux?
Tags: tutorial, todayilearned, programming, linux
Published: 2021-11-11 21:09:40

## `Why Python packaging can be hard`

There may be a time in your development career where you need to author a package that extends Python w/ C or C++. In such a case your Python package needs to go through a compilation process, which converts C or C++ to binaries that work for a specific target system. This becomes really tedious when you think about how many flavors and versions of Linux there are.  Building a separate binary for Red Hat, SUSE, Ubuntu, etc... Ugh so tiring.

## `Why Python packaging can be easy w/ manylinux`

Fortunately, there is a solution. `manylinux` was birthed to make it easy for your Python packages to be compatible with most Linux variants. `manylinux` takes advantage of the fact that most distributions are mindful of backwards compatibility, and intentionally builds bdist wheels on an old version of a distribution. The idea is that if we build on an old supported version, the binaries produced are compatible with current versions.

## `So what is a manylinux really? Is it a ham sandwich?`

No. Even better. It's a Docker image. `manylinux` is a `Docker` image built off a certain old versions of the CentOS operating system that comes bundled with libraries that are assumed to be present by default on almost all Linux systems.

You can find an example of manylinux distributions within the pandas project. Here are two (out of many) from the list of available pandas downloads from PyPI:

```bash
pandas-1.0.3-cp37-cp37m-manylinux1_x86_64.whl
pandas-1.0.3-cp37-cp37m-manylinux1_i686.whl
```

In this case, pandas has built manylinux wheels for CPython 3.7 supporting both x86-64 and i686 architectures. It's manylinux so this wheel should be compatible for many linux :)

Happy packaging!
Kaggle Housing Price Competition Top 1% 
Tags: datascience, python, jupyter, machinelearning
Published: 2021-11-11 21:04:30

I updated my notebook for the Housing Prices Competition on Kaggle and was able to go from the top 7% to the top 1% after adding some model tuning! Even though it is more of an introductory competition, it still feels good to have done so well and have all the time I put into it pay off. 

Please take a look at the Kaggle notebook. I still haven't gone though all the transformations but would be happy to if anyone would like an explanation.

Kaggle - https://lnkd.in/gy3hhW63
Do you have any questions about whistleblowing and worker’s rights in the tech industry? Ask to be featured on our podcast! 🎧
Tags: podcast, discuss
Published: 2021-11-11 21:01:25

---
title: Do you have any questions about whistleblowing and worker’s rights in the tech industry? Ask to be featured on our podcast! 🎧  
published: true
description: 
tags: podcast, discuss
---

The [DevDiscuss Podcast](dev.to/devdiscuss) begins with an interview and ends with commentary from listeners — and we like to feature the _actual_ voices from our community!

To inform an upcoming episode of the show, we'd like to know...

> ### **Do you have any questions about whistleblowing and worker’s rights in the tech industry?**


For your chance to hear your actual comments on an upcoming episode, answer the question above by:

- Calling our Google Voice at +1 (929)500-1513 and leave a message 📞

- Sending a voice memo to pod@dev.to 🎙

- OR, leaving a comment here (we'll read your response aloud for you) 🗣

Please send in your recordings by Wednesday, November 17th at 9 AM, ET (1 PM UTC, 6 AM PT)

#### Voice recordings will be given priority placement 😉

Catch up on recent episodes of the show [here](https://dev.to/devdiscuss) 👀
Python Packaging: sdist vs bdist
Tags: python, todayilearned, codenewbie, programming
Published: 2021-11-11 20:54:55

## `Why packages?`

Let's start with a fundamental question: why package at all? Reason is fairly simple. Once you have created a package, then you are likely to use some of the code in other places. For example, you might want to do this:

```python
from mypkg.module import func
```

## `What is a distribution?`

A Python distribution is a versioned compressed archive file that contains your Python package. The distribution file is what an end-user (the client) will download from the internet when they run `pip install`.

There are two primary distribution types in use today: `Built Distributions` and `Source Distributions`.

## `Source Distribution (sdist)`

A source distributions is the simpler of the two types of distributions. Intuitively speaking, an `sdist` is very similar to source code - the code that you write. Therefore, `sdist` will not include platform-specific binaries. The result is an archive (.tar.gz) that contains the source code of your package and instructions on how to build it, and the target system of your client will perform the actual build to create a bdist (wheel).

Creating an sdist is akin to sharing just the source. It doesn't build usable artifacts that the client can consume immediately. The advantage of this is that creating an sdist is the same for all platforms (Windows, Linux, Mac) and machines (32 Bit / 64 Bit). The disadvantage is that users have to build the package themselves once they download the sdist.

## `Built Distribution (bdist)`

A built distribution, also sometimes referred to as a `bdist`, is more complex than an sdist in that it actually "builds" the package. Principally, `bdist` creates a distribution containing `.so`, `.dll`, `.dylib` for binary modules. The result is an archive that is specific to a platform (for example linux-x86_64) and to a version of Python (for example Python3.9). 

Installing a `bdist` in the client is immediate, as they don't need to build anything (you as the package author have already built it for them, setuptools doesn't need to build it). The downside is that you as the package author have to build for multiple platforms and versions and upload all of the distributions for max compatibility.

## `Should I produce sdist or bdist for clients?`

It is best practice to upload both, wheels and a source distribution, because any built distribution format only works for a subset of target systems. If there is not a platform-specific bidst that works for the end-user, they can go ahead and build locally w/ the `sdist`.