teleren/devto huggingface dataset:
The Importance of Software Documentation and How to Create Effective Documentation
Published: 2023-02-07 05:00:00

Software documentation is a crucial part of the software development process. It provides information about the purpose, design, and use of a software system, and is used by developers, users, and other stakeholders. In this post, we'll take a look at the importance of software documentation and how to create effective documentation.

Why is software documentation important? 

It helps users understand how to use the software It helps developers understand the design and implementation of the software It helps maintainers understand the code and fix bugs It helps stakeholders understand the capabilities and limitations of the software 

How to create effective software documentation: 

Start early: Documentation should be a part of the software development process from the beginning, not an afterthought. 

Use a clear and consistent style: Documentation should be easy to read and understand. Use headings, bullet points, and other formatting techniques to make it easy to scan and digest. 

Use examples: Examples can be a powerful way to illustrate concepts and show how the software works. 

Keep it up to date: Documentation should be kept current as the software changes. Outdated documentation can be misleading and confusing. 

Conclusion

Software documentation is a crucial part of the software development process. It provides information about the purpose, design, and use of a software system, and is used by developers, users, and other stakeholders. By creating effective software documentation, you can ensure that your software is understood and used effectively by all stakeholders.
Improve FCP and LCP for Performance ReactJs
Tags: react, javascript, html, css
Published: 2023-02-07 04:56:55

Hii... I was working on an application but when I run an analyze page load I got a low score on FCP and LCP I need to improve those both to increase my app performance any suggestions/ideas to resolve the issue and improve the performance

My FCP score -- 3.0s
My LCP score -- 3.0s
I failed to print the consonants
Tags: beginners, programming, career, algorithms
Published: 2023-02-07 04:54:59

I recently had a coding challenge as part of a recruitment drive, and I was asked to write a program to print the number of consonants in a given string. I was confident in my abilities and decided to use my favourite programming language, Java, to solve the problem.

However, when I ran my code, I encountered an error. I was under a lot of pressure during the coding challenge and my confidence took a hit. I couldn't understand what I had done wrong. I felt embarrassed and ashamed of myself for not being able to solve what seemed like a simple problem.

After the coding challenge, I went home and revisited my code.

```java
public class Consonants {
    public static void main(String[] args) {

        Scanner input = new Scanner(System.in);
       
        System.out.println("Enter a string");
        String str = input.nextLine();
        int len = str.length();
        int count = 0;

        for (int i = 0; i < len; i++){

            char c =  Character.toLowerCase(str.charAt(i));
            if( c != 'a' ||
                    c != 'e' ||
                    c != 'i' ||
                    c != 'o' ||
                    c != 'u' ||
                    c != ' ' ){

                count++;
            }
        }
        System.out.println(count);
    }
}
```

That's when I realized that I had made a logical mistake in my `if` statement. Instead of using the `&&` operator, I used the `||` operator, which caused the program to always evaluate to `true`.

It was a frustrating experience, but I learned a valuable lesson. In high-pressure situations, our thinking can become more focused and narrow, and it can be difficult to see all the possibilities. That's why it's always a good idea to take a break, relax, and come back to the problem with a fresh mind.

I also learned the importance of double-checking my work and paying attention to details, especially in a coding challenge where mistakes can be costly. This experience has motivated me to keep practising and improving my coding skills so that I can perform better in future coding challenges.
Convert Monthly income into Hourly in JS
Tags: javascript, programming, webdev, tutorial
Published: 2023-02-07 04:48:14

JS code snippet... 

```js
const governmentTax = .20; // 20% Tax 
const monthlyIncome = 500; // put your amount here...

const weeksInMonth = 4;
const workingHours = 8;
const workingDays = 5;

const weeklyHours = workingHours * workingDays;
const monthlyHours = weeklyHours * weeksInMonth;

const afterTaxPay = monthlyIncome - (monthlyIncome * governmentTax);

const hourlyIncome = afterTaxPay / monthlyHours;

console.log('Your hourly income is: $' + hourlyIncome);

// Your hourly income is: $2.5
```
Vercel + Support Center = 🚀
Tags: vercel, devex, support, center
Published: 2023-07-08 07:44:50

---
title: Vercel + Support Center = 🚀
published: true
date: 2023-02-07 04:31:37 UTC
tags: vercel, devex, support, center
canonical_url: https://blog.okikio.dev/vercel-support-center
---

Support Center; my first major project at [**Vercel**](https://vercel.com) **,** it's been a blast working on it and it's now out. 🎉

Check it out [vercel.com/changelog/support-center](https://vercel.com/changelog/support-center)

> BTW, I joined **Vercel** 🎉 ~6 months ago...
> 
> ![Ta-da gif](https://cdn.hashnode.com/res/hashnode/image/upload/v1675656328514/3bcbb1fe-48bd-41b5-9ca0-b0740776eaab.gif)

Well anyway...

Support Center is a modern tool for viewing and communicating with Customer Support at Vercel. Built for enterprises to improve the customer support experience while retaining the practices and tools that the Customer Support Team at Vercel had built up over the years. From what customers and the Customer Support Team have told us we've achieved that goal.

For some background. Before Support Center, customers had to email support before they could get any help 😬, it was clunky and prone to _" **\*\*email got sent to spam errors"** _, and _" **\*\*I didn't check my email problems"** _, realizing that the experience wouldn't do, the dev team drafted up the idea to connect the current Salesforce based ticketing system with a UI/UX customers would enjoy.

The main hiccup we ran into during development was the excessively complex (and archaic) work of **integrating with Salesforce** and the performance of the support center, of which the solution is **caching** (the bane of all Software Engineers everywhere).

> 📚 **Fun fact** : Salesforces uses a SQL-like syntax for querying data that's similar to SQL but yet very far away from SQL, it's called [SOQL](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm), and working with it can be very frustrating

The problems boiled down to:

1. How do you keep the cache always up to date?

2. How to keep the support center fast, responsive, and reliable with the most up-to-date info?

3. How to make working with Salesforce easier?

The solution to the first 2 problems... 🥁 are **webhooks** of course.

In essence, whenever a change is made on Salesforce we call a webhook and have that webhook sync with a cache that we use for the support cases 🤯.

We can then expand how long the cache should securely hold case data, and add a cache warm-up for when on the main page.

The last issue was dealing with the complexity of working with Salesforce, we just powered through and though frustrating, I think the results are pretty fantastic.

![Preview image of Support Center and a demo support case](https://cdn.hashnode.com/res/hashnode/image/upload/v1675661452180/09676e71-e3ad-4293-a8bd-17fced1c8473.webp)

Working on this project was awesome, and I'm grateful for being able to work with such a capable team of designers & developers on this project.
904. Leetcode Solution in CPP
Published: 2023-02-07 03:56:42


==============================================================
#Description:
You are visiting a farm that has a single row of fruit trees arranged from left to right. The trees are represented by an integer array fruits where fruits[i] is the type of fruit the ith tree produces.

You want to collect as much fruit as possible. However, the owner has some strict rules that you must follow:

You only have two baskets, and each basket can only hold a single type of fruit. There is no limit on the amount of fruit each basket can hold.
Starting from any tree of your choice, you must pick exactly one fruit from every tree (including the start tree) while moving to the right. The picked fruits must fit in one of your baskets.
Once you reach a tree with fruit that cannot fit in your baskets, you must stop.
Given the integer array fruits, return the maximum number of fruits you can pick.

 

Example 1:

Input: fruits = [1,2,1]
Output: 3
Explanation: We can pick from all 3 trees.
Example 2:

Input: fruits = [0,1,2,2]
Output: 3
Explanation: We can pick from trees [1,2,2].
If we had started at the first tree, we would only pick from trees [0,1].
Example 3:

Input: fruits = [1,2,3,2,2]
Output: 4
Explanation: We can pick from trees [2,3,2,2].
If we had started at the first tree, we would only pick from trees [1,2].
 

Constraints:

1 <= fruits.length <= 105
0 <= fruits[i] < fruits.length
==============================================================
#Solution:

```cpp
class Solution {
 public:
  int totalFruit(vector<int>& tree) {
    int ans = 0;
    unordered_map<int, int> count;

    for (int l = 0, r = 0; r < tree.size(); ++r) {
      ++count[tree[r]];
      while (count.size() > 2) {
        if (--count[tree[l]] == 0)
          count.erase(tree[l]);
        ++l;
      }
      ans = max(ans, r - l + 1);
    }

    return ans;
  }
};

```
#leetcode
#challenge 
Here is the link for the problem:
https://leetcode.com/problems/fruit-into-baskets/
Development & Security's Arduous Path to Elevated Trust
Tags: security, testing, tooling
Published: 2023-02-07 04:12:24

It’s 2023. Threats aren’t just a consideration, they are a priority in the software industry. As a result, Product Engineering and DevOps teams have taken a more proactive role in the prevention of vulnerabilities. There is nothing more embarrassing to a developer than finding out your luxury home is actually a house of cards in front of stakeholders due to a bug that could have easily been detected with a testing tool.

Luckily, for everyone involved, we have the technology today to find potentially harmful coding errors before they can cause harm. But that hasn’t always been the case.

([More](https://www.true-positives.com/post/development-security-past-and-present-paths-to-trust-assurance)))
Free & Easy Security Smoke Testing with OWASP PTK
Tags: security, testing, opensource, news
Published: 2023-02-07 04:05:11


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ysk4zwdyufz1v4yz3nv5.png)

Learn about a free, open-source tool capable of bringing a genuine "Shift Left" experience to security and development. Delivered by allowing security testing to occur more effortlessly by negating the need to configure a third-party tool or worry about connectivity and proxy issues.(https://www.true-positives.com/post/the-next-evolution-of-browser-based-penetration-testing-kits-owasp-ptk)
Tests are a business investment
Published: 2023-02-07 04:01:03

Tests are a _business_ investment, of tech resources, to create _business_ value.

It's good to study the [Testing Pyramid](https://martinfowler.com/articles/practical-test-pyramid.htm). High level tests are slow and brittle, but connect the low-level code to business features. We can discuss their value with the business. Unit tests are fast and detail oriented -- I write a ton of these. Integration tests are useful to bring multiple modules together and check they work as expected.

In practice I write 1-2 high level tests (generally end to end, sometimes UI, or API/integration tests) to help focus development and have something that the business understands. Integration tests are great to iterate on, so that new code and tests actually work with real APIs correctly.

All tests are valuable. They are a high-level specification of the code. They "smooth the path forward" for the low-level implementation. Tests are not a tax, they are a way to think about the work and ensure it acts exactly as needed, no more.

Tests are not free. However they create a lot of value -- they create (business and tech) _confidence_ that the system is working as expected. Tests assist refactoring, which makes the code much cheaper and easier to work with.

(disclaimer: writing a book about tech feedback loops, e.g. tests)


adapted from https://news.ycombinator.com/item?id=34469416
CLI Client for ReductStore v0.6.0 has been released
Tags: news, database, tooling, reductstore
Published: 2023-02-07 03:28:31


Hello everyone,

We're excited to announce the release of [version 0.6.0 of the Reduct CLI](https://github.com/reductstore/reduct-cli/releases/tag/v0.6.0)! This release brings a number of new features for working with the new [ReductStore API v1.3](https://docs.reduct.store/http-api).

<!--more-->

### File Extensions for Export

Now the CLI client tries to guess the file extension for exported files based on the MIME type of the record.
You can also specify the file extension explicitly using the `--ext` option:

```
rcli export folder server_1/bucket_1 . --ext jpeg
```

### Filter by Labels

During the export to another ReductStore instance or a filesystem, you can filter entries by labels using the `--exclude` and `--include` options:

```
rcli export bucket server_1/bucket_1 server_2/bucket_1 --include animal=cat --exclude color=red
```

For more information, see the [documentation](https://cli.reduct.store/en/latest/docs/export/).


if you have any questions or feedback, don't hesitate to reach out in [Discord](https://discord.gg/8wPtPGJYsn)
or by opening a discussion on [GitHub](https://github.com/reductstore/reductstore/discussions).

Thanks for using [ReductStore](https://www.reduct.store)!
O que é Bug Tracking?
Tags: veracode, beginners, tutorial, security
Published: 2023-02-07 03:00:00

Bug tracking é um processo utilizado para identificar, registrar, acompanhar e resolver erros (conhecidos como "bugs") em software ou sistemas. O objetivo é identificar e corrigir problemas o mais rapidamente possível para melhorar a qualidade do software ou sistema e evitar que os erros causem problemas para os usuários.

O processo de bug tracking geralmente envolve a criação de um registro de erro, que é gerenciado por uma equipe de desenvolvimento de software. Cada registro de erro inclui informações sobre a natureza do problema, sua origem, prioridade, status e outras informações relevantes. A equipe de desenvolvimento usa essas informações para reproduzir e corrigir os erros.

Existem várias ferramentas de bug tracking disponíveis, como sistemas de gerenciamento de projetos de software, ferramentas de colaboração em equipe e sistemas de gerenciamento de erros personalizados. Essas ferramentas permitem aos desenvolvedores e equipes de teste monitorar e gerenciar erros de forma eficiente, o que ajuda a melhorar a qualidade do software ou sistema e a aumentar a satisfação dos usuários.

**É possível integrar Veracode com uma ferramenta de Bug Tracking?**
Sim, é possível integrar o Veracode com uma ferramenta de bug tracking. 
Essa integração permite que os erros identificados pelo Veracode sejam automaticamente reportados e gerenciados em uma ferramenta de bug tracking, o que agiliza o processo de correção.

A integração permite que a equipe de desenvolvimento obtenha uma visão completa da segurança do código e possa trabalhar de forma mais eficiente para corrigir problemas de segurança. Além disso, a integração ajuda a garantir que todos os problemas de segurança sejam registrados e priorizados corretamente, o que pode ajudar a proteger a aplicação contra possíveis vulnerabilidades.

A Veracode oferece integrações com várias ferramentas de bug tracking, incluindo [JIRA](https://dev.to/m3corp/importando-resultados-no-jira-cloud-5db6), Microsoft Visual Studio Team Foundation Server (TFS), [Azure DevOps](https://dev.to/m3corp/importacao-de-falhas-para-o-azure-boards-3013), entre outras. A equipe de desenvolvimento pode escolher a ferramenta de bug tracking que melhor atenda às suas necessidades e integrar o Veracode com ela para aproveitar ao máximo a integração.

Para saber mais sobre a Veracode e solicitar um ambiente de testes, entre em [contato](https://www.m3corp.com.br/contato/).
When web meets app. Progressive Web App (PWA), the best of both worlds📲
Tags: pwa, webdev, serviceworker, mobile
Published: 2023-02-07 02:59:43

Progressive Web Apps (PWA) are a new approach to web development that offers the best of both worlds: the accessibility and speed of a traditional website, combined with the functionality and user experience of a native mobile app.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rksyo9nxvypr5u6b8ngn.gif)


At its core, a PWA is just a website that is optimised for mobile devices and designed to work offline. It uses modern web technologies, such as service workers and web manifest files, to provide a seamless and fast user experience, even when the user is not connected to the internet.


PWAs offer several benefits over traditional websites and native mobile apps. For example, they are much easier and faster to develop and deploy, since they don't require approval from app stores or complex installation processes. They also offer a more seamless user experience, since they can be installed directly from the web browser and launched from the home screen like any other app.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dqx6m1c0mg5jf65fpvbn.gif)

Another important advantage of PWAs is that they are more accessible and discoverable, since they can be easily indexed by search engines and shared via links. This makes them a great option for businesses that want to reach a large and diverse audience, without having to worry about the limitations and restrictions of app stores.



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bgfbal897fsw08nivgxw.gif)


In conclusion, PWAs represent a new and exciting frontier in web development, offering a way to create fast, functional, and accessible web-based applications that deliver a truly native-like experience to users. If you're looking to build a new web application, or if you're interested in modernising an existing one, then PWAs are definitely worth considering. 

That's a wrap for my first article. If you like this kind of content do give it some love ❤️

Cheers! ✌️
The Joy of React
Published: 2023-02-07 02:58:42

Platform Renders:
- `react-dom` for the web
- `react-native` for mobile (iOS / Android) or desktop (Windows / MacOS) applications
- `react-three-fiber` for 3D scenes using WebGL and Three.js

Steps in render function:
- create a DOM element
- update properties
- put it in the container

- We can only use JS expressions inside the {}
"Features of Data Lake Federated Analysis"_Apache Doris Summit 2022
Tags: database, bigdata, datalake, opensource
Published: 2023-02-07 02:11:20

Relying on parallel processing and high-performance operators, Apache Doris can provide a sub-second level query on massive datasets. Users today began to build data storage architecture based on features of data lake. In this lecture, you will get the basic idea of how to build a data lake with Apache Doris.(Contact US: support@selectdb.com)

Apache Doris is a real-time analytical database based on MPP architecture, known for its high performance and ease of use. It supports both high-concurrency point queries and high-throughput complex analysis. (https://github.com/apache/doris)

SelectDB is a cloud-native real-time data warehouse developed based on the Apache Doris open source project by the same key developers. The SelectDB company focuses on the enterprise-grade cloud-native distribution for Apache Doris. (Contact US: support@selectdb.com)

Follow us:
https://linktr.ee/apachedoris

Apache Doris @GitHub
https://github.com/apache/doris

Apache Doris Website
https://doris.apache.org/

Apache Doris @ Twitter
https://twitter.com/doris_apache

Apache Doris @ Medium
https://medium.com/@ApacheDoris

Apache Doris @ Dev.to
https://dev.to/apachedoris

Apache Doris @ Reddit
https://www.reddit.com/user/ApacheDoris

SelectDB Website
https://en.selectdb.com/

SelectDB @ Twitter
https://twitter.com/Select_DB

SelectDB @ Reddit
https://www.reddit.com/user/SelectDB

SelectDB @ Dev.to
https://dev.to/selectdb
Como desplegar una app React en Firebase
Published: 2023-02-07 02:06:23

En esta ocasión aprenderemos a desplegar nuestra aplicación web a los servidores de google mediante Firebase, una tarea, dejame decirte, bastante sencilla. Bien, sin más dilación comencemos.

Deploy
Lo primero que debemos hacer es registrar nuestra aplicación en Firebase. Para ello haremos uso de la consola.

source: imgur.com

En este caso como la aplicación la cual queremos desplegar es una aplicación web seleccionamos la plataforma web.

source: imgur.com

Vamos a seleccionar la opción de Hosting en el menú lateral izquierdo.

source: imgur.com

Procedemos a instalar el CLI de Firebase

npm install -g firebase-tools
Es probable que necesites ejecutar el comando como administrador.

El siguiente paso será situarnos en la carpeta de nuestro proyecto, autenticarnos e inicializarlo.

firebase login
firebase init
source: imgur.com

Seleccionamos la opción Hosting y Seleccionamos el proyecto Firebase al cual queremos asociar nuestra aplicación.

En el apartado What do you want to use as your public directory? debemos indicar nuestro directorio público. Para un proyecto, por ejemplo, en vue será la carpeta dist, o el archivo index.html.

Una vez hayamos inicializado firebase el siguiente paso será realizar el deploy. Para ello ejecutamos el siguiente comando.

Si tu proyecto es utilizando Vue antes de realizar el deploy es necesario volver a compilar.

firebase deploy
Si no hubo ningún error debemos obtener como salida la url de nuestro proyecto ya en línea.