teleren/devto huggingface dataset:
How to do efficient QA when hotfixes alter your test plan and sprint
Tags: hotfixes, testing, qa, scrum
Published: 2022-01-04 14:53:33

“How to adopt & do efficient QA in a situation when hotfixes alter your test plan and Sprint?” — that’s an interesting question we found in a [r/softwaretestingtalks](https://www.reddit.com/r/softwaretestingtalks/) community.

You can see how our CSO [Paul Elsner](https://www.linkedin.com/in/paul-elsner-b0b8b9a5/) is answering it on our [Youtube channel](https://youtu.be/oFWXgItae00) or continue reading this article to learn the main points of his answer.

So, a hotfix is a term used for a critical fix deployed on production to patch the client business issue.

## What does a typical hotfix test and release look like?
Hotfix test and release process are composed of the following steps:

1. The customer reports the issue.
2. The Dev & QA Team checks whether it’s a valid issue or not.
3. Product Owner creates a ticket in case of a valid issue.
4. The developer starts working on the reported issue and deploys its fix on the QA/Staging Environment.
5. QA team starts testing the fix and executes various necessary regression tests to check its impact on the SUT (Software Under Test).
6. DevOps deploys the Hotfix to production after getting the “Green Go” signal from the QA.
7. QA tests the fix on production

## So, how does the development and QA of hotfix fit in the running sprint?

One basic rule of scrum is not to take any new or additional tickets that can be impacting the sprint goal. Thus, all the nice-to-have features are parked for the next sprints and not considered in the ongoing Sprint.

Any newly created ticket during the Sprint is marked as a **backlog**. A hotfix has become common in the Agile methodology due to the tight deadlines and continuously changing requirements in functionality. The business flow issues are an exception to this rule and become **priority #1** in the running Sprint.

## Let’s take a quick look at the operationalizing hotfix best QA practices

Would you deploy any code without a QA process? Of course, No. Follow the same Development and QA practices on a smaller and faster scale for hotfixes.

- Define the scope of the Hotfix.
- Determine timelines for the code fix, testing, and deployment.
- Have an automated CI/CD process with Unit Tests, Integration Tests, Automated Regression Tests.
- Perform the exploratory testing by QA.

Hotfixes should not be frightful or painful experiences for QA teams in the sprints. Instead, Hotfixes can be a **learning experience** that helps the QA to prevent future emergencies by having some common-sense barriers and procedures.

So, stay calm and let Hotfix endure in your sprints and test planning. Proper designed automated tests will reduce the testing effort of the QA Team, and hotfixes can be deployed in the production with full confidence.

What’s your experience with altering sprints? Share your experience in a [r/softwaretestingtalks](https://www.reddit.com/r/softwaretestingtalks/) community.
Need help with an api display problem between child element of a parent element
Published: 2022-01-04 14:43:39

hello I am on a project in react js. I would like to display the data of an API.
I managed to display the name of the parent table but I am unable to display the data of the child table which is in the parent table.
Could you help me please ?

Voici mon code :

import './Indicateur.css';
import React, { Component } from 'react';


class Indicateur extends Component {
    constructor(props){
        super(props);
        this.state = { getEmissionsPerDistance: [] };
    }

    componentDidMount(){
        fetch('https://api.monimpacttransport.fr/beta/getEmissionsPerDistance?km=10')
        .then((response) => response.json())
        .then((data) => {
            console.log(data);
            this.setState({
                getEmissionsPerDistance: data
            });
        })
        .catch((error) => console.log(error));
    }

    render(){
        return (
            <div className="indiceMain">
                <h1>Indicateurs</h1>
                <div className="indiceName">
                    {this.state.getEmissionsPerDistance.map((emission) => (
                    <h2 className="names">{emission.name}</h2>
                ))}
                </div>


            </div>
        )
    }
}

export default Indicateur;







![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pz50kp2vgk2g02a82g4f.jpg)
Find Median Of Two Sorted Arrays – LeetCode Solutions
Tags: leetcode, medianoftwosortedarrays, python, datastructures
Published: 2022-01-04 14:41:48

LeetCode has a hard coding Problem in Its’ Algorithm Section: “Find Median Of Two Sorted Arrays”. Today We are going to solve this problem. LeetCode Link of the Problem is HERE


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d2l51en4tkp4xspuwyn8.jpg)
Question
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays.

The overall run time complexity should be O(log (m+n)).


 
Example 1: Input: nums1 = [1,3], nums2 = [2] Output: 2.00000
Explanation: merged array = [1,2,3] and median is 2.

Example 2: Input: nums1 = [1,2], nums2 = [3,4] Output: 2.50000
Explanation: merged array = [1,2,3,4] and median is (2 + 3) / 2 = 2.5.

Conditions
nums1.length == m
nums2.length == n
0 <= m <= 1000
0 <= n <= 1000
1 <= m + n <= 2000
-106 <= nums1[i], nums2[i] <= 106
Solution to “Find Median Of Two Sorted Arrays“
The Skeleton Code Given by LeetCode:

class Solution(object):
    def findMedianSortedArrays(self, nums1, nums2):
        """
        :type nums1: List[int]
        :type nums2: List[int]
        :rtype: float
        """
Firstly...

To get the solution visit https://hecodesit.com/find-median-of-two-sorted-arrays-leetcode-solutions/
Fundamentos de TypeScript 🦆| #2: Tipos de datos primitivos y especiales
Tags: spanish, typescript, beginners, webdev
Published: 2022-01-04 14:39:49

## **Sintaxis de tipado fuerte**
Para poder escribir código con tipado fuerte se usa la siguiente sintaxis:

```js
let nombreVariable: tipoVariable = valorVariable;
```

> *Puedes usar `const` también.*

## **Tipos de datos primitivos**
TypeScript presenta los siguientes tipos de datos:

### **`string`**

```ts
const nombre:string = "Cristian";
```

### **`number`**
```ts
const edad:number= 25;
```

### **`boolean`**
```ts
const isSoltero:boolean= true;
```

### **`undefined`**
```ts
const u:undefined = undefined;
```

### **`null`**
```ts
const n:null= null;
```

## **Tipos de datos especiales**
TypeScript presenta los siguientes tipos de datos especiales:

### **`any`**
Útil para declarar variables que a priori no sabemos de qué tipo es o será. Por ejemplo cuando consultamos una API. Se recomienda solo usarla cuando sea estrictamente necesario.

```ts
const pais:any= "Bolivia";
```

### **`void`**
Útil para indicar que una función no regresa ningún tipo de dato.

```ts
function mostrarMensaje(mensaje:string):void{
   console.log(mensaje);
}
```
Esta función no tiene ninguna declaración `return` en su cuerpo, por ellos mismo es idóneo usar el tipo de dato `void` para indicar esto mismo.

> *Veremos funciones a profundidad en posteriores posts.*

### **`never`**
Representa el tipo de valor que nunca ocurren. Poco usado en la práctica. Por ejemplo una función que siempre regresa un error.

```ts
function error(mensaje: string): never {
    throw new Error(mensaje);
}
```

## **Conclusiones**
- TypeScript presenta varios tipos de datos como `string`, `number`, `boolean`, `null`, `undefined`, `any`, `never`, `void`, etc.
- La sintaxis es muy clara e intuitiva.

## **Referencias**
{% youtube BwuLxPH8IDs&t=2487s %}
Introducing TechCommunityCalendar.com
Tags: community, devrel, opensource, techtalks
Published: 2022-01-04 14:34:13

I've been in DevRel for a couple of months now and something that struck me was the lack of a central place to go to find a calendar of events in the tech community. Don't get me wrong, there are a few places that list _some_ types of events but I wanted somewhere that listed the following..

- Conferences 
- Hackathons 
- Call for papers
- Meetups
- and Online website events 

All in one place!

So I set about creating one.

[www.TechCommunityCalendar.com](https://www.TechCommunityCalendar.com) is designed to be a central location where events that the tech community may be interested in can be listed and viewed.

It is quite crude at the moment, but I am a big believer of getting your V1 live to start getting feedback from users to incrementally improve it.

Think it could be better? It will shortly be opensource on GitHub so that you can help improve it yourself.

Many thanks to [Avanade](https://www.avanade.com) for helping support the project. Without their commitment to giving back to the technical community, I don't think this would have been possible and i'm proud that this is one of the first initiatives i've been involved with since becoming DevRel Lead @ Avanade.

Follow me on Twitter for more information on this project and others like it [@LeeEnglestone](https://twitter.com/LeeEnglestone)

![Tech Community Calendar](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jx78sy0vho3m9zym224n.png)

-- Lee
Changing copier template strings (_endops)
Tags: python, bash, todayilearned
Published: 2022-01-04 14:31:12

---
canonical_url: https://waylonwalker.com/til/copier_endops/
cover_image: https://images.waylonwalker.com/til/copier_endops.png

published: true
tags:
- python
- bash
- til
title: Changing copier template strings (_endops)
series: til
---

I'm on a journey to template out all the boilerplate files in my life and I am currently playing with copier to see if it fits these needs

I was completely stuck for awhile.  copier was not replacing my template variables.  I found out that adding all these `_endops` fixed it.  Now It will support all of these types of variable wrappers

``` yaml
# copier.yml
_templates_suffix: .jinja
_envops:
  block_end_string: "%}"
  block_start_string: "{%"
  comment_end_string: "#}"
  comment_start_string: "{#"
  keep_trailing_newline: true
  variable_end_string: "}}"
  variable_start_string: "{{"
```

> !RTFM: Later I read the docs and realized that copier defaults to using `[[` and `]]` for its templates unlike other tools like jinja or cookiecutter.

---

This is a TIL, it will likely play a small role in a larger post later.
e-commerce website
Tags: atlashackathon
Published: 2022-01-04 13:43:07

[Instructions]: # (To submit to the MongoDB Atlas Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
[Note]: # (Please make sure the project links to the appropriate GitHub repository, and includes the [Apache-2 permissive license](https://www.apache.org/licenses/LICENSE-2.0)  and README.)
We tried our best to utilize MongoDB and also implement payment gateway integration. We learned many things through out the development.
- [Backend Repository](https://github.com/harikanani/e-commerce-mongodb-hackathon)
- [Frontend Repository](https://github.com/harikanani/e-commerce-frontend-mongodb-hackathon)



### Submission Category: 

[Note]: # (E-Commerce Creation, Prime Time, Action Star, Automation Innovation, or Choose Your Own Adventure)

- E-Commerce Creation

We have tried to build an e-commerce website but we may not completed all the requirements for e-commerce creation. we have added stripe payment gateway integration.

### Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)
{% github https://github.com/harikanani/e-commerce %}
{% github https://github.com/harikanani/e-commerce-frontend %}

### Additional Resources / Info



#### Screen shorts
![product-page](https://user-images.githubusercontent.com/54361799/148067800-7a867909-a8d4-45b9-a069-1d7ec1b99b64.jpg)
![homepage-ecommerce](https://user-images.githubusercontent.com/54361799/148067801-bbe7caa2-6cce-476f-81c5-bb901f73d756.jpg)
![cart](https://user-images.githubusercontent.com/54361799/148067861-010748fc-be22-4896-a04b-5f472e619c9c.jpg)

![payment](https://user-images.githubusercontent.com/54361799/148067813-0df4de30-46a8-4ac4-b74a-ece919a67694.jpg)



#### demo video
{% youtube https://youtu.be/rEYwbyVBZn8 %}


### Collaborators
@abhigoyani
How do you get free amount of RAM memory Mac has using Scala
Tags: macos, mem, sbt, scala
Published: 2022-01-04 13:37:09

## What ?

A simple Scala program to get the RAM available on a Mac

## Why ?

Because I want to check from SBT if there is enough available RAM memory to run certain compilation options and I would like to share with others

## How ?

Just go to https://github.com/csaltos/mem-on-mac-scala/blob/main/MemOnMac.scala and copy paste the code, you can use it as bytes or gigabytes.
linux commands🐧
Published: 2022-01-04 13:34:58

# Types of shells
* Bourne shell (sh shell)
* C shell (csh shell)
* Z shell (zsh shell)
* Bourne again shell (bash shell)

# linux commands

### basic commands
1. `echo` - print a string
2. `ls` - list files in a directory
3. `cd` - change directory
4. `pwd` - print working directory
5. `mkdir` - make a directory
6. `rmdir` - remove a directory
7. `rm` - remove a file
8. `cp` - copy a file
9. `mv` - move a file
10. `cat` - concatenate files and print on the standard output
11. `grep` - search for a pattern in a file

### User accounts
1. `whoami` - print the name of the current user
2. `id` - print the user ID of the current user
3. `sudo` - run a command as root
4. `su` - run a command as another user

### Download files
1. `curl <url>` - download a file from the internet
2. `wget <url>` - download a file from the internet


### Check OS version
1. `uname -a` - print operating system information
2. `lsb_release -a` - print operating system information

# Package managers
RPM: Red Hat Package Manager

1. `rpm -i <package>` - install a package
2. `rpm -e <package>` - remove a package
3. `rpm -q <package>` - query a package

YUM: Yum Package Manager
1. `yum install <package>` - install a package
2. `yum remove <package>` - remove a package
3. `yum list <package>` - query a package
4. `yum repolist` - list available repositories

# Services
1. `service <service> start` - start a service
2. `systemctl start <service>` - start a service
3. `systemctl stop <service>` - stop a service
4. `systemctl status <service>` - check the status of a service
5. `systemctl enable <service>` - enable a service to start at boot
6. `systemctl disable <service>` - disable a service to start at boot


# VI editor
1. `vi <file>` - open a file in vi editor
2. to switch to insert mode: `i`
3. to switch to command mode: `esc`
4. to switch to visual mode: `v`
5. to switch to replace mode: `r`
6. to delete a character: `x`
7. to delete a line: `dd`
8. to delete a word: `dw`
9. to copy a line: `yy`
10. to paste a line: `p`
11. to save a file: `:wq`
12. to quit vi: `:q`
13. to quit vi without saving: `:wq!`
14. to quit vi and exit: `:q!`

# Networking
1. `ifconfig` - print network interface configuration
2. `route` - print routing table
3. `netstat` - print network statistics
4. `ping <host>` - send ICMP echo request to a host
5. `traceroute <host>` - trace the route to a host
6. `dig <host>` - query DNS information
7. `nslookup <host>` - query DNS information
8. `nmap <host>` - scan a network
9. `ss` - print network statistics

# Routing
1. `route add -net <network> <gateway>` - add a route
2. `route del -net <network>` - delete a route
3. `route add -host <host> <gateway>` - add a route
Beware mutation
Tags: mutation, programming, bug, distributedsystems
Published: 2022-01-04 13:34:40

Can you spot the problem here?

```javascript
let sum = 0;
for (i = 0; i < 10; i++) {
  setTimeout(() => (sum += i), 100);
}
setTimeout(() => console.log(sum), 1000);
```

It's supposed to print the sum of 0 to 9, but instead it's printing 100.

Well, it's not an exclusivity of Javascript. Have a look at this Go piece of code:

```go
package main

import (
	"fmt"
	"sync"
	"time"
)

func main() {
	sum := 0
	var wg sync.WaitGroup
	for i := 0; i < 10; i++ {
		wg.Add(1)
		go func() {
			time.Sleep(100)
			sum += i
			wg.Done()
		}()
	}
	wg.Wait()
	fmt.Println(sum)
}
```

The same "unexpected" behavior! And it's the case for many other programming languages, give it a try with your favorite one.

Have you already grasped what's happening here? You may have already identified the issue, but in case not, try to think a little bit before proceeding if you like to solve this kind of thing.

## Unexpected 100?

Is it really unexpected? It's not, but sometimes it plays a trick on us!

If you didn't grasp what's happening here yet, let me show you. The for loop uses a variable `i` that increases by 1 until it reaches 10. The loop code block is using the value of the variable to increase the `sum`, however, it's being done asynchrounously, turning it into a recipe for disaster. The code block has a sleep call, and since the loop goes much faster, by the time the variable `sum` is increased the variable `i` got mutated and is now storing the last value: `10`. This value is then summed up 10 times.

## Beware mutation

This is never a problem when you have synchronous code, but the moment parallelism is introduced it starts behaving unexpectedly. Even worse if it has to do with concurrency, because that's when race conditions come to bite us.

## An easy fix

Don't fear! It's quite easy to fix this kind of thing:

```javascript
let sum = 0;
for (i = 0; i < 10; i++) {
  const value = i;
  setTimeout(() => (sum += value), 100);
}
setTimeout(() => console.log(sum), 1000);
```

```go
package main

import (
	"fmt"
	"sync"
	"time"
)

func main() {
	sum := 0
	var wg sync.WaitGroup
	for i := 0; i < 10; i++ {
		value := i
		wg.Add(1)
		go func() {
			time.Sleep(100)
			sum += value
			wg.Done()
		}()
	}
	wg.Wait()
	fmt.Println(sum)
}
```

A simple local variable will suffice to avoid the problem of sharing a mutable variable since now every block will have a copy of the value itself.

## Concluding

My previous example is a silly case. Who wants to sum the loop counter, right? But it's not so uncommon to see code written like this:

```go
for i := 0; i < 100; i++ {
	go func() {
		sendEmail(users[i])
	}
}
```

You can change the `sendEmail` by any other function call doing I/O that you'd like to do in parallel to make it more efficient, and this is not the most idiomatic Go code but translates well to other programming languages, which makes it perfect to illustrate the issue.
How do you get total amount of RAM memory Linux has using Scala
Tags: scala, runtime, mem, memory
Published: 2022-01-04 13:24:41

## What ?

A simple Scala program to get the total RAM on a Linux machine

## Why ?

Because I want to check from SBT if there is enough total RAM memory to run certain compilation options and I would like to share with others

## How ?

Just go to https://github.com/csaltos/mem-on-linux-scala/blob/main/MemOnLinux.scala and copy paste the code, you can use it as bytes or gigabytes or filter for other memory options like memory free or available memory.
Cloud Migration for Integration Software
Tags: webmethods, esb, integration
Published: 2022-01-12 11:41:22

---
title: Cloud Migration for Integration Software
published: true
date: 2022-01-04 13:22:17 UTC
tags: webmethods, esb, integration
canonical_url: https://tech.forums.softwareag.com/t/cloud-migration-for-integration-software/254280
---

## Introduction

To open the topic, let’s look at a few interesting numbers. Gartner has followed IT markets for many years and predicts a doubling of the number of organizations using cloud services between 2018 and 2022. The total amount of money spent on cloud services is also set to double in the same period to almost €300 billion per year. Yet moving to the cloud brings its challenges. When questioned a couple of years ago by KPMG, 54% of CIOs said that integration with the existing landscape was the biggest barrier to cloud adoption. McKinsey recently asked CIOs about their IT modernization projects, where cloud plays a major part. They found that 80% of such projects have not brought the agility or business benefits that were expected. So, if shifting to the cloud is so difficult, why are companies doing it? And how can they ensure a greater chance of success?

Learn the answer these questions and read all about Cloud Migration Drivers, the different paths to the cloud, the role of the integrations, and more in the [original article](https://tech.forums.softwareag.com/t/cloud-migration-for-integration-software/254280) in the Software AG Tech Community!
vitest + mocks = 💪 superpower
Tags: vite, vitest, testing, react
Published: 2022-01-04 12:45:10

Previously, we discovered how powerful vitest can be when used with vite.
Using mocks gives us the flexibility to simulate, develop, test, and refine use cases quickly and easily. 
For mocking behavior in development and API integration I will use MSW.
For simple function business logic, I will demonstrate vitest mocking function.

Full code - https://github.com/yanirmanor/vite-test-vitest

For a simple function mock you will use ``` vi.fn() ```
then you have all kinds of functions that you can use and control the mock. The most popular I think is mockReturnValue for mocking the return value or mockImplementation for mocking the function implementation.

examples:
``` 
  vi.fn().mockReturnValue(23)
  expect(mockFnOverrideValue()).toBe(23) 
```

``` 
const mockFnGetSum = 
  vi.fn().mockImplementation(sum => sum * 3.14)
  const total = mockFnGetSum(100)
  expect(total).toBe(314) 
```

Nice. now I will show how you can use MSW for development and testing.
First install msw - ``` pnpm install msw --save-dev ```
then run ``` pnpx  msw init public/ --save ```
In development - I created a vite .env variables VITE_MOCKING and set it to be true.
in the app.jsx I added an if statement, then you need to create and handlers a set of request mock.
you need to set the handlers array inside setupWorker and make it start.
you can open the network tab inside the chrome devtools 
and look for the service worker in the response header.
also, you will see in devtools console - [MSW] Mocking enabled

``` 
if (import.meta.env.VITE_MOCKING === true) {
  const handlers = [
    rest.get('https://randomuser.me/api/', (req, res, ctx) => {
      return res(
        ctx.delay(1000),
        ctx.status(202, 'Mocked status'),
        ctx.json({
          results: [
            {
              name: {
                first: 'John',
                last: 'Doe'
              }
            }
          ]
        })
      )
    })
  ]

  const worker = setupWorker(...handlers)
  worker.start()
}
```

We have almost done.
this technique is similar for testing.
instead of using serviceWorker we will replace it with setupServer
and start this node server to run by listen() before all tests
, after all, we call close and finally on after each test we will reset 

```
const server = setupServer(...restHandlers)

// Start server before all tests
beforeAll(() => server.listen({ onUnhandledRequest: 'error' }))

//  Close server after all tests
afterAll(() => server.close())

// Reset handlers after each test `important for test isolation`
afterEach(() => server.resetHandlers())
```

With this approach, your tests will be cleaner and more readable, and your software will be developed more quickly.
Enjoy 😎
One of the best Poster maker app
Tags: python, webdev, css, career
Published: 2022-01-04 12:39:13

Make stunning poster designs in minutes for any event, restaurant,  business, and more with the **[Poster maker app](https://posterapplab.com/)**. Creating personalized posters for free is easy now. Do
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6bx14sskn2ryqdl7yhyr.jpg)wnload the app from either Play Store or App Store.