teleren/devto huggingface dataset:
Story of First Git PR: There will be a Knight
Tags: beginners, git
Published: 2020-07-26 19:46:14

####_Summary for shorter read_
#####*Someone has to push you for you to put your first pull request.
#####*Open Source Community will provide u your personal KNIGHT. You have to ask for it.
![Lias](https://dev-to-uploads.s3.amazonaws.com/i/b5h5z7bej0o864n5w5o0.jpg)[@Lais Carvalho](https://dev.to/laisbsc) ![Yetunde](https://dev-to-uploads.s3.amazonaws.com/i/je6qammy22d0bm8ns9dt.jpeg) [@Yetunde Dada](https://dev.to/yetudada)
###_Longer version below(Grab a coffee)_ 
This is my experience from [EuroPython](https://ep2020.europython.eu/) Online Sprint 2020! The Sprint I took reluctantly! ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/uplj57aoq3le5uf49nfq.png) 
I am from an electronics background. Had a github account from many years. Put a github.io page [here] (https://vjkr.github.io/). But never took any part of GitHub seriously. Reason..
####_Github pages frightened me._ 
#####They were like a terminal with white background and every word looking like a command!!
Well. I took a part in [Kedro](https://github.com/quantumblacklabs/kedro) sprint. There appeared Lais Carvalho who was kind enough to type 3 paragraph answer for my '2 lines question and a sad smiley'. She directed to this amazing [First PR slideshow] (https://slides.com/cheukting_ho/1st_pr) by Cheuk Ho. Also asking me to complete asap! I was like okay... Now I have to work. I declared Lais as my KNIGHT!!!

Lais and Yetunde(PM of Kedro) guided me in every single step. 
####I was also given special customized "beginner"-"easy"-"documentation" issues with work with. 
#### All I had to do was delete text inside a square bracket.:)
And then the long wait to get your PR merged to master! Voila!! My first contribution. Yetunde(rightly addressed as Queen by Lais) bestowed upon me contributor role on the [Release] (https://github.com/quantumblacklabs/kedro/blob/master/RELEASE.md) page. I assured Yetunde that I will be narrating  about her whole life.. 
####"Yetudada made me merge my first PR - deleting of text" and this made me a contributor. DELETE YET CONTRIBUTE!!
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fnmha1wflwhdx9mb0gpd.JPG)

Thanks Lais and Yetunde for getting me my first open source contribution. Any one needing any basic assistance. Ping me!
I have a joke about X but ...
Tags: jokes, javascript, php, docker
Published: 2020-07-26 20:03:31

- I have a joke about Docker but I am afraid someone might want to push me inside a container.

- I have a joke about Kubernetes but I am afraid someone might want to push me into a pod.


- I have a joke about Object Oriented Programming but I won't say it because I am now a new Person();


- I have a joke about PHP but you need to first use the trait to understand it.

Keep it coming 😂😂😂
Desafio Foodfy - Bootcamp Launchbase
Tags: html, css, javascript
Published: 2020-07-26 19:52:23

Eu estou fazendo o bootcamp Launchbase. No curso existem vários desafios para que possamos praticar o aprendizado. Aqui eu estarei postando o Foodfy que é o principal desafio do bootcamp.

O Foodfy é um desafio incremental. Quanto mais avançamos no bootcamp, mais coisas vamos acrescentando ao projeto. A primeira parte do desafio se encontra nesse [link](https://github.com/Rocketseat/bootcamp-launchbase-desafios-02/blob/master/desafios/02-foodfy.md). 

Aqui é o repositório do projeto no meu Github:

{% github dauryellen/foodfy-bootcamp-challenge %}

Nesse desafio nós temos que construir um site completo para uma empresa de receitas chamada Foodfy.

![Foodfy Gif](https://dev-to-uploads.s3.amazonaws.com/i/thiws5e209jylu6au19t.gif)

Para essa primeira parte do projeto foi utilizado bastante HTML, CSS e um pouco de JavaScript.
Builder Pattern in Javascript — With a Simple Example
Tags: javascript, design
Published: 2020-07-26 16:58:32

Many times, we may come across a scenario where we want to construct complex objects which involves computing multiple sequential operations. In such a scenario, a builder pattern can be used.

**Builder Pattern**: A Design Pattern that lets us extract the object construction out of its own class (its representation) so that it can be used for multiple different representations.

One advantage to use this pattern is, it lets us build objects with one operation on top of another where we don’t need to call all operations at a time, only the ones that are needed to produce a particular output.

In this article, we will go through a simple example as to how to implement builder pattern in Javascript.

Let’s say we want to do something like
`let calculator = new Calculator()`
`let result = calculator.add(5).subtract(1).divide(2).compute()`

This instantiates a calculator and performs multiple operations on top of one another and finally compute something.

Here’s how we can achieve this using Builder pattern

```
class Calculator {
  constructor(props){
    super(props);
    this.result = 0 ;
  }
  
  add = (number) => {
    this.result = this.result + number ;
    return this ;
  }
  
  subtract = (number) => {
    this.result = this.result - number ;
    return this;
  }
  
  divide = (number) => {
    this.result = this.result / number ;
    return this;
  }
  
  multiply = (number) => {
    this.result = this.result * number ;
    return this;
  }
  
  compute = () => {
    return this.result;
  }
}
```
When we call `new Calculator()`, the result is instantiated with 0 and then any number of operations can be performed on top of it, to compute the final result.

The part to focus here, is that the instance is returned from every method (every computation) and is then used to build up the complex object. This way the method calls can be chained. This chaining of method calls is known as fluent API [Understanding Fluent APIs](https://www.sitepoint.com/javascript-like-boss-understanding-fluent-apis/).

This gives us a gist of how builder pattern works and how it can be used in different scenarios.

*Original posted on [https://medium.com/swlh/builder-pattern-in-javascript-e5b13e4e51af](Medium)*
What is needed for easy onboarding?
Tags: help, proglangdesign, gwion, programminglanguagedesign
Published: 2020-07-26 19:44:35

Pretty much everything in the title...  

I need teammates for [Gwion](https://github.com/fennecdjay/Gwion).  
Currently there is also most no user doc, let alone the dev one. I just started adding doxygen comments to the [util](https://github.com/fennecdjay/gwion-util) directory (not pushed yet), hoping it helps.  

But maybe there is something I can do before that would be more useful.
What would you do?
JungleJS + Storybook + TailwindCSS starter
Tags: showdev, svelte, junglejs
Published: 2020-07-26 19:32:32

<figcaption>📷 Cover image: <a href="https://unsplash.com/@isaacquesada?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText" rel="external">Isaac Quesada</a></figcaption>

{% github ekafyi/junglejs-storybook-tailwind %}

[JungleJS](https://www.junglejs.org/) is a new static site generator. All [Svelte](https://svelte.dev/) goodness + [GraphQL](https://graphql.org/) data layer = fast, performant static site. Jungle’s underlying philosophy seems to resemble Eleventy, except Jungle uses Svelte. 

But as of now, Jungle does not have live reload yet. We have to restart the server any time we make a change. While only partially addressing the needs for live reload, we can use [Storybook](https://storybook.js.org/) for developing UI components. Even in project with hot reloading/live reload, it’s useful to have an isolated UI development environment like Storybook, which also provides us with [various addons](https://storybook.js.org/addons/), from accessibility to testing. Finally, [Tailwind](http://tailwindcss.com/) provides customizable, utility-first CSS, which helps us build our UI faster.

And thus [this starter site](https://github.com/ekafyi/junglejs-storybook-tailwind) was born.

For a quick start, you can click the “Use this template” button on the Github repository or run `git clone https://github.com/ekafyi/junglejs-storybook-tailwind.git`.

Let me know if you're building anything with this!

---

## Bonus track

{% youtube OQlByoPdG6c %}
Managing Kubernetes with ArgoCD
Tags: kubernetes, devops, gitops
Published: 2020-08-31 19:16:23

---
title: Managing Kubernetes with ArgoCD
published: true
date: 2020-07-26 19:24:26 UTC
tags: ["kubernetes", "devops", "gitops"]
canonical_url: https://www.joshkasuboski.com/posts/argocd-managed/
---

I had to manually apply changes to my cluster, but now a lot of it is controlled from git thanks to ArgoCD.

## Managed with a cluster repo

The cluster state is kept in [kasuboski/k8s-gitops](https://github.com/kasuboski/k8s-gitops). Each folder is a different function for the cluster. The gitops folder is special. It has the [ArgoCD](https://argoproj.github.io/projects/argo-cd) manifests and the apps folder.

ArgoCD will sync manifests from a git repo to the cluster. It continuously watches to make sure the desired state (from git) matches the observed state (in the cluster). You configure ArgoCD using CRDs. Argo has Apps and Projects. A Project configures access for Apps and an App represents a repo that deploys Kubernetes objects.

You can see my apps at [gitops/apps](https://github.com/kasuboski/k8s-gitops/tree/master/gitops/apps). I use an app of apps [pattern](https://argoproj.github.io/argo-cd/operator-manual/cluster-bootstrapping/#app-of-apps-pattern) to deploy. I apply this root “apps” app that then deploys the other apps for the cluster.

ArgoCD also comes with a dashboard that shows the apps and their status. You can also get a badge to put in the repo to show overall status.

![](https://argocd.joshcorp.co/api/badge?name=apps&revision=true)

![The argo dashboard shows apps](https://www.joshkasuboski.com/posts/argocd-managed/argo-dashboard.png)

## But why

Managing Kubernetes like this (once everything is automated) allows me to stand up a cluster with the same state simply by installing ArgoCD and applying an ArgoCD App.

It also keeps me from accidentally messing with the cluster since even if I delete a Deployment, ArgoCD will reapply it.
Day 10: A Little break away from the real action
Tags: 100daysofcode, javascript, css
Published: 2020-07-26 19:11:16

And on the 10th day she rested.. not literally but kinda. Messing with peoples code and pens is my  break, away from the real action.

I've been meaning to implement css animation for the longest time. Today was the day i did something about it.  I thought I'd have to write the code from scratch but there are numerous resources online that have done that for me and all devs; Thank you Google, what would would we do without you? 

After toying with [this resource]( https://tobiasahlin.com/moving-letters/) and a couple of pens, i added some animations to [this landing page](https://camp-re-emerge-website.now.sh/) I've been working on. So now its a little bit exciting to look at and i can keep on reloading 😅.  Side note: i might have overdone it, comes with the excitement of trying something new. 

Look who made it to day 10! 🥳🥳. Day 10 ends on a sad note though, my Pc  decided to bail out on me. May i find a solution tomorrow 🤞.
Woah! Blog Automation!
Tags: react, javascript, node, devops
Published: 2020-07-26 18:54:53

A proof of concept post that blog posts can be automated! 
APIs are really cool!


nothing more to see. :)


Connect with me!
[Linkedin](https://www.linkedin.com/in/rudy-goldhaber/)
[Twitter](https://twitter.com/syriiadvent)
[Github](https://github.com/SyriiAdvent)
My Github Readme Profile
Tags: github, git, design
Published: 2020-07-26 18:37:09

I just designed my Github readme profile and i think it looks good.
To make a github readme profile just make a repository with same name as your github username.
Inside the repository make a readme file and customize it as you like.
### <b>About my readme-profile<b>
If you are thinking how i make a gif like this then well its pretty simple.
Just create a website with a video playing in it's back and add some fade animation to the text so it will appear after sometime.
Record the website with screen recorder (i will recommend you to use google chrome extension as it is very simple and easy to use) then convert the video into gif and <b>BOOM</b> your github readme is ready.
Guys it is my first Dev.to post so please bear with it.
<span style="color:blue">Hope it will help you in you to devlop your github readme profile as well.</span>
CS193p Notes - Lecture 12: Core Data
Tags: ios, swift
Published: 2020-07-26 16:40:31

- Core data
    - Object-oriented database
    - Core Data uses SQL to store the data but interacting with it happens using Swift and object-oriented programming
- The objects we create in the database are `ObservableObject`s
- `@FetchRequest` fetches the objects and represents a "standing query"
- To get Core Data to a project it's required to check the box when creating a new project
    - If you already have a project where you want to add Core Data, create a new project and copy paste everything there

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

AppName.xcdatamodeId

`SceneDelgate.swift` creates `context` that is then passed to all views using `.environment`

```swift
@Environment(\.managedObjectContext) var context
...
.sheet(isPresented: $showFilter) {
  FilterFlights(flightSearch: self.$flightSearch, isPresented: self.$showFilter)
    .environment(\.managedObjectContext, self.context)
```

```swift
@Environment(./managedObjectContext) var context
let flight = Flight(context: context)
flight.aircraft = "B737"
let ksjc = Airport(context: context)
ksjc.icao = "KSJC"
flight.origin = ksjc // add flight to ksjc.flightsFrom
try? context.save() // disk might be full but in general don't fail

let request = NSFetchRequest<Flight>(entityName: "Flight")
request.predicate = NSPredicate(format: "arrival < %@ and origin = %@", Date(), ksjc)
request.sortDescriptors = [NSSortDescriptor(key: "indent", ascending: true)]
let flights = try? context.fetch(request) // KSJC flights sorted by ident
// flights is nil if fetch failed, [] if no such flights, otherwise [Flight]
```

[@RealLankinen](https://twitter.com/reallankinen)

- [Notes 1](https://dev.to/lankinen/cs193p-notes-lecture-1-course-logistics-and-introduction-to-swiftui-44ap)
- [Notes 2](https://dev.to/lankinen/cs193p-notes-lecture-2-mvvm-and-the-swift-type-system-406f)
- [Notes 3](https://dev.to/lankinen/cs193p-notes-lecture-3-reactive-ui-protocols-layout-5g8a)
- [Notes 4](https://dev.to/lankinen/cs193p-notes-lecture-4-grid-enum-optionals-4noj)
- [Notes 5](https://dev.to/lankinen/cs193p-notes-lecture-5-viewbuilder-shape-viewmodifier-fgh)
- [Notes 6](https://dev.to/lankinen/cs193p-notes-lecture-6-animation-1a8f)
- [Notes 7](https://dev.to/lankinen/cs193p-notes-lecture-7-multithreading-emojiart-2ak3)
- [Notes 8](https://dev.to/lankinen/cs193p-notes-lecture-8-gestures-json-1f3m)
- [Notes 9](https://dev.to/lankinen/cs193p-notes-lecture-9-data-flow-26e)
- [Notes 10](https://dev.to/lankinen/cs193p-notes-lecture-10-navigation-textfield-3ei9)
- [Notes 11](https://dev.to/lankinen/cs193p-notes-lecture-11-picker-2hgh)
- [**Notes 12**](https://dev.to/lankinen/cs193p-notes-lecture-12-core-data-eci)
- [Notes 13](https://dev.to/lankinen/cs193p-notes-lecture-13-persistence-2jeh)
- [Notes 14](https://dev.to/lankinen/cs193p-notes-lecture-14-uikit-integration-1p7m)

[Originally published here](https://www.notion.so/lankinen/CS193p-2020-iOS-development-course-from-Stanford-81c094238e9d471bbf059ea8d83b3e15)
Pick a commit from another branch to the current branch (cherry-pick)
Tags: git, github
Published: 2020-07-26 18:30:43

When to use cherry-pick
- Always try to not to use cherry-pick because it can make a duplicate commit.
- If you have already committed something on another branch, you can pick it and merge it with your working branch. Example: you may need a hotfix commit from another branch.
- Restoring lost comments. Sometimes a pull request might get closed without merging. But you can see those commit in the git log. So you can cherry-pick them

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

# Steps
##  1. Get the hash of the required commit
Checkout to the branch that has the required commit. Then get git hash of that commit by using CLI or Github site
```
git log --oneline 
git reflog
```
or you can view your git as a graph
```
git log --graph --oneline --all
```
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6tyisejrm8g5ybrcngq5.png)

##  2. Cherry-pick the commit
Checkout to the brach that you want to add the commit. Enter the following command. 
`git cherry-pick commit-id`. example:
```
git cherry-pick c67a4b7
```
if you want to add only the content without commit. You can add `--no-commit` 
```
git cherry-pick c67a4b7 --no-commit
```
Day 3 : Portfolio Project
Published: 2020-07-26 18:17:46

As mentioned in the earlier post I took a challenge to create a simple portfolio website by next friday. Today I learnt few css concepts like using Ids and box model. To be honest didn't spend much time on learning but just maintain consistency I turned up and worked on few FCC exercises
You can follow my progress here https://www.freecodecamp.org/thelazybug
Pylint-Ignore - Get Started Using Pylint
Tags: python, codequality, showdev
Published: 2020-07-26 17:47:06

<div align=center>
[![Pylint-Ignore](https://dev-to-uploads.s3.amazonaws.com/i/crx81b866qg851mfeikx.png)](https://pypi.org/project/pylint-ignore/)
</div>

I have a few projects that I haven't been using Pylint for and after recently running into a bug that I know would have been caught by it, I decided that needed to change and so I created this project [Pylint-Ignore](https://pypi.org/project/pylint-ignore/)

This allows me to start using Pylint and catch any bugs in new code I write and gradually burn down the backlog of possible issues in my projects. I think this is a better approach than having to configure everything at the start and having to clean up my whole project before I can add Pylint to my CI setup.

I hope you find this useful and look forward to your feedback.
How do you handle breaking changes with GraphQL? 
Tags: discuss, graphql
Published: 2020-07-26 17:45:30

I'm looking for some general tips for designing a GraphQL schema. Let's say you have the following schema:

```graphql
type Query {
  comments(threadId: ID!): [Comment!]!
  # Get the latest comment by the current user
  latestCommentByUser: Comment!
}

type Mutation {
  # Return true if success
  createComment(comment: CommentInput!): Boolean!
}

type Comment {
  id: ID!
  body: String!
  time: DateTime!
}
```

It looks good and is easy to understand. The client can get the comments by:
```graphql
query CommentsQuery {
  comments(threadId: 10) {
    id
    body
  }
  latestCommentByUser {
    id
    body
  }
}
```

Now, let's say the client wants to create a comment:
```graphql
mutation CreateComment {
  # Will return true if succeeded
  createComment(body: "This is a comment")
}
```

Nice! but, we probably want to get the new comment so we can get the id and the timestamp.

So, let's update schema:
```graphql
type Mutation {
  # Return the new comment
  createComment(comment: CommentInput!): Comment!
}
```

This is nice but we will probably also need to update our local version of `latestCommentByUser` (sure, this is a silly example but my point is that we need to get more data in the response). We might be able to do something like: 

```graphql
mutation CreateComment {
  # Will return true if succeeded
  createComment(body: "This is a comment") {
    id
    body
  }
}
query CommentsQuery {
  latestCommentByUser {
    id
    body
  }
}
```
But can we be sure that the mutation always will run before the query? Is it even valid to do both a mutation and a query in the same request?

It can be achieved by doing something like:
```graphql
type Mutation {
  # Return the new comment
  createComment(comment: CommentInput!): CreateCommentResponse!
}

type CreateCommentResponse {
  newComment: Comment!
  latestCommentByUser: Comment!
}
```

We can divide this into two questions:

1. How do you handle breaking changes in GraphQL? New url path? Just adding new values/methods in the schema and deprecate the old ones? Some other way?

2. How do you add more data to the mutation response? I find myself in situations, from time to time, when I want to add some data to the mutation request, like in the example above. Should we always return a generic object (like `CreateCommentResponse`) so we can add and remove data as we go or is it a better way?
Planning poker with Showdown
Tags: kotlin, selfhosted, agile, productivity
Published: 2020-07-26 16:55:53

---
title: Planning poker with Showdown
published: true
description: Planning poker with Showdown
tags: #Kotlin #selfhosted #agile #productivity
cover_image: https://raw.githubusercontent.com/Foso/Showdown/master/docs/img/ShowdownExample.png
---

In our team we are using planning poker to estimate our tickets. Before the Corona pandemic started, usually most people were at the office, so we used poker cards on paper or as an smartphone app. 

But with many people starting to work remote we had the challenge to do planning poker remotely. There are already existing websites or slack bots for this, but we wanted a solution that can be selfhosted and customized.

So i‘ve created a selfhosted open source web app called [Showdown](https://github.com/Foso/Showdown).
The server is written with Ktor and webpage is written with KotlinJs. You just need your browser to connect to the server. On the page you can see the other players and can see instant when someone has voted and of course the players votings at the end.

# How to use it?
## Deployment
You can find a deployment instruction [HERE](https://github.com/Foso/Showdown#deployment) or you can try the test instance on Heroku [HERE](http://shwdwn.herokuapp.com/#/)

## Usage
1) Choose a room name
To play planning poker, you and your team needs the same room link. You can choose any room name. Let's say you want to join the room "devto", then the room link is : [shwdwn.herokuapp.com/room/devto](shwdwn.herokuapp.com/room/devto) (On your own server your domain would be different)

2) Choose a player name
3) Vote for an option
[![](https://raw.githubusercontent.com/Foso/Showdown/master/docs/img/option.png)  
](https://raw.githubusercontent.com/Foso/Showdown/master/docs/img/option.png)
4) Show Votes
[![](https://raw.githubusercontent.com/Foso/Showdown/master/docs/img/showvotes.png)](https://raw.githubusercontent.com/Foso/Showdown/master/docs/img/showvotes.png)

When everyone has voted you can click "**Show Votes**" to reveal the votes or you can activate "**Auto reveal**" in the settings menu.

## Roadmap
I'm still working on adding additional features. When you find any bugs or have feature requests, feel free to let me know :)
Asynchronous Reading of Directory and File in Node.js
Tags: node, javascript, webdev
Published: 2020-07-26 16:46:32

Asynchronous programming in JavaScript certainly makes many operations easy to perform though initially, it is tough to get that.

**fs.readdir** reads the content of the directory and **fs.readFile** reads the content of the file asynchronously. So, here in this code, we will be reading the directory content and then the files in that directory in an asynchronous way.

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

Here, we are first reading the directory, storing the content of the directory in **fileNames** and as soon as directory traversing is done, we then start traversing the files of that directory. 

Each file is read and after that, the data of that file is pushed back into the dataset.


*If you find anything wrong or any other method for this, do mention in the comment section.*