teleren/devto huggingface dataset:
Day 11 of 100 Days of Code & Scrum: Coding, Writing, and Physical Therapy
Tags: 100daysofcode, beginners, webdev, programming
Published: 2021-10-19 12:12:43

<small>Photo by <a href="https://unsplash.com/@bruno_nascimento?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Bruno Nascimento</a> on <a href="https://unsplash.com/s/photos/exercise?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></small>

Greetings, everyone!

It's Tuesday, and it's unfortunate that I won't be able to be as productive today because of my weekly physical therapy session. That said, I shall try my best to fulfill the minimum requirements of the challenge!

## Yesterday

I finished the draft of the introduction of my Scrum Guide for beginners.

## Today

### Scrum

- wrote about how the members of a Scrum Team function individually as well as their interactions with the others (still missing the Scrum Master section).
- read about traits that make an individual suitable for each role in a Scrum Team.
- looked into how businesses misuse Agile and Scrum in their operations.

### GraphQL

- review concepts I've learned last week.
- look deeper into how GraphQL differs from REST API, and which scenarios one should be used over the other.

![difficult roads lead to beautiful destinations](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9fb9iv4qjptfw1wgg8sp.jpg)

<small>Photo by <a href="https://unsplash.com/@helloimnik?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Hello I'm Nik</a> on <a href="https://unsplash.com/?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a></small>

Have a good day everyone! 

### Resources/Recommended Readings

- [The 2020 Scrum Guide](https://scrumguides.org/scrum-guide.html)
- [Mikhail Lapshin's Scrum Quizzes](https://mlapshin.com/index.php/scrum-quizzes/)
- [The Fullstack Tutorial for GraphQL](https://www.howtographql.com/)
- [Apollo Docs](https://www.apollographql.com/docs/)
- [A Short Introduction to the Scrum Framework by Jim Medlock](https://medium.com/chingu/a-short-introduction-to-the-scrum-methodology-7a23431b9f17)



### DISCLAIMER

This post only expresses my thoughts and opinions (based on my limited knowledge) and is in no way a substitute for actual references. If I ever make a mistake or if you disagree, I would appreciate corrections in the comments!

### Other Media

Feel free to reach out to me in other media!

<span><a target="_blank" href="https://www.rammina.com/"><img src="https://res.cloudinary.com/rammina/image/upload/v1638444046/rammina-button-128_x9ginu.png" alt="Rammina Logo" width="128" height="50"/></a></span>

<span><a target="_blank" href="https://twitter.com/RamminaR"><img src="https://res.cloudinary.com/rammina/image/upload/v1636792959/twitter-logo_laoyfu_pdbagm.png" alt="Twitter logo" width="128" height="50"/></a></span>

<span><a target="_blank" href="https://github.com/Rammina"><img src="https://res.cloudinary.com/rammina/image/upload/v1636795051/GitHub-Emblem2_epcp8r.png" alt="Github logo" width="128" height="50"/></a></span>
Comparing strings - What can go wrong #unicode
Tags: javascript, webdev
Published: 2021-10-19 12:02:56

### Experiment

For this experiment, please have a mac ready and open this sandbox: https://codesandbox.io/s/string-comparison-unicode-bl9q7.

Create a file with the same name as the variable `NAME_FILE_LIKE_THIS` (Jalapeño.txt) and upload it to the sandbox. The `onChange` event gets triggered and the uploaded file name is logged to the console and compared with the variable.

Now, you would assume they match. It clearly logs "Jalapeño.txt". And on Windows, they do match. But on Macs, they don't...

Why? To first understand what's happening, spread out the variable "name" like this in the onChange event: `console.log(...name)`.

The result is: `J a l a p e n ̃ o . t x t`. The ñ got split into two characters!

You can observe similar behavior with Japanese words like "プりん", or any word that contains diacritics.

---

### What's happening?

There are two ways to represent unicode characters. Precomposed (ñ), which is the default when you type, and decomposed (n + diacritic). When you upload a file on Macs, it turns the filename into the decomposed version.

### What's the fix?

You can turn a string into both its precomposed as well as decomposed representation using [string.normalize](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize).

```javascript
const decomposed = [...'Jalapeño'.normalize('NFD')]
// (9) ['J', 'a', 'l', 'a', 'p', 'e', 'n', '̃', 'o']

const precomposedAgain = [...decomposed.join('').normalize()]
// (8) ['J', 'a', 'l', 'a', 'p', 'e', 'ñ', 'o']
```
A Fun Programming Joke To Start Your Day
Tags: jokes, dailydeveloperjokes
Published: 2021-10-19 12:00:12

---
title: "A Fun Programming Joke To Start Your Day"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12597d4e1c1.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_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:___ What accommodations did the JavaScript developer request at the hotel?

___A:___ A room with a Vue.
 -->
PHP Abstract Classes Explained
Tags: php, abstract, dry
Published: 2021-10-19 11:58:29

Abstract classes in PHP are used to extend other classes. Used when more then one class use the same logic. Good for readability and for hiding smaller (obvious) details to make our life simpler.

##For example##

Lets say we have a webshop with 2 types of Users: customers and employees. A User, no matter if it's a customer or employee, always has a `user name` and `user type`. Although the type differs per user, the name is always the same: user name. This is how our abstract class would look like:

```
<?php
abstract class User {
    private $name;

    public function __construct($name) {
        $this->name = $name;
    }

    public function getUserName() {
        return $this->name;
    }

    public abstract function getUserType();
}
```

But this abstract class on it's own won't do so much. If you would create an User object, you would have a non-functional user. This doesn't exist on our webshop. So in order to make it useful, we create our two types of users:

```
<?php
class Customer extends User{
    private $id

    public function __construct($name, $id) {
        $this->name = $name;
        $this->id = $id;
    }

    public function getUserType() {
        return 'customer';
    }
}

class Employee extends User{
    private $id

    public function __construct($name, $id) {
        $this->name = $name;
        $this->id = $id;
    }

    public function getUserType() {
        return 'employee';
    }
}
```

As you can see, these classes are extended from our abstract  class. This means the getUserName() method is included/reachable, although not visual in our child classes. 

Also every method written in the parent abstract class can be overwritten in the child class. As you can see we defined getUserType(), but without any functionally yet. In the child classes we overwrite this method and give it functionality. This now will tell us more about the type of the user being used.

##Result##
Now we can create our first customer and employee and output each user type.

```
$customer = new Customer('John', 1);
$employee = new Employee('Jane', 1);

echo 'John is a '. $customer->getUserType().'.';
echo '<br>';
echo 'Jane is a '. $employee->getUserType().'.';
```

This would output:
```
John is a customer.
Jane is a employee.
```

~That's all folks!
JavaScript Let - How to declare block-scoped values?
Tags: javascript, tutorial, beginners
Published: 2021-10-19 11:32:00

In this short tutorial, we look at how to declare block-scoped values using JavaScript let. We also look at how the let keyword is different from the others.

This tutorial is a part of our initiative at [Flexiple](https://flexiple.com/), to write short curated tutorials around often used or interesting concepts.

### Table of Contents - JavaScript startsWith():
- [JavaScript let](#javascript-let)
- [Code and Explanation](#code-and-explanation)
- [Redeclaring variables](#redeclaring-variables)
- [Closing thoughts](#closing-thoughts)

## JavaScript let:
Until ES5, JavaScript variables had either global or local scope. Only after ES6 was block scope introduced in JavaScript. Scope denotes which variables we have access to in our program.

You may have come across functional scope variables, these variables are only accessible inside a function. You could receive an error in case you tried to print it outside the function. Apart from these, there are global variables. These variables can be accessed anywhere in the program and are declared using the var keyword.

Similarly, variables that are block-scoped are only accessible inside a particular block of code. These variables are declared using JavaScript let and these blocks are enclosed within { } brackets.

## Code and Explanation:
Let us look at a code snippet explaining the same.
```javascript
var num = 1;
console.log(num);
// Output: 1

{
  let num = 2;

  console.log(num);
  // Output: 2
}

console.log(num);
// Output: 1
```
In the code snippet, we initially declared a variable ‘num’ using the var keyword. We printed the value and the output was 1
We printed the value and the output was 1
We later open a block and use the let keyword to declare the value as 2. Now the value of ‘num’ inside the block is 2
Lastly, we print the variable after the block is closed, here the variable takes the values set using the var keyword
The above steps are an example of how the let method can be used.

## Redeclaring variables:
While using the JavaScript let, the variable cannot be redeclared within the same block. Attempting to do so would raise an error as shown below:
```javascript
{
  let num = 2;
  let num = 4; //Error: Identifier 'num' has already been declared
}
```
This is a common problem while using a switch case, this can be solved by using new blocks for each case. However, this is not a problem while using the var keyword. The below code snippet should give an idea of the case:
```javascript
{
  let num = 2; 
  console.log(num) // 2
}
{
  let num = 4; 
  console.log(num)// 4
}
```
As aforementioned, a similar syntax can be used while using the let method in switch cases as the variable has to be redeclared.

## Closing thoughts:
In this article, although we discuss in detail about the JavaScript let methods we have not explained in detail about scope. I would recommend you spend some quality reading about the various types of scopes and their uses.
Top Angular Interview Questions
Tags: angular, career, programming
Published: 2021-10-19 11:26:40

Precise has become one of the most famous systems for building front-end web applications. All things considered, it is typically a hotly debated issue in web advancement new employee screenings. 

This arrangement of Angular interview questions will surely be useful to clear your interview. Yet, before we get into that, let us rapidly recap about Angular.

![Angular IQ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u65abmpgqmelg2z55gd8.png) 

*Why Angular?*

Now comes the critical question; Why Angular? Because Angular comes with a range of benefits and features that are apt for enterprise applications and websites that have a lot of dynamic content or multiple workflows.

* What is the purpose of Angular?
* What are the essential building blocks of Angular?
* Mention some of the features of Angular.
* Discuss some advantages of using Angular.
* Can you think of any disadvantages of using Angular?
* Mention an example of the structural directive.
* What are templates in Angular?
* How are Angular expressions different from JavaScript * expressions?
* Explain the architecture of Angular.
* Tell us some differences between components and directives.
* What is the primary language used in Angular?
* Explain the lifecycle hooks.
* How are animations done in Angular?
* What are the special transition states?
* Explain the steps to create a reusable animation.
* Mention some of the functions that help control complex animation sequences.
* What are class decorators in Angular?

Want to know more questions, then go through [Angular interview questions and answers](https://www.techgeekbuzz.com/angular-interview-questions/) blogs and crack the interview. These questions curated by to MNCs.
Python Code Formatting Made Simple With Git Pre-commit Hooks
Tags: python, programming, tutorial, git
Published: 2021-10-19 11:18:52

It's hard to maintain coding style guides and standards for software projects.

The problem is that it's really easy to forget about maintaining these standards, which leads to inconsistent codebases where some files are formatted differently than others. This inconsistency makes the code much harder to read and understand, especially when trying to make changes or fix bugs in someone else's project.


Pre-commit hooks are helpful git scripts that run automatically before git commit. These scripts can be used with Black, Isort, and Autoflake tools, which help us easily maintain a clean python codebase.

[Python Code Formatting Made Simple With Git Pre-commit Hooks](https://www.the-analytics.club/python-code-formatting-git-pre-commit-hook)
Extract Text From Image With Python
Tags: python, pytesseract, programming, tutorial
Published: 2021-10-19 11:17:08

![text extraction graphic image ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v5jpqkon44s5dzl0nnlv.png)
##TO EXTRACT TEXT FROM IMAGE WITH PYTHON IS PRETTY EASY:
For some good reason one might want to extract texts from images, but the question is usually: how do I do that? , well.. if you happen to be among those that asked, Here comes the Calvary: Python is the answer.

We only need a few lines of code and just 2 python modules.

Without further ado, let’s dive into the codes already. We’ll begin by importing the relevant python modules for this program.

We are going to use [Pytesseract](https://pypi.org/project/pytesseract/) and [Pillow(PIL)](https://pypi.org/project/Pillow/). In case this is your first time using the aforementioned modules, you might want to click on them for a quick documentation read-up.

To install both modules is easy too, just use the normal *pip install [module]*. In case you re using linux distro like ubuntu and you got a “module not found error” on pytesseract, try installing tesseract-ocr first with *sudo apt install tesseract-ocr* ,then go ahead and install pytesseract with pip afterwards.

##Here is your code below:
```python
#importing the necessary modules
import pytesseract as pt
from PIL import Image
 
#Converting image to text
img = Image.open('/[image path]/image.jpg')
extracted = pt.image_to_string(img)
print(extracted)
print(type(extracted))
```

That’s all! You just got any readable text on your image. Easy Pizzy huh? Here we used a .jpg image, but you can even use a png as well, depending what your image extension is.

Meanwhile, you can now do whatever you want with your extracted text. Now that I have proven to you that to extract text from image with python is super easy, feel free to also check this image manipulation tutorial [here](https://pythgenie.geofsphere.com/working-with-images-in-python/) and see if it could come in handy in your next python project.
Lambda Expressions in Java
Tags: java, beginners
Published: 2021-10-19 11:13:47

## Introduction
Lambda expressions are similar to methods, but they are anonymous methods (methods without names) used to implement a method defined by a functional interface and they can be implemented right in the body of a method. A lambda expression is a short block of code which takes in parameters and returns a value so they implement the only abstract function and therefore implement functional interfaces.

###Syntax
(parameters) -> { code block }

The left side specifies the parameters required by the expression, which could also be empty if no parameters are required.

The right side is the lambda body which specifies the actions of the lambda expression. The body of a lambda expression can contain zero, one or more statements.

When there is a single statement curly brackets are not mandatory and the return type of the anonymous function is the same as that of the body expression.

When there are more than one statements, then these must be enclosed in curly brackets (a code block) and the return type of the anonymous function is the same as the type of the value returned within the code block, or void if nothing is returned.

##Using Lambda Expressions
####1.Example: No Parameter

interface Trigger{  
    public String display();  
}  
public class LambdaExpressionExample3{  
public static void main(String[] args) {  
    Trigger s=()->{ return "Lambda function is used";};  
    System.out.println(s.display());  
}  
}

####2.Example: Single Parameter(can also be with multiple parameter)
interface NumericTest {
	boolean computeTest(int n); 
}

public static void main(String args[]) {
	NumericTest Even = (n) -> (n % 2) == 0;
	NumericTest Negative = (n) -> (n < 0); 
        System.out.println(Even.computeTest(10));
        System.out.println(Negative.computeTest(-9));
}
####3.Lambda expressions as arguments
interface MyString {
	String myStringFunction(String str);
}

public static String reverseofStr(MyString reverse, String str){
  return reverse.myStringFunction(str);
}

public static void main (String args[]) {
	// lambda to reverse string
	MyString reverse = (str) -> {
		String result = "";	
		for(int i = str.length()-1; i >= 0; i--)
			result += str.charAt(i);	
		return result;
	};
	System.out.println(reverseofStr(reverse, "Lambda example")); 
}

lambda expressions are added in Java 8 to provide functionalities such as
Enable to treat functionality as a method argument, or code as data.

A function that can be created without belonging to any class.

A lambda expression can be passed around as if it was an object and executed on demand.

so it saves a lot of code. In case of lambda expression, we don't need to define the method again for providing the implementation.
Create nice Readmes for your open source projects ✨
Tags: opensource, webdev, markdown, github
Published: 2021-10-19 11:10:31

---
canonical_url: https://blog.avneesh.tech/create-nice-readmes-for-your-open-source-projects
---

Creating good Readmes for your open source project is very important to get some popularity, stars, forks, and contributors. So today we are going to look at 2 ways to create beautiful Readmes.

###  [1. Readme-md-generator](https://github.com/kefranabg/readme-md-generator) 

This CLI tool generates a great looking in a few minutes. To use this tool run-

```
npx readme-md-generator
```
After running this command, it will ask you a bunch of questions for adding in the readme. 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1634631785207/xTIl0Tdl6.png)
After you have answered all the questions it will create a README.md file for you that looks like this-

{% gist https://gist.github.com/avneesh0612/4426c933fa3360fc8c880ef92a251a98 %}

Now you can edit and tweak it as per your need. 

#### Quick hack
If you want to preview the readme directly hit ctrl + shift + V and it will show you a live preview.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1634631985171/kyEEEGF87.png)


### 2.  [Readme.so](https://readme.so/) 
If you want to build a more customized Readme, then this is a great tool built by @[Katherine Peterson](@katherinecodes).

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1634632855581/5CoDKpy2B.png)

By just clicking some buttons and editing some text, I got a nice readme like this-

{% gist https://gist.github.com/avneesh0612/b226e6a76499c18586a10b6f258640f3 %}


I hope you could make some nice Readmes for your open source projects with these amazing tools.

What tools do you use for making your Readme? Let me know in the comments 👇


**Useful links-**

[Readme MD generator](https://github.com/kefranabg/readme-md-generator) 

[Readme.so](https://readme.so/)

[All socials](https://avneesh-links.vercel.app/)
Robotic Process Automation - a tool or a strategy?
Published: 2021-10-19 10:53:00

[Robotic Process Automation](https://fastpathautomation.com/) is now a technology used by over 85% of large enterprises. These businesses can enjoy many benefits, including lower operational costs, higher accuracy and faster throughput. 

[RPA](https://fastpathautomation.com/) can make a huge difference in a company's bottom line. You need to have an automation program that covers your entire business. This broad deployment strategy brings enormous benefits in terms of cost and accuracy. It's important to note that RPA can be used at the corporate level as a strategic technology.

<h2>Into a digital business world</h2>

Many businesses are pursuing digital transformation as a strategic plan, particularly legacy ones that are being challenged by digital competitors. Many existing enterprises are being disrupted by these new, digital-first companies. They can operate without the overhead of legacy systems and with greater accuracy and cost savings than automation. RPA allows you to apply the same digital approach to your entire business.

<h2>Automation's hidden value</h2>

A strategic method is to look at where RPA and the artificial intelligence (AI) and machine learning (ML) tools can bring advantages to your customers. Take a look at the existing metrics that measure customer success. What can automation do to improve the speed of service delivery? Are you able to pass some of the savings or improved accuracy on to your customers?

For banks, automating loan assessment can speed up processing times. Even though there's no cost reduction, it still provides valuable business benefits. It is not a good idea to focus on short-term tactical cost savings without considering the larger strategic picture of pleasing customers. It is possible to achieve both, which is not uncommon. A better customer experience often requires speed and accuracy.

RPA should be a strategic tool that every company has in its arsenal. You need to approach RPA in this way to reap the greatest benefits. Strategic implementations are the most effective. They can span entire companies, drive digital transformation and maximize customer benefits.