teleren/devto huggingface dataset:
What is Unit Testing and its Tools
Tags: unittest, unittesting
Published: 2021-05-24 12:53:36

Software testing is the major requirement for the present digital era for delivering quality software applications. It is the practice of helping many enterprises in ensuring that the developed application is as per the business and user requirements. Thus, it is essential for the teams to validate every testing practice from the initial stage, i.e. from the Unit Testing phase itself.

Unit testing is considered to be the first software testing phase in the software testing lifecycle (STLC). It is practiced before integration testing and helps in validating the correctness and completeness of the smallest component. Since it is the first testing practice, it is essential for the teams to perform this with clear understanding so that testing of applications is efficient from the first phase itself.

What is Unit testing?

Unit testing is the initial software testing phase where the smallest individual components of a software are tested and validated to ensure each unit of the code performs as expected by the enterprises or the clients. It is performed during the development phase of the application by developers.

3 Types of Unit testing

There are three types of unit testing; and each of the testing types is having different properties.
• Gray Box Testing: This unit testing type is used for executing test cases, test suites, and to test various other methods.
• Black Box Testing: In this unit testing type, the testing teams are allowed to test the user interface of the application along with the output and input.
• White Box Testing: In this unit testing type, developers test the functional behavior of the application for validating their execution.

5 Unit Testing Tools to help you

NUnit: This is a unit testing framework widely preferred for all most all .net languages. It is an open-source tool allowing developers to write scripts manually and perform data-driven tests.
JUnit: This is a free testing tool used that provides assertions for identifying test methods. With this tool, the testers are allowed to test the data first and then insert the code.
HtmlUnit: This is an open-source Java library tool that supports JavaScript and provides other GUI features such as tables, forms, links, etc.
JMockit: This is an open-source unit testing tool that allows mocking API with verification and recording syntax. With this tool, the teams can obtain features related to code coverage, data coverage, and path coverage.
PHPUnit: This tool is widely preferred by the PHP programmer. In this tool, small portions of code known as units are considered for testing each of them separately.

Unit testing is the first software testing phase and also an important phase to ensure the further testing phases are functioning well. Leverage unit testing services from next-gen QA testing services provider to ensure each of the smallest code is performing as expected.
Amazing SignUp Form Using HTML & CSS
Tags: html, css, webdev, beginners
Published: 2021-05-24 12:44:41

Today I created a Amazing SignUp Form with HTML & CSS for my MEAN Project. This is a simple form have with html validation. I hope you like this also comments about your thoughts.

For more content follow me on Instagram  [@developer_nikhil27](https://www.instagram.com/developer_nikhil27/).

Thank you!
{% codepen https://codepen.io/NikhilBobade/pen/abJWwOV %}
An open discussion on coping with unreached potential
Tags: watercooler, psychology, productivity, healthydebate
Published: 2021-05-24 12:40:35

_So I will introduce the opening narrative to open the floor for discussion and layout a few observable obstacles but would love community feedback to better understand the true underlying and arch-arching obstacles that act as deterrents towards our maximum potentiality in our endeavors but also, tips, tricks, affirmations, and other advice that can be given that may help other better cope with these obstacles to help overcome them._

## When you posit your ideal, large or small, conscientiously address it with cunning to further your potential success

**How one might ask?**

_When you posit an ideal, you place yourself in an inferior position in relation to that ideal and that can be a rather crushing weight on your shoulders so you must have a multi-faceted answer to a simple question. How do you position yourself to tap into the maximum potentiality that may seem locked or untapped but will bring you to address a forward movement towards your primary ideal?_

1. You can simply have no ideals, nothing to strive for, nothing to do which is a bad answer. This leads to idleness, stagnation, and the deprivation of the main source of pleasure which is observed, perhaps consciously but more notably subconsciously as a consequence of observed movement towards the ideal you've placed value in.


2. You can set your ideal beyond the capacity of what you know you can presently reach. This can act counter-productively, like a double-edged sword in a sense, it can allow for	some forward momentum which will produce a rather powerful drive towards your ideal but if you set the ideal too high, you become a victim of your self-driven judgment towards the ideal which can lead to feelings of failure, stagnation, and inadequacies.

*As I analyze this theory I will present further ideologies on how to address the type of coping needed almost as an inherent necessity to bolster your abilities and position forward in life.*

**This is an open discussion, so please, share your ideas and thoughts on the premise, a rising tide raises all ships, the more we speak on these topics the better we strengthen our depth of faith and constitution of character to not let these obstacles towards our ideals stop us!**
Day 5/30 : Social Media Icons with Tooltip on Hover using HTML and CSS
Tags: html, css, webdev, tutorial
Published: 2021-05-24 12:26:15

Welcome to Day 5 of this [Challenge](https://dev.to/somanathgoudar/30dayschallenge-30-days-extreme-html-css-challenge-50k1). This is what I created today. 

**➜ Here is the Demo :**
![Social Media Icons with Tooltip on Hover](https://1.bp.blogspot.com/-n83aLZ3qmv4/YKOaIwCrlvI/AAAAAAAAABg/G6QkVy1GWpEjjLP2uou-KgyC1Id9QItjQCLcBGAsYHQ/s600/p5.gif)

**➜ Video Tutorial :**

{% youtube X86OxINWnVk %}
**➜ Source Code :**
https://www.futurecodersweb.com/2021/05/social-media-icons-with-tooltip-on.html


**➜ Instagram Post and Reel for Day 5 :**
[See Post and Reel](https://www.instagram.com/future_coderss/)

------------------------------------------------------------------

Hey, If You don't know what is happening here. Don't Worry, I am doing a crazy challenge 😅. Read More about it from the post below.

{% link https://dev.to/somanathgoudar/30dayschallenge-30-days-extreme-html-css-challenge-50k1 %}

**Support Me :**
👉 Buy me a Coffee: https://www.buymeacoffee.com/somanathgoudar
👉 [Follow Me on Instagram](https://www.instagram.com/somanath_goudar/)
👉 [Follow Future Coders on Instagram](https://www.instagram.com/future_coderss/)
👉 [Subscribe to My Main Channel](https://www.youtube.com/channel/UC_nTrhTr5fnBGjOxnkPUmmA)
👉 [Subscribe to Channel Created for this Challenge](https://www.youtube.com/channel/UCzGSyMOf2jPt1MkNBB3SJ3g)

------------------------------------------------------------------
A Whole Project Team Exploratory Testing Sessions
Tags: engineeringmonday, testing, softwaredevelopment
Published: 2021-05-24 12:14:53

I love working on challenging projects — they make me think more and I always end up learning a lot of new things.

Our current project is one of those. It has a web platform, iOS and Android applications, a public webstream, and a dozen different user roles. All of those platforms are interconnected and depend on each other, especially with time events where one platform has to pass the information to another in an exact given time frame.

We use the BDD approach on this project — the software tester is included in every aspect of the project, the team is writing user stories, some of the stories are automated, and every user story/feature is manually tested by a software tester. This approach worked well when testing the applications and the features, separately, one by one. However, when we tried to use the platform, all the applications together, we saw that lots of bugs caused by miscommunication or misalignment between the applications could be found. The only way to overcome this testing obstacle was to include more people in the testing process because it could not be done by just one or two software testers.

So, we decided to start exploratory testing sessions with the whole project team. Everyone was included in testing — software developers, project managers, designers, even the CEO. The software tester made the test cases in TestRail and handed out them to the team to give feedback after the testing session. Then the tester would review the feedback and open the bug tasks for fixing. 

What else did we gain from this:
- We managed to get to the state where more people are using the platform and get their feedback
- In a smaller group, we managed to simulate a real user test
- The project team got a chance to learn more about the platform's functionality and its features — the fronted/web platform developer got a chance to use mobile applications and vice versa, designers got a chance to see how their design is behaving in the app and the project managers got a chance to see the real state of the project
- The developers got a chance to reproduce the reported bugs together with software testers and to understand them better


These sessions were both fun and useful for our project team. Feel free to share your thoughts if you have had a similar situation.
Daily Developer Jokes - Monday, May 24, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-05-24 12:00:02

---
title: "Daily Developer Jokes - Monday, May 24, 2021"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Monday%2C%20May%2024%2C%202021"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12595564d36.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Why shouldn't you trust Matlab developers?

___A:___ Because they're always plotting something.
 -->
Changing default git branch to main locally
Tags: github, git, productivity
Published: 2021-05-24 11:55:19

![git main branch](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44c2a87fl571uka9lb8c.jpeg)

GitHub has [shifted to `main` branch](https://github.blog/changelog/2020-10-01-the-default-branch-for-newly-created-repositories-is-now-main/) for new projects but when creating a new project locally with `git init` still creates master branch. In this post, we will see how to create `main` branch locally by default.

The `git init` command accepts value for name of the branch in the `-b` flag.

```sh
$ git init -b main
Initialized empty Git repository in /private/tmp/food/.git/
$ touch tmp.txt
$ git add .
$ git commit -m "main"
[main (root-commit) 0b3550b] main
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 tmp.txt
```

> This is possible only with Git 2.24 onwards.

We can also configure the default branch globally.

```sh
git config --global init.defaultBranch main
```

For older Git versions, we can switch to the `main` branch before committing anything because the branch doesn't exist for real until something is committed.

```sh
cd sport
git init
git branch -m main
```

My git version was `2.31.1` while writing this post.

```sh
git --version
git version 2.31.1
```
Eight Steps to solve coding interview question
Tags: career, coding, interview, tips
Published: 2021-05-24 11:54:45

Recently I have started giving lots of coding interviews online. Lately, when I was asked to solve a coding problem, I realized that my approach to solving the problem was not good, which always made me move in the wrong direction and not solve the problem. I started studying my way of solving a problem and realized what I was doing wrong.

After lots of study and efforts, I came up with **Eight (8) steps** to solve a coding problem. After following these steps, I solved the problem with ease and in a proper way. Here I'm sharing with you the tips to solve a coding problem. Let's go ahead with an example question.

### Eight Steps to solve coding interview question

#### Step 1: Verify the constraints.

#### Step 2: Write out some test cases.

#### Step 3: Figure out a solution without a code.

#### Step 4: Write out your solution in code by hand.

#### Step 5: Double check for errors.

#### Step 6: Test your code with your test cases.

#### Step 7: Analyzing Space & Time complexity.

#### Step 8: Can we optimize our solution?

To go through the steps in details please click here <a href="https://pratapsharma.in/eight-steps-to-solve-coding-interview-question/" target="_blank">eight steps to solve coding interview question</a>.

If you learned something from this article, please share it with your friends.

You may also follow me on <a href="https://www.linkedin.com/in/prataps22/" target="_blank">LinkedIn</a> and <a href="https://twitter.com/Pratap2210" target="_blank">Twitter</a>.
PHP - Google/YT - An OAuth issue
Tags: php
Published: 2021-05-24 11:53:53

I was operating a site a few years back where I could use the YT API with just a key and specific API link to allow the end-user to hover over videos for a short-play/info etc. It seems now, OAuth is required but no matter how I try to configure it, it seems to get stuck on the search function and I can't for the life of me find the issue that lies within.

I have it set up with globals defined within the function to search, along with the urlencoded key, and akey. I am using the Google API to search results up to 50 verifying the key/akey in the search. It's then set up to display in an XML with predefined methods to organize the search results, to cache older search results of the same or create a new cache of the file, this runs using a time interval to refresh results every x minutes. Where could I be not looking that's the deterrent for providing me the search results?


The basic functionality would be  
 ___   ___ 
|   | |   |
|   | |   |->5 results per row
|___| |___|
|   | |   |
|   | |   |->5 results per column
|___| |___| 

Any suggestions would be greatly appreciated, I've tried a few methods found through stack/google research but have not had any success.
What is Qlik Sense?
Published: 2021-05-24 11:50:04

Qlik Sense is another incredible application delivered by Qlik Tech. 

Qlik Sense is self help examination. It enables singular clients to make customized , intuitive data visualizations, reports and dashboards from various data sources without breaking a sweat. The look and feel of Qlik Sense is distinctive when contrasted with QlikView however it accompanies same incredible motor as QlikView. 

If you are interested to learn Qlik Sense, check out [Qlik Sense Certification](https://intellipaat.com/qlik-sense-training/).

Qlik Sense highlights : 

1. Free for individual and interior business use. You can download Qlik Sense and start the experience 

2. Qlik Sense work area is intuitive and simple to utilize application 

3. Sense center point is utilized to put together applications. Each application can contain numerous sheets 

4. Data burden can be pretty much as simple as straightforward "simplified" of records 

5. Simple route 

6. Simple to fabricate diagrams by straightforward simplified 

7. Usefulness to make story 

8. Worldwide selectors accessible as a matter of course 

9. Capacity to join your QlikView contents to Qlik Sense application 

10. Amazing API's give added augmentations to the usefulness
Fixing Jekyll/Webrick Issue on Arch Linux
Tags: ruby, jekyll, webrick, archlinux
Published: 2021-05-24 11:42:46

Jekyll may not run on Arch Linux because of an error with `webrick`. This is caused because webrick is not yet compatible with latest version of Ruby (3.0.1). 

This is the relevant line from error output.

> /blog/vendor/bundle/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `require`: cannot load such file -- webrick (LoadError)

While setting up my GitHub pages blog, I faced this issue. I'll quickly document how to fix this.

### Install Bundle

You will need to have `rubygems` installed for this.

```sh
sudo pacman -S rubygems
```

Then install `bundle` via gem.

```sh
gem install bundle
```

Gem will print a warning about not having the local binary folder in your path. Add the following line to your `~/.bashrc` or `~/.zshrc` depending on the shell you use.

```
export PATH=/home/$USER/.local/share/gem/ruby/3.0.0/bin:$PATH
```
Make sure you replace "3.0.0" with the version number gem reports.

### Uninstall Ruby

We need to remove the latest Ruby version.

```sh
sudo pacman -Rns ruby rubygems
```

### Install Ruby 2.7

Webrick is compatible with Ruby 2.7. This is the version we will install.

```sh
sudo pacman -S ruby2.7
```

### Symlink `ruby` Binary

`bundle` will call the binary at `/usr/bin/ruby`. However, the old Ruby version is installed at `/usr/bin/ruby-2.7`. So we will create a symlink. You will need to uninstall `ruby` as I said earlier.

```sh
sudo ln -s /usr/bin/ruby-2.7 /usr/bin/ruby 
```

Now, `/usr/bin/ruby` will just be a symlink (or shortcut in layman terms) to `/usr/bin/ruby-2.7`.

### Run `bundle`

Go to your Jekyll project directory. Install the dependencies.

```sh
bundle install
```

Then launch your Jekyll site

```sh
bundle exec jekyll serve
```

Your website should be now live!  🚀

You can follow my personal blog at [https://flyingcakes85.github.io/blog/](https://flyingcakes85.github.io/blog/)

Follow me on GitHub : [flyingcakes85](https://github.com/flyingcakes85)
A Simple Machine Learning Cheat Sheet For Cracking The Theory Interview
Tags: machinelearning, datascience, python, interview
Published: 2021-05-24 11:12:14

Hello Machine Learning Enthusiasts, I found this great Machine Learning cheat sheet that you can use for acing your ML theory interviews.

Happy Reading!!! 🔥🔥🔥 

### **Bias vs. Variance**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uetd82x9z305bt99106r.jpg)

### **Imbalanced Data in Classification**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/czqhpv63wb1xwknzherk.jpg)

### **PCA Dimensionality Reduction**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eh84d6pebyeuhrsal1d8.jpg)

### **Bayes Theorem and Classifier**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9fabotpnqadjdvcwolo9.jpg)

### **Regression Analysis**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lua0rb05ac8fn596imqv.jpg)

### **Regularization in ML**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5c4vqgdngvorpuwl33mz.jpg)

### **Famous CNN's**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cedif9fnmms8uq234tqa.jpg)

### **Convolutional Neural Networks**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/caew1b7hdcpnpuwkcucb.jpg)

### **Ensemble Learning in ML**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wuqi64ju8ayhh05c39sy.jpg)

### **How To Prepare For Behavioral Interview ? (1/4)**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqtkfwjq96pvbg71zujq.jpg)

### **How To Prepare For Behavioral Interview ? (2/4)**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/stqoldu8qve3em552xz0.jpg)

### **How To Prepare For Behavioral Interview ? (3/4)**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9ca4w8ddg3q8qsielt80.jpg)

### **How To Prepare For Behavioral Interview ? (4/4)**

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fw7q5693pvq58hra5e6b.jpg)

# **Conclusion**

Thank you for reading 🔥🔥🔥, and I hope you found this article useful 🔥

If you enjoyed reading, please consider following me here on Dev.to and also on Twitter @ [heyOnuoha](https://twitter.com/heyOnuoha/) so you don’t miss out on new content on topics like:

* Web Development (JS and Python)
* Improving as a developer
* Machine Learning

#### **Support Me** :
👉 Follow Me on [Twitter](https://twitter.com/heyOnuoha/)
👉 Buy me a ☕
<a href="https://www.buymeacoffee.com/heyOnuoha" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>


Cheers!!!
Weekly Challenge 114
Tags: perl, perlweeklychallenge
Published: 2021-05-24 10:17:14

[Challenge](https://perlweeklychallenge.org/blog/perl-weekly-challenge-114/), [My solution](https://github.com/manwar/perlweeklychallenge-club/tree/master/challenge-114/sgreen)

# TASK #1 › Next Palindrome Number

## Task

You are given a positive integer `$N`.

Write a script to find out the next [Palindrome Number](https://en.wikipedia.org/wiki/Palindromic_number) higher than the given integer `$N`.

## My solution

This task is relatively straight forward. I first check that a positive integer is supplied. I then have a while loop that increases by 1 each time. We have a found a palindrome number where `$number == reverse $number` is true.

## Examples

```
$ ./ch-1.pl 1234
1331

$ ./ch-1.pl 999
1001
```

# TASK #2 › Higher Integer Set Bits

## Task

You are given a positive integer `$N`.

Write a script to find the next higher integer having the same number of 1 bits in binary representation as `$N`.

## My solution

This is almost identical to the first task, except the match condition is different. We can quickly find out the number of set bits using `sprintf('%b', $number) =~ tr/1/1/` (convert to a binary and count the number of `1`s).

Like with the first task, I have a while loop that increases by 1 each time. Once we have found the correct number, I display that value and exit.

## Examples

```
$ ./ch-2.pl 3
5

$ ./ch-2.pl 12
17
```