teleren/devto huggingface dataset:
Improve Product Quality by focusing on Developer Experience
Tags: refactorit, productivity, codequality, codenewbie
Published: 2022-02-08 21:53:39

_Some folks use QA as the bug catchers. They send them code that they haven't thoroughly checked._ [The Clean Coder]

Everything starts with the source code, and developers are the only people capable to change it - to better, or to worse. It’s obvious that the QAs don’t create the bugs, they just find them! The bugs, and hence the quality, starts with the source code.

Having said that, if the project DX is really poor, then it is extremely hard to improve the overall Product Quality. Regardless of the chosen measures.

Consider an example - you’re going through the legacy project in order to fix a bug. The mess is everywhere, you see many places worth refactoring, but instead of doing anything like improving it, you don’t even touch it, you do everything to touch as few lines of code as possible, because any change may break something, and you don’t want to be the one responsible.

This is what I call poor Developer Experience. You noticed the problem, but didn’t fix it. You violated your professional ethics, because you were so afraid of making a mistake. Naturally, you don’t want to ruin your professional reputation, but in that particular case, it also means that you prefer to leave the problem to fester and exacerbate rather than be perceived as the one who touched and broke something.

In the long-term, it’s impossible to work like that, to drive the project like that.

In a perfect world, you would have tools and processes to help you, like Tests (Unit, E2E, Integration), Static Typings, Linter, other CI quality gates, and so on and so forth. All of them would confirm that your changes are safe, so you would be proud that you made the project a little bit better. And for sure, you wouldn’t be having any ethical issues.

When a developer isn’t afraid to change the code then they change it all the time. This is simply the nature of software delivery - to make constant adjustments to the new reality, to the new business request. It is not dangerous to make constant changes, incremental improvements to the code, but leaving the code static is.

Trust developers. There’s nothing more devastating than micro-management. Let them be free and responsible. It will generate a feeling of ownership and commitment.

Give developers all the tools they need and ask for. If they hate testing library - they won’t use it, or only as little as required. If they hate slow CI workflow - give them time to improve it. If they want to refactor something - at least consider it! The idea is pretty straightforward - when someone doesn’t like what they do, feels forced or disrespected, then we cannot talk about efficiency, thus we cannot talk about Product Quality.
A new tech ideas community 
Tags: javascript, showdev, beginners, react
Published: 2022-02-08 21:33:56

So today we launched [techbuilders.ai](https://Techbuilders.ai) a paid community where creators can talk about ideas and chat with other people that have ideas too!

Check it out [here](https://Techbuilders.ai) or the app [here](https://app.Techbuilders.ai)
Why switch from Windows to Linux.
Published: 2022-02-08 21:31:26

Many people ask me: 

Why should I switch from Windows to the Linux.

And it is hard t o tell Windows users why to switch, if they never sawed anything with Linux.


## What are the reasons?

- **Freedom**, you can do whatever YOU want to do with YOUR system if you use Linux. You don't like that specific menu? Just go and replace it.
- **Tiling  window managers**, as our screens get bigger and bigger and we use more space then ever,we need to handle that space great. That's where Tiling WMs or Extentions like Forge come in: Your Windows gets automaticly tiled, no more draging Windows around or overlapping things.
- ** No Money waste**, on Windows you have some good Applications, like Todoist etc. on Linux you also have Todoist, but there is  also  Planner, it looks  so great, acts  like Todoist but is completly free.  That's how you save a lot of money, as you don't have to buy commercial Applications as there are much better free and open source Applications on Linux. You can put your money into the hardware  instead of the software.
- **Linux is the future**, there are App stores since decades on Linux, where they are now new for Windows users, just like virtual desktops.
- **Darkmode**, on Windows you have some System applications etc. that don't respect YOUR theme on YOUR operating system. On Linux you have tons of themes, not just dark and light, and when you set your gtk theme, all Applications and System applications will use that specific theme.
- **Security**, Google and other websites choose to run on Linux, often just for security and maintance. There are not much viruses on Linux, you can safely download files again.

## Where should I start when I want to learn Linux?
I suggest you to download the Linux Mint iso and follow the install instructions, it's quite easy. You can also get a power user on Linux Mint, as you can install things like gnome, kde and tiling window managers.

> I hope you also learn Linux and like it.
System testing of GitHub Actions
Tags: github, testing, act, devops
Published: 2022-02-08 21:25:36

It's the last and the shortest part of the series. Testing the whole action as a [black box](https://en.wikipedia.org/wiki/Black-box_testing) can be done in 2 ways (as far as I can see).

# github-action-ts-run-api again

Use the same [tool](https://github.com/cardinalby/github-action-ts-run-api) as for integration test, but run tests against the whole action.

# Use _Act_ tool

This approach implies that you should create special testing workflows that can be naturally run on GitHub Actions runner or can be run locally using [Act](https://github.com/nektos/act).

> If you need to debug an action on actual GitHub hosted runner, take a look at [debugging-with-tmate](https://github.com/marketplace/actions/debugging-with-tmate) action on the Marketplace.

Testing workflows can be located in the action repository and refer to the action using the local `./` path. It's especially convenient because each branch in the action repo will be tested against the version of the action stored in this branch.

Here is a fragment of the testing workflow for [git-get-release-action](https://github.com/cardinalby/git-get-release-action):

```yml
- name: Get 1.1.1 release by releaseId
  id: getByReleaseId
  # referring to the action in the current repo
  uses: ./  
  with:
    releaseId: 41301084

- name: Check getByReleaseId step result
  if: steps.getByReleaseId.outputs.tag_name != '1.1.1'
  shell: bash
  run: exit 1
```

Another option is creating a dedicated repo for testing workflows. It can also contain commits, releases, issues and other GitHub objects that can be read and modified by the action without bloating your main repository.

The drawback of this approach is that you have to specify an exact version of the action in `uses` key of each step:

```yaml
- name: Get 1.1.1 release by releaseId
  id: getByReleaseId
  # referring to the specific version (v1)
  uses: cardinalby/git-get-release-action@v1
  with:
    releaseId: 41301084
```

If you have multiple branches in the main repo and want to test them, you should create the same
branches in the tesing repo and change all `uses` keys to the appropriate version (`action-name@myBranch`). 

## 👏 Thank you for reading

Any comments, critics and sharing your own experience would be appreciated!

If you are interested in developing own Actions, you can read my other posts:
- [DRY: reusing code in GitHub Actions](https://cardinalby.github.io/blog/post/github-actions/dry-reusing-code-in-github-actions/)
- [JavaScript GitHub Action packing and releasing](https://cardinalby.github.io/blog/post/github-actions/js-action-packing-and-releasing/)
- [GitHub Actions: implementing deferred steps](https://cardinalby.github.io/blog/post/github-actions/implementing-deferred-steps/)
Finding the longest common prefix string amongst an array of strings
Tags: leetcode, java, algorithms, programming
Published: 2022-02-08 21:17:32


#### Leetcode problem 14. Longest Common Prefix

#### Question:
#### Write a function to find the longest common prefix string amongst an array of strings. If there is no common prefix, return an empty string "".


#### This is a solution from leetcode:
#### Approach 1: horizontal scanning

```java
public class LongestCommonPrefix {
    public static String longestCommonPrefix(String[] strs) {
        // if the length of the string array is zero, return "";
        if (strs.length == 0) {
            return "";
        }
        // Name the first element in string array as prefix;
        String prefix = strs[0];

        //Loop from the second element in "strs" to the last one
        for (int i = 1; i < strs.length; i++) {
            // If the current element contains the prefix, move to the
            // next element and do the comparison again with the prefix
            while (strs[i].indexOf(prefix) != 0) {
                // Chop down the tail character of prefix
                prefix = prefix.substring(0, prefix.length() - 1);
                // Return "" when prefix is emply
                if (prefix.isEmpty()) {
                    return "";
                }
            }
        }
        return prefix;
    }
    // Test
    public static void main(String[] args) {
        // Array of strings
        String[] res = {"English", "Engli", "EnE"};
        String result = longestCommonPrefix(res);
        // Show result
        System.out.println(result);
    }
}
```
Working on my portfolio
Tags: beginners, programming, react, career
Published: 2022-02-08 20:57:22

## Journey
It's been great doing my Portfolio from scratch with Reactjs, I've learned how to use react-router-dom properly, learned more about git, and got to know new technologies like an email sender used in the form area for Contact. It's a simple website yet, only to be able to show my previous projects and a little about me, but I have my ideas for the near future.

## Plans
What I have in mind right now is about creating my blog inside this website, like for example nicholascosta.dev/blog or changing my portfolio URL to nicholascosta.dev/portfolio, which is being a difficult decision to make, having your reader's opinion would be very appreciated.

## What I'm doing right now
I'm currently working on the blog part of the website(still didn't make up my mind on the URL) and thinking about the color palette of the website because I'm not 100% sure of the current one. I'm waiting for your feedback on my portfolio.

**observation**: *I'm a beginner developer, started programming around 6 months ago, that's the reason for the lack of projects, I'm working right now on implementing the blog feature, but soon I'll focus more on different projects*
How to run PostgreSQL inside of a Docker container in less than 5 minutes!
Tags: postgres, docker, database, webdev
Published: 2022-02-08 20:51:56

If you are looking for a fast, easy and convenient way to run PostgreSQL and be able to access it via command line or SQL client - this is the perfect solution!

To start, make sure you have docker installed and that it is running on your machine. To do this run the following command in the command line: 

`docker -v`

Next, you need to pull down the postgres image from docker hub. You can find the official postgres image [here](https://hub.docker.com/_/postgres), if you need to run a specific version of postgres make sure to checkout the available tags.

`docker pull postgres`

if you are using a tag run the following command with the tag.

`docker pull postgres:tag`

Finally, we need to actually run the container. To do this, we need to pass a few flags in our next command.

`docker run --name postgres-example -d -p 2022:5432 -e POSTGRES_PASSWORD=postgres postgres`

- **name** will be the name of the container
- **-d** specifies that we want to run the container in detached mode
- **-p** specifies what local port we want mapped to our exposed container port
- **-e** provides the password environment variable to our container
- **postgres** is the name of the image we want to run

After this, you should be able to run a `docker ps` command to see the container running, or head over to your docker desktop application to interact with it there. 

Now you can add this connection to your local sql client or use the CLI for your container to interact with postgres using psql.

Check out my [video guide](https://youtu.be/TfJ8YD7sfsI) for more details
Introduction to Charsets
Published: 2022-02-08 20:44:45

## 

**CHARSETS**
A charset is a set of different cahracters  that are being used or supported by a software and hardware, it's the key component behind displaying and editing numbers, text and symbols on a computer. These character sets are created through a process known as encoding.

A computer or software has different purposes or tasks to carry out, the characters needed to perform a specific purpose are then grouped into a character set. When text is inputed through a keyboard or some other means, the character encoding map then maps  the characters you chose  to the specific byte memory.

Some example of Charsets are

* ASCII
* UNICODE
* UTF-8
* UTF-16
* UTF-32

**ASCII and UNICODE**
ASCII is short for American Standard Code for Information Interchange. Unicode and ASCII are the two most used character encoding standards in the Technology sector, they are basically standards on how to represent set of characters in written form, these characters include, symbols, digits, lowercase letters and uppercase letters.

Most of these characters are represented in binary form since it is easier for computers to store numbers than letters, these characters are then written, stored and transmitted in digital media.

**Differences between ASCII and UNICODE**
One of the major differences between ASCII and UNICODE is the way they encode characters, ASCII only encodes a set of characters which include, letters, numbers and symbols but in the case of UNICODE, it encodes a much larger range of characters.

Originally ASCII used seven bits to encode each character which was inadequate, to sort out this issue Extended ASCII was introduced, it then increased from 7bits to 8bits. 
For UNICODE, it uses a variable bit encoding program, here you can choose between 8, 16 and 32 bit encodings.

One other significant difference is the number of characters being accomodated by each of the encoding standards. UNICODE accomodates more characters than ASCII this is why most written languages are supported by UNICODE, Chinese is a good example of these languages. It also supports right-to-left scripts like Arabic.

Unicode is the IT standard for encoding texts for both Computers and telecommunication devices, but ASCII only encodes characters for electronic communication only.

Larger space is occupied by UNICODE because it is a superset of ASCII, and ASCII uses less space.
⭕ Generate 250+ CSS-only Loaders & Spinners - 10015.io

Tags: beginners, css, productivity, webdev
Published: 2022-02-08 20:42:59

Hi guys 👋,

I've an all-in-one online toolbox project called 10015.io and I've been building a fancy **[CSS loading animation generator](https://10015.io/tools/css-loader-generator)**  for some time. The most time-consuming tool that I coded so for was by far this CSS loading generator which took 12+ days to finalize. It offers **250+ CSS loading animations** from different categories such as spinners, progress bars, dot/bar/shape loaders, pulse loaders, blob loaders, hypnotic loaders and so on.

I also like to get fancy loaders from Codepen or similar sites and use in my projects, but the main problem is to customize these loaders with the theme of your website. You can customize colors, size, and animation speed in this tool by just using the settings screen from UI.

Here are some screenshots 🖼️:

![CSS loader generator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zpqrczol1r2hsikrdt30.png)

![CSS loading animation generator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c694ozoxcck3kjtyvdgk.png)

![CSS spinner generator](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r1e4axjdu960c4kyycce.png)

You can access CSS loader generator from the link below.

[https://10015.io/tools/css-loader-generator](https://10015.io/tools/css-loader-generator
)

I've used publicly shared CSS animations created by Temani Afif (who is also a dev.to writer I follow - @afif), Jhey Tompkins and other anonymous creators. I've used code of these CSS loaders as reference and make them dynamic & customizable.

I've written a [blog post](https://dev.to/fatihtelis/biggest-online-tools-collection-10015io-3gbf) about my online tools project [10015.io](https://10015.io) recently and got really kind feedbacks from you. I really appreciate your support.

I'm open to any suggestions. Feel free to comment if you think I can somehow improve the tool.
Debí de empezar un blog antes
Tags: beginners, spanish, motivation
Published: 2022-02-08 20:42:35

Los últimos días me planté buscar un nuevo trabajo, soy un desarrollador mexicano y tengo 6 años de experiencia en el mundo de software, me gusta enseñar y me agradaba la idea de subir videos acerca de programación o de las nuevas tecnologías que encontraba, pero en realidad nunca me comprometí en hacerlos de manera continua. Pero si programaba experimentos en la tecnología que estaba interesado, de esa manera aprendí muchas tecnologías, solo por la  curiosidad, pero nunca escribí acerca de mis avances o talvez subir un video a YouTube y ahora que estoy buscando trabajo veo que tal vez escribir un poco acerca de mis experimentos en un blog personal o en alguna plataforma hubiera sido de mucha ayuda.

En el libro "Show your work" de Austin Kleon dice que deberíamos estar bien con ser principiantes, ya que en realidad todos en alguna área lo somos, pero tenemos pena de serlo y nunca compartimos el conocimiento que obtenemos porque creemos que a nadie le interesara y ahora veo que es falso. Si compartiéramos nuestras experiencias conforme vamos aprendiendo podríamos llegar a alguien el cual busca saber el punto de vista de un principiante, pero nos perdemos de oportunidades que pueden llegar únicamente por compartir nuestras ideas y esto no solamente aplica a los programadores aplica para todos abogados, biólogos y carpinteros, el compartir tus ideas, proyectos y pensamientos siempre le servirá a alguien y con el tiempo puede que lo que hayas compartido te dé una gran sorpresa en el futuro.

¡No tengas miedo de compartir lo poco que sabes!

Así que es por eso que quiero tomar cartas en el asunto y así que con este pequeño post inauguró mi blog y el no tener pena de compartir mis experimentos con el mundo.
How to select a network gateway for your private cloud?
Tags: kubernetes, devops, cloudnative, network
Published: 2022-02-08 20:40:04

We recently published this great article that helps people understand why they need a gateway, what sort of services they might leverage on such a device, and what the major options are in the market.

https://www.netris.ai/how-to-select-a-network-gateway-for-your-private-cloud/

I hope this helps you on your cloud journey!
Como Criar um Botão de Submit Fora da tag <form>
Tags: html, webdev
Published: 2022-02-08 20:16:55

Nem sempre o melhor lugar para se colocar o botão de _submit_ é dentro da tag `<form>`. Em alguns casos é preferível que ele esteja fora dessa tag (por questões de layout por exemplo).

### Como fazer?
É muito simples. O próprio `HTML` já torna isso possível. De que forma? Basta seguir dois passos simples:

* Declarar um **id** para o formulário
```html
<form id="my-form">
...
</form>
```

* Informar o **id** do formulário no atributo **form** do botão que irá submeter o formulário (esse botão pode estar em qualquer lugar na árvore de elementos. Dentro ou fora da tag `form`).
```html
<button form="my-form">Submit Button</button>
```

Legal né? 🙂
Servidor Oracle DB + APEX + ORDS + JasperReports desde cero (Parte 2)
Tags: oracle, apex, spanish
Published: 2022-02-08 20:06:05

En la primera parte completamos la instalación de un servidor Oracle Linux 8 listo para empezar a ser configurado con el resto de los componentes. Ahora veamos la instalación de nuestro *middleware* que sería **Apache Tomcat**

## Apache Tomcat 9

Tomcat será el servidor de aplicaciones sobre el que desplegaremos ORDS. Para la instalación de Tomcat usaremos como base los pasos indicados [aquí](https://oracle-base.com/articles/linux/apache-tomcat-9-installation-on-linux)

Debemos descargar dos componentes:

- [OpenJDK 17](https://jdk.java.net/17/)
- [Apache Tomcat 9](https://tomcat.apache.org/download-90.cgi)

Como usuario `root` crearemos el usuario `tomcat` y el directorio donde se instalará el software.

```
useradd tomcat
mkdir -p /u01
chown tomcat:tomcat /u01
```

Instalaremos OpenJDK en el directorio `/u01/java`

```
su - tomcat
mkdir -p /u01/java
cd /u01/java
tar xzf openjdk-17_linux-x64_bin.tar.gz
ln -s jdk-17 latest
```

Procederemos a instalar Tomcat en el directorio `/u01/tomcat`

```
mkdir -p /u01/tomcat
cd /u01/tomcat
tar xzf apache-tomcat-9.0.54.tar.gz
ln -s apache-tomcat-9.0.54 latest
```

Siguiendo las recomendaciones del artículo, procederemos a separar los binarios de Tomcat de la configuración para que los futuros procesos de actualización sean más simples. Para esto crearemos un nuevo directorio que servirá como ubicación para `CATALINA_BASE` y en este copiaremos los archivos relevantes.

```
mkdir -p /u01/config/instance
cp -r /u01/tomcat/latest/conf /u01/config/instance
cp -r /u01/tomcat/latest/logs /u01/config/instance
cp -r /u01/tomcat/latest/temp /u01/config/instance
cp -r /u01/tomcat/latest/webapps /u01/config/instance
cp -r /u01/tomcat/latest/work /u01/config/instace
```

Agregaremos las siguientes líneas al archivo `/home/tomcat/.bash_profile`

```
export JAVA_HOME=/u01/java/latest
export CATALINA_HOME=/u01/tomcat/latest
export CATALINA_BASE=/u01/config/instance
```

Cerramos la sesión del usuario `tomcat` y la volvemos a iniciar para que tome los cambios en este archivo. Luego de esto ya podemos iniciar/detener Tomcat con los siguientes comandos (habiendo iniciado sesión con el usuario `tomcat`):

```
$CATALINA_HOME/bin/startup.sh
$CATALINA_HOME/bin/shutdown.sh
```

Si todo finalizó de manera correcta podemos ingresar al portal de Tomcat en `http://ip-servidor:8080/`.

En la próxima parte haremos la instalación de la base de datos.