teleren/devto huggingface dataset:
How to test new microservice APIs - (Monolith to Microservice)
Tags: microservices, webdev, testing
Published: 2023-02-02 05:11:55

This article will cover on a interesting approach to test newly build microservice APIs. Assuming that we are building a new microservice breaking an old monolith application that is already in production and used by end users.

## Debrief
We had a very large monolith and had to break them into multiple microservices. This was easy due to the [TDD](https://dev.to/vishesh/technical-design-document-microservice-200g) practice. The problem was on deciding the release process. How will you release the microservice APIs without affecting the end users and also test then thoroughly.

- Release and test gradually and not at once
- Need a way to test the new microservice APIs before releasing
- Foresee any issues early before actual release

## Proposed solution
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4f6cuoq9zl5tzcd2x1er.png)

Below is the list of steps how the experiment should work:

- Frontend calls the new monolith API.
- In backend, the **API middleware** is triggered. The middle ware will as usual send pass the request to the controller.
- The controller performs the operations and returns the response to the middleware.
- The middleware here will return the response to frontend. **Thus causing no delays to the frontend.**
- In background the middle ware will do the following.
  - A **random percentage** is calculated. Ex: 3
  - This random percentage is compared with the **release percentage** set either as an environment variable or any flags like LaunchDarkly. **Hence if release percentage is set to 5 then there only 5% of chance that the process continues.**
  - If the above condition matches, then call the microservice API.
  - Compare and log the API processing time and response.

We can gradually increase the release percentage whenever there are no issues with monolith and microservice API responses. Ex: start with 5 then increase to 25, then to 50, then to 75 and finally to 100.

Using this setup without even affecting existing monolith API you can test the new microservice API. This will be most effective on APIs that are very sensitive, like billing or most used, like getting main job list.

## Conclusion
Once the test succeeds and at 100% you are not receiving any issues. Then you can disable this experiment & monolith APIs and directly enable the microservice APIs.
Software Engineering Entrepreneurship » Issue 1 » Ice breaker
Tags: productivity, architecture, startup, career
Published: 2023-02-02 04:28:22

```yaml
Edition: Feb. 2023
Issue: 1
Dates covered: Feb. 1
Subject: Ice breaker
```

## What you're probably feeling right now

I'd like to answer 2 questions that are probably going through your mind:

1. "Will reading this help me personally?"
1. "If yes, who are you?"

---

## What I can offer you

In this first edition of Software Engineering Entrepreneurship I will take you through the journey of laying the groundwork for an ambiguous future as a technology leader. I will define and implement the infrastructure and sample app of a company that's built to scale, fail fast (iterate) and provide a secure, reliable product to thousands of users.

---

## Who is this targeted to?

Continue reading if this is you: 

"I will start a tech. company of my own one day!"

With that, the important note here is that I will be speaking in the shoes of a Software Engineer-by-day. Yet, the topics covered would be considered advanced for any Engineer. At larger companies, part of what I'll cover would even fall under separate teams such as IT or DevOps.

---

## "Okay, I'm sold. Now who are you?"

Hey that's super awesome! If you're seriously up for following along, I would love to hear your takeaways along the way. Please comment or reach out at any time.

I am happy to introduce myself. I am Morgan Wowk from the giant multi-biome land of Canada 🇨🇦. Originally from the fields of endless wheat and now on the West Coast taking a bath. I have worked in e-commerce for nearly 7 years and have been at a company **[Bold Commerce](https://www.linkedin.com/company/boldcommerce/)** the whole way through - proudly cutting the taboo about staying at one place too long 😏.

---

## Format and schedule

I won't promise a detailed tutorial as we take this journey.

Instead, I will promise learning advice, decisions, discoveries, successes and an inspirational perspective on how you can do more to unlock a life as the founder of your dream technology company.

I am so excited to share updates with you **every Thursday** throughout February 2023 with the occasional bonus days.

---

## Continue reading

{% embed https://dev.to/morganw/software-engineering-entrepreneurship-issue-2-resilient-people-and-systems-11a3 %}
Bash Variables
Published: 2023-02-02 04:22:59

## Bash Variables

In the bash shell, variables are used to store values. Variables can be declared and assigned values using the following syntax:
```
variable_name=value
```
For example:
```
name="Shubham Kumar Gupta"
```
To reference the value stored in a variable, prefix the variable name with a '$' symbol.
```
echo "My name is $name"
```
+ In bash, variables can store string, integer or floating-point values.
+ Variable names are case-sensitive.
+ Varibale names can only contain letters, numbers, and underscores and they must start with a letter or an underscore.
<br />

## How to change $PATH variable

+ The $PATH variable in bash defines the search path for executables.
+ We can change it by modifying the contents of the $PATH environment variable.
<br />

### Few ways to modify the $PATH variable in bash:

+ Temporarily modify $PATH for the current shell session:
```
PATH="$PATH:/new/directory"
```

+ Permanently modify $PATH for the current user:
```
echo 'export PATH="$PATH:/new/directory"' >> ~/.bashrc
```

+ Permanently modify $PATH for the system-wide shell:
```
echo 'export PATH="$PATH:/new/directory"' >> /etc/environment
```

+ In each of the above examples, replace /new/directory with the path to the directory you want to add to the $PATH variable.
+ After modifying the $PATH variable, you may need to log out and log back in or restart your terminal session for the changes to take effect.
Microcontroller evaluation board designed with STM32F207IGH6
Tags: microcontroller, stm32f207igh6
Published: 2023-02-02 04:08:55

Indroduction to [STM32F207IGH6](https://www.embedic.com/product/stm32f207igh6)

## Features

- 16-Mbit SRAM
- 1-Gbyte or more microSD™ cards
- Boot from user flash, system memory or static memory
- ISO/IEC 14443 Type A and Type B smart card support
- I2C 64-Kbit serial EEPROM, ST MEMS and I/O expanders compatible
- IEEE 802.3-2002 compliant Ethernet connector
- Two CAN 2.0 A/B channel connectors on the same DB
- RS-232 communication
- IrDA transceiver (supports highest version MB786 C-07 board)
- USB OTG (HS and FS) with Micro-AB connector
- Induction motor control connector
- I2S audio DAC, headphone stereo audio jack
- 2 inch 240x320 TFT color LCD touch screen
- Four-color light-emitting diode
- camera module and expansion connector ST camera plug-in
- Joystick with four directional controls and selection
- Reset, wake-up, tamper, user buttons
- RTC with battery backup
- daughter board or expansion connector package board
- JTAG, SW and trace debug support
- Embedded ST-LINK / V2
- 5 5V power options: power jack, USB FS connector, USB HS connector, ST-LINK/V2
 

## Description

The STM3220G-EVAL (Figure 1. & Block Diagram Figure 2.) evaluation board is a complete demo and development platform for STMicroelectronics.

Based on the STM32F2 family of ARM Cortex-M3 cores and embedded with the high-performance STM32F207IGH6.

The comprehensive hardware features of the board help users to evaluate all peripherals (USB OTG HS, USB OTG FS, Ethernet, motor control, CAN, microSD™ cards, smart cards, USART, audio, and support for DAC, RS-232, IrDA transceiver motherboard version MB786 C-07, SRAM, ST MEMS, EEPROM, etc.) and to develop applications. and development applications. The embedded ST-LINK/V2 circuit provides a debugger and programming tools for the STM32.

1.System Requirements

- Windows® OS (XP, 7, 8)
- USB type A to type B or Mini-B cable
 
2.Development tools

- IAR EWARM (IAR Embedded Workbench®)
- Keil® MDK-ARM™
- GCC-based IDEs (free AC6: SW4STM32, Atollic® TrueSTUDIO®,...)
 
3. Demo Software
The demo software is pre-loaded on the STM32F207IGH6 flash memory to facilitate the demonstration of device peripherals in standalone mode. For more information, please go to download the latest version and refer to the STM3220G-EVAL demo software on the ST website.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m234vmn32ilzuvuydoub.png)
Nothing Phone 1 Review
Tags: nothingphone, apple
Published: 2023-02-02 04:01:59



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1y2p2wo0qn23o1xyoew1.jpg)

**It's finally here!**

The Nothing Phone 1 was the best Android phone of 2022. Americans were disappointed that it didn't make the cut. This is now changing. There is a new Beta Membership available that allows you to purchase a Phone 1 and experience Android 13 beta from the company for $300. This membership does not work on all US carriers.

Beta software and incompatibility with certain carriers are difficult to swallow. Let's see how the Nothing Phone 1 compares, especially when compared to phones such as the Google Pixel 6a, which dominates the US budget market.

## Design

Its design is the most intriguing aspect of the phone, which was revealed for the first time on June 15.

Anyone who has seen the Ear (1) headphones will recognize the design language. It is made of a mixture of transparent and opaque plastics that hint at the internals of the phone without revealing too much. You can choose from black or white.

The phone has a pair of LED light strips at the back. These are called the Glyph Interface and can flash in white (though not in all patterns) and have some neat tricks.

## Flashing notifications

Reverse wireless charging is done by glancing around the charging coil

Slowly filling in the bottom bar during wired charging to indicate a full battery

When using the camera, all illuminating simultaneously as a fill light

Different patterns are flashed in response to pre-set notification alerts and ringtones

The phone's frame is made from recycled aluminum and much of the plastic is post-consumer recycled. For protection, the front and back are covered in Gorilla Glass 5 and the handset is also IP53 certified for dust and water resistance.

## Nothing OS

Software is the last key component of the phone. Pei also presented Nothing OS, an Android-based user experience at the March announcement event. This will be the first smartphone from the company.

Pei describes Nothing OS as "capturing the best features and essence of Android. It distills the operating system down to its essentials. Every byte serves a purpose."

It's a familiar approach that follows similar principles to OxygenOS user experiences found on phones made by Pei’s former company, OnePlus.

The screenshots above show that Nothing OS has a distinctive aesthetic. This is consistent with the retro-futurism seen throughout the brand's other assets.

In an effort to provide a simpler and cleaner navigation experience, the OS's ringtones are and will be influenced by "Morsecode, oscillators, and digital watches".

Pei also promised to reduce the number of pre-loaded apps by 40%, with Google's experiences being the first port-of-call for most services.
Use CSS to pass an element through your letters
Tags: css, design
Published: 2023-02-02 03:43:02

A while ago I created an [animation](https://threeforce.netlify.app/) to celebrate The Legend of Zelda: A Link to the Past anniversary. My main goal was to practice Three.js. But I had to find a way to recreate the logo effect where the sword goes through the "Z" with CSS. 

![Zelda logo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9vljq30gqshjozf63z6z.png)

You can have a look at [my implementation](https://github.com/sylvhama/threeforce/blob/main/src/components/Title/Title.tsx) made with React. I also wanted to share a pure HTML/CSS version to show it's easy to make:

The idea is to create the _illusion_ by duplicating each letter and superposing them via an absolute position. Then with the magic of [clip-path](https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path) you can hide letter parts. The result would look like this (hover the word to see the animation):

{% codepen https://codepen.io/sylvhama/pen/yLqQZqx %}

More details:
- My letters are wrapped in a `span` with a [pseudo ::after element](https://developer.mozilla.org/en-US/docs/Web/CSS/::after) used to duplicate the letter;
- The letters parent `h1` is a flex layout in order to remove white spaces;
- The text remains accessible (screen readers will ignore duplicated letters) and selectable (pseudo element won't be copied).
Selenium for Beginners: Automating a Search on YouTube
Tags: python, testing, selenium, automation
Published: 2023-02-02 03:40:19

Selenium is a popular open-source tool that automates web browsers and is commonly used for testing web applications. In this article, we will use the Firefox driver to navigate to the YouTube home page, locate the search bar, and enter a search query.

## Prerequisites

- Python 3.10
- Selenium library
- Firefox browser

## Setup

Install the Selenium library using pip:

```bash
pip install selenium
```

## Steps

1. Import the necessary libraries

    ```python
    from selenium import webdriver
    from selenium.webdriver.common.keys import Keys
    from selenium.webdriver.common.by import By
    ```

2. Create a new instance of the Firefox driver

    ```python
    driver = webdriver.Firefox()
    ```

3. Navigate to the YouTube home page

    ```python
    driver.get("https://www.youtube.com/")
    ```

4. Locate the search bar using xpath `'//*[@id="search"]'`

    ```python
    search_bar = driver.find_element(By.XPATH, '//*[@id="search"]')
    ```

5. Enter a search query

    ```python
    search_bar.send_keys("《想我就打给我》-Bell玲惠")
    ```

6. Press the Enter key to submit the search query

    ```python
    search_bar.submit()
    ```

7. (Optional) Close the browser

    ```python
    driver.close()
    ```

By following these steps, you can automate a search on the YouTube website using the Selenium Python module. You can modify the code to search for anything you like, and it can be used as a foundation for more complex automation tasks. The full code can be found [here](https://github.com/Rusydy/selenium-learn/blob/main/search-channel/find_youtube_channel.py).
953. Leetcode Solution in Javascript
Tags: javascript, beginners, programming
Published: 2023-02-02 03:37:09


==============================================================

Description:
In an alien language, surprisingly, they also use English lowercase letters, but possibly in a different order. The order of the alphabet is some permutation of lowercase letters.

Given a sequence of words written in the alien language, and the order of the alphabet, return true if and only if the given words are sorted lexicographically in this alien language.

 

Example 1:

Input: words = ["hello","leetcode"], order = "hlabcdefgijkmnopqrstuvwxyz"
Output: true
Explanation: As 'h' comes before 'l' in this language, then the sequence is sorted.
Example 2:

Input: words = ["word","world","row"], order = "worldabcefghijkmnpqstuvxyz"
Output: false
Explanation: As 'd' comes after 'l' in this language, then words[0] > words[1], hence the sequence is unsorted.
Example 3:

Input: words = ["apple","app"], order = "abcdefghijklmnopqrstuvwxyz"
Output: false
Explanation: The first three characters "app" match, and the second string is shorter (in size.) According to lexicographical rules "apple" > "app", because 'l' > '∅', where '∅' is defined as the blank character which is less than any other character (More info).
 

Constraints:

1 <= words.length <= 100
1 <= words[i].length <= 20
order.length == 26
All characters in words[i] and order are English lowercase letters.
==============================================================

Solution:
```javascript
var isAlienSorted = function(W, O) {
    let alpha = new Map([["",-1]])
    for (let i = 0; i < O.length; i++)
        alpha.set(O.charAt(i), i)
    for (let i = 1; i < W.length; i++) {
        let a = W[i-1], b = W[i]
        for (let j = 0; j < a.length; j++) {
            let achar = a.charAt(j), bchar = b.charAt(j),
                aix = alpha.get(achar), bix = alpha.get(bchar)
            if (aix < bix) break
            if (aix > bix) return false
        }
    }
    return true
};
```
==============================================================
#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/verifying-an-alien-dictionary/
CryptoBox base on wails.io
Tags: javascript, programming, tooling, vue
Published: 2023-02-02 03:33:40

**Online version**

Github: [ https://github.com/istommao/Cryptography]( https://github.com/istommao/Cryptography)
Website:  [https://crypto-online.cn/](https://crypto-online.cn/)

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

**Desktop version**
Github:  [https://github.com/istommao/CryptoBox](https://github.com/istommao/CryptoBox)
Download:  [ https://github.com/istommao/CryptoBox/releases]( https://github.com/istommao/CryptoBox/releases)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fybivh8611zlgtl9e18i.png)
Shadowing Inherited State Variables
Published: 2023-02-02 03:21:14


**Inheritance** is a fundamental concept in object-oriented programming, allowing developers to create new classes that inherit properties and methods from existing ones. However, when it comes to state variables, there is a potential pitfall that developers should be aware of: shadowing inherited state variables.

**Shadowing** occurs when a subclass defines a state variable with the same name as one in its superclass, effectively hiding the inherited variable. This can lead to unexpected behavior and can make the code harder to understand and maintain.

**A practical example** of shadowing inherited state variables can be seen in the following Solidity code:

```
pragma solidity ^0.8.17;

contract Parent {
    uint256 public x;

    function setX(uint256 _x) public {
        x = _x;
    }
}

contract Child is Parent {
    uint256 public x;

    function setX(uint256 _x) public {
        x = _x;
    }
}
```

In this example, both the Parent and Child contracts have a state variable named x. The Child contract inherits from the Parent contract and has its own declaration of x, which is called "shadowing".

When the Child contract's setX function is called, it updates its own x state variable and not the inherited x from the Parent contract. This is because the state variable in the Child contract shadows the inherited state variable from the Parent contract.

In other words, the Child contract has a new storage location for the x state variable, separate from the one in the Parent contract. The Child contract's state variable takes precedence over the inherited state variable from the Parent contract.


**In conclusion**, shadowing inherited state variables can lead to unexpected behavior and can make the code harder to understand and maintain. To avoid shadowing, developers should consider using a different name, using the "super" keyword, or using composition instead of inheritance. Additionally, developers should also consider the security implications of inherited state variables to ensure that sensitive information is protected.
Data Engineering
Tags: dataengineering, developer, datascience
Published: 2023-01-21 03:42:42

Data engineering is the process of acquiring, cleaning, transforming, and storing data for use in analytics and decision-making. It is a crucial step in the data science process and involves a wide range of skills and technologies.

Different steps can be categorized as follows.

The first step in data engineering is data acquisition, which involves sourcing and collecting data from various sources such as databases, APIs, and web scraping. The data acquired in this step is often unstructured, inconsistent, and may require cleaning and pre-processing before it can be used for analysis.

Data cleaning and pre-processing is the next step in the data engineering process. This step involves identifying and removing any errors or inconsistencies in the data, such as missing values, duplicate records, and outliers. Data pre-processing also includes tasks such as normalization and feature scaling, which are necessary for machine learning algorithms to work correctly.

Data transformation is the next step in the data engineering process, which involves converting the data into a format that is suitable for analysis. This may include tasks such as pivot tables, join operations, and aggregation. The transformed data is then loaded into a data warehouse or a data lake for storage.

Data storage is the final step in the data engineering process. A data warehouse is a large, centralized repository of data that is optimized for querying and reporting. Data lakes, on the other hand, are designed to store large amounts of raw, unstructured data, and are optimized for batch processing and analytics.

Data engineering is a critical step in the data science process and requires a wide range of skills and technologies. Data engineers work with various tools such as SQL, Python, and Apache Hadoop to acquire, clean, transform, and store data. They are responsible for ensuring that data is accurate, consistent, and available for analysis, and play a crucial role in the success of data science projects.

In conclusion, data engineering is the foundation of data science and plays a crucial role in the success of data science projects by ensuring that data is accurate, consistent, and available for analysis. Data engineers work with a wide range of skills and technologies to acquire, clean, transform, and store data for use in analytics and decision-making.
Sure Shot Way to Crack Manual Testing Interview 💯 | Manual Testing Interview
Tags: webdev, beginners, programming, tutorial
Published: 2023-02-02 02:52:03

Manual Testing Interview: In this video, we are going to learn about the How to crack the Manual Testing Interview. We will discuss the Manual Testing Projects Questions. I will share the Handy things that you need to have in your PC to crack Manual Testing easily.

{% embed https://youtu.be/J_mU-Sbgo3A %}

👉Manual Tester Blueprint Live Classes
https://sdet.live/manual


👉 Download Manual Testing Templates
✅ Test Case -  https://sdet.live/tc-template

✅ Test plan -  https://sdet.live/notes

✅ Download RTM -  https://scrolltest.com/rtm

✅ Bug Report -  https://sdet.dorik.io/bug-report-temp...


✅ Download Notes -  https://sdet.live/notes

✅ New Batch - https://go.scrolltest.com/manual


✅ Join Facebook Group :  http://bit.ly/learntesting2019

✅ Website:   https://scrolltest.com

✅ Website:   https://thetestingacademy.com

✅ Twitter: https://twitter.com/itstechmode

🚀 Tools and services I recommend:
Some of the courses that I recommend to become better Automation Tester 🙌🙌

✅API Testing - 
https://www.learnapitesting.com


✅Cypress Tutorial with LIVE Projects -
http://cypresstutorial.com


#manualtestinginterview #manualtestinginterviewquestionsandanswersforexperienced #manualtestinginterviewquestions #manualtestinginterviewquestionsandanswersforfreshers #manualtestinginterviewquestionsandanswers #manualtestinginterviewquestionsfor3yearsexperience