teleren/devto huggingface dataset:
Summarize Scrum terminology
Published: 2022-06-18 14:48:36

## Introduction
We use introduced Scrum in our business.
But I'm new to working in Scrum format.
Therefore, this time I will write about the terms used in Scrum.

※It will be a rough content.
Also,not all of terminology are covered.

## What is Scrum?
![Scrum diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/whga9kkhsnokk3q9pxjv.png)
 
Scrum is a lightweight framework for people, teams, and organizations to create value through adaptive solutions to complex problems.

Features include
- Increase the speed of service/product development.
- Flexibility to withstand change.

## Scrum terminology
Here is a broad introduction to Scrum terminology.

### Scrum Team
Scrum team are people who work on sprints.

The Scrum team consists of:

|  Role  |  Explanation  |
| ---- | ---- |
| Product Owner | Responsible role in determining product direction. |
| Scrum Master  | The role of managing the process of Scrum development.<br>Coordinating role in resolving issues and explaining rules in development.  |
| Development Team | Members who actually design and build.  |

## Sprint
A short, delimited period for the Scrum team to complete a certain amount of work.

The standard sprint period is one week to one month.

### Sprint Planning
An event to discuss sprint goals and plan the work needed to reach those goals.

**Sprint Goal** is a goal set in a sprint.

### Daily Scrum
Daily Scrum is an event to check if a sprint goal can be achieved.
It will be held every day in 15 minutes, such as in the morning.

### Sprint Review
Sprint review is one of the meetings held at the end of the sprint.
It will be an event to check the results of the sprint and get feedback.

### Sprint Retrospective
Sprint Retrospective is one of the meetings held at the end of the sprint.
It is like looking back on a sprint and considering the next improvement.

## lastly
I wrote an article in English for the first time
I will continue to write articles to familiarize myself with the English language.

## Reference information
[About Scrum](https://www.ogis-ri.co.jp/column/agile/agilescrum01.html)
[What is Scrum?](https://asana.com/ja/resources/what-is-scrum)
ASP.NET Core MVC - What is IActionResult?
Tags: webdev, mvc, csharp, dotnet
Published: 2022-06-18 14:45:52

The IActionResult type is a based abstraction of an ActionResult.

<aside>
💡 An ActionResult is a return type of a controller method, also called an action method, and serves as the base class for *Result classes. Action methods return models to views, file streams, redirect to other controllers, or whatever is necessary for the task at hand.

</aside>

It specifies how a response is going to be given for a Specific Request.

The IActionResult return type is appropriate when multiple action result return types are possible in an action.

![IActionResult Overview Diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j9eq3d2uuskrhmfmteg0.png)

The IActionResult is an interface, while action results themselves are abstract classes.

##
ASP.NET Core MVC - Introduction
Tags: webdev, dotnet, csharp, mvc
Published: 2022-06-18 14:42:52

Hey fellows, In this article series I’m going to cover the following areas in the Web development with C#, ASP .NET Core MVC, MVVM Tech Stack.

- ASP .NET Core
- Razor Pages and Blazor
- MVC Architecture
- MVVM Architecture
- Models, ViewModels, Views, Partial views, Controllers, ViewComponents
- Dependency injection, Major dependency injection lifetimes, Services
- SQL Server configuration, EFCore migrations, Relationship types
- Authentication, Authorization, Cookie-based Authentication
- Azure Deployment

So, In this section, we will talk about MVC architecture at a high level.

## What is MVC mean?

The **Model-View-Controller (MVC)** is an architectural design pattern that divides a software application/system into three main logical components,

1. **The model** 
2. **The view** 
3. **The controller**

Each of these components is made to control and manage specific development domains in an application. 

MVC is one of the most frequently used industry-standard web development frameworks to create scalable and extensible projects.

![MVC Architecture Diagram](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/maimprt3bgkt2hcjs3ea.png)
 



## Model

In basic C# ASP .NET Core Web applications, it acts as a C# class which holds application data as a Data Blueprint. It also manages the Database operations and relations.

Ex: Buyer, Seller, Admin User, Categories Classes in e-commerce Applications

So Basically, The Model component corresponds to all the data-related logic that the user works with.

## View

The view is a component that displays the user interface. In C#, It’s the CSHTML file (Razor Views). This handles the app's data presentation and user interaction

In view, you can trigger/notify the events that get handled by the controllers.

## Controller

A controller controls the workflow that a user interacts with MVC application**.** A controller contains the flow control logic for an ASP.NET MVC application. A controller determines what response to send back to a user when a user makes a browser request.

According to some folks,

> Controllers are the brain of an [ASP.NET](http://asp.net/) Core application. They process incoming requests, perform operations on data provided through Models, and selects Views to render on the browser.
> 

Controllers are stored inside the Controllers folder in the root of the app.

Next Article, we will talk about these 3 main sections with C# examples.
Minimum Rounds to Complete All Tasks
Tags: leetcode, dsa, theabbie
Published: 2022-06-18 14:30:40

You are given a **0-indexed** integer array `tasks`, where `tasks[i]` represents the difficulty level of a task. In each round, you can complete either 2 or 3 tasks of the **same difficulty level**.

Return _the **minimum** rounds required to complete all the tasks, or_ `-1` _if it is not possible to complete all the tasks._

**Example 1:**

**Input:** tasks = \[2,2,3,3,2,4,4,4,4,4\]
**Output:** 4
**Explanation:** To complete all the tasks, a possible plan is:
- In the first round, you complete 3 tasks of difficulty level 2. 
- In the second round, you complete 2 tasks of difficulty level 3. 
- In the third round, you complete 3 tasks of difficulty level 4. 
- In the fourth round, you complete 2 tasks of difficulty level 4.  
It can be shown that all the tasks cannot be completed in fewer than 4 rounds, so the answer is 4.

**Example 2:**

**Input:** tasks = \[2,3,3\]
**Output:** -1
**Explanation:** There is only 1 task of difficulty level 2, but in each round, you can only complete either 2 or 3 tasks of the same difficulty level. Hence, you cannot complete all the tasks, and the answer is -1.

**Constraints:**

*   `1 <= tasks.length <= 105`
*   `1 <= tasks[i] <= 109`

**SOLUTION:**

    from collections import Counter
    
    class Solution:
        def minimumRounds(self, tasks: List[int]) -> int:
            rounds = 0
            ctr = Counter(tasks)
            for f in ctr.values():
                found = False
                for i in range(f // 3, -1, -1):
                    if (f - 3 * i) % 2 == 0:
                        rounds += i + (f - 3 * i) // 2
                        found = True
                        break
                if not found:
                    return -1
            return rounds
Docker Desktop 4.9.1 is available
Published: 2022-06-18 14:28:39

![dockerelease](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ac09h2kxj4rtxt17gq0b.png)

[Docker Desktop 4.9.1](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=module) comes with [Docker Engine 20.10.16 ](https://docs.docker.com/engine/release-notes/#201016)and [Compose 2.6.0](https://docs.docker.com/compose/release-notes/#260) for the first time. This new release is [available to download](https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=module) for the new users as well as to update if you have existing 4.9.0 version installed in your system.

![imagesavailable](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3u6azf80s7hchvef06ag.png)
 

In this release, new changes include:
- [New Docker Desktop Extensions](https://www.docker.com/products/extensions/) have been made available.
- The [docker/disk-usage-extension ](https://hub.docker.com/r/docker/disk-usage-extension)was updated to v0.2.4. This extension allows you to view disk space used by Docker and reclaim disk space in one click.

![diskusage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3w8t8tf2t67oieez1m5f.png)
 


- The Containers table has been re-designed. 
- It is now possible to resize columns and bulk delete containers. 
- Sorting is also now persisted 
- New actions to copy the Container ID or pause a container is possible.


![containerid](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sksnivaiu7ba9zplry50.png)


Reference:

- [Docker Desktop for Mac 4.9.1 Release Notes](https://docs.docker.com/desktop/release-notes/)
- [Download Docker Desktop for Apple Chip](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=dd-smartbutton&utm_location=module)
- [Introducing Docker Extension](https://www.youtube.com/watch?v=BClJ0i9lXIY) - YouTube
- [Introduction to Docker Extension](https://docs.docker.com/desktop/extensions/)
- [How to create your own Docker Extension](https://docs.docker.com/desktop/extensions-sdk/)
- [Create Your First Extension](https://docs.docker.com/desktop/extensions-sdk/tutorials/initialize/)
- [Minimal frontend extension tutorial](https://docs.docker.com/desktop/extensions-sdk/tutorials/minimal-frontend-extension/)
- [Minimal React extension tutorial](https://docs.docker.com/desktop/extensions-sdk/tutorials/react-extension/)
- [Minimal docker CLI extension tutorial](https://docs.docker.com/desktop/extensions-sdk/tutorials/minimal-frontend-using-docker-cli/)
Auto change repo name with Github action
Tags: javascript, github, actionworkflow, api
Published: 2022-06-18 14:25:00

## Introduction
* I have just released repo that uses Github API and Github Action to watching to auto rename your repository through Variable Environment
* After you click to the star repository button, the action workflow will be run, and **after 60** seconds, the name and description of the repository will be updated to change.

## Usage

* 1 Create secret key ENV with name id RUN_TOKEN in setting -> developer setting
* Create run.yml job file in .github/workflow folder

##### 1. Default
* Visit [Autoname on Maket place](https://github.com/marketplace/actions/auto-name)
* Click on **Use latest version** button
* Copy the code below and paste it into your run.yml file

##### 2. Self-host
```bash
name: "Run"

on:
  workflow_dispatch:
  watch:
    types: [started,fork]

jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/cache@v2
        with:
          path: ~/.npm
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-
      - run: npm i
      - uses: ./
        with:
          githubToken: ${{ secrets.RUN_TOKEN }}
          actor: ${{ github.actor }}
```
#### Options

* See example action at [here](https://github.com/marketplace/actions/auto-name)
Book Club: "Test Driven Development: By Example" #13
Tags: books, tdd, discuss
Published: 2022-06-18 14:10:43

---
title: Book Club: "Test Driven Development: By Example" #13
published: true
description: A chapter by chapter discussion of "Test Driven Development By Example" by Kent Beck
tags: books, tdd, discussion
series: Book club TDD By Example
---

## Chapter 13: Make It

Previously we'd written some fake code that was returning a value we wanted for our test to pass, instead of using real logic. To remove this fake implementation, we used a test to drive us forward to a real implementation, but, it's a test we don't want to keep.

That's because the test is _testing_ the implementation, solely for the purpose of helping write the code we want.

If you know tests, you know already that we test behaviour **not** implementation. @quii did a great talk to explain this, using a shape factory as an example;
If we write a test to check the squares made in the square plant, good tests might be that the square has four sides, and all sides are the same length. If the square plant outsources some of it's work to the rectangle plant, we might test that a square is also made of two rectangles. But that's a bad test because, although it passes, if we switch our outsourcing in the future to the triangle plant, our tests will fail. We don't care if the square is made from rectangles or triangles (that's implementation detail): we just care that we get squares from the square plant.

Another thing happening in this chapter is some casting of types and checking with `instanceof` which then gets refactored out. Beck talks about a limitation in Java:
```java
Bank.reduce(Expression, String)
Expression.reduce(String)
```
...which he says isn't a problem in languages with keyword parameters. The name of the method in both classes is the same but parameters are different. I'm not familiar with keyword params, is this something anyone here has experience of?

🔎 View my code-along repo at https://github.com/ruthmoog/test-driven-development-by-example 

-----

![Book cover](https://learning.oreilly.com/library/cover/0321146530/250w/ ) Kent Beck's "[Test Driven Development: By Example](https://www.oreilly.com/library/view/test-driven-development/0321146530/)" was released in 2002. The book aims to explain how to use TDD to write quality code that works.
Majority Element II
Tags: leetcode, dsa, theabbie
Published: 2022-06-18 14:00:45

Given an integer array of size `n`, find all elements that appear more than `⌊ n/3 ⌋` times.

**Example 1:**

**Input:** nums = \[3,2,3\]
**Output:** \[3\]

**Example 2:**

**Input:** nums = \[1\]
**Output:** \[1\]

**Example 3:**

**Input:** nums = \[1,2\]
**Output:** \[1,2\]

**Constraints:**

*   `1 <= nums.length <= 5 * 104`
*   `-109 <= nums[i] <= 109`

**Follow up:** Could you solve the problem in linear time and in `O(1)` space?

**SOLUTION:**

    # class Solution:
    #     def majorityElement(self, nums: List[int]) -> List[int]:
    #         k = len(nums) // 3
    #         ctr = {}
    #         for num in nums:
    #             ctr[num] = ctr.get(num, 0) + 1
    #         return [num for num, count in ctr.items() if count > k]
        
    class Solution:
        def majorityElement(self, nums: List[int]) -> List[int]:
            nums.sort()
            n = len(nums)
            elms = set(nums)
            op = []
            for x in elms:
                ctr = bisect.bisect_right(nums, x) - bisect.bisect_left(nums, x)
                if ctr > n // 3:
                    op.append(x)
            return op
Building Your First Dockerized MERN Stack Web App
Tags: docker, webdev, programming, react
Published: 2022-06-18 13:48:15

Wrote an article on Dockerized MERN stack web app

{% embed https://aravindkumarvemula.medium.com/building-your-first-dockerized-mern-stack-web-app-8db82c47d8ba %}

Github Repository: 
{% embed https://github.com/lmas3009/Dockerized-MERN-Stack %}
Remove Duplicates from Sorted Array II
Tags: leetcode, dsa, theabbie
Published: 2022-06-18 13:30:41

Given an integer array `nums` sorted in **non-decreasing order**, remove some duplicates [**in-place**](https://en.wikipedia.org/wiki/In-place_algorithm) such that each unique element appears **at most twice**. The **relative order** of the elements should be kept the **same**.

Since it is impossible to change the length of the array in some languages, you must instead have the result be placed in the **first part** of the array `nums`. More formally, if there are `k` elements after removing the duplicates, then the first `k` elements of `nums` should hold the final result. It does not matter what you leave beyond the first `k` elements.

Return `k` _after placing the final result in the first_ `k` _slots of_ `nums`.

Do **not** allocate extra space for another array. You must do this by **modifying the input array [in-place](https://en.wikipedia.org/wiki/In-place_algorithm)** with O(1) extra memory.

**Custom Judge:**

The judge will test your solution with the following code:

int\[\] nums = \[...\]; // Input array
int\[\] expectedNums = \[...\]; // The expected answer with correct length

int k = removeDuplicates(nums); // Calls your implementation

assert k == expectedNums.length;
for (int i = 0; i < k; i++) {
    assert nums\[i\] == expectedNums\[i\];
}

If all assertions pass, then your solution will be **accepted**.

**Example 1:**

**Input:** nums = \[1,1,1,2,2,3\]
**Output:** 5, nums = \[1,1,2,2,3,\_\]
**Explanation:** Your function should return k = 5, with the first five elements of nums being 1, 1, 2, 2 and 3 respectively.
It does not matter what you leave beyond the returned k (hence they are underscores).

**Example 2:**

**Input:** nums = \[0,0,1,1,1,1,2,3,3\]
**Output:** 7, nums = \[0,0,1,1,2,3,3,\_,\_\]
**Explanation:** Your function should return k = 7, with the first seven elements of nums being 0, 0, 1, 1, 2, 3 and 3 respectively.
It does not matter what you leave beyond the returned k (hence they are underscores).

**Constraints:**

*   `1 <= nums.length <= 3 * 104`
*   `-104 <= nums[i] <= 104`
*   `nums` is sorted in **non-decreasing** order.

**SOLUTION:**

    class Solution:
        def removeDuplicates(self, nums: List[int]) -> int:
            n = len(nums)
            i = 0
            while i < n:
                ctr = 1
                while i < n - 1 and nums[i] == nums[i + 1]:
                    ctr += 1
                    if ctr > 2:
                        nums[i] = None
                    i += 1
                i += 1
            i = 0
            while i < len(nums):
                if nums[i] == None:
                    nums.pop(i)
                else:
                    i += 1
            return len(nums)
Pros and Cons of Server Side Rendering
Published: 2022-06-18 13:17:40

Server-side rendering (SSR) is an application’s ability to convert HTML files on the server into a fully rendered HTML page for the client. The web browser submits a request for information from the server, which instantly responds by sending a fully rendered page to the client. Search engines can crawl and index content prior to delivery, which is beneficial for Search Engine Optimization purposes.

**Some server-side rendering advantages include:**

- A server-side rendered application enables pages to load faster, 
  improving the user experience.
- When rendering server-side, search engines can easily index and 
  crawl content because the content can be rendered before the 
  page is loaded, which is ideal for SEO. 
- Webpages are correctly indexed because web browsers prioritize 
  web pages with faster load times.
- Rendering server-side helps efficiently load webpages for users 
  with slow internet connection or outdated devices.

**Server-side rendering disadvantages may include:**

- Rendering server-side can be costly and resource-intensive as it 
  is not the default for JavaScript websites, and the server takes 
  on the full burden of rendering content for users and bots.
- While rendering static HTML server-side is efficient, rendering 
  bigger, more complex applications server-side can increase load 
  times due to the bottleneck.
- Server-side rendering may not be compatible with third-party 
  JavaScript code. 
- Rendering server-side may be ideal for static site generation, 
  but frequent server requests and full page reloads can result in 
  overall slower page rendering in more complex applications.
hack Steam Wallet Codes
Published: 2022-06-18 13:14:41

Hackers can use [free steam gift card codes](url=https://gamersarenapro.com/free-steam-wallet-codes/) to take over your account. One of the most common methods they use is to contact Steam support in an attempt to recover the account. They can then provide the Steam support agents with the wallet code redeemed on that account and other PII to gain access to your account.
CustomEvent 客製一個 addEventListener
Tags: javascript, webdev, customevent, frontend
Published: 2022-06-18 13:08:18

## 本篇大綱

- [本篇要解決的問題](https://www.letswrite.tw/custom-event/#%e6%9c%ac%e7%af%87%e8%a6%81%e8%a7%a3%e6%b1%ba%e7%9a%84%e5%95%8f%e9%a1%8c)
- [製作一個 Demo](https://www.letswrite.tw/custom-event/#%e8%a3%bd%e4%bd%9c%e4%b8%80%e5%80%8b-demo)
- [CustomEvent](https://www.letswrite.tw/custom-event/#customevent)
- [在要的地方註冊客製事件](https://www.letswrite.tw/custom-event/#%e5%9c%a8%e8%a6%81%e7%9a%84%e5%9c%b0%e6%96%b9%e8%a8%bb%e5%86%8a%e5%ae%a2%e8%a3%bd%e4%ba%8b%e4%bb%b6)

---

## 本篇要解決的問題

之前 August 在公司寫了一整包會員登入的功能，原本以為如果有其他前端，只要知道員會登入了沒就可以，直到最近二位前端也進來要使用功能了，才發現需要寫一些事件出來讓他們二位可以監聽，因為他們必須在登入的中間做些其它事。

我們很常在寫像是以下的監聽事件：

```javascript
window.addEventListener('load', () => {}')
```

但，很少在寫自己的事件，好啦，是 August 本人還沒寫過 XD。

本篇就是實作一個自己的事件出來，主要參考文件：

[MDN：CustomEvent](https://developer.mozilla.org/zh-TW/docs/Web/API/CustomEvent)

---

## 製作一個 Demo

先來製作一個 Demo 來實作，Demo 的內容是會有一個 input，當 input 裡面輸入了 letswrite 時，按下「確認」按鈕後就會 alert 一個現在的時間。

Demo 的部份 August 直接在寫 CodePen 上：

<https://codepen.io/letswrite/pen/OJxZJYq>

---

## CustomEvent

CustomEvent 的寫法是這樣：

```javascript
const event = new CustomEvent("custom_event_name", {
  detail: '可以傳出去的值'
});
document.dispatchEvent(event);
```

要監聽我們上面這段註冊的事件是這樣：

```javascript
document.addEventListener('custom_event_name', e => {
  console.log(e.detail); // => 可以傳出去的值
})
```

`custom_event_name`：就是自己取一個事件的名稱，取一個看了知道是做什麼的名稱就行。

`detail`：是當事件被觸發時，可以傳出去的值，上面的範例是偷懶寫成：

```javascript
detail: '可以傳出去的值'
```

實際上也可以傳更多的資料出去，像這樣：

```javascript
detail: {
  name: "Let's Write",
  uri: "https://www.letswrite.tw",
  author: "August"
}
```

在 CodePen 上 August 寫的範例是把當下的時間給傳出去。

`CustomEvent` 的 option 還有很多的參數可以用，就請各位自行去看 [MDN](https://developer.mozilla.org/zh-TW/docs/Web/API/CustomEvent) 的文件囉。

---

## 在要的地方註冊客製事件

這段算是 August 給自己的一個紀錄，在看文件時，不知道為什麼就是熊熊轉不過來，不知道 `CustomEvent` 是要放哪？想說有可能看到這篇的 你 / 妳 也會有這種困擾，就寫了這段。

因為上面範例程式碼的那行：

```javascript
document.dispatchEvent(event);
```

在文件上是寫：

```javascript
obj.dispatchEvent(event);
```

想了 `obj` 是要寫什麼想了老半天，為了在以後回頭看這篇時可以立馬搞懂，範例上才會直接寫為 `document`。

結果，把 `obj` 寫上 `document` 後，一開始熊熊轉不過來的地方就又熊熊轉了過來（熊好忙 XD）。

那要把我們想監聽的客製事件放在哪呢？就放在「做了什麼事情時」的那邊。

比方本篇在 CodePen 上的 Demo，是當 `input` 被輸入了 **letswrite** 時要執行，那就把 `CustomEvent` 放在那邊，本篇 Demo 的程式碼如下：

```javascript
const input = document.getElementById('input');
const btn = document.getElementById('button');

btn.addEventListener('click', e => {
  let value = input.value;
  
  // 當 input 被輸入了 letswrite 時
  if(value === 'letswrite') {
    // 註冊客製事件
    let eventDemo = new CustomEvent('letswrite', {
      detail: new Date()
    })
    document.dispatchEvent(eventDemo)
  }
})
```

鏘鏘！就是這樣，喵~~