teleren/devto huggingface dataset:
BigBrainKotlin#4 | Among Us
Published: 2020-11-30 08:19:22


Don't be a Java-ish dev in Kotlin-ish world, improve your knowledge about Koltin Standard Library and write better Kotlin code. ✌🏻 If your Java dev migrating to Kotlin this will help you learn alot!

![BBK Special](https://dev-to-uploads.s3.amazonaws.com/i/w3whhvj3pqicr29fn8wj.jpg)

The aim of these articles is not hate on Java, but to help people learn various ways in which they can write the same logic better and more Kotlin standard library focused way.

`Question`: 
Find the imposter from the given array with at least 3 items, it's either entirely comprised of odd integers or entirely comprised of even integers except for a single integer N. Write a method that takes the array as an argument and returns this "Imposter" N...

```
imposter(arrayOf(2,6,8,-10,3)) => returns 3

imposter(arrayOf(206847684,1056521,7,17,1901,21104421,7,1,35521,1,7781)) => returns 206847684

imposter(arrayOf(Integer.MAX_VALUE, 0, 1))=> returns 0
```

Try it out yourself, or submit it in the comments before checking out my solutions.

## 👉 [BigBrainKotlin#4](https://chetangupta.net/bbk5/)

Hope to see you on the other side...

Until next time. Happy Hacking! 👩‍💻

Stalk Me 👀 :
[LinkedIn](https://bit.ly/ch8n-linkdIn) | [Medium](https://bit.ly/ch8n-medium-blog) | [Twitter](https://bit.ly/ch8n-twitter) | [StackOverflow](https://bit.ly/ch8n-stackOflow) | [CodeWars](https://bit.ly/ch8n-codewar) |[WorkX](https://bit.ly/ch8n-home) |[Github](https://bit.ly/ch8n-git) |[Instagram](https://bit.ly/ch8n-insta) |[Youtube](https://bit.ly/ch8n-youtube)
BigBrainKotlin#3 | Spin My Words...
Tags: kotlin, algorithms, java, android
Published: 2020-11-30 08:15:54

Don't be a Java-ish dev in Kotlin-ish world, improve your knowledge about Koltin Standard Library and write better Kotlin code. ✌🏻 If your Java dev migrating to Kotlin this will help you learn alot!

![BBK](https://dev-to-uploads.s3.amazonaws.com/i/e5p16z6mlksi1qmn430k.jpg)


The aim of these articles is not hate on Java, but to help people learn various ways in which they can write the same logic better and more Kotlin standard library focused way.

`Question`: 
Write a function that reversed all words in the String whose length is five or more letter words reversed.
```
spinWords( "Hey fellow warriors" ) => returns "Hey wollef sroirraw" 
spinWords( "This is a test") => returns "This is a test" 
spinWords( "This is another test" )=> returns "This is rehtona test"
```

Try it out yourself, or submit it in the comments before checking out my solutions.

## 👉 [BigBrainKotlin#3](https://chetangupta.net/bbk4/)

Hope to see you on the other side...

Until next time. Happy Hacking! 👩‍💻

Stalk Me 👀 :
[LinkedIn](https://bit.ly/ch8n-linkdIn) | [Medium](https://bit.ly/ch8n-medium-blog) | [Twitter](https://bit.ly/ch8n-twitter) | [StackOverflow](https://bit.ly/ch8n-stackOflow) | [CodeWars](https://bit.ly/ch8n-codewar) |[WorkX](https://bit.ly/ch8n-home) |[Github](https://bit.ly/ch8n-git) |[Instagram](https://bit.ly/ch8n-insta) |[Youtube](https://bit.ly/ch8n-youtube)
BigBrainKotlin#2 | Mumbling...
Tags: kotlin, java, algorithms, android
Published: 2020-11-30 08:13:18

Don't be a Java-ish dev in Kotlin-ish world, improve your knowledge about Koltin Standard Library and write better Kotlin code. ✌🏻 If your Java dev migrating to Kotlin this will help you learn alot!

![BBK](https://dev-to-uploads.s3.amazonaws.com/i/e5p16z6mlksi1qmn430k.jpg)


The aim of these articles is not hate on Java, but to help people learn various ways in which they can write the same logic better and more Kotlin standard library focused way.

`Question`: 
This time no story, no theory. The examples below show you how to do :
```
mummble("abcd") -> "A-Bb-Ccc-Dddd"
mummble("RqaEzty") -> "R-Qq-Aaa-Eeee-Zzzzz-Tttttt-Yyyyyyy"
mummble("cwAt") -> "C-Ww-Aaa-Tttt"
```

Try it out yourself, or submit it in the comments before checking out my solutions.

## 👉 [BigBrainKotlin#2](https://chetangupta.net/bbk3/)

Hope to see you on the other side...

Until next time. Happy Hacking! 👩‍💻

Stalk Me 👀 :
[LinkedIn](https://bit.ly/ch8n-linkdIn) | [Medium](https://bit.ly/ch8n-medium-blog) | [Twitter](https://bit.ly/ch8n-twitter) | [StackOverflow](https://bit.ly/ch8n-stackOflow) | [CodeWars](https://bit.ly/ch8n-codewar) |[WorkX](https://bit.ly/ch8n-home) |[Github](https://bit.ly/ch8n-git) |[Instagram](https://bit.ly/ch8n-insta) |[Youtube](https://bit.ly/ch8n-youtube)
BigBrainKotlin#1 | Find Max and Min
Tags: kotlin, algorithms, java, android
Published: 2020-11-30 08:09:47


Don't be a Java-ish dev in Kotlin-ish world, improve your knowledge about Koltin Standard Library and write better Kotlin code. ✌🏻 If your Java dev migrating to Kotlin this will help you learn alot!

![BBK](https://dev-to-uploads.s3.amazonaws.com/i/e5p16z6mlksi1qmn430k.jpg)


The aim of these articles is not hate on Java, but to help people learn various ways in which they can write the same logic better and more Kotlin standard library focused way.

`Question`: 
Print the Highest and Lowest number from the input string. 
`8 3 -5 42 -1 0 0 -9 4 7 4 -4`

Try it out yourself, or submit it in the comments before checking out my solutions.

## 👉 [BigBrainKotlin#1](https://chetangupta.net/bbk2/)

Hope to see you on the other side...

Until next time. Happy Hacking! 👩‍💻

Stalk Me 👀 :
[LinkedIn](https://bit.ly/ch8n-linkdIn) | [Medium](https://bit.ly/ch8n-medium-blog) | [Twitter](https://bit.ly/ch8n-twitter) | [StackOverflow](https://bit.ly/ch8n-stackOflow) | [CodeWars](https://bit.ly/ch8n-codewar) |[WorkX](https://bit.ly/ch8n-home) |[Github](https://bit.ly/ch8n-git) |[Instagram](https://bit.ly/ch8n-insta) |[Youtube](https://bit.ly/ch8n-youtube)
Why didn't we catch it during QA?
Tags: testing, development, qa
Published: 2020-11-30 06:45:06

---
title: Why didn't we catch it during QA?
published: true
description: 
tags: testing, development, qa
//cover_image: https://direct_url_to_image.jpg
---

Imagine there's a mid-sized startup in 2020. They are quite advanced and has put people to couple of roles for product development. They have testers, developers, and product managers (who plan features). Spirit was high and they are chugging along just fine. Until one day, a production bug happen.

_"Why didn't we catch it during QA?"_, a question was thrown into sprint retro in good spirit. 

Discussion follows afterward and they concluded that testing should not be done only in regression -- as regression time was not enough to re-test all the hundreds of use cases. To catch bugs early, testing should also be performed right after development is complete to make sure it was build against the specification. Ticket should not be closed before testing is done on the feature ticket. Everyone agrees it's the right thing to do and they proceed with the new practice. 

Things were chugging along nicely. Until another production bug pop up again.

Again, _"Why didn't we catch it during QA?"_, a question was thrown into sprint retro in good spirit. 

"We have tested the feature immediately after code has been merged and we found it built according to the specification."
Discussion follows afterward and they found out that developer has built the feature exactly as specified by product manager. However, the specification didn't capture a use case performed by some users. 

So, the team agrees to amend their practices. Prior to development, specification has to be checked with testers (and of course developers) to make sure specification does not have gaps. A formal method was introduced to verify specification which output can be used directly for feature testing. 

---

Have you asked above question to your team? Have you ever received such question as tester?

Depends on the team condition, individual state, and other things, above question can be very harsh. Sometimes it is required to verify wether testers have sound test plan and approach to build one. But you cannot repeat the same question on every occasion. If you do though, then it's a sign of a deeper problem to solve.

The gist are:

1. Testing by testers is not limited to activities prior to release 
2. Testing are needed in every phase of software development. Shift left. Catch defects early before it's costly to fix.
3. Testing by testers is not a reason to skip testing during development. If you do this, you will need a specific skillset of test engineer and also different planning on the size of those testers.

Why do we have defects in the first place anyway?
Pengalaman Naik Bus Bekasi - Malang
Tags: naikbus, rutebus
Published: 2020-11-30 08:00:41

Pengalaman Naik Bus dari Bekasi ke Malang
Halo, kali ini akum au share pengalaman aku naik bus tujuan Bekasi – Malang. Perjalanan ini aku lakukan tanggal 19 November 2020 dengan menaiki bus Medali Mas. Jadi, waktu titik penjemputannya di Jati Asih, Bekasi. Lalu kemudian mulai berangkat sekitar pukul 3 sore. 

Nah selama perjalanan pas awal-awal itu masih macet ya aku lupa persisnya di mana cumin emang dari berangkat sampe sekitar jam setengah 6 sore itu rada macet. Oh iya naik bis ini kamu bakal dapet air minum, snack berupa roti terus ad popmie sama kopi juga yang bis akita seduh pake air panas yang disediain di dalam bus. Terus nanti kita dikasih makan juga dan makanannya itu sistemnya prasamanan gitu. Kalian nanti tinggal tukerin aja tiket ke petugas yang jaga pintu masuk rumah makannya. 

Bisa dibilang perjalanan dari Bekasi ke Malang cukup jauh ya tapi gak beda-beda jauh kalo naik kereta bahkan kalua menurutku lebih cepet naik bus daripada kereta yang biasa aku tumpangin. Bus yang aku tumpangin nyampe malang sekitar pukul 7 pagi.

Source : https://www.ziybee.com
Completing the freeCodeCamp JavaScript Algorithms And Data Structures Certificate
Published: 2020-11-30 07:49:46

---
title: Completing the freeCodeCamp JavaScript Algorithms And Data Structures Certificate
published: true
description: 
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/k2aq8z34mf446l28r09r.png
---
I'm currently taking freeCodeCamp's JavaScript Algorithms and Data Structures (https://www.freecodecamp.org/learn) certification for the first time and recording myself code as I go through each part of the curriculum.

If you'd like to join me in completing this certification, sign up to my code club (https://madisonkanna.com/codebookclub), and once you're in our discord, join the #freecodecamp-curriculum channel. Here you can post when you get stuck, or discuss the challenge with me as we go. 

Video 1: [Basic JavaScript part 1](https://www.youtube.com/watch?v=Ko8ThPJPQ0o&list=PLWfQIkV7as96aCvX33VKW1VD804Fj9_on).

I was inspired to hit record as I go through the entire curriculum after watching Florin Pop's channel where he did so with the FCC curriculum.

These videos are just me hitting record and going through lessons-- nothing fancy, and almost zero editing. The goal is not to post polished videos but share my thought process as I go through the certifcate.

I plan on uploading at least 1 video each week and finishing the certification in 8 weeks.
Share your webperf best practices
Tags: webperf, webdev, frontend
Published: 2020-11-30 07:46:20

---
title: Share your webperf best practices
published: true
description: It would be great if we could share our #webperf best practices.
tags: #webperf #webdev #frontend
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/dc5l3960vmydz6nc18q2.jpg
---

Hi devs 👋

Last few weeks I have been working on a project that is not doing pretty well with web performance.

Although in the public field we constantly hear that web performance is important, I haven't seen many teams that have a well-built web performance optimization culture.

It would be great if we could share our examples and best practices.

I came up with a survey that I hope might be interesting. If you would like to describe in a detailed manner your processes for monitoring and optimizing web performance, please share them with us (it could be really useful for others).

----------------------------------

**Poll**:

**1.** How many people are in your project team?

**2.** Which field is your project related to? (_e-commerce, health, education, etc_)

**3.** Describe practices and tools which you use on your project to improve web performance?

**4.** Which of the negative consequences of poor web performance are the most critical for your project? (_you can list own options_)
   - a) users are less engaged and are less likely to buy/use your product;

   - b) it impacts negatively the perception of your brand;

   - c) it leads to exclusion of some users.

**5.** Do you know how web performance correlates with conversion rates and/or other product metrics for your project?

**6.** Do you have any web performance targets that you are aiming for?

**7.** Is there any kind of web performance budget for your project?

**8.** Have you ever faced a regressive web performance degradation issue? (_after merging some changes from pr or after dependencies upgrade, etc_)

**9.** Do you use any kind of web performance monitoring tool on your project?

**10.** Do you measure web performance on your real users' devices?

**11.** Do you track your own app metrics using the Custom Metrics API?

----------------------------------

That's all 🎉 

Thanks for your attention 🙏

I would be really glad to speak with you if you send me your interesting cases and/or problems from your experience.
Cyber Monday -40% Off Summon The JSON
Tags: javascript, python, java, csharp
Published: 2020-11-30 07:45:38

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

A card game for software developers? What has it to do with education?

Summon The JSON connects gamification, memory techniques with learning how to code. It is a project we were working on since November 2019.

Currently, there are four decks available. For: JavaScript, Python, C#, Java and PHP.

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

Each beautifully illustrated, fantasy themed deck contains:

    65 printed cards
    8-page long instruction
    Inside a beautiful tuckbox

The instruction contains three methods of playing for one, up to four people. Not only programmers can play it, also people who learn how to code, and even: non-programmers. It makes Summon The JSON a great off-screen entertainment for everyone, and a way to enthuse to coding.

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

It is also a great, and a really (really like 100% sure) unique Christmas gift!

Since today is Cyber Monday we decided to give Summon The JSON enthusiasts on Dev.to a 40% discount!

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

Some other important perks:

    Free US delivery
    14 days no-question asked return option

To get 40% off apply a discount code **CYBER40** after choosing a language on [summonthejson.com](https://summonthejson.com). If you don’t know what language to choose we recommend JavaScript or Python for starters!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/isxdxes52i8xg6kkhd46.jpg)
Animate Styled Components with Framer Motion!
Tags: webdev, react, framermotion, javascript
Published: 2020-11-30 07:43:36

I love Framer Motion because it's a library that's easy to use and powerful. I've created page transitions within [Next.js](https://blog.sethcorker.com/shared-layout-page-transitions-nextjs-framer-motion) and cool [interactions like tap to expand](https://blog.sethcorker.com/react-animation-tap-to-expand). It's a very versatile library for animation in React and it's not just limited to building from scratch.

If you're using a CSS-in-JS library then it might not be immediately obvious how to integrate Framer Motion smoothly but once you know, it's as easy as 🥧.

Watch this short tutorial on how you can add animations and gestures like drag, to an existing UI library built on top of [styled-components](https://styled-components.com). 

{% youtube sKmV2FV-krY %}

## The core concepts

Here's a quick reference to help you out!

### Turning a styled-component into something animatable

Use the `as` prop and specify `motion.div` or another `motion.<some html element>` to start using Framer Motion for that component.  

```jsx
<MyComponent as={motion.div} animate={{ y: 100 }} />
```

Animating it's as easy as adding the `animate`, `transition`,  and other props you're used to adding directly to motion elements.

### Making your own styled-components and integrating with Framer Motion

Define your styled component but instead of passing an html element as the first argument, give it a motion element instead.

```jsx
const MyCustomComponent = styled(motion.div)`
  width: 2rem;
  background-color: tomato;
`;
```

Need to add drag functionality? Simply pass in the prop when you use it!

```jsx
<div>
  <MyCustomComponent drag />
  <MyCustomComponent animate={{ opacity: 1 }} />
</div>
```

---

It's as easy as that. If you use styled-components to build your React apps then I hope you this helps you develop rich experiences with animation and interactivity without the hassle. Framer Motion is my favourite library for tinkering with animations and it's versatile enough to be used with a variety of different frontend technology.


## References
- Want to [create something cool in React95](https://github.com/React95/React95)?
- Check out [Framer Motion for animating React components](https://www.framer.com/motion/)
- Learn more [cool animations you can achieve including animations on scroll](https://blog.sethcorker.com/scroll-animation-with-framer-motion)
Import mysql database in php.
Tags: java, python, cpp
Published: 2020-11-30 07:33:03

#First of all open the xampp and start the services of mysql.
**Secondly** you just type the **url** 'http://localhost/phpmyadmin/.
Now type Database name as your database have, then goto SQL tab.
Then simply click on import file.
Choose the correct path of your file, then at last click on **submit** button.
**Hope**, It will help you.
How to Autoscale Kubernetes (EKS) on AWS with Terraform
Tags: terraform, devops, techtalks, techtter
Published: 2020-11-30 07:32:17

In this video you will learn how to Autoscale Kubernetes EKS cluster with Terraform. It's a step by step guide. Watch it or regret it later.

{% youtube tDNi-sS0LsA %}
10 JavaScript Array methods to simplify your code.
Tags: javascript, webdev
Published: 2020-11-30 07:19:27

##Let’s start!

## 1. `filter()`
The `filter()` method creates a new array with all elements that pass the test implemented by the provided function.

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

## 2. `forEach()`
The `forEach()` method executes a provided function once for each array element.

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

## 3. `some()`
The `some()` method tests whether at least one element in the array passes the test implemented by the provided function. It returns a Boolean value.

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

## 4. `every()`
The `every()` method tests whether all elements in the array pass the test implemented by the provided function. It returns a Boolean value.

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

## 5. `includes()`
The `includes()` method determines whether an array includes a certain value among its entries, returning true or false as appropriate.

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

## 6. `map()`
The `map()` method creates a new array populated with the results of calling a provided function on every element in the calling array.

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

## 7. `reduce()`
The `reduce()` method executes a reducer function (that you provide) on each element of the array, resulting in a single output value.

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

## 8. `sort()`
The `sort()` method sorts the elements of an array in place and returns the sorted array. The default sort order is ascending, built upon converting the elements into strings, then comparing their sequences of UTF-16 code unit values.

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

## 9. `find()`
The `find()` method returns the value of the first element in the provided array that satisfies the provided testing function.

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

## 10. `findIndex()`
The `findIndex()` method returns the index of the first element in the array that satisfies the provided testing function. Otherwise, it returns -1, indicating that no element passed the test.

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

If you liked this article, be sure to ❤️ it.

Let's keep in touch:  
Website: [markodenic.com](https://markodenic.com/)
Twitter: [@denicmarko](https://twitter.com/denicmarko)
static in JavaScript
Tags: webdev, javascript, codenewbie, 100daysofcode
Published: 2020-11-30 07:14:30

This keyword `static` allows us to create methods and properties that are assigned to the class itself, and not it's instances. 

```javascript
class person {
    // A static method
    statis hello() {
        console.log("Hello!");
    }
}

// Call the static method directly
Person.hello();
```

### Value of "THIS"

Inside statis methods, "this" hold a reference to the class. 

```javascript
class Test {
    statis getThisValue() {
         console.log(thos);
    }
}

// Call the static method
Test.getThisVkaue();

/* 
  class Test { ... }
*/ 
```

<hr>

### EXAMPLE 1

```javascript
class Car {
    constructor(make, model) {
         this.make = make; 
         this.make = model; 
    }
    // This statis method creates a new instance of Car
    static createCar(make, mmodel) {
        console.log("Building a new car...");

        return new this(make, model);
    }

    info() {
        console.log(`I'm a ${this.make} ${this.model})
    }
}

// Call the static method "createCar" directly from the car class

let bmw = Car.createCar("BMW", "E82");

// Run our "info" method from the Car instance

bmw.info();

/*
   Building a new car...

   I'm a BMW E82!
  
*/
```

### When should you use "STATIC"? 

You shouuld use static methods and properties whenever, 
- You're writing utility classes that don't change
- The method should not be changes or overridden
- The code is not dependent on instance creation

<hr>

Have anything in mind ? Comment Below! <br>
⚡Thanks For Reading | Happy Coding 😁