teleren/devto huggingface dataset:
Podcast Launch: Open Source For Business. Learn from the world's #1 OSS experts within enterprises!
Tags: opensource, techtalks, podcast
Published: 2020-09-21 22:45:34

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

I wanted to share with this great community a new podcast that OpenTeams just launched: Open Source For Business.

We launched this podcast because we want to help enterprises better manage their OSS technologies. Why? Because we believe that with the right corporate participation and involvement, OSS can and will thrive!

You can watch/listen to the podcast on:

* [YouTube](https://www.youtube.com/watch?v=KcfHi5zCTKM&list=PLA7hukZmf3&ab_channel=OpenTeams)
* [Spotify](https://open.spotify.com/show/1Him9218GEeAGc4J3yN2Lu?si=fxXh)
* [PCA](https://pca.st/5z9jsva3)
* [Google Podcasts](https://podcasts.google.com/feed/aHR0cHM6Ly9hbmNob3IuZm0vcy8yZWI0ZTczMC9wb2RjYXN0L3Jzcw==)

I'd love any feedback or recommendations. Please feel free to leave a review letting us know what you think on Apple podcasts!

Some of the guests that we've had on the show (and will be releasing the podcasts soon) include:
* Gil Yehuda, used to be the Senior Director of Open Source at Verizon Media
* Guy Martin, Director at OASIS
* Jono Bacon, author of People Powered: How Communities Can Supercharge Your Business, Brand, and Teams
* Patrick Masson, used to be the General Manager of the Open Source Initiative (OSI)
* Nithya Ruff, Head of Open Source at Comcast
* Joseph Jacks, Founder of OSS.Capital
* Stormy Peters, Director of the Open Source Program Office at Microsoft
* Paul Chen, Manager of Open Source Enablement & Compliance at Synopsys
* Wenjing Chu, Head of Open Source & Research at Futurewei Technologies
* Hong Phuc Dang, Founder of FOSSASIA

Stay tuned!
I didn't expect all of the help I got.
Tags: webdev, beginners, javascript
Published: 2020-09-21 22:32:40

Yesterday, I posted my first article. To my surprise I got more than one response. There were a lot of people there offering advice and willing to help. To all those people, I would like to say a thank you a lot. I know, i say  thank you way too much. I am just not used to asking for help or getting any for that matter.

Anyway based on the information I got yesterday, plus the information during my procrastination over the last 7 months, I have decided to start by learning Javascript first in a #100daysofcode setup. I am committing to a post everyday no matter how short to explain what I did that day from the 1st of October. I will put these posts up here an on medium. 

While learning the main crux of frontend web development, i.e HTML, CSS, Javascript, Bootstrap, React, etc. I will also be learning all the extras that make up the whole ecosystem like GIT, NPM, APIs, etc on the side. Hopefully I will be at a job ready position in that time.

Once again thank you to everyone that read my post yesterday and everyone that commented with some help.

PS: I started reading the "Your First year in code" book by Isaac Lyman and a couple of amazing co-authors and I actually appreciate this outlook on what to expect along the way. The how to code in one chapter chapter has been my favourite so far by the way. Thanks to them.

This is  to the next 109 days. #inittowinit
.gitignore mistake that everyone makes
Tags: github, git
Published: 2020-09-21 22:29:45

`.gitignore` should be a [whitelist](https://dictionary.cambridge.org/us/dictionary/english/whitelist), not a [blacklist](https://dictionary.cambridge.org/us/dictionary/english/blacklist) of files you want to include.

If we look at a bunch of random open-source projects, they all instead try to exclude every known undesirable file, e.g.

* https://github.com/streamich/react-use/blob/master/.gitignore
* https://github.com/facebook/relay/blob/master/.gitignore
* https://github.com/webpack/webpack/blob/master/.gitignore

This setup means that whenever a new developer joins the team or a new tool is adopted by someone in a team, you need to update `.gitignore` configuration. Examples of this include `.idea`, `.vscode` (IDE specific), `.nyc_output`, `.next` (tool specific), `.DS_Store` (OS specific).

A better solution is "ignore everything with exclusions". In practice, this means that you ignore all files (or at least all hidden files) by default and add exceptions to those files that were agreed to be added to the project, e.g.

```ini
coverage
dist
node_modules
package-lock.json
*.log
.*
!*/*.babelrc.js
!.dockerignore
!.editorconfig
!.eslintignore
!.eslintrc
!.gitignore
!.gitlab-ci.yml
!.npmignore
!.storybook
!.npmrc
!.prettierignore

```

In this project we are ignoring all files that start with a dot, but we've added exceptions to the configuration files that belong to the project.

This configuration also ensures that you do not accidentally commit private files (keys) that are conventionally prefixed with a dot too.

Adopting this convention will save back-and-forth discussing what exclusions should be added to `.gitignore`.
Announcing Sailscasts community
Tags: node, sails, javascript, codenewbie
Published: 2020-09-21 21:39:20

---
title: Announcing Sailscasts community
published: true
description: Join the Sailscasts community and let's collaborate on your journey with Sails.js and Server-side JavaScript
tags: #node, #sails, #javascript, #codenewbie
//cover_image: https://direct_url_to_image.jpg
---
I announced some time ago on [twitter](https://twitter.com/Dominus_Kelvin/status/1302614636227956736?s=20) that I will be building [Sailscasts](https://sailscasts.com) - a platform targeted at helping server-side JavaScript developers build out their ideas in the [Sails.js](https://sailsjs.com) Node.js framework. [Read](https://dominuskelvin.dev/blog/introducing-sailscasts) more about Sailscasts.

Prior to the launch of the Sailscasts platform, I created a Discord server where developers new to Sails.js can get help on their questions about Sails.js. Also available are channels for Node.js, Vue.js, amongst other fun channels.

When we are together we learn and grow faster. Join the Sailscasts community, I will be stoked to bid you welcome in there.

[Join the Sailscasts community](https://discord.gg/gbJZuNm)

P.S: Interested in learning Sails.js from the Sailscasts platform? [Join](https://sailscasts.com) the wait-list and you will be the first to know when it launches.

As always, you can [tweet](https://twitter.com/dominus_kelvin) at me on Twitter your thoughts on this article.

Code expressively 🎨, <br /> Kelvin

Originally posted on my [blog](https://dominuskelvin.dev/blog/announcing-the-sailscasts-community)
Intro to Objects Part 2: Methods
Tags: javascript
Published: 2020-09-21 22:05:25

**Writing Methods in Objects**
Another cool feature in  objects is the ability to write a method. Writing a method is when you add functions as a property on an object. Here is an example:

```
const math = {
  add: function (num1,num2) {
     return num1 + num2
  }
}
```

To call these functions we use a combination of accessing the object and invoking the function

```
const math = {
  add: function (num1, num2) {
     return num1 + num2
  }
}

math.add(5,5)

// 10
```
Even if you have multiple methods this will work

```
const math = {
  add : function(num1, num2){
    return num1 + num2;
  },
  sub: function (num1,num2){
    return num1 - y;
  }
}

math.add(5,5) // 10
math.sub(10,2) // 8
```

**Shorthand**

While the above syntax works perfectly fine there is new shorthand syntax you can use as well.

```
const math = {
  add(num1,num2){
  return num1 + num2;
  },
  sub(num1,num2){
  return num1 - num2;
  }
}

math.add(5,5) // 10 
math.sub(10,2) // 8
```

**Conclusion** 
Now you know how to write and use methods, using traditional or short hand syntax. For part 3 you will learn how to use the This keyword with objects.
Pairing with Taniyah Jackson on Pinning Comments to Articles
Tags: devstream, pairprogramming, ruby
Published: 2020-09-21 21:44:45

I had a lot of fun with Taniyah Jackson on the pairing today. She's brand new to Ruby and Ruby on Rails and I barely have any Rails experience, so it was fun being in the hot seat.

We didn't do a tonne of coding as we were going through some fundamentals about Ruby on Rails, [Active Record](https://guides.rubyonrails.org/active_record_basics.html) and [Object Relational Mappers](https://en.wikipedia.org/wiki/Object-relational_mapping) (ORM) to get us set up for working on the issue, but still great stuff.

We also talked about [polymorphic associations](https://edgeguides.rubyonrails.org/association_basics.html#polymorphic-associations) in Active Record, naming convention in Rails and did a brief overview of the [MVC architecture](https://www.sitepoint.com/model-view-controller-mvc-architecture-rails).

Here's the issue that Taniyah has started working on.

{%github https://github.com/forem/forem/issues/4523 %}

Once we have a PR up, I'll update this post with a link to it.

You can check out the [full stream on Twitch](https://www.twitch.tv/videos/747956751) (expires in 14 days) and/or check it out on Youtube

{%youtube YUA7k3MQx5g %} 

Taniyah is looking for her first developer role, so give her a follow on DEV and Twitter and help get her hired!

Taniyah:

* [Twitter](https://twitter.com/Code_Kuroi)

Nick:

* [Twitter](https://twitter.com/nickytonline)
* [Website](https://iamdeveloper.com/)
* [livecoding.ca](https://livecoding.ca)
* [YouTube](https://youtube.iamdeveloper.com)

Looking forward to the next pairing and thanks again Taniyah!

P.S.: Feel free to subscribe to [my Twitch](https://livecoding.ca) channel and [my YouTube channel](https://m.youtube.com/channel/UCBLlEq0co24VFJIMEHNcPOQ). 😉
O(n*m) staircase with N steps
Tags: javascript, 100daysofcode, interview, bigoh
Published: 2020-09-21 21:34:20

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

# Description:


`This problem was asked by Amazon.`

There exists a staircase with N steps, and you can climb up either 1 or 2 steps at a time. Given N, write a function that returns the number of unique ways you can climb the staircase. The order of the steps matters.


## Example:

For example, if `N` is `4`, then there are `5` unique ways:

* 1, 1, 1, 1
* 2, 1, 1
* 1, 2, 1
* 1, 1, 2
* 2, 2

### Fibonacci:

`N = [0, 1, 2, 3, 4, 5, 6]`  
`Output Ways =   [1, 1, 2, 3, 5, 8, 13]`   
Fibonacci in the output.

## Extra:

What if, instead of being able to climb 1 or 2 steps at a time, you could climb any number from a set of positive integers X? For example, if `X = [1, 3, 5]`, you could climb `1`, `3`, or `5` steps at a time.



## Solution in JS:

* O(n * m)  
* n --> staircase steps  ( N )
* m --> valid climb up steps ( X.length )

```js

let staircase = (n, X) => {

	// Steps climb up
	let setX = new Set(X)

	// Positions arrays step staircase
	// Included  0  
	let cache = Array(n + 1).fill(0);
	
	// The position 0 is always 1 way.
	cache[0] = 1;
	

    for (let i = 0; i <= n; ++i) {

		let temp = 0;
		
		// Valid Steps add
        for (let x of X) {
            if (i - x > 0) {
                temp += cache[i - x]
            }
		}

		//Update cache.
		cache[i] += temp;
		// position numbers 
		// is included (1) or not (0)
        cache[i] += setX.has(i) ? 1 : 0;
    }

	// The last position in cache have the
	// # of ways.
    return cache.pop();
}



```

## Simple Test:
```js

// Case 1
let X = [1, 2 ];
let n = 4;

console.log(staircase(n, X))

// Case 2 
let X = [1, 3, 5];
let n = 4;

console.log(staircase(n, X))
```


You can check  
 <a href="https://github.com/difo23/interviewQuestAnsJS" target="_blank"> code </a> by @difo23
Code Coverage
Tags: testing, devops, codequality
Published: 2020-09-21 21:28:28

# An introduction to code coverage
In this blog, you'll learn what is code coverage, in what stages does it help us and what is the need of it??

**Code Coverage** is a parameter under software testing which tells you the no. of lines of code that are successfully validated under a test procedure, which in turn, help us in analyzing/verifying  the quality of our software code.

## To Calculate :

Code Coverage Percentage = (Number of lines of code executed by a testing algorithm/Total number of lines of code in a system component) * 100.



### Code coverage criteria :

1.Function Coverage -- The functions in the source code that are called and executed at least once.

2.Statement Coverage -- The number of statements that have been successfully validated in the source code.

3.Path Coverage -- The flows containing a sequence of controls and conditions that have worked well at least once.

4.Branch or Decision Coverage -- The decision control structures (loops, for example) that have executed fine.

5.Condition Coverage -- The Boolean expressions that are validated and that executes both TRUE and FALSE as per the test runs.

 

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

So does it mean higher the code-coverage % better is the code quality of your software program.

**Noooh!!!**

If we take 100% code coverage for any software program it says no bug, no defect and indicates that the test cases have covered all the criteria and requirements of software application.

But in this case we are clueless and blank to evaluate if the test case has met all range of possibilities or not, did the test cases cover the incorrect requirements or might have missed any important ones??!!


So if we see the software product is built on 100 % irrelevant code coverage then undoubtedly we're gonna compromise on quality.

 

**Then what should we focus on?? Our focus should be on writing test scripts that aren’t fuzzy. Don’t focus on achieving 100% coverage , focus on how the analysis can be clubbed out with your robust test scripts which are gonna cover every functional and non-functional area of source code.**

[Where I Read](https://www.atlassian.com/continuous-delivery/software-testing/code-coverage)

Feel free to connect and correct if wrong anywhere.
Why I Chose to Leave my Career in Civil Engineering
Tags: flatiron, coding, future, developer
Published: 2020-09-21 21:21:34

  Ever since I was a child, I knew I had a strong interest for technology. I remember it was Christmas 96' when I was gifted the Nintendo 64. It opened my eyes to the possibilities of technology, even if I didn't know it at the time. When I was about 12 years old my father bought a Dell desktop for our family to use. Later, I took the computer apart, and was able to put it back together. In the process I learned the RAM was faulty and the CPU was caked in dust. The dust was causing the computer to overheat, and the RAM was fried. My father bought replacement parts, and I cleaned the computer to the best of my ability (didn't know about Duster back then). After this, the computer ran better than when we had purchased it. From this point on, I knew I wanted to work with technology and had interests in Engineering.

When I went to college I chose to study Sustainable Technologies. I wanted to better my community and environment. My passion for the outdoors has always been on of my strongest drives. I worked in the field as a environmental and civil engineering technician. However, after two years I realized I wasn't really using cutting edge technology AND many of the jobs paid just above the poverty line in Buncombe County. I found that I was in a industry that produced so much unnecessary waste and wasn't what I learned in school. The career path seemed to lead to dead ends, and I wasn't making beneficial impacts in my local community. 

About this same time, my friend was working on a video game project while he was at Full Sail University in FL. He asked me to produce the music (I play multiple instruments and produce my own music using various software) for the video game and happily I obliged. I believe we used a software called "Gamemaker Studio 2" and I learned a few things about coding. I had a lot of fun messing around with character sprites and animating the character. Writing code that allowed the character to jump, and then jump again midair was exciting and challenging. During this time so many ideas developed for applications in sustainable design, applications, teaching, and so much more. These ideas could be used to push sustainable actions using websites or software to help our environments and local communities.

I didn't know where to begin. I did not necessarily have a background in programming. I searched forums while I had down time at work. Finally a Reddit sub group called "R/codingbootcamps" popped up on my suggested feed. I looked into the group and many people had success in short 6 month or less programs. The one I found that interested me the most was Flatiron Programming Bootcamp.

I left my stable career two weeks before this program began. I have high hopes that this will be a great start in the tech field. My dream is to be a software developer that makes life easier for those in need.
Primer post por aquí...
Tags: python, vue, angular, django
Published: 2020-09-21 21:15:28

Hey! Hola a todos, espero estén bien. Es mi primer post por aquí, para comenzar a compartir voy a contar un poco de mí. Mi nombre es Efrain Rivera, tengo 25 años, soy de Honduras y soy un Ingeniero en Informática, aficionado del Real Madrid. 

Tengo algo de experiencia con javascript y particularmente he desarrollado proyectos en Angular y Vuejs. En mi tiempo libre estoy actualmente aprendiendo Python y he curioseado algo con Django. Pienso escribir en este espacio principalmente de esos temas. También comentarles que actualmente quiero dar un giro a mi carrera profesional, estoy empeñado en aprender más acerca de mi marca personal y mejorar mi presencia digital. Esto por el motivo que quiero conseguir mi primer trabajo remoto con alguna empresa de otro país. Por ello también estoy aquí, quiero aprender de otras personas, quiero compartir lo que aprendo y hacer comunidad. Un abrazo.

Si puedes, déjame en los comentarios un consejo para mejorar mi marca personal y, ¿qué puedo hacer para mejorar mi portafolio personal?
My first public product launch! 🎉🎓
Tags: education, homeschooling, webdev, showdev
Published: 2020-09-21 20:35:23

---
title: My first public product launch! 🎉🎓
published: true
description: Study scope is a new platform for homeschooling parents looking to find great resources
tags: education, homeschooling, webdev, showdev
---
👋, I'm Nathan. I was homeschooled K-12, and really enjoyed my education experience! The sort of freedoms I was allowed growing up made my public schooled peers jealous, and was able to pursue all sorts of cool things. One of those things was programming. 
 
I've been working on this idea since December of 2019.
Thinking about the state of public education and just about how learning / education even happens, I came to the conclusion that one of the big issues with learning *just about anything* is finding  high quality content. If that's the case, then how do you even start without feeling like you're drowning in a sea of data? The internet is a good representation of that. You can learn just about anything, but you need to know what you're looking for, or know someone who knows. Libraries have always been around, too! Anyone can get a full education if only they knew what to do, what to read, what to focus on. 

One great quote from Good Will Hunting. Will, talking to a Harvard student: 

> You wasted $150,000 on an education you coulda got for $1.50 in late fees at the public library

The widely accepted idea of how education happens is through "professionals" and those who hold the keys. 
The month you were born puts you in a specific grade, The arbitrary starting point and ending point have no bearing on reality. Grades do not determine the cognitive abilities of a student. 
The Traditional model is to leave it to the professionals

A child’s abilities *should not* be determined by their birthday, a grade, or by a system that prioritizes achievements over learning and discovery. Schools don't tend to incentivize anything that doesn't look like a head-start or [specialization](https://www.ted.com/talks/david_epstein_why_specializing_early_doesn_t_always_mean_career_success)

***
The fundamental building blocks of learning have been around for thousands of years. 
Education isn't a black box held behind closed doors by "professional educators". It's just a tool that can be used by ANYONE. 
I want to unbox the education system.

***
[Study Scope](https://studyscope.io) is a platform for homeschooling parents who are both veterans and starting out. It makes it easy to find resources based on the educator's needs, and the child's needs. Where someone would normally search for title or by grade for a curriculum resource, you can search by teaching styles, learning styles, grades, and much more! It's powered by a passionate community of educators that recommend and review material, as well as share the curriculum “stack” they have selected for their children.

It's kinda interesting how the entire world just _happened_ to homeschool this year right after I quit my job and dedicated all my time and effort to this product.

If anyone has some advice for this noob, please send it. 🤙

Wish me luck!
Clean DynamoDB data automaticlly
Tags: aws, dynamodb, amplify
Published: 2020-09-21 20:23:50

During one of my last project I had to remove user data that was older than two weeks. 

I was looking for setting up an AWS Lambda function that is running on a recurring schedule.  The idea was that this function scan all the date fields in the dynamoDB table. 

It is expensive to scan all items and filter out the items which are out of date. Then you need to set up some functionality to delete these items via a batch in Dynamodb. It is possible to set up it, but there is a more easier way to do it. 

#TTL in DynamoDB
Make sure you have a date field in your Dynamodb table. It needs to have a Unix epoch time format. You can give this field any name. 

The next step is to select the TTL field on the table. Unfortunately this is not supported from the Cloudformation templates in AWS Amplify. This is a manual process in each new environment that you set up.



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


https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html

#Javascript
This is how you can achieve this Unix epoch time format in JavaScript.

```
const numWeeks = 2; // after how many weeks the data needs to be removed
const now = date;
now.setDate(now.getDate() + numWeeks * 7);
const ttl = Math.round(now.getTime() / 1000);

 const setTTL = {
      ttlFieldName: ttl
  }; 
```

#AWS Amplify
In your API schema you can create it like this. 

```
type modelName
  @model{
  id: ID!
  ttl: Int!
}
```

#Update
It is also possible to accomplish this via code. You can give this package a try: https://github.com/flogy/graphql-ttl-transformer

#Conclusion
Your data will be removed automatically now (in this case in two weeks) according a recurring schedule.

#About me
I am a huge fan of AWS Amplify and blog about certain topics that come along with it. If you have any questions related to the framework, React of React Native then you can always reach out to me.

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

Do you want to be updated about new blogs?
Follow me on twitter: https://twitter.com/ramonpostulart