teleren/devto huggingface dataset:
Book Review: Management 3.0
Tags: bookreview, practices, agile
Published: 2021-05-09 15:59:57

---
title: Book Review: Management 3.0
published: true
date: 2021-05-09 00:00:00 UTC
tags: BookReview,Practices,Agile
canonical_url: https://hceris.com/book-review-management-3-dot-0/
---

[![Management 3.0](https://hceris.com/static/0e5a7c83b4cd2274727a989950b11bfb/ab8e0/cover.jpg "Management 3.0")](/static/0e5a7c83b4cd2274727a989950b11bfb/ab8e0/cover.jpg)

Agile development has a complex relationship with management. Some old school organizations want to call themselves agile, without changing anything substantive. So they maintain the same hierarchies as before and keep decisions out of the team. But they use story points. Others react to this and go the opposite way: They have teams where every single thing is supposed to be decided in a “democratic” way. It tends to lead to a lot of meetings and few if any actual decisions.

So, there seems to be still plenty of space for books like this one. This book intends to give you a better toolbox to engage in agile leadership. It’s not about a concrete set of steps. If you’re looking for a recipe to follow, you’re going to be disappointed.

The book talks about many different aspects of what some call [servant leadership](https://www.thoughtworks.com/insights/blog/leadership-agile-environment). These are some chapters in the book:

- How to energize people
- How to empower teams
- How to develop competence
- How to grow structure

Each chapter gives you plenty of different thoughts and ideas. You can then consider and adapt for your organization. As I said, it doesn’t get very concrete, so you’ll have to do your homework if you want to translate the ideas into actions. It might not be the first book you want to read about agile development.

## Pragmatism

The thing I like the most is the pragmatism throughout the content. Agile development materials are sometimes a bit _naive_. If you call yourself a _self-enabled_ team, everything will be fine! Or so goes the thinking. But some people don’t argue in good faith. Or they’re not that motivated. Or something else. That’s a reality that many choose to ignore willfully. And it might lead to frustration.

## Verdict

There are things to learn from this book. It’s an interesting view on agile, and it covers a lot of ground on how to organize teams effectively. However, it ends up being a bit too long. I think more aggressive editing would’ve helped. There’s a bit too much rambling for my taste in some parts. That’s why I score it with ⭐⭐⭐ stars.
Speed Up your Ruby on Rails Development Environment
Tags: rails
Published: 2021-05-08 23:55:30

There will be a time when your Rails development environment started to become very slow due to multiple reasons, but mostly because your codebase is very big and the monolith architecture is just too sweet for you to pass on.

An example of this is you have to wait like 10 seconds (or worse) when you change something in your Rails code and hit that refresh button. Normally, starting Rails console/server also can be affected. 

What works for me might not work for you, but it should help you to get started. BTW, I'm optimizing 7 years old codebase. So here are some tips for speed improvements. 

Get a baseline first on how slow it is so that you know you are actually improving it instead of just using your feeling:

```
$ time bundle exec rake environment
```

This should show you the load time without spring. Any changes we make should make the numbers better than before. 
Alright, now we need to identify what's causing the slowness. We can use [https://github.com/nevir/Bumbler](https://github.com/nevir/Bumbler) gem for this. Just run this command first:

```
$ bumbler
```

It will show you gems that are taking time to be loaded/require.


But what can you do with that output? Start from the bottom and see if you put your gem in the right development. You don't have to put your server monitoring gem in the development environment, right? 

You can also do `require: false` in your Gemfile for certain gems that are being used rarely, but you need to `require` it manually when you want to use it.

Use your judgment wisely. Check out how [https://github.com/discourse/discourse/blob/master/Gemfile](https://github.com/discourse/discourse/blob/master/Gemfile) is doing it

Next, run:

```
$ bumbler --initializers
```

This will show you the load time of initializers.
 
In my case, it was the routes (we have thousands of routes due to our support of multiple languages). So, reducing the routes will help but we can't remove the routes, it's one of our best features.

Since you won't always be using ALL of them in the development, so you can do this:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8a9y6oxsomlfp8yndaz7.jpeg)

What does it do? By default, it will use all of the languages except when you have that `MIN_LOCALE` environment variable which you would only put in your local development. 

Another place to check would be your Admin routes. Again, you are not accessing your Admin routes all the time, so, you can use the same trick in your `routes.rb`. Try optimizing your codebase based on what bumbler told you. 

One last tip would be to do some cleanup on your gems. Remove gems that are not being used. Sometimes we just forgot that we don't need it anymore. 

That's it, folks. Here is my result from this exercise:
- Reduce slow requires by 41%
- Reduce Initialize require by 72%
- Reduce the number of routes by 91%
- Reduce rake time by 55%

Thanks for reading
Image as a Link with Contentful and Gatsby JS
Tags: gatsby, contentful, tutorial
Published: 2021-05-08 23:40:56

As rich as the Rich Text functionality of Contentful might be, it doesn't include a simple way to create clickable images, i.e images embedded in a HTML link element. Here is a quick workaround with a Gatsby JS frontent.

## Create a custom model in Contentful
We are creating a new custom model called **ImageWithLink** that contains 3 simple fields:
- title
- image (type *Media*)
- url (type *Short text*)

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

You can then use your ImageWithLink model in any Rich Text contents or as part of another model definition.

## Integrate with GatsbyJS
I will only emphasize how to generate the custom image with link element when the ImageWithLink model is provided inside a Rich Text field. You need to make sure your GraphQL requests are working correctly and [that you imported all packages/functions needed](https://www.contentful.com/developers/docs/tutorials/general/rich-text-and-gatsby/) to process Rich Text elements in Gatsby ;) I chose to use a fluid image in my example.

```
[BLOCKS.EMBEDDED_ENTRY]: node => {
	const {__typename} = node.data.target
	const target = node.data.target

    return <a href={target.url}><img src={target.image.fluid.src} /></a>
}
```

I hope this will help some of you !
Best ❤️
Looking for Open-Source Contributors?
Tags: opensource, discuss, contributorswanted, goodfirstissue
Published: 2021-05-08 23:02:53

![OpenSource](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xcz52htc5hfx6m2nna3q.jpeg)
If you're a project owner/maintainer looking for more contributors to your project, you can gain more contributors by listing your repository on [Goodfirstissue.dev](https://goodfirstissue.dev/).

## What is Goodfirstissue.dev?

It is a platform that has a list of popular Open-Source project repositories with "Open" Good First Issues. So whether you're making your first contribution or want to take up some beginner-friendly issues, you will find a project repository there.

## How can I list my project? 

You can list your repository by making a pull request here: {% github deepsourcelabs/good-first-issue no-readme %}

To maintain the quality of projects in Good First Issue, there are criteria for listing a repository:

- At least three open issues with the `good first issue` label
- Detailed setup instructions for the project
- CONTRIBUTING.md
- Actively maintained

Don't forget README.md is your friend.

If you create a pull request, drop a ‘Hi’ in the `#good-first-issue` channel on our [slack workspace](https://join.slack.com/t/deepsourceusers/shared_invite/zt-gfe1t4oi-DFaFfjLMXwxaz7iz3eLLzg).
Take Control of Your VSCode Workspaces 🛠️
Tags: vscode, news, showdev, productivity
Published: 2021-05-08 23:02:51

I work on a lot of different projects. You probably do too.

Back in 2018, I created an extension for VSCode to help solve the problem of managing many different projects, using many different workspaces. It's called [**Workspace Explorer**](https://marketplace.visualstudio.com/items?itemName=tomsaunders-code.workspace-explorer).

![Opening a Workspace](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0nrkbeiwkpbn89f76ij7.gif)

**Workspace Explorer** provides a file-browser-like experience for your workspaces. Some of the things you can do:

- Workspaces
  - Create Workspaces
  - Delete Workspaces
  - Rename Workspaces
  - Open a Workspace in Another Window
  - Open a Workspace in the Same Window
- Sub-Folders
  - Organize Workspaces in Sub-folders
  - Delete Sub-folders
  - Rename Sub-Folders
- Custom Icons
  - Set Custom Icons for Workspaces and Sub-folders



-------

## Workspace Explorer 2.0.0

Today I'm releasing version `2.0.0` of **Workspace Explorer**. This release brings support for `jpg` icons, environment variables in config paths, and patches several bugs. I've incremented the major version as support for SVG icons has been removed, due to an issue in VSCode.

Icon Format Support

- ~~svg~~
- png
- jpg (new)

Environment Variable Support

```
${env:NAME_OF_ENV_VAR}/remainder/of/your/path

/root/of/my/path/${env:NAME_OF_ENV_VAR}/remainder/of/your/path

${env:USERPROFILE}\my\windows\path
```

---

![Workspace Explorer](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzmi40v4eypicwxym4u1.png)

**Workspace Explorer** is developed open source on GitHub. Special thanks to all the contributors and issue reporters over the years.

{% github sirfuzzalot/workspace-explorer no-readme %}
Verificar rangos de fechas en PostgreSQL
Tags: postgres
Published: 2021-05-08 22:13:58

Mi motor de base de datos favorito para proyectos nuevos es PostgreSQL o postgres. Es una base muy solida, open source, con más de 30 años de desarrollo, se ha ganado una gran reputación por su confiabilidad, robustez y desempeño.

Hoy les quiero compartir un pequeño tip que me ha servido mucho en un  par de proyectos, en los cuales se requiere mantener un registro de datos históricos y que no debe haber superposición de un valor en un mismo rango de fechas. Por ejemplo, el valor del IVA generalmente es fijo, pero hubo un tiempo en que cambió. Una tabla para manejar estos cambios en el tiempo sería de la forma:

```sql
create table historico_iva(
    id serial,
    empresa_id integer not null,
    desde date not null,
    hasta date null,
    porcentaje_iva numeric(10,2)
)
```

Esta validación de datos se podría realizar a nivel de aplicación al verificar que no haya 2 valores de IVA para la misma fecha, por ejemplo digamos que el 1 de junio cambia el valor al 10% en la tabla habría los siguientes registros:

|id|empresa_id|desde|hasta|porcentaje_iva|
|--|--|--|--|--|
|1|1|2000-01-01|2021-05-31|12|
|2|1|2021-06-01|null|10|

Para buscar que valor de iva debo aplicar en una fecha específica puedo usar la consulta:

```sql
select porcentaje_iva 
from historico_iva 
where empresa_id = 1 
and current_date between desde and coalesce(hasta, 'Infinity')
```

Esta debe devolver siempre un solo valor, pero por cualquier error de programación o al editar datos en la base directamente en el registro 2 le pongo 2021-05-31 en la fecha desde, el día 31 de mayo no se sabría si fue 10 o 12 el IVA ya que la consulta devuelve 2 valores. O también que la fecha desde sea mayor a la fecha hasta en cuyo caso nunca retornaría un valor.

Para evitar este inconveniente se puede agregar un par de checks a nivel de base de datos, y para esto postgres ayuda mucho con una extensión para manejo de este tipo de validaciones denominada `btree_gist`.

Para nuestro ejemplo se debe agregar los siguientes CHECKs en la tabla:

```sql
--- activa la extension btree_gist
CREATE EXTENSION btree_gist;

--- verifica que la fecha desde sea menor a la fecha hasta
ALTER TABLE porcentaje_iva 
    ADD CHECK ( "desde" < "hasta");

--- evita superposición de rango de fechas en una misma empresa
ALTER TABLE porcentaje_iva 
    ADD CONSTRAINT no_sobreponer_fechas_iva 
        EXCLUDE USING GIST (
            empresa_id WITH =,
            daterange("desde", coalesce("hasta", 'Infinity'), '[]') WITH &&
        );
```

Esto implica que al tratar de crear un registro de la misma empresa, que tenga fechas sobrepuestas
la base de datos no lo va a permitir y generará un error.
Preventing Infinite Loops With a Valid Terminal Condition
Tags: javascript, beginners, tutorial, devops
Published: 2021-05-08 21:46:47

* The final topic is the dreaded infinite loop. Loops are great tools when you need your program to run a code block a certain number of times or until a condition is met, but they need a terminal condition that ends the looping.
* It's the programmer's job to ensure that the terminal condition, which tells the program when to break out of the loop code, is eventually reached. 
* Ex: The myFunc() function contains an infinite loop because the terminal condition i != 4 will never evaluate to false (and break the looping) - i will increment by 2 each pass, and jump right over 4 since i is odd to start. Fix the comparison operator in the terminal condition so the loop only runs for i less than or equal to 4.
```
function myFunc() {
  for (let i = 1; i != 4; i += 2) {
    console.log("Still going!");
  }
}
```
* Answer:
```
function myFunc() {
  for (let i = 1; i <= 4; i += 2) {
    console.log("Still going!");
  }
}
myFunc();
```
* i starts at 1. i which is 1 first is less than or equal to four so we continue forward. i is now 3 because i will increment by 2 each pass. 3 is less than or equal to four so we continue. i is now 5. 5 isnt less than or equal to four so we stop a the console will display
```
Still going!
Still going!
```
Using Caution When Reinitializing Variables Inside a Loop
Tags: javascript, devops, tutorial, beginners
Published: 2021-05-08 21:36:14

* Sometimes it's necessary to save information, increment counters, or re-set variables within a loop. A potential issue is when variables either should be reinitialized, and aren't, or vice versa. This is particularly dangerous if you accidentally reset the variable being used for the terminal condition, causing an infinite loop.
* Printing variable values with each cycle of your loop by using `console.log()` can uncover buggy behavior related to resetting, or failing to reset a variable.
* Ex:
The following function is supposed to create a two-dimensional array with `m` rows and `n` columns of zeroes. Unfortunately, it's not producing the expected output because the `row` variable isn't being reinitialized (set back to an empty array) in the outer loop. Fix the code so it returns a correct 3x2 array of zeroes, which looks like `[[0, 0], [0, 0], [0, 0]]`.
* Code:
```
function zeroArray(m, n) {
  // Creates a 2-D array with m rows and n columns of zeroes
  let newArray = [];
  let row = [];
  for (let i = 0; i < m; i++) {
    // Adds the m-th row into newArray

    for (let j = 0; j < n; j++) {
      // Pushes n zeroes into the current row to create the columns
      row.push(0);
    }
    // Pushes the current row, which now has n zeroes in it, to the array
    newArray.push(row);
  }
  return newArray;
}

let matrix = zeroArray(3, 2);
console.log(matrix); console will display 
[ [ 0, 0, 0, 0, 0, 0 ],
  [ 0, 0, 0, 0, 0, 0 ],
  [ 0, 0, 0, 0, 0, 0 ] ]
```
* Fixed:
```
function zeroArray(m, n) {
  // Creates a 2-D array with m rows and n columns of zeroes
  let newArray = [];
  for (let i = 0; i < m; i++) {
    // Adds the m-th row into newArray
  let row = []; <----------
    for (let j = 0; j < n; j++) {
      // Pushes n zeroes into the current row to create the columns
      row.push(0);
    }
    // Pushes the current row, which now has n zeroes in it, to the array
    newArray.push(row);
  }
  return newArray;
}

let matrix = zeroArray(3, 2);
console.log(matrix); will now display 
[ [ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ]
```
Fixing Bluetooth in Debian 9
Tags: debian, bluetooth, gnu, linux
Published: 2021-05-08 21:00:38

Some time ago I bought a **Lenovo Thinkpad E580** computer, then I decided to install **GNU/Linux** as my operating system, I chose **Debian Wheezy** but **unfortunately my wifi and bluetooth did not work**. 

After searching the internet I found a controller that was compatible with my wifi, however I couldn't fix the bluetooth. Back then it wasn't a major problem so I gave up!.

Two months ago I bought a **wireless headphone**, which works via bluetooth, so this time I decided to fix it.

I followed many instructions that I found on the internet, but still couldn't fix it, then I realized that my computer was showing various messages when it started and in general it was:
```bash
bluetooth hci0: firmware: failed to load rtl_bt/*****_config.b
bluetooth hci0: firmware: failed to load rtl_bt/*****_config.bin
bluetooth hci0: firmware: failed to load rtl_bt/*****_fw.bin
...

```
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nlp03ecnhicuajkm292u.jpg)

The problem was obvious, the operating system could not find the bluetooth driver, in the path ***/lib/firmware/rtl_bt/***.


Searching on the internet I found a [repository](https://github.com/wkennington/linux-firmware/tree/master/rtl_bt) with many different drivers available already compiled (ready to download and use),
So I followed the following instructions to fix it:

## Steps to install bluetooth driver
1. Clone the repository
```bash
╰─$ cd /home/user/Downloads/
╰─$ git clone https://github.com/wkennington/linux-firmware.git
```
If you do not have git installed, here you have the [instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).

2. Copy bluetooth driver to OS firmware path.
```bash
╰─$ sudo cp -R /home/user/Downloads/linux-firmware/rtl_bt/ /lib/firmware
```

3. Reboot your pc
```bash
╰─$ sudo reboot
```

## Bluetooth fixed!
In my situation, the above steps helped me to finally fix bluetooth on **debian wheezy**. Then warning messages no longer appeared.

If these steps worked for you, you will see something like this in your bluetooth settings panel (I am using GNOME desktop environment).

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggzvuzu06zlo5dhrqmu5.png)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r6fsnn5o9t13yoizcy3s.png)

## Wrapping Up
You just need to download the bluetooth driver and add it to the correct path in your operating system, and reboot.

Remember this is my solution, maybe it is not the correct way to install a driver (due to security issues), but I just wanted to listen to music with my headphones, so for me it was not a big deal, but maybe for you are.

Let me know if this worked for you in the comments.

Thank you for reading my blog post.
**Fabian**
No Need Postman, Your VSCode is Enough for Testing Your API 😎⚡
Tags: vscode, postman, api, extensions
Published: 2021-05-08 20:12:56

hey you all👋

A couple week ago I've found Lightweight ⚡ and simple 😋 tools for testing my API. That's Thunder Client.

# Thunder Client
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tizuy1k1jeez7uzogpym.png)

![](https://github.com/rangav/thunder-client-support/blob/master/images/thunder-client.gif?raw=true)

Thunder Client is Rest API Client Extension for Visual Studio Code, with simple and clean design. The extension makes api testing very easy with Scriptless GUI based testing. and created by [Ranga Vadhineni](https://twitter.com/ranga_vadhineni).

Thunder Client has many Main Features such as :

 - List item
 - Lightweight API Client
 - Simple & Clean UI
 - Collection & Environment Variables
 - Scriptless Testing

## 💻 How to install it ?

 - It'a easy, just go to Extension menu in sidebar VSCode, and install it:
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o9fzrrb32wzisc17ptjv.png)

 - And you'll see the thunder client icon in sidebar
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v383nyhy1xaahlhixbrn.png)

# Let's try test Thunder Client

 - For testing API, I use a dummy api that's [SWAPI](https://swapi.dev/)(The Star Wars API).

> https://swapi.dev/

 - ### Get request
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jbim7792zhhwk57w4w42.png)

 - ### Set Environment
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3mqoexo2ptuujjkqford.png)

Now you can try more by your self 🙌🙌, have nice try.

## Conclusion

Thunder Client is Rest API Client Extension for Visual Studio Code, with simple and clean design. The extension makes api testing very easy with Scriptless GUI based testing. and created by [Ranga Vadhineni](https://twitter.com/ranga_vadhineni).

**NB**: It does'nt means Thunder Client is better then postman, not. Postman still has more feature than Thunder client. Thunder Client made for own use and simple API testing
Responsive Admin Panel or Dashboard - Flutter UI
Tags: html, ruby, dart, swift
Published: 2021-05-08 19:55:04


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gex020fid1g8d80aiqq3.png)
Live Preview : https://abuanwar072.github.io/Flutter-Responsive-Admin-Panel-or-Dashboard/#/
Packages we are using:

flutter_svg: https://pub.dev/packages/flutter_svg
google_fonts: https://pub.dev/packages/google_fonts
provider: https://pub.dev/packages/provider

Fonts
Poppins: https://fonts.google.com/specimen/Poppins

On Flutter V2.* web officially supported on a stable branch. Today I share an Admin panel or you can call it dashboard UI build with flutter. Now you can build your app dashboard using flutter. This dashboard contains almost everything that you need like a chart, table, nice small card for showing info. It works perfectly on the Web, macOS app, Tablet also on both Android and iOS phones. It's time to code once run everywhere. Yeah, Flutter web is not SEO friendly but we don't need SEO for the admin panel.