teleren/devto huggingface dataset:
HiS #16: Managing Over-Participation
Tags: opensource, podcast, maintainers
Published: 2020-08-12 02:41:21

---
title: HiS #16: Managing Over-Participation
published: true
tags: opensource, podcast, maintainers
cover_image: https://press.stripe.com/img/v3/books/covers/working-in-public.jpg
canonical_url: https://hopeinsource.com/overparticipation
---

> Is more (information, people, code) always better? 

{% spotify spotify:episode:790utqQrcoSW2bBP7YErKX%}

If anyone is interested in open source and even more broadly the future of how we communicate and maintain online communities, I would recommend getting this book: ["Working in Public"](https://www.amazon.com/dp/0578675862/). Nadia is one of the most insightful people we've had the privilege to have in our community (and beyond) the last few years. Had a chance to just chat about the book and related ideas. Check out the transcript!

Snippet:
> To me, the book is sort of the combination of the last five years or so that I've spent looking at open source projects and communities. Some of which we explored even together on this podcast. But trying to make sense of an observation, I kind of been having over the course of that exploration. Just looking at the idea that we talk about open source being this thing where everyone is in.. anyone can participate, in an open source project.

Nadia Eghbal joins Henry to chat about her new book, Working in Public: The Making and Maintenance of Open Source Software, a deep-dive into the of open source community and how it may paint a picture of online communities in general. They talk about her 2x2 model of communities, the public web (Twitter) to private groups (group chat), the turn to individual creators, and the importance of moderation and boundaries.

Nadia: https://twitter.com/nayafia
Henry: https://twitter.com/left_pad

**Headings**:

- Five Years Looking At Open Source Communities
- Our Common Wisdom Encourages Participation But..
- Pushing Back on the Definition of Participation
- 2x2 of Contributor/User Growth
- Victims of Success
- It's a Good Problem, Let's Adapt to Changing CircLiberalism and "Don't Read the Comments"
- Questioning Hypotheses and Norms
- Salvation By Maintanance
- Welcoming Communities, Seeker Friendly Churches
- The Importance of Moderation: Saying No
- Inversion of Authority
- Whose Responsibility? Platforms?
- GitHub Isn't a Creator Based Economy, Yet
- Open Source and Content Creation
- Maintenance is Inherently Not Top of Mind?
- Modes of Production: Niche and Growth
- Beyond Zoom: Designing For Conversation
- Cozyroom
- Tools Vs. Apps: The Tyranny of Grids
- Simulating Walking Through a Park
- Digital Fidgeting Through Removing Video
- Focusing Through Distraction?
- Shaping to Future of The Social Web
- Creating the Suburbs of the Internet
- The Beautiful Dance of Norms
The Difference Between Regular Functions and Arrow Functions
Tags: javascript, react, node
Published: 2020-08-12 02:28:12

Arrow function — also called fat arrow function — is a new feature introduced in ES6 that is a more concise syntax for a writing function expression.

#### Following are the main differences:

* Syntax
* Arguments binding
* Use of this keyword
* Using a new keyword
* No duplicate named parameters

#### 1) Syntax:
{% gist https://gist.github.com/vandnakapoor19/dc471d3ad004a4167669d873821f2f80 %}

A developer can get the same result as regular functions by writing a few lines of code using arrow functions.

Curly brackets are not required if only one expression is present.
```
let add = (x, y) => x + y;
```
If there’s only one argument, then the parentheses are not required either:

```
let squareNum = x => x * x;
```

#### 2) Arguments binding
Arrow functions do not have arguments binding.

###### Regular Function
```javascript
// Object with Regular function.
let getData = {
// Regular function
    showArg:function(){
      console.log(arguments);
    }  
}
getData.showArg(1,2,3); // output {0:1,1:2,2:3}
```
###### Output
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9re38hysbredza2spk8j.PNG)

###### Arrow Function:
```javascript
// Object with Arrow function.
let getData = {
// Arrow function
    showArg:()=>console.log(arguments)
}
getData.showArg(1,2,3); // Uncaught ReferenceError: arguments is not defined
```
###### Output
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5o050o99h1zr0434neyo.PNG)

#### 3) Use of this keyword
unlike Regular functions, arrow function does not have their own "this" keyword. ```The value of this inside an arrow function remains the same throughout the lifecycle of the function and is always bound to the value of this in the closest non-arrow parent function.```
{% gist https://gist.github.com/vandnakapoor19/1105c8c9855e906f8da52894bc25d55f %}
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/f93aha2je1ybp8nxzcx3.PNG)

#### 4) Using a new keyword
Regular functions created using function declarations or expressions are constructible and callable. Regular functions are constructible; they can be called using the new keyword.

However, the arrow functions are only callable and not constructible, i.e., arrow functions can never be used as constructor functions.

**Regular function**
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6fe0l4byw1pmm3vzwg21.PNG)

**Arrow function**
```
let add = (x, y) => console.log(x + y);
new add(2,3);
```
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/90k4c0if5gm7jh0uj7qr.PNG)

#### 5) No duplicate named parameters
Arrow functions can never have duplicate named parameters, whether in strict or non-strict mode.

However, We can use duplicate named parameters for regular function in non-strict mode.
An Introduction to Things My Students Never Read
Tags: html, css, beginners, introduction
Published: 2020-08-12 01:58:56

There's an old joke among teachers that if you want to hide something from a student, stick it in a textbook. The 18 years I spent teaching at various colleges and the other 12 spent in the corporate training world have only convinced me to extend it to handouts, slide decks, most sentences not ending with "... and this will be on the quiz."

The flip side of that is that there are few places less conducive to learning something than a college classroom or a corporate training room. The only things you can guarantee are that everyone had trouble finding a parking spot, no one really wants to be there at that _particular_ moment, and a significant portion of the class _really_ needs to go to the bathroom.

I loved teaching and can honestly say the best part of the gig was the students. I still hear from many and I'm thrilled when I do. Students today have it far tougher than I did when I was an undergrad back in the early 1980s. I've never had time or patience for the "kids today are soft" stuff. Nowadays I tell people that I'm a freelance web developer when I have to be serious and when I don't I tell them I'm a professional cautionary tale. A lot of the work I do is related to the beer business somehow .

I really enjoy reading the tutorials published here. Even when it's a topic I'm familiar with I like to see how other brains make sense of them. The other day I came across a directory that held the website I used as a supplement for my last semester teaching basic web development.  As I read through a couple of the pages I thought  maybe ought to see the light of day again. The last university I taught at still hasn't killed the site, but it's really just a matter of time. My class was intended for students who weren't majoring in an IT-related field, so these are pieces that assume zero prior knowledge. I've never posted here before, so this seems like a good way to start.

So here's the plan:  I'm going to take a two or three of the pages I wrote for my class and convert them to blog posts and post them here. There will be a little editing just to make examples less specific to the university I was at and just generally tighten things up (because there are no finished blog posts, only current drafts). Eventually they'll also make their way onto my personal site, but I haven't gotten around to really building that out yet (professional cautionary tale, remember?). If there's any interest when I've worked through the stuff I'm revising, I'm open to requests. 

The first piece is going to deal with what is meant by "semantic HTML."  Stay tuned.
Day 72 : #100DaysofCode - Still Trying To Get API To Work
Published: 2020-08-12 01:40:23

Today I focused on my photo application again. I am still trying to figure out exactly how to implement my api and where to put my api calls for my application. The goal is to have a picture and a quote show under the photo and a user to be able to add the picture and quote to their page. 

So far I was able to implement what I learned about api calls during my cli project into this project. To get started, I am using two free apis. <a href="https://quotes.rest"> quotes.rest </a> and <a href="https://source.unsplash.com/random"> unsplash </a>. 

I just wanted to see if I could make an api call today and luckily I was able to! I created a photos controller and within the photos#index I added the following code: 

```
class PhotosController < ApplicationController
    def index 
        @photo = "https://source.unsplash.com/random"

        url = "https://quotes.rest/qod"
        uri = URI.parse(url)
        response = Net::HTTP.get_response(uri)
        res = JSON.parse(response.body)
        @quote = res["contents"]["quotes"][0]["quote"]
        author = res["contents"]["quotes"][0]["author"]
        category = res["contents"]["quotes"][0]["category"]
    end 
end
```

<h6> The photo </h6>
``@photo = "https://source.unsplash.com/random"`` holds the photo url for the views page. 

<h6> The quote </h6>

``@quote = res["contents"]["quotes"][0]["quote"]`` holds the quote! I made an ``Net::HTTP`` request to the api and was able to get the quote along with the author and category provided by the <a href="https://quotes.rest"> quotes.rest </a> api. I know all of this is very messy and needs to be out of my controller BUT I am proud of myself that I was able to make two calls to an api and show it in my views like this:

```
<h1> This is photos index </h1>

<div class="cards">
<% 20.times do  %>
    <div class="card">
        <img src="<%= @photo %>" alt="random" >
        <br/>
        <p> <%= @quote %> </p>
   
    </div>
<% end%>
</div>
```

This is the beginning of a beautiful friendship with rails and apis. 

As always, thanks for reading!

Sincerely, 
Brittany

Song of the day: (I was with my 1 year old nephew all day today and I love Disney haha)

{% youtube nbY_aP-alkw %}
The Ultimate Screencast Recording Process 
Tags: video, tutorial, screencasts
Published: 2020-08-12 01:27:23

Knowing how to screencast is a valuable skill, You may have already tried doing it and you found that it takes a ton of work. 

Generally, there are two approaches when it comes to creating screencasts:

1. Record your screen and then do a voice over
2. Record both simultaneously, but doing one step at a time while taking pauses between each step.

Each process has it's own pros and cons

## Record your screen and then do a voice over

Recording audio and the screen separately sounds really good in theory. You'll read a script and your life will be easy.

However, the problem with voiceovers is that it's so hard to match the pace of the screen recording. Sometimes you're coding too fast, other times you're going too slow.

So the only fix is to keep adjusting the video speed and try doing multiple takes when you're recording the audio. 

This is a ton of work and it can be really frustrating. So I personally don't use this approach.


## Record both simultaneously, but doing one step at a time while taking pauses between each step.

This is a nicer approach because after recording you don't need a lot of editing. You can remove the pauses by looking at the audio track.
Also, if you know you messed up, you can just do a loud clap, so that you can find the bad takes a lot faster.

On the other hand, I find this approach very hard for me. I can't do two things at the same time (code + voiceover).

So for me to get a good take, I need to redo the same step multiple times. 

---

So from my point of view, both approaches are hard. 
One is hard in the production phase, and the other in post-production.

But it doesn't have to be this way. Here's how I do it:

## Code. Pause. Narrate

1. I record my screen
2. pause
3. read the explanation from a script.

When editing, all I need to do is grab the voiceover and decide where I want it to start

I don't mess up or forget what I want to say, and I'm not doing two things at once

This is a combination of the 2 approaches and works perfectly for me.

Here's a video where I show how I do it:

{% youtube VNoraIXOo8Q %}
AWS Cli compute-optimizer command 
Published: 2020-08-12 00:44:41

Per AWS [webpage](https://aws.amazon.com/compute-optimizer/)

"*AWS Compute Optimizer recommends optimal AWS Compute resources for your workloads to reduce costs and improve performance by using machine learning to analyze historical utilization metrics. Over-provisioning compute can lead to unnecessary infrastructure cost and under-provisioning compute can lead to poor application performance. Compute Optimizer helps you choose the optimal Amazon EC2 instance types, including those that are part of an Amazon EC2 Auto Scaling group, based on your utilization data.*"

AWS CLI added compute-optimizer command since version on 06/10/2020 [2.0.21](https://github.com/aws/aws-cli/releases/tag/2.0.21) - at least it was not available on version 2.0.14 and I was not able to find references to compute-optimizer in earlier versions.
Make sure to update your AWS CLI version, refer to AWS [documentation](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) for more details.
![Install AWS CLI](https://www.virtiogroove.com/dev/devtoimages/awscliupdate.PNG)

Use `-u` or `--update` option on install binary
`sudo ./aws/install --update`

Once confirmed it is 2.0.21 and higher you will see new command
![Install AWS CLI](https://www.virtiogroove.com/dev/devtoimages/awsclicompute.PNG)

Now, let us enable Compute optimizer, if has not been enabled yet

`aws compute-optimizer update-enrollment-status  --status Active`

It is Global service - and it will collect information across all regions.
After few hours, depending of number of objects, you will start to see recommendations

Use subcommands bellow to get recommendations:

`o describe-recommendation-export-jobs`
`o export-auto-scaling-group-recommendations`
`o export-ec2-instance-recommendations`
`o get-auto-scaling-group-recommendations`
`o get-ec2-instance-recommendations`
`o get-ec2-recommendation-projected-metrics`
`o get-recommendation-summaries`
Composing Generator functions in JavaScript
Tags: javascript
Published: 2020-08-12 00:00:00

---
  title: Composing Generator functions in JavaScript
  published: true
  tags: JavaScript
  date: Wed Aug 12 2020 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/composing-generators-javascript
  cover_image: https://melvingeorge.me/_next/static/images/main-4acd9ed6bbbddddd5fcb1a455161eac8.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/composing-generators-javascript)
  
Composing generators in JavaScript is a way of combining and using a generator function inside another generator function body.

Let's understand this with the help of an example,

Suppose we have a generator function which generates number from a starting number to an ending number.

```javascript
// Generates numbers from start to end
function* GenerateNumbers(start, end) {
  for (let i = start; i <= end; i++) {
    yield i;
  }
}
```

Now let's create another generator function that uses the above `GenerateNumbers()` generator function.

The new generator function first generates values from 1 to 100 and then from 300 to 400.

Let's use the `GenerateNumbers()` inside the new generator function to generate those numbers.

```javascript
// Generates numbers from start to end
function* GenerateNumbers(start, end) {
  for (let i = start; i <= end; i++) {
    yield i;
  }
}

// Sequence Generator 1 - 100 and 300 to 400
function* SequenceGenerator() {
  // embed another generator function here
}
```

Inside this function, we need to use the `yield*` special keyword to compose or embed the generator function within a generator function.

```javascript
// Generates numbers from start to end
function* GenerateNumbers(start, end) {
  for (let i = start; i <= end; i++) {
    yield i;
  }
}

// Sequence Generator 1 - 100 and 300 to 400
function* SequenceGenerator() {
  yield* GenerateNumbers(1, 100);
  yield* GenerateNumbers(300, 400);
}
```

Let's use the `for..of` looping statement to print the values to the console.

```javascript
// Generates numbers from start to end
function* GenerateNumbers(start, end) {
  for (let i = start; i <= end; i++) {
    yield i;
  }
}

// Sequence Generator 1 - 100 and 300 to 400
function* SequenceGenerator() {
  yield* GenerateNumbers(1, 100);
  yield* GenerateNumbers(300, 400);
}

for (let number of SequenceGenerator()) {
  console.log(number);
}

/* 
OUTPUT
------

1
2
3
.
.
.
100
300
301
302
.
.
.
400

*/
```

As you can see that first the numbers from 1 to 100 are printed then numbers from 300 to 400 are printed.

### Feel free to share if you found this useful 😃.

---
Who is Uncle Bob
Tags: career, codequality, cleancode, development
Published: 2020-08-21 14:00:28

---
title: Who is Uncle Bob
published: true
date: 2020-08-12 00:00:00 UTC
tags: career,codequality,cleancode,development
canonical_url: https://coreydmccarty.dev/posts/2020_08_12_uncle_bob/
series: Clean Code
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/290he1upv9fxfugl0e9o.png
---

After spending several hours listening to his talks, it occured to me that this information is needed by all developers and perhaps may be beyond the immediate consideration of beginners. In order to do my part to share the message of a man named Robert C Martin I will be writing a summaries of his talks as I watch them.

# The Man

Robert C Martin is an American software engineer who writes wonderful books about writing code as well as teaching and talking on the material of his books. [His website](https://coreydmccarty.dev/posts/2020_08_12_uncle_bob/cleancoder.com) contains a great deal of information, and you have likely heard about these books as many are considered required reading for career developers.

- [Designing Object-Oriented C++ Applications Using the Booch Method](https://en.wikipedia.org/wiki/Special:BookSources?isbn=978-0132038379) 1995
- [Agile Software Development](https://en.wikipedia.org/wiki/Special:BookSources/978-0135974445) 2002
- [Clean Code: A Handbook of Agile Software Craftsmanship](https://en.wikipedia.org/wiki/Special:BookSources/978-0132350884) 2009
- [The Clean Coder: A Code of Conduct For Professional Programmers](https://en.wikipedia.org/wiki/Special:BookSources/978-0137081073) 2011
- [Clean Architecture: A Craftsman's Guide to Software Structure and Design](https://en.wikipedia.org/wiki/Special:BookSources/978-0134494166) 2017
- [Clean Agile: Back to Basics](https://en.wikipedia.org/wiki/Special:BookSources/978-0135781869) 2019

Uncle Bob is credited with cretion of the [SOLID principles](https://en.wikipedia.org/wiki/SOLID), was a founder of the [Agile Manifesto](https://en.wikipedia.org/wiki/Agile_Manifesto). He served as editor-in-chief of [C++ Report](https://en.wikipedia.org/wiki/C%2B%2B_Report) magazine and served as the first charman of the [Agile Alliance](https://www.agilealliance.org/). His writing can be found at [blog.cleancoder.com](https://blog.cleancoder.com/) and you can find many of his talks on YouTube if you don't have the ability to attend one in person. He runs a consulting company as as a company that provides training videos.

In the coming weeks I will be writing beginner level summaries of his publicly available videos.

Happy Coding!
WordPress Development Tracks
Tags: wordpress
Published: 2020-08-11 23:51:30

This is what I started with. What other training do you recommend for soon-to-be WordPress developer pros?

Junior Track on Lynda
https://www.lynda.com/learning-paths/Web/become-a-junior-wordpress-developer

Advanced Track on Lynda
https://www.lynda.com/learning-paths/Web/become-an-advanced-wordpress-developer

Tonya Mork
https://knowthecode.io/
How To Customize UITextView
Tags: ios, swift, tutorial
Published: 2020-08-11 23:42:17


So recently I’ve been working on an iOS version of my Mock My Words app. It’s pretty simple in functionality so I wanted to compensate with a nice user interface. The main functionality requires that a user enter (or paste) in text of pretty much any size. Oftentimes iOS text entry with a  **UITextField**, but that only offers single line input. For multi-line input, you have to use  **UITextView**  😔. After throwing that in my app I was rather unimpressed with how it looked. So, I decided to put my own spin on it. It took a bit of research and I’m pleased with how it turned out so I thought I’d share with the community on how customize the UITextView object to your own needs.

----------

## Create the UITextView

I’m building this app programmatically, so the first step is to instantiate the UITextView object. If you’re using a storyboard, you’ll want to create an IBOutlet and then follow the other steps the same. I declared my UITextView at the class level of the view controller it’s used in, and the one-line looks like

        **let** textBox = UITextView()

**Please note, all of the following code should be executed by  _viewdidload()_**, but feel free to extract it to a function and then call that function from viewDidLoad()

## Add it to the view

Next, you have to add it to the view hierarchy so it actually shows up. If you’re using a storyboard, skip this step.

        view.addSubview(textBox)textBox.translatesAutoresizingMaskIntoConstraints = **false**

## Set the delegate

If you actually want your app to react to actions the user may take, you need to make your view controller extend UITextViewDelegate, and then have the following line in your configuration.

        textBox.delegate = **self**

## Customize the textbox

You can use creative freedom here, but here’s how I laid out my textbox view.

        textBox.autocorrectionType = .no
        textBox.text = placeholderText
        textBox.backgroundColor = .secondarySystemBackground
        textBox.textColor = .secondaryLabel
        textBox.font = UIFont.preferredFont(forTextStyle: .body)
        textBox.layer.cornerRadius = 20
        textBox.textContainerInset = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)

## Give it a shadow

Again, this is optional, but this is how I gave my textbox a shadow so it has a material design feel.

        textBox.layer.shadowColor = UIColor.gray.cgColor;
        textBox.layer.shadowOffset = CGSize(width: 0.75, height: 0.75)
        textBox.layer.shadowOpacity = 0.4
        textBox.layer.shadowRadius = 20
        textBox.layer.masksToBounds = **false**

## Tell your view where to put it

Your method for doing this will definitely vary, but I used

        NSLayoutConstraint.activate([insert your array of constraints here])

And that’s it! You have a custom textbox that kind of floats above the view you put it in.