teleren/devto huggingface dataset:
Testing techniques_Task2(PAT)
Tags: guvi, softwaretesting, testingtechniques, beginners
Published: 2023-12-16 18:04:39

**1)Boundary value analysis**
As name suggests this technique is based on testing boundary values of test data, which includes minimum value,minimum value+1,maximum value,maximum value -1 as valid inputs and minimum value-1,Maximum Value +1 as invalid inputs.

BVA falls under black box testing.

**Example:**
Eligibility age for attending particular exam is from 18 - 30, boundary values will be as follows.
**Valid Values:**
Minimum value - 18
Maximum value - 30
Minimum+1 - 19
Maximum-1 - 29

**Invalid Values:**
Minimum value-1 - 17
Maximum value+1 - 31


![BVA](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/exta77yr995y0typqddp.PNG)

Main logic behind this technique is, if it works for boundary values it will definitely work for values between boundaries as well.

BVA is mainly applicable in places where function uses input values in any form.

**2)Decision Table Testing:**

It provides tabular view of input and also expected outcome of that.

Mainly to check how required function performs for different combination of inputs.


**Example:**

For appearing to particular security exam, there are certain conditions needs to satisified.


![DT](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4keunv2ja5fvy099w6q.PNG)


above provided decision table clear depicts what all inputs are considered to be eligible for exam or not which also provided required combination in clear way and also ensuring test coverage.

**3)Use case testing**

Use case testing is based on user's perspective rather than system perspective, which ensures required user actions can be performed successfully and application is working as expected.

**Example**
Online payment
**Action:**User selects Online banking option as payment
**System:**Interacts with payment gateway and connects
**Action:**User completes payment
**System:**Responds with successful order details

**4)Linear code sequence and jump**
It is white box testing technique as testing is done on code level, where testing starts from one branch of code and jumps to next branch of code and by this all modules are tested and covered one by one .

**Example**

If developer completed login page module for application, he will test each branch or component involved in login like signup functionality code, login functionality code, forget password code.
Dealing with Date and Time in Humanizer in C#
Tags: csharp
Published: 2023-12-16 18:00:23

Dealing with Date and Time in C# can be a bit cumbersome at times. However, one library that simplifies this process is Humanizer. 

Humanizer is a popular open-source library in C# that allows developers to handle date and time in a more human-friendly manner. It provides a set of extension methods that can be used to format, manipulate, and humanize various DateTime-related objects.

One of the key features of Humanizer is its ability to convert DateTime objects into human-readable strings. For example, instead of displaying a date in the default format (e.g. "2022-01-01"), Humanizer allows you to convert it into a more user-friendly format like "January 1st, 2022". This makes it easier for users to understand and interpret the dates in your application.

In addition to formatting, Humanizer also provides methods for performing common date and time calculations. For instance, you can easily calculate the difference between two dates and get the result in a human-readable format, such as "2 hours ago" or "3 days from now". This can be particularly useful when dealing with time-sensitive data or creating user-friendly reminders.

Moreover, Humanizer supports localization, allowing you to display dates and times in different languages or cultural formats. This can be crucial when building applications for a global audience or when catering to specific localization requirements.

Overall, Humanizer is a powerful library that simplifies the handling of date and time in C#. By providing convenient methods for formatting and manipulating DateTime objects, as well as supporting localization, it reduces the complexity involved in dealing with dates and times, resulting in more user-friendly and intuitive applications.
Project Sixteen: Typewriter
Tags: webdev, beginners, challenge, codingquokka
Published: 2023-12-16 17:42:39

Some years ago I worked at a startup and we had this nice banner with a typewriter effect. I don't remember entirely what the banner was saying - but it was quite fun working on this one.

After all, having a nice flashy banner might come in handy for a landing page for you too one day, so I thought we might as well try and implement one today.

## Typewriter Effect: requirements and recipe

> As a user I want to see a message slowly appear on the screen letter-by-letter so that I can truly appreciate it

Let's start with an example from a great movie, I hope you've seen it:

![Green "Wake up Neo..." appearing on the black screen one letter at a time](https://codingquokka.com/img/wake_up_neo.gif)


Of course, you don't need to recreate this exact animation or use the iconic green on black colour palette, but there are some requirements:

### Requirements

1. Letters should appear one-by-one with a set interval
2. Contrast ratio should be sufficient
3. There should be accessible label with the whole phrase
4. There shouldn't be any layout shifts throughout the whole animation cycle

### Recipe

1. Start with a static text: style it however you want
2. Ensure that it's accessible
3. Write a function that would type the sentence for you
4. Choose an interval that feels right
5. Follow the white rabbit...

### Hints

To avoid layout shifts set the size of the "display" to a fixed value - this way it won't accidentally grow when more text is added.

There are several ways to achieve the typewriter effect, the simplest one is to split the phrase into individual letters and add them one by one to the screen, however it's also possible to do it with pure CSS.

## Hard Mode: Vertical Scrolling Text

For this one you definitely need to have watched Matrix at least once and owning a pair of round glasses and a black coat is a nice to have.

How about implementing this effect:

![Green numbers running down the black screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/icik2decorwc1t3wj3cv.png)

Looks cool and fun to code both on terminal and in the browser: either can be coloured, erased and repainted ;-)

Share your creations and feedback and see you tomorrow!

Liked the idea a lot and would love to have it all year long?

[![Buy Me A Coffee](https://cdn.buymeacoffee.com/buttons/v2/default-red.png)](https://www.buymeacoffee.com/valeriavg)
Your First Journey into RabbitMQ with Python
Tags: webdev, python, codenewbie, learning
Published: 2023-12-16 17:38:32


## Hello World Program

Here we are using `pika` `python` client. You can pick anyone as per your application.

Find the list of clients [here](https://rabbitmq.com/devtools.html)

## Prerequisites

1. `RabbitMQ` is installed and is running on localhost. You can simply do this by running the docker image :

```bash
   docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.12-management
```

2. Pika Client

```bash
pip install pika --upgrade
```

---

## The Program:

**Producer Program - `sender.py`**

```python
import pika

connection = pika.BlockingConnection(
    pika.ConnectionParameters(host='localhost'))
channel = connection.channel()

# INFO: this connects to a broker on the local machine(localhost)

# Creating hello queue

channel.queue_declare(queue="hello")

# INFO: message needs to go through the exchange
# exhange specify exactly to which queue the message should go
# Thus, The queue name needs to be specified in the routing_key parameter:

channel.basic_publish(
    exchange='',
    routing_key='hello',
    body='Hello World')

print("[x] Sent 'Hello World!")


# Before exiting the program we need to make sure the network buffers were flushed and our message was delivered to RabbitMQ. We can do it by gently closing the connection.

connection.close()

```

**Consumer Program - `receiver.py`**

```python
import pika, sys, os


def main():
    connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
    channel = connection.channel()

    channel.queue_declare(queue='hello')

    # Receiving a message works by subscribing a callback function
    #to a queue  Whenever we receive a message, this callback function is called by the Pika library.

    def callback(ch, method, properties, body):
        print(f" [x] Received {body}")


    channel.basic_consume(queue='hello', on_message_callback=callback, auto_ack=True)
    #finally, we enter a never-ending loop that waits for data and runs callbacks whenever necessary,
    # and catch KeyboardInterrupt during program shutdown.

    print("[*] Waiting for message. To exit  press Ctrl+C")
    channel.start_consuming()

if __name__ == '__main__':
    try:
        main()
    except KeyboardInterrupt:
        print('Interrupted')
        try:
            sys.exit(0)
        except SystemExit:
            os._exit(0)

```

## Running

Run `Consumer`

```bash
python receiver.py
```

Run `Producer`

```bash
python sender.py
```

## Output

By, `Consumer`

```bash
# => [*] Waiting for messages. To exit press CTRL+C
# => [x] Received 'Hello World!'
```

## Reference

Unravel the secrets of RabbitMQ with our reference to the original RabbitMQ tutorial [here](https://rabbitmq.com/tutorials/tutorial-one-python.html).

## Conclusion

With this guide, you've taken the first step into a world of endless possibilities.
Stay tuned for more advanced programs
🛠️ Challenge and Solution in React Native 🛠️
Tags: reactnative, usememo, react, codeperformance
Published: 2023-12-16 17:36:36

Hi LinkedIn folks! 👋

I would like to share a recent experience facing an intriguing challenge in React Native and how we managed to overcome it.

**💡 The Problem:**

Our React Native app was experiencing a notable performance issue on more complex screens. The response time was lower than expected, affecting the user experience.

**🧐 Investigation:**

After some analysis, we discovered that excessive component rendering was causing bottlenecks. Unnecessary components were being rendered even when they were not visible.

**✨ The Solution:**

We implemented a rendering optimization technique using React Memoization. This allowed us to avoid unnecessary rendering and significantly improve performance.

```
import React, { useMemo } from 'react';

const MyComponent = ({ data }) => {
   // Using useMemo to memorize the component
   const optimizedComponent = useMemo(() => (
     {/* Your component here */}
   ), [date]); // Dependencies that, when changed, trigger re-rendering

   return optimizedComponent;
};
```

**🚀 Result:**

Implementing this solution resulted in a more agile application response, providing a smoother experience for users, especially on more complex screens.

**🌐 Lessons Learned:**

Optimizing the rendering process is critical to ensuring optimal performance in React Native applications. This experience reminded us of the importance of carefully considering how and when components are rendered.

💬 Let’s exchange ideas:

Have you experienced similar challenges in your React Native projects? How did you address performance issues? Share your experiences in the comments!
Python Selenium
Published: 2023-11-20 05:27:22

#**1. <u>Describe the Python Selenium Architecture in detail</u>**# 

It is an open standard that provides a transport mechanism for transferring data between client and server on the web. 

-  It is an automation framework which allows automating users actions with a web browser.

-  It communicates with web browser through a set of open-source API’s

-  Implemented on a web browser

-  All major web browsers support it including Internet Explorer.

-  All OS supports web driver

Selenium WebDriver Architecture is made up of four major components:

**Selenium Client library:** Selenium provides support to multiple libraries such as Ruby, Python, Java, etc as language bindings
**JSON wire protocol over HTTP:** It is an open standard that provides a transport mechanism for transferring data between client and server on the web. It uses the Layer-5 of OSI reference model.
**Browser Drivers:** Selenium browser drivers are native to each browser, interacting with the browser by establishing a secure connection using HTTP protocol. Selenium supports different browser drivers such as ChromeDriver, GeckoDriver, Microsoft Edge WebDriver, SafariDriver, and InternetExplorerDriver.
**Browsers:** Selenium provides support for multiple browsers like Chrome, Firefox, Safari, Internet Explorer etc.


#**2. <u>What is the significance of Python Virtual Environment</u>**# 

A virtual environment is a tool that helps to keep dependencies required by different projects separate by creating isolated Python virtual environments for them. This is one of the most important tools that most Python developers use.
We use a module named virtualenv which is a tool to create isolated Python environments. virtualenv creates a folder that contains all the necessary executables to use the packages that a Python project would need.
That's a compelling vision for Deployh.ai! It certainly addresses a real pain point for small B2B software players.
Tags: news, cloud, automation, startup
Published: 2023-12-16 17:17:54

1. Imagine building business apps without tech headaches! DeployH.ai is your all-in-one tool for small businesses, simplifying development, testing, and launch. No more juggling tools, just build your dream app and win the market.

2. Tired of missing deadlines and exceeding budgets? DeployH.ai streamlines your B2B software development, saving you time and money. Code like a pro, launch like a rocket, and conquer your competition.

3. Big tech tools, small business budget? We've got you! DeployH.ai gives your B2B team the power of enterprise platforms, without the enterprise price tag. Build, test, launch, and scale with ease.

4. Stop wasting time on paperwork, start building your future! DeployH.ai automates tedious tasks in B2B software development, freeing you to focus on innovation and growth. Say goodbye to manual processes, hello to success.

5. Feeling lost in a sea of code? DeployH.ai is your lifeboat! Our intuitive platform guides B2B teams through development, testing, and launch, even without tech expertise. Build your app with confidence, no coding required.

6. Is your B2B app stuck in development purgatory? DeployH.ai is your fast track to launch! We break down complex projects into bite-sized tasks, getting your app to market faster than ever.

7. Market research got you down? DeployH.ai's built-in insights help B2B teams build apps people actually want. No more guessing, just data-driven decisions for guaranteed success.

8. Team collaboration a nightmare? DeployH.ai brings harmony to the code! Our platform connects B2B teams in real-time, keeping everyone on the same page and crushing deadlines together.

9. Security fears keeping you up at night? DeployH.ai sleeps so you can dream big! Our secure platform protects your B2B app data like Fort Knox, giving you peace of mind to focus on what matters.

10. Stop building apps, start building empires! DeployH.ai empowers B2B teams to conquer the market, one line of code at a time.

Visit our website www.deployh.ai for more information.
Blockchain Bridge is ...
Published: 2023-12-16 17:12:50

**What is a [blockchain bridge](rainbowbridge.app)?**
Let's start from afar..
Blockchain technology has revolutionized the way we think about trust, security and the transfer of value. However, one of the challenges facing blockchain is interoperability. Each blockchain network operates independently, with its own rules and protocols, making it difficult for them to interoperate. This limits the potential of blockchain technology and prevents it from becoming a truly global, decentralized infrastructure.

So, what do you do if you need to send an asset from one blockchain to another? We are pleased to present you with a solution to this problem
**Blockchain bridge** offer a solution to this problem by linking different blockchain networks. We enable cross-chain transactions by creating a secure connection between two or more blockchain networks.

**How does it work?**

- When a user wants to transfer a digital asset from one blockchain network to another, the asset is first blockchain-locked in the original blockchain and then represented in the new blockchain using a "wrapped" token. A wrapped token is a token that represents another asset, such as Bitcoin or Ethereum, on a different blockchain network. The wrapped token is then transferred to the target blockchain network, where it can be exchanged for the original asset.


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

- Smart contracts are used to facilitate these transactions by ensuring that they are executed in a secure manner without the need for trust between counterparties. Smart contracts act as an intermediary between different blockchain networks, confirming and executing transactions only when certain conditions are met.  

**Respectfully yours, RainbowBridge team** 🌈🌈🌈
[Twitter (X)
](https://twitter.com/RainbowBCBridge)[Telegram](https://t.me/rainbowbridgetoken)
Adventofcode 🎄: Day 15&16 - Why use React?
Tags: beginners, react
Published: 2023-12-16 17:03:23

Why should you use React?? Here is why:

**Easy creation of dynamic applications**
React is renowned for its ability to facilitate the creation of dynamic applications through a variety of features and design principles. 

**Improved Performance**
React has improved performance compared to traditional approaches in web development, and several factors contribute to this improvement such as, Virtual DOM, Component- based architecture and so on...

**Reusable Components**
Reusable components in React offer several advantages, enhancing development efficiency, maintainability and scalability. Breaking down the user interface into modular components promotes code modularity and accelerates development by reusing established units. 

**Unidirectional data flow**
With unidirectional data flow, the parent component is responsible for managing the state, and it passes this state down to uits child components via props. This one-way flow makes it easier to understand how data changes happen through the application. This simplicity ensures that changes in the application state are clear, reducing likelihood of bugs caused by unexpected side effects.

**Dedicated tools for easy debugging**
React Developer Tools, provides developers with insights into the components hierarchy, state changes, and performance metrics directly within the browser developer tools. This allows for real time inspection and manipulation of React components, making it easier to identify and address issues.
I did the math: Resend is actually cheaper than AWS SES in most cases
Tags: aws, resend, mail, backend
Published: 2023-12-16 16:41:55

While chosing an email provider to go above the free rate limit from Supabase I stumbled upon this article basically saying that Resend is a wrapper around Amazon SES, thus recommending to use SES directly

https://matteosonoio.it/resend/

Resend presents itself as being a dev-friendly email provider that "just works" while AWS SES (simple email service) is the complex but performant alternative.

After a whole day of configurations in the AWS console I still couldn't send one single email, let alone setup logging and the likes.

When going back to Resend, I managed to send my first email in literally 1mn. The whole Supabase integration took 15mn.

You do the math.

---

No actually I'm gonna do it:

This is the cost per email for both of these services:

- SES: $0.0001
- Resend: $0.0004

It really depends on what you're gonna use mails for, but if you only use transactional emails (signup, invites, order confirmations), you might send 10 of them per users per day, so 300 emails per months per user, which gives an email cost per user of:

- SES: $0.03 / user / month
- Resend: $0.12 / user / month

However keep in mind that you have to pay your engineer to setup the whole thing and Resend makes you save a lot in that regard, at least in my personal experience:

- SES: 15 hours = $1500
- Resend: 15mn = $25

You can plug in your own numbers, but over one year, SES only gets cheaper when you have:

```ts
cost_ses = 1500 + 12 * 0.03 * nb_users
cost_resend = 25 + 12 * 0.12 * nb_users
cost_ses < cost_resend
1500 - 25 < 12 * (0.12 - 0.03) * nb_users
1365 < nb_users
```

at least 1365 users. And that's if you intensively use emails. So while SES is cheaper than Resend, I'd recommend to always start with a dev-friendly provider like Resend to start your project, then optimize by directly using the underlying cloud provider directly.
Frontend devs, what are your thoughts on WordPress? Have you used it in your corporate jobs?
Tags: webdev, frontend, discuss
Published: 2023-12-16 16:36:49

**GitHub Repo:** [https://github.com/webcrumbs-community/webcrumbs](https://github.com/webcrumbs-community/webcrumbs)

As we advance in [WebCrumbs](https://github.com/webcrumbs-community/webcrumbs), we keep asking ourselves if we're solving a real problem. Are we? What are your thoughts on WordPress?

 > Never used? Why?
 > Love it? Why?
 > Hate it? Why?

Your opinion is super important for us to check if we're doing it right. Can you help us?


---

Follow me for more! 
I usually write about JavaScript, WebDev and [Webcrumbs](https://github.com/webcrumbs-community/webcrumbs) ❤️.

{% embed https://dev.to/opensourcee %}