teleren/devto huggingface dataset:
Advanced TypeScript Exercises - Question 7
Tags: typescript, javascript
Published: 2020-03-11 16:17:28

--- series: Advanced TypeScript Exercises ---

Today's question will be about creating exclusiveness behavior of the type. TypeScript is structurally typed language, very important is to mention that also types compatibility in TypeScript is based on structural subtyping. That property is visible during assignment and during passing of arguments to functions. Short explanation would be - we can assign or pass values which have at least the same members as wanted type, but also they can have more constraints. More about that in [TS documentation](https://www.typescriptlang.org/docs/handbook/type-compatibility.html).

Our task is to make types more strict and block possibility of passing/assigning subtypes.

### 7.1 Make a type which will only allow for assignment of an empty object
```ts
type EmptyObject = {} // empty object only, 🔥 change the type to be exclusive for any field 

// test cases
const shouldPass: EmptyObject = {}; // this should be ok 🟢
const shouldFail: EmptyObject = {
    prop: 1 // here we should have compile error 🛑 
}
```

### 7.2 Change function type to be exclusive for its arguments
```ts
type SomeType =  {
    prop: string
}
// change below function type definition 🔥 in order to allow only strict SomeType value
function takeSomeTypeOnly(x: SomeType) { return x }

// test cases
const x = { prop: 'a' };
takeSomeTypeOnly(x) // this should be ok 🟢

const y = { prop: 'a', addditionalProp: 'x' };
takeSomeTypeOnly(y) // here we should have compile error 🛑 
```

The questions and ready to start code is available in [The Playground](https://www.typescriptlang.org/play/index.html?ssl=24&ssc=61&pln=14&pc=1#code/PTAEHYDoEZQYQE4FMCGAXJo0E8AOmB3ACwEsBjI0AkgGxtBToHsDQmA7G7UAMyYQagkAW1w42AIwBWSMmlAA3RgFckAKDU58oAKKicAeWmz5AXlABvAL6gQQ-dybG5bTtgA0oQLwbgUl3QFFHYAc0w0IlC8UKZQCUwkAA8yGmUAZxIFTD4BQO4eEiQaABNQDTsMFPkyFBSkFLUyDgrQFKImZSKABWqUgC5dByMZF3NrAG5bMDCSFObW9uLYtgBrb0Aj-frG+Ra2ooAxFFo+vTFsQZNQEbVQa9BcBCZcPtg7cOQqTG350CIUDP8mUS0OIIe4CLyARb2SlYNGo7FAAEzwH7BTLKdhyEgcLCRLDRRYJZJpP5ZUAkNAzFAIILKYRIdhoDRaTAAZQBSAAKjjzJYrjc7g8+hUECRgmpoXYAiiYgUWLw0RisUzQIUkHl2GTMexvH4RWwECqBGhoowaLKOFxmmhhS5WbTOdolMl1Dx5WhNVgUEskLaOZEDG4ABTxPo++1IACUllAyDQygQWvioGhG3YTUTI1u90eoAA5Cgc0nRppPd62WH-Vwg5GyqQZp8itLlmsNA1U-JuBn+dm8znPChCgONRxGB0s30c-EC1Yi2gS6G-YHsNWwK9CB85g2fn8GoCaMDQd5IUA)

Post your answers in comments (preferred links to the playground). Have fun! Answer will be published soon!

**This series will continue**. If you want to know about new exciting questions from advanced TypeScript please follow me on [dev.to](https://dev.to/macsikora) and [twitter](https://twitter.com/macsikora).
AI and Software Testing 
Tags: ai, qa, softwaretesting
Published: 2020-03-11 16:09:11

Everyone speaks about the increasing adoption of artificial intelligence (AI) to boost the software testing process. At the same time, this adoption leads to new challenges from both a complexity and a skills perspective.

It is not easy to find specialists with these skills today. But what about the future when and more organizations start adopting AI? The rise of which professions, roles will we observe? Let's make some predictions. 

- AI test experts. Of course, this role is first on the list, if we speak about the synergy of AI and software testing. These specialists will have to combine traditional testing expertise with the solid understanding of natural-language processing techniques and machine-learning algorithms not to mention other tech skills. 
- AI QA strategists. Introducing AI into the business processes, there must be a person possessing both business and technical knowledge to set the procedure up and running.
- Data scientists. It's not an easy task to build models analyzing test data, applying predictive analytics and statistics. Data scientists with a deep understanding of data analysis techniques will be definitely high in demand. 

What predictions for this niche do you have? 

http://hire-tester.com/automated-testing/
Dynamic white-box testing
Tags: qa, softwaretesting, whiteboxtesting
Published: 2020-03-11 16:07:21

There are various classifications of test types, depending on the test objectives and methods. Dynamic white-box testing is used to test the internal design, code, and structure of a program by running it. Its main advantage is the maximum test coverage, the opportunity to find hidden errors and optimize the code. 

Dynamic white-box testing is also performed to confirm the software compliance with business requirements and is focused on three main aspects: 

- Testing of the source code, separate software parts, low-level functions, and libraries.
- Integration testing.
- System testing. 
Do you use this type of testing to verify your software?

http://hire-tester.com
Software testing & QA
Tags: qa, softwaretesting
Published: 2020-03-11 16:05:24

You have a long-term project and want to have domain QA experts working for you? A team of manual and automation testers can be dedicated to working entirely your project, integrating testing processes into development ones. This is a far better option than separate test engineers hiring since you get:
- Access to manual and automation testing expertise.
- Experts with the exact skills that you require.
- Free team management and transparent control.
- Ability to extend the team on request.

Drop us a line to discuss the details: info@hire-tester.com or Skype: hire-tester.com

http://hire-tester.com
Why Managers Make more Money than Engineers
Tags: career
Published: 2020-03-11 16:02:40

---
title: Why Managers Make more Money than Engineers
published: true
description: Why Managers Make more Money than Engineers
tags: #career
canonical_url: https://www.jitbit.com/alexblog/285-why-managers-make-more-money-than-engineers/
---

Programmers often wonder, why executives make more money than developers. How come "John the manager" gets paid more than me, who's doing all the work?!

Here's a little story I read, by Robert Sapolsky, a professor of biology at Stanford.

## The Naked Mole Rat

There's this weird African specie, a rodent called "the naked mole rat", that lives in cooperative groups, mostly underground. While studying their behavior scientists soon began to realize there are two types of species in their colonies: the one that's skinny and hardworking, doing all the work ("the engineers"), the other types were lazy and fat ("the managers") and were just sitting around doing nothing all day, simply eating all the food brought by the hardworking types.

It was really puzzling since it contradicted all known behavioral studies and theories. Until it turned out, that you just needed to watch the colony long enough to realize what's really going on.

Turns out when the rainy season comes, these fat guys who have been sitting around doing nothing all year long eating tons of food - they go up, turn around and plug their butts into the tunnel entrances. Protecting everyone from snakes, coyotes *and* preventing water from flooding the tunnels.

Literally covering everyone's asses with their own.

P.S. Here's [a video](https://youtu.be/Y0Oa4Lp5fLE?t=4324) of Robert's lecture (link points to the timecode where he tells a version of this story)
Integrated software testing from the HireTester team
Tags: integratedsoftwaretesting, qa, softwaretesting
Published: 2020-03-11 16:01:44

Integrated software testing from the HireTester team is:

- End-to-end manual testing 
- UI automation testing
- Backend (API) automation testing
- DevOps services
- Dedicated QA Analyst to manage the team and handle communication. 

Get in touch to learn more info@hire-tester.com or follow http://hire-tester.com
Quality Control (QC) vs Quality Assurance (QA): What's the Difference? 
Tags: qa, qc, softwaretesting
Published: 2020-03-11 16:00:28

Quality Control (QC) is a process aimed to check the current product quality and: 
->Verify the functionality compliance with specifications. 
->Verify the documentation compliance with requirements for its creation, content, and format. 
->Review the code to verify its compliance with coding standards, architectural documentation, safety, etc.

Quality Assurance (QA) is a set of activities covering all tech stages of the SDL, production, and usage to ensure end-product quality.

Whether you're looking for quality control or quality assurance services, the HireTester team can become your reliable QA partner and cover your back in software testing.

http://hire-tester.com
day 2/100 => 100daysofcode Flutter
Tags: 100daysofcode, flutter
Published: 2020-03-11 15:45:59

today is 2/100 of training 100-days-of-code , and learn about Widget DateTimePicker dan function dari List ( removeWhere ),

biarpun agak capek, semoga bisa menyelsaikan training ini



https://twitter.com/triyono__
https://github.com/triyono777/100-days-of-code/blob/master/log.md

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fcp6ulio366n4i1le3yq.png)
PyTennessee 2020: Lessons Learned After a Year of Serverless in Production
Tags: python, serverless, aws, techtalks
Published: 2020-03-11 15:42:14

It was great speaking at PyTennessee 2020 this year, kicking off the first of 4 scheduled talks I have in Q2 around "serverless" technologies.


{% speakerdeck 0ebf85a4a0c441d98a33907bdcf5b155 %}
Daily Challenge #203 - Pascal's Triangle
Tags: challenge
Published: 2020-03-11 15:40:29

---
title: Daily Challenge #203 - Pascal's Triangle
published: true
series: Daily Challenge
description: Can you write a program which calculates the sum of squares on a line in Pascal's triangle? 
tags: challenge
---
In the drawing below we have a part of the Pascal's triangle, lines are numbered from zero (top).

![Pascal's Triangle](https://i.imgur.com/eaVf6vr.jpg)

We want to calculate the sum of the squares of the binomial coefficients on a given line with a function called easyline (or easyLine or easy-line).

Can you write a program which calculates easyline(n) where n is the line number?

The function will take n (with: n >= 0) as parameter and will return the sum of the squares of the binomial coefficients on line n.

###Examples:

`easyline(0)` => 1
`easyline(1)` => 2
`easyline(4)` => 70
`easyline(50)` => 100891344545564193334812497256

###Tests
`easyline(7)`
`easyline(13)`
`easyline(3)`
`easyline(19)`

Happy Coding!

***
_This [challenge](https://www.codewars.com/kata/56e7d40129035aed6c000632) comes from g964 on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
Ubuntu 18.04 tty screen
Tags: ubuntu
Published: 2020-03-11 15:39:02

So somehow I was able to blow away my desktop in Ubuntu 18.04. All I got while restarting my machine was this tty1 screen. 

So after a couple of googling, I assured myself that I had blown away my desktop. 

So here is what I had to do to bring it back.

```
sudo su

apt-get update 

apt-get install ubuntu-desktop

reboot

```


This will take a lot of time to install. Once done you will be able to see that sweet gnome screen of your desktop again.

I hope this helps idiots like me!
Welcome Thread - v64
Tags: welcome
Published: 2020-03-11 15:35:23

---
title: Welcome Thread - v64
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
---

![light bulb!](https://media.giphy.com/media/xT0xeADNkaq35EqfoA/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Tic Tac Toe Game
Tags: react, tictactoe, game, complexlogic
Published: 2020-03-11 15:18:50

Hello all, I have developed the Tic-Tac-Toe game in react.

Tic-tac-toe, noughts, and crosses, or Xs and Os is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row is the winner.

- Players: 2
- Skill(s) required: Strategy, tactics, observation
- Genres: Paper-and-pencil game, Board game, Strategy game

What to go though my repo on GitHub: [Tic Tac Toe Repository](https://github.com/ankitkanojia/tic-tac-toe)

Wanna Play? [Start Game](https://rgame-tic-tac-toe.herokuapp.com/)

![Tic-Tac-Toe](https://raw.githubusercontent.com/ankitkanojia/tic-tac-toe/master/Tic-Tac-Toe.gif)

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


##<center>Follow me on [GitHub](https://github.com/ankitkanojia)</center>
React + Redux Architecture
Tags: react, redux, crudoperations, csharpcorner
Published: 2020-03-11 15:06:05

Greetings to all coders,

Specific to a new React Developers, Hope you are aware of **Redux Architecture** in React. Redux is a predictable state container for JavaScript applications. It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test.

In case you want to learn Redux Architecture with React application(**Including CRUD operations**), Please go through my tutor articles in which I have mentioned step by step process to learn **React + Redux**.

#Article Links#

1) [CRUD Operation Using React Redux - Part One](https://www.c-sharpcorner.com/article/crud-operation-using-react-redux-part-1/)
2) [CRUD Operation Using React Redux - Part Two](https://www.c-sharpcorner.com/article/reactcrud-operation-using-react-redux-part-two/)
3) [CRUD Operation Using React Redux - Part Three](https://www.c-sharpcorner.com/article/crud-operation-using-react-redux-part-three/)

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

##<center>Follow Me on [GitHub](https://github.com/ankitkanojia)</center>
Study Guide Az-900
Tags: certification, az900, azure
Published: 2020-03-11 12:56:17

#Az-900 content

- [Microsoft Learn](https://docs.microsoft.com/en-us/learn/paths/azure-fundamentals/) is very useful to start. It contains assessment at the end of every module, and it's very well timed to have an idea of every topic.
- [Assessment List](https://build5nines.com/free-oss-exam-self-assessment-tool/) is useful to identify your lack of knowledge on each part, and help you track your progress.
- [Tim Warner's playlist dedicated to Az 900](https://www.youtube.com/watch?v=HfZ1kgHlrfg&list=PLYGZ9Q0oTOHfsI-3IAhvyc09ssPDfoePv) covers every module (1 point = 1 video). It's still being produced.
- [Labs Walkthrough](https://microsoftlearning.github.io/AZ-900T0x-MicrosoftAzureFundamentals/) is the site regrouping 23 labs that covers Az-900 topics. 
- [Labs Source](https://github.com/MicrosoftLearning/AZ-900T0x-MicrosoftAzureFundamentals) is the github of the labs.

#Learn Azure
- [Azure Tips and tricks](https://microsoft.github.io/AzureTipsAndTricks/) contains a lot of information on how to use the portal or API. It's very useful .
- [Azure Friday](https://www.youtube.com/playlist?list=PLLasX02E8BPDT2Z2pdCHNCkENpcQWy5n6) introduces new features through short videos.
- [Azure Advent Calendar 2019 site](https://azureadventcalendar.com/) contains links to video about various recent topics.
- [Azure Advent Calendar 2019 playlist](https://www.youtube.com/watch?v=GK_8FAHwoe8&list=PLaGfA5qEcV9LFE7-xLzm-kUELDAtLGIEx) is the playlist of all video produced for Azure Advent Calendar 2019
How we developed software to solve the problem of counting growing plants
Tags: machinelearning
Published: 2020-03-11 14:19:01

High accuracy

Information on how the plants are growing on the field is significant for further work on field processing, fertilization, crop forecasting. Previously, agrarian companies used traditional calculation methods. The number of plants was counted manually in several areas of the field and, according to specific formulas, the number of plants in the whole field was calculated. Such a method is imperfect and highly dependent on the quality of the agronomist's work.

Evrone has developed a software to solve the problem of counting the growing plants. All you need is a regular quadcopter with a set of equipment for video broadcasts, a computer and our software package.

https://evrone.com/plantscounter
How did you end up in your current role?
Tags: discuss, career
Published: 2020-03-11 12:51:06

Hey DEV community! 👋🏽

If you work in an engineering or engineering-adjacent role: **how did you end up in your role?** What has the hardest thing been for you? What do you like about your role? 

I’ve been in tech for almost eight years (after switching careers) and I’m now on an engineering team! Previous to this, I was a content strategist on a developer relations team. I graduated with my Master’s in User Experience Design over the summer.

I’ve been in my current role for five months, and I’m a Senior Technical Program Manager on a web eng team. I ended up on my team serendipitously, the result of a re-org. My new manager selected me to lead a specific program, and I learned most of the role on the job (including Agile).

I’m now five months in and so grateful for the switch! I’m learning so much about myself and how to leverage my strengths in a completely new role. It’s not easy going from doing something you had years of experience in and was confident in to being a newb, but I’m energized by the work. I’m taking a related course, I’ve read quite a number of books, and spent some time looking at online tutorials for aspects related to my new job. And I’m excited to share that opportunities to do work that aligns with my UX degree is on the roadmap.

I look forward to hearing about your experiences!
Missing letters FCC intermediate algorithm
Tags: replit, node
Published: 2020-03-11 13:36:42

---
title: Missing letters FCC intermediate algorithm
published: true
tags: replit, nodejs
---

//Intermediate Algorithm Scripting: Missing lettersPassed

//Find the missing letter in the passed letter range and return it.

//If all letters are present in the range, return undefined.//



function fearNotLetter(str) {
var args = []; var arr =[]; var arrX =[];
 for(let i = 0; i < str.length; i++){
   arr = str.charCodeAt(1+i); 
   if(arr > str.length){
    args = String.fromCharCode(arr-1); 
     };
       if(args[0] > str[i]){
         arrX = args; 
       }else if(args[i] === str[i]){
         arrX = undefined; console.log(arrX)
       };
       };
 
 
return arrX;
};
fearNotLetter("abce");
//fearNotLetter("abcdefghjklmno");
//fearNotLetter("stvwx");
//fearNotLetter("bcdf"); 
//fearNotLetter("abcdefghijklmnopqrstuvwxyz")
//https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/missing-letters

{% replit @oscarhernandez6/Missing-letters %}
Running scalable workloads on Kubernetes
Tags: todayilearned, kubernetes, programming
Published: 2020-03-11 13:00:24

*TL;DR notes from articles I read today.*

### [Tips for running scalable workloads on Kubernetes](http://bit.ly/2xqWoBv)

- You must set resource requests & limits so the Kubernetes scheduler can ensure workloads are spread across nodes evenly. 
- The scheduler can use configured affinities & anti-affinities as another hint of which node is best to assign your pod to. 
- In Kubernetes, readinessProbe tells that a pod is ready to start receiving requests and livenessProbe tells that a pod is running as expected. Setting these ensure that requests to service always go to a container that can process the request.
- It is common for nodes in Kubernetes to disappear and you should configure a pod disruption budget to ensure you always have a minimum number of ready pods for deployment. 

*[Full post here](http://bit.ly/2xqWoBv), 13 mins read*

---

### [Non-functional requirements: Quality](http://bit.ly/2W9mweJ)

- To develop quality code, you should focus on clean code structure, the correctness of implementation and maintainability. 
- Define a company-wide META architecture for every project to follow, allowing more reuse of code. Use the KISS principle and avoid excessive detailing or heavy customizing. 
- To keep clean code, always activate the compiler warning, no matter what language you use; define (and monitor) naming, line length, and API documentation conventions like Javadoc; and maintain test coverage of least 85% with not only unit tests but also automated acceptance tests, and regular manual code inspections, especially when working with external vendors.
- Rather than using pull requests as a quality gate, use a simpler model such as release branch lines and automate visualization of coupling between classes and modules. Light coupling is easier to maintain and lets you reutilize the module/class more readily.
- Avoid third-party libraries, and try to solve any given problem with only one library/technology to reduce security risks. 

*[Full post here](http://bit.ly/2W9mweJ), 10 mins read*

---

*[Get these notes directly in your inbox every weekday by signing up for my newsletter, in.snippets().](https://mailchi.mp/appsmith/insnippets?utm_source=devto&utm_medium=post08&utm_campaign=is)*
Daily Developer Jokes - Wednesday, Mar 11, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-03-11 13:00:20

---
title: "Daily Developer Jokes - Wednesday, Mar 11, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Wednesday%2C%20Mar%2011%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259a37a785.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
A new database query walks into a bar.

The server says "Sorry, cache only."
 -->