teleren/devto huggingface dataset:
Consistency for Agile Teams
Tags: consistency, agile, teams, change
Published: 2020-04-15 12:51:10

---
title: Consistency for Agile Teams
published: true
description: Maintaining steady consistent progress in an agile environment
tags: consistency, agile, teams, change
cover_image: https://www.saent.com/wp-content/uploads/2016/12/winter-road-arrow-74780.jpeg

---

As an agile team, we are working tirelessly to deliver _working software_. Periodically, we pause and reflect on what we delivered, what we didn't, and what could be improved; whether it's the process itself, the organization of the team, or the tools. We improve, restart, and repeat.

It gets _tempting_ to pursue one improvement after another, and naturally, there's _always_ something to improve. However, in one of our meetings, our team decided to shift focus to something else: **consistency**. Before we improve, we need to be consistent.

## Consistency, how?

We have delivered the sprint goal. All is well. Now, instead of looking for improvements that will supposedly help us deliver more, we will maintain the same pace and try to do it for another two sprints. If we are able to do that, then we are consistent. And now, we can introduce gradual improvements and be consistent with them.

If not, then there's something that needs to be fixed. Let's revisit our process and progress and see where it went wrong. After finding and fixing the issue, we can try to be consistent again.

Sounds easy enough! But it is not. It takes good, clear communication, discipline, and commitment from each team member.

## Consistency and Change

Consistency is not about sacrificing change. It is rather about striking a balance between the two. Before adding new functionality or behavior, we should be consistent, and thus confident that it won't break already existing ones.

Change is inevitable, and we'd rather have a solid foundation that allows us to respond smoothly to that change; this _solidity_ comes through being consistent.

_this post was also published on our (RealxData) [blog] (http://realxdata.io/agile/2020/04/14/consistency-agile-teams.html) and [medium](https://medium.com/@amrrbakry/consistency-for-agile-teams-a96734739366)_
April 15 — Daily CodeNewbie Check-in Thread
Tags: codenewbie, checkin, beginners, discuss
Published: 2020-04-15 12:28:05

---
title: April 15 — Daily CodeNewbie Check-in Thread
published: true
description: A daily thread to ask questions, share progress, and stay accountable!
tags: codenewbie, checkin
series: Daily Checkin
---

You are encouraged to use this daily thread to:
- Ask for help (all questions encouraged)
- Explore topics you’re curious about
- Share something you’ve written or read
- Celebrate your wins
- Stay accountable to your goals
- Support your fellow programmers

Happy Coding!

---

_Interested in joining the twice-weekly live [#CodeNewbie Twitter chats](https://twitter.com/search?q=codenewbie)?  You can find us [on Twitter](https://twitter.com/search?q=codenewbie) each Wednesday at 9pm ET (1am GMT on Thursday) and Sunday at 2pm ET (6pm GMT)!_
JQuery form to object
Tags: jquery, javascript
Published: 2020-04-15 12:20:34


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jrjyyzkkhv04is7jlvy1.png)

```javascript
$.fn.getForm = function () {
            var self = $(this);
            var obj = {};
            self.find('input[name], select[name]').each(function (i, e) {
                if (e.type === "radio") {
                    if (e.checked) {
                        obj[e.name] = e.value;
                    }
                } else if (e.type === "checkbox") {
                    if (!obj[e.name]) {
                        obj[e.name] = [];
                    }
                    if (e.checked) {
                        obj[e.name].push(e.value);
                    }
                } 
                else {
                    obj[e.name] = e.value;
                }
            });
            return obj;
        }
```
```javascript
$('#ownform').getForm();
```
```json
{"FirstName":"Topias","LastName":"Taavitsainen","Gender":"Male","Heroes":["monkey_king","arc_warden","pugna"],"Job":"sea"}
```
Don’t make your .git folder publicly accessible, hacker can steal your source code
Tags: git, security, devops
Published: 2020-04-15 12:04:23

Have you ever realized the danger of a publicly accessible .git folder?

There are some developers who deploy their app to production using pure **git clone** method. They clone their app repository from gitlab/github/bitbucket directly to a web-root facing folder on server like /var/www/app/. That makes the .git folder exist in /var/www/app/.git.

If you don’t have proper permission to that .git folder, it will be accessible to the public. Like this:

<img class="s t u gp ai" src="https://miro.medium.com/max/996/1*jOflET0r-jSjdEoRGV1MOA.png" width="498" height="566" srcSet="https://miro.medium.com/max/552/1*jOflET0r-jSjdEoRGV1MOA.png 276w, https://miro.medium.com/max/996/1*jOflET0r-jSjdEoRGV1MOA.png 498w" sizes="498px" role="presentation"/>

And then hacker can download your .git folder using:

```bash
$ wget -c -r -np -R "index.html*" http://example.com/.git
```

After downloaded, it’s just an empty folder with .git folder on it. It also has all commit history.

<img class="s t u gp ai" src="https://miro.medium.com/max/1268/1*xWZYs1xTHuNW12RqsV7JhQ.png" width="634" height="150" srcSet="https://miro.medium.com/max/552/1*xWZYs1xTHuNW12RqsV7JhQ.png 276w, https://miro.medium.com/max/1104/1*xWZYs1xTHuNW12RqsV7JhQ.png 552w, https://miro.medium.com/max/1268/1*xWZYs1xTHuNW12RqsV7JhQ.png 634w" sizes="634px" role="presentation"/>

Hacker can reset to latest commit to restore the source code files.

```bash
$ git reset --hard HEAD
```

<img class="s t u gp ai" src="https://miro.medium.com/max/1136/1*Sxfmb1fbf6aS0z0NEc8RqQ.png" width="568" height="173" srcSet="https://miro.medium.com/max/552/1*Sxfmb1fbf6aS0z0NEc8RqQ.png 276w, https://miro.medium.com/max/1104/1*Sxfmb1fbf6aS0z0NEc8RqQ.png 552w, https://miro.medium.com/max/1136/1*Sxfmb1fbf6aS0z0NEc8RqQ.png 568w" sizes="568px" role="presentation"/>

And boom, your source code is leaked!

* * *

Here is how to mitigate it:
===========================

Add/edit your .htaccess file to make the .git folder hidden

```htaccess
RewriteEngine on  
RewriteRule .*\.git/.* - [404]
```

Why use 404 not found instead of 403 forbidden?  
Hacker doesn’t even know if the .git folder exists, it’s 404. But if it’s 403 forbidden, hacker knows there is .git folder, only not accessible.

* * *

Hope it helps.
Salam.
On.NET Episode: Consuming GraphQL in C#
Tags: dotnet, graphql, webdev, webapi
Published: 2020-04-15 12:02:34

In this episode, Brandon show us how to consume a GraphQL endpoint from a C# client, specifically an iOS + Android written in C# using Xamarin.

Learn more: https://codetraveler.io/DotNetGraphQL

{% youtube 4XlA2WDXyTo %}

If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).


## Useful Links
* [GraphQL for .NET](https://github.com/graphql-dotnet/graphql-dotnet)
* [Hot Chocolate: GraphQL Server for .NET](https://hotchocolate.io/)
* [ASP.NET Core Docs](https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-3.1&WT.mc_id=dotnet-devto-cephilli)
Daily Developer Jokes - Wednesday, Apr 15, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-04-15 12:00:14

---
title: "Daily Developer Jokes - Wednesday, Apr 15, 2020"
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=Wednesday%2C%20Apr%2015%2C%202020"
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/5e1259823aa3b.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 do assembly programmers need to know how to swim?

___A:___ Because they work below C level.
 -->
As We Fight Through Adversity
Tags: positive, jobs
Published: 2020-04-15 11:59:48

From [bigmacmurray.com/blog/as-we-fight-through-adversity](https://bigmacmurray.com/blog/as-we-fight-through-adversity)

This article was supposed to be about how to practice daily resilience. But in March of 2020, as I'm working to launch this site, adversity takes on a very different meaning. It's not the adversity of trying to overcome a demanding work and family schedule to find time to build my dreams that is dominating my thoughts right now.

There are very few people who have experienced what we are experiencing, or know how we will get through it. I'm sure in 3 or 6 months, when we resume our normal lives, most of us will breathe a sigh of relief. But today and tomorrow are filled with anxiety. We are helpless and weak and insignificant to the world. It's always been that way but we tend to forget sometimes. Most of us are feeling worried and anxious and need to get out and find a distraction. But we are also worried about the consequences. There are so many unknowns and so many people that could be hurt in my life if I drop my guard.

Most of us are staying positive and want to do the best we can for ourselves and our world. Every day is a challenge. I'm still breathing, so I have to keep going. I won't give up on myself or my family. Beside that thought there's not much I can offer to make anyone feel better. But I'm here for anybody that needs some help or needs to vent. If you need career advice or encouragement hit me up.

I'm enthusiastic for anyone looking to get into development (or engineering or whatever). I'm lucky to be competent during a time when more companies than ever are hiring. My current employer builds JavaScript applications, designs and programs in VR, builds Machine Learning apps, and tests Cyber Security. A career in any of those fields is interesting and accessible and growing. It's up to the individual what is the best fit. So to say, if this stuff interests you, I'm open to chat. [Here's a link to the contact form](/contact). Or find me on [Twitter](https://twitter.com/createadrln) or [Instagram](https://instagram.com/flexingthreesixfive).

One morning we will wake up and things will be better. Keep positive and hang in there until then.
Defining Class and Module Aliases in Ruby and Rails
Tags: ruby, rails, refactoring
Published: 2020-04-23 11:49:31

---
title: Defining Class and Module Aliases in Ruby and Rails
published: true
date: 2020-04-15 11:55:13 UTC
tags: [
  "ruby",
  "rails",
  "refactoring",
] 
canonical_url: https://rewritable.me/27plewichg/
---

In Ruby, creating a new name for an existing value is easy:

```
a = 1
b = a

b #=> 1
```

Since Ruby module names are just constants (and classes are just special modules), you can treat them the same way:

```
class OriginalName
end

NewName = OriginalName

NewName.new #=> #<OriginalName:0x00007ffdb0a59190>
```

In a Rails application, constants are expected to be defined in a file with a corresponding path and name (otherwise, the auto-loader will have trouble finding it).

For example, the following model

```
class Nested::OriginalName < ApplicationRecord
end
```

would conventionally be defined in:

```
app/models/nested/original_name.rb
```

The alias, `Nested::NewName`, would ideally be defined in:

```
app/models/nested/new_name.rb
```

For example:

```
Nested::NewName = Nested::OriginalName
```

It's more likely, though, that you would be looking for a shorter alias, without the namespace. As long as you follow the file path and name conventions, you can safely define any alias you want:

```
# app/models/new_name.rb

NewName = Nested::OriginalName
```
Python: Merging and Updating Dicts the New Way
Tags: python, tutorial, beginners, computerscience
Published: 2020-04-15 11:51:33

In the upcoming Python version 3.9 you can now merge and update Dictionaries by simply using `|` for merging and `|=` and for updating.

## Merge Dictionaries by `|` operator

```python
dict1 = {'Sam' : 15, 'Peter' : 27, 'John': 35, 'Ben' : 42} 
dict1 = {'Mark' : 15, 'Tom' : 27, 'Jack': 24, 'Ben' : 34}
dict3 = dict1 | dict2 
print(dict3)
#Ouput: {'Sam' : 15, 'Peter' : 27, 'John': 35, 'Ben' : 34, 'Mark' : 15, 'Tom' : 27, 'Jack': 24}
``` 

Just like `update()` the latter one's common key is combined with the new dict.

## Update Dictionaries by `|=` operator

```python
dict1 = {'Sam' : 15, 'Peter' : 27, 'John': 35, 'Ben' : 42} 
dict1 |= Dict({'Mark' : 15, 'Tom' : 27, 'Jack': 24, 'Ben' : 34})
print(dict1)
#Ouput: {'Sam' : 15, 'Peter' : 27, 'John': 35, 'Ben' : 34, 'Mark' : 15, 'Tom' : 27, 'Jack': 24}
```

Just like the previous one the latter one's common key is combined with the new dict.

If you are an experienced Pythonic Programmer you already would have guessed that it uses `|` and `|=` operator overloading.

Python 3.9 is scheduled to be released in this October!
Know About Android Jetpack Components & Architecture
Tags: android, javascript, devops, architecture
Published: 2020-04-15 11:24:17

What is Andoid Jetpack?
Jetpack is a suite of libraries, tools, and guidance to help developers write high-quality apps easier.

Prerequisites

To Implement any of the Android Jetpack Components it requires Android Studio version higher than 3.3 and  androidx.* setup.

Jetpack comprises the androidx.* package libraries, unbundled from the platform APIs. This means that it offers backward compatibility and  updated more frequently than the Android platform, making sure you always have access to the latest and greatest versions of the Jetpack components.

Android Jetpack Components
– Foundation
– Architecture
– Behavior
– UI
 

Android Jetpack Architecture
– Navigation
– Live Data
Read more here:https://www.rlogical.com/blog/what-is-android-jetpack-know-about-android-jetpack-components-architecture/
Instance Comparison Chart: Find The Right AWS EC2 Instance
Tags: aws, awsec2instance, awscostoptimization, awsreservedinstance
Published: 2020-04-15 11:16:40

---
title: Instance Comparison Chart: Find The Right AWS EC2 Instance
published: true
description: Use this Instance Comparison chart to find the right AWS EC2 Instance that matches your requirements and budget.
tags: AWS, AWS EC2 Instance, AWS Cost Optimization, AWS Reserved Instance
---
![EC2 instance](https://dev-to-uploads.s3.amazonaws.com/i/f2gacaf7mqr23bmbx233.PNG)

So you’ve decided to choose AWS the primary provider of your cloud service and now you’re looking into setting up your environment. You’ve got your project to be deployed and all you have left to do is choose an AWS instance that will run your machine image. But now, like many others before you, you are stumped by the countless choices of EC2 instances out there.

Choose the wrong ones and you pay the price not only from your wallet but also in the effectiveness of your cloud environment. It is a very common obstacle for new AWS users to overcome. Along with the varied types of instances, the different AWS EC2 pricing options add fuel to the flames of uncertainty. 

For example, purchasing i3EN 3XLarge for its memory and CPU specs is a choice that will leave you with an extra $2k expense in your annual bill when you can gain the same size for a cheaper price by purchasing Z1D 3XLarge instead. 

Having a concrete budgetary plan with a deep insight into the specs you are looking for can greatly help narrow down your choices. However, we don’t all come in with solid plans. Sifting through the choices is time-consuming and ineffective.

Totalcloud’s Instance Comparison Chart lets you view the instances in a scatter chart with rich customization options. You can compare instances, filter it by your preferences and view the different instances from lowest to highest EC2 prices. 
Choose from compute-optimized instances, General purpose instances or any other instance type, filter them according to the memory or vCPU specs you have in mind and view your narrowed down the list of instances according to the price from lowest to highest. 
Change the pricing model from AWS Reserved Instances of Windows or Linux to On-Demand pricing.
Click on the data points to compare multiple instances. 
View the prices as hourly, weekly, monthly or annually. 

Whether you come with everything you want already in your mind or you’re completely blank on what you’re looking for, you’ll still gain a lot of information from the chart. We hope you can find the right EC2 instances for your projects, you can provide us with feedback for any suggestions you might have.

You can check the tool out <a href="https://www.totalcloud.io/aws-instance-types">here</a>
![Table](https://dev-to-uploads.s3.amazonaws.com/i/u5xq62f1azs132umswgd.PNG)
Introduction to Python Programming Basics(Part 4)
Tags: python, beginners, tutorial, codenewbie
Published: 2020-04-15 11:04:20

<h2> File Management </h2>
Python has different methods you can do to a file which include;
<blockquote>
Creating a file <br>
Reading a file <br>
Updating a file <br>
Deleting a file <br>
</blockquote>
In order to work with any file in python we have to first open it.
```python
file = open('file.txt', 'w')
```
The above code will open the file and if the file is not found, it will create the file.
Now that we have a file opened, we can try to get some info about the file.
Note: we used w so as to open the file in write mode.
```python
file = open('file.txt', 'w')
print("Name of File: ", file.name)
print("Mode Opened In: ", file.mode)
```
When the above code is run, it will output:
```python
Name of File: file.txt
Mode Opened In: w
```
Now let's try writing something into our file:
```python
file = open('file.txt', 'w')
file.write("I am learning Python ")
file.write("Learning Python is Fun")
file.close()
```
It's always a good practice once you finish working with a file you close that's why I have used file.close()
For you to see the change you have to open the file.txt to see whatever you wrote has been executed. 
Now that we have written something in our file, let's try appending to it.
Appending basically is adding some values to an existing one or a file without deleting the current values in the file. So to append we use the mode a which is used for appending
```python
file = open('file.txt', 'a')
file.write(" and it is easy")
file.close()
```
Now to read what we have in our file. We use the r+ mode.
And in reading we create a variable and then assign whatever has been read from the file to the variable we created then it is the variable we now call to be printed.
```python
file = open('file.txt', 'r+')
contents = file.read(200)
print(contents)
```
I have used 200 so as it reads the first 200 characters of our text file. Now with that we will get the text file contents right in our terminal as follows
```python
I am learning Python Learning Python is Fun and it is easy
```

Hope you are progressing well, that's all for today, see you later.
How do you frontend-backend monorepo?
Tags: help, discuss, webdev
Published: 2020-04-15 11:01:29

That also includes backend isn't JavaScript.

My folder structure a while ago is like this,

```
- package.json
- .eslintrc
- packages/
  - local-frontend/
  - web-frontend/
  - server/
```

I don't use Lerna, nor Workspace.

But if so, how do I deploy?
React devs, why did you start using React?
Tags: javascript, discuss, webdev, react
Published: 2020-04-15 10:53:33

---
title: React devs, why did you start using React?
published: true
description: What problem does React solve for you
tags: JavaScript,discuss,webdev,react
---

I started using React over 4 years ago because I was interviewing for a job where I would be using it for all new projects. Up until then, I'd mainly used jQuery, Ember and plain old JavaScript.

Today, I still use React and I still enjoy it over the cumbersome mess of trying to build interactive apps with jQuery. I remember hours of frustration finding the root of bugs caused by manually keeping track of UI on the page.

![Buggs Bunny hammering a rock](https://media.giphy.com/media/P2xf5nPyu5WP6/giphy.gif)
_It felt like banging my head against a brick wall, hoping to break through._

**As a developer using React today, why did you start using it and what problem did React solve for you?**
Restful routes or why do I have to do this?!
Tags: rest, restful, http, codenewbie
Published: 2020-04-15 10:30:57

---
title: Restful routes or why do I have to do this?!
published: true
description: 
tags: rest, restful, http, codenewbie
---

Introduction:
REST or Representational State Transfer is an architectural style, a convention that enables interaction through descriptive HTTP requests : GET, POST or DELETE and makes it simpler to organize your app structure.


In order to understand how to use RESTful routes better, we need to take a look n what those HTTP requests mean.

GET is used to retrieve data and nothing else. It's like you'd play "get" with your HTTP dog...

POST is used when you want to make something new. Basically you send data to the database and the models, where it's processed and manipulated in the desired way. Nothing to do with posting mail though...

PATCH. Come on you two, patch things up! .. This one updates whatever you want to be updated.

DELETE is generally used to...you know...delete stuff.

---

A *GET* route should look like:
www.mywebsite.com/user/3 
www.mywebsite.com/items/3/edit
www.mywebsite.com/products/new

They all should only display the content and not process it in any way. That's a job for the other routes.

--- 

A *POST* route should look like:
www.mywebsite.com/products

You might wonder why is this looking like a GET route, well, it just LOOKS like it, but it behaves differently. Whilst a GET request will only display a form, a POST request will process the input values and enable CRUD actions.

---

A *PATCH* route should look like: 
www.mywebsite.com/items/3

Again, you'd think that we need the "/edit" but we don't. That '/edit' is only needed in the GET request, when we're displaying the updating form.

What PATCH does, it updates our (let's say) Item object, only with the specific parameters we're asking for, it doesn't recreate the whole object like a PUT request would do.

---

A *DELETE* route should look like: 
www.mywebsite.com/items/3

Here we're deleting the specified source from the server. Nothing to see, move along! 

---

You can see that we're following a clean pattern of routes here. A convention that is explicit to the user, that is easier to debug, easier to follow and also understand as there's a lot of documentation on it.