teleren/devto huggingface dataset:
3 reasons why devs don’t contribute to open source. Discuss!
Tags: discuss, opensource
Published: 2018-11-23 17:57:41

---
title: 3 reasons why devs don’t contribute to open source. Discuss!
published: true
description: A discussion about contributing to open source
tags: discuss,opensource
---


#Overview

I came across this survey from Digital Ocean that takes a deep dive into understanding what devs think about contributing to open source.

In the survey we can say the list of open source projects sorted by popularity and it is no surprise that projects like React and Linux are some of the most favorable.

##Google was found to be the most supportive when it comes to open source.

——

#Contributing to open source

There was 1 part which took me by surprise where a large percentage  find it a challenge to contribute to open source.

The article states:

_Two of the most prominent barriers preventing developers from getting involved in open source are not knowing where to begin, and doubting they have the right skills._

In my opinion some projects like Dev.to are very well documented  on Github. Even though I may not be  very knowledgeable with Ruby I am sure anyone can get their head around it as ultimately its the basic programming principles that count.

Having said that, there are a number of projects that should  follow the same standards. This is where I have to admit that more needs to be done to encourage developers to contribute.


What is your take on this? Do you agree that these barriers exist? What could be improved? Let me know in the comments below.


##Reason No. 3

The third reason which doesn’t surprise me at all:


_Companies not giving their employees time to contribute is also a large factor._


It is maybe high time that more companies allocate a day a week where devs can spend X amount of time on open source projects or just learning something new.

This is something we do at Root Codex where we encourage our devs to contribute and take time every week to work on some form of pet project.


Did you have or are currently facing such barriers when it comes to contributing your code?


Do you contribute to open source? And if so which project?

Is there something, as a community that we can do to help others overcome these barriers?

Looking forward to hearing from you! 🙂



Full survey may be found at:

https://www.digitalocean.com/currents/october-2018/?utm_source=dev.to
💪🏼 Typed fetch Response in TypeScript
Published: 2018-11-23 15:49:14

---
title: 💪🏼 Typed fetch Response in TypeScript
published: true
description: 
tags: 
---

Currently TypeScript `lib.dom.d.ts` does not implement Typed fetch response
https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L2230
Bellow you can see how we can override that

```typescript
interface TypedResponse<T = any> extends Response {
  /**
   * this will override `json` method from `Body` that is extended by `Response`
   * interface Body {
   *     json(): Promise<any>;
   * }
   */
  json<P = T>(): Promise<P>
}

interface Payload {
  id: number
}
```

Firsth method

```typescript
function myFetch<T>(...args: any): Promise<TypedResponse<T>> {
  return fetch.apply(window, args)
}

myFetch<Payload>('/')
  .then(response => response.json())
  // here data will have Payload type
  .then(data => console.log(data.id))
// or
myFetch('/')
  .then(response => response.json<Payload>())
  // here data will have Payload type
  .then(data => console.log(data.id))
```

Second method. I like first one

```typescript
declare function fetch<T>(...args: any): Promise<TypedResponse<T>>

fetch<Payload>('/')
  .then(response => response.json())
  // here data will have Payload type
  .then(data => console.log(data.id))
// or
fetch('/')
  .then(response => response.json<Payload>())
  // here data will have Payload type
  .then(data => console.log(data.id))
```

Maybe some contrubution will help
https://github.com/Microsoft/TSJS-lib-generator/pull/622
DEV Shop is Open for Business 🛍
Tags: meta, devshop
Published: 2018-11-23 14:18:43

![](https://thepracticaldev.s3.amazonaws.com/i/bgtzulv7t2tuy52u2lcp.jpg)

# **[shop.dev.to](https://shop.dev.to)**

![](https://thepracticaldev.s3.amazonaws.com/i/1fdgg6fy0mrlmstyg95m.jpg)

# **[shop.dev.to](https://shop.dev.to)**

![](https://thepracticaldev.s3.amazonaws.com/i/193epmk23jrx07fgxuza.jpg)

# **[shop.dev.to](https://shop.dev.to)**

![](https://thepracticaldev.s3.amazonaws.com/i/g9uv3wqdvk9lml0bsx3a.jpg)

### Use coupon code **BlackFriday10000** for all the savings 🤑 (Good through Monday)
What javascript frameworks 2019 would be the most popular?
Tags: frameworks, javascriptframeworks, javascript
Published: 2018-11-23 11:57:43

---
title: What javascript frameworks 2019 would be the most popular?
published: True
description: The article runs about the most popular javascript frameworks that will come in 2019
tags: frameworks, javascript-frameworks, Java-script  
---

Java script is one the most popular languages for software development. Due to the results of numerous researches javascript will have not loose its position for 5 years. The technologists predicate that the peak of it hasn’t come yet. 
IT experts are assuared that Vue, Angular.Js, React and Node are four main JavaScript frameworks now and they won’t loose their importance in 2019.
Vue.js – is using to simplify interface design. This framework is also used for developing a lightweight. On GitHub it was nominated as most popular JavaScript interface.
If you’re interested in javascript frameworks 2019 follow http://merehead.com/blog/top-javascript-frameworks-2019/. There you’d find lots of info on this theme.
React is also very popular javascript framework. It is supported by well-know organizations, for sample Instagram or Facebook. It gives an opportunity to use lots of documentations and different online resources. It also allows committing transition between versions and has lots of other advantages.
Angular.js is supported by such serious corporations as Google. Mobile web-development, two-way data binding and lots of other advantages are peculiar to it. 
Node.js is a framework that becomes more and more popular. It gives full-featured JS environment and also opens the access to all the needful tools. 
There are other multi-functional javascript frameworks which will be used in 2019. No doubt nexr year opens lots of innovated features in this branch.
How do you style your web-apps to work on all browsers?
Tags: frontend, css, discuss, webdev
Published: 2018-11-23 11:20:56

---
title: How do you style your web-apps to work on all browsers? 
published: true
description: Sometimes, I just wish all browsers were based on Chrome
tags: frontend, css, discuss, webdev
---

Frontend and/or fullstack devs, how does your workflow look like when you're designing a web-app that should look and feel the same across all modern browsers?

I've been working on a project for 3 months with focusing only on Google Chrome and Chrome-based browsers (such as Min Browser, Vivaldi, etc.), and the list of bugs present on Firefox, Edge, and Safari are stacking up insanely 😂

Looking forward to your responses!
CodeCraftConf follow-up : notes on growing a team
Tags: development, leadership, codecraft, codecraftconf
Published: 2018-11-27 13:06:10

---
title: CodeCraftConf follow-up : notes on growing a team
published: true
tags: development,leadership,codecraft,codecraftconf
series: codecraftconf
canonical_url: https://craignicol.wordpress.com/2018/11/23/codecraftconf-follow-up-notes-on-growing-a-team/
---

Whilst I have a few thoughts I’m still processing after the whirlwind of fantastic insights I got from CodeCraftConf, I wanted to capture some of the highlights from some of the answers to my questions on Growing a Team.

Many thanks to everyone who came to the session. Lots of thoughts coming out of the conference.

### When is it time to grow your team?

- You never grow a team, you create a new one.
- There’s always too much work, you should grow when you have capacity, so you don’t put new starts off

### How do you deal with resistance from existing team members?

- Communicate clearly and address concerns (e.g, time to mentor)
- Involve team early
- Do you have a choice who joins?

### Is it more important to find a culture fit or build a diverse team?

- Do candidates know what they’re signing up for?
- Introvert vs extrovert (see also hiring practice)
- Interviews should be structured to filter out arseholes – do they have empathy (or have they been taught to suppress it)
- Every new hire should bring the level up
- Don’t just hire for technical skill
- Diversify your interview pool

### What is your biggest worry with your current team size, or with growing your current team?

- Are you doing Health Checks? Survey staff regularly
- Make sure the bigger team, outside your daily work, understand the culture – it only feeds from top down
- Fear of churn
- Loss of culture
- Try to understand
- Make the culture explicit

### What practices do you use to ensure sustainable growth?

- Pair a lot, reflect (e.g. retro)
- face-to-face regularly, even if it’s video
- Values workshop – does everyone share them?
- Social convenor to ensure cohesion
- Slack channel dedicated to positive feedback on living the values
- Office/company changes should have their own backlog with an open grooming process so priorities are explicit

### How long does it take to integrate someone new?

- Be careful about language
- Train everyone in personal skills
- Listen even when you disagree
- lack of ego
- Culture changes people
- What personalities do you want?

<iframe type="text/html" width="748" height="421" src="https://www.youtube.com/embed/GHZ7-kq3GDQ?version=3&amp;rel=1&amp;fs=1&amp;autohide=2&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent" allowfullscreen="true" style="border:0;"></iframe>

<figcaption>Power corrupts</figcaption>
-
Can CSS color variables depend on each other? Help me fight off CSS preprocessors.
Tags: help, css, discuss
Published: 2018-11-23 10:47:40

---
title: Can CSS color variables depend on each other? Help me fight off CSS preprocessors.
published: true
description: 
tags: help, css, discuss
---

Here, --dark-highlight is a brighter version of --dark. Is there a way I can set --dark-highlight to be dependent on --dark, where it automatically uses the same hue, saturation, and alpha values, but increases the lightness by 5%


```
:root {
  --dark: hsla(209, 28%, 6%, 1);
  --dark-highlight: hsla(209, 28%, 11%, 1);
}
```

Also, what's a good guide to the new CSS features?
Need Help Porting `ngx-toasta` to support Angular-universal
Tags: angular, javascript, frontend, help
Published: 2018-11-23 10:41:12

---
title: Need Help Porting `ngx-toasta` to support Angular-universal
published: true
description: I need help porting a NPM Module to support angular-universal and I don't know how to move with it
tags: angular, javascript, frontend, help
---

Hi DEVs

I am posting this here because I am now in peril.

We use `ngx-toasta` for Toast Notifications in our Angular app.
We recently converted the app to use Angular-Universal to support Server Side Rendering.

Actually we were using `ng2-toasty` earlier but found this port after searching further on NPM registry.

It is one of our major and important dependencies, it is based here: https://www.npmjs.com/package/ngx-toasta
does not work with angular-universal. I tweeted the developer about this, but he did not respond. So, now I need to move with it. But I don't know how to. :-(

Can anybody help me here?
How latency numbers changes from 1990 to 2020.
Tags: latency, computing
Published: 2018-11-23 10:30:38

---
title: How latency numbers changes from 1990 to 2020.
published: true
description: How latency numbers changes over a period of time
tags: latency, computing
cover_image: https://thepracticaldev.s3.amazonaws.com/i/8tmvob3d9ac75vl1tdln.jpg
---
## What is Latency
In computing,"latency" describes some type of delay. It typically refers to delays in transmitting or processing data, which can be caused by a wide variety of reasons.

`Note: 1 ns = 1 * 10^-9 sec`

**In 1990:**
- L1 cache reference: 181 ns
- L2 cache reference: 784 ns
- Branch mispredict: 603 ns
- Main memory reference: 207 ns
- Compress 1K bytes with Zippy: 362,000 ns
- Send 2K bytes over commodity network: 1448 ns
- Read 1 MB sequentially from memory: 3038000 ns
- Round trip within same datacenter: 500,000 ns
- Disk seek: 20,000,000 ns
- Read 1 MB sequentially from disk: 640,000,000 ns
- Read 1 MB sequentially from SSD:  50,000,000 ns

**In 2000:**
- L1 cache reference: 6 ns
- L2 cache reference: 25 ns
- Branch mispredict: 19 ns
- Mutex lock/unlock: 94 ns
- Main memory reference: 100 ns
- Compress 1K bytes with Zippy: 11,000 ns
- Send 2K bytes over commodity network: 45,000 ns
- Read 1 MB sequentially from memory: 301,000 ns
- Round trip within same datacenter: 500,000 ns
- Disk seek: 10,000,000 ns
- Read 1 MB sequentially from disk: 20,000,000 ns
- Read 1 MB sequentially from SSD: 5,000,000 ns

**In 2010:**
- L1 cache reference: 1 ns
- L2 cache reference: 4 ns
- Branch mispredict: 3 ns
- Mutex lock/unlock: 17 ns
- Main memory reference: 100 ns
- Compress 1K bytes with Zippy: 2000 ns
- Send 2K bytes over commodity network: 1000 ns
- Read 1 MB sequentially from memory: 30,000 ns
- Round trip within same datacenter: 500,000 ns
- Disk seek: 5,000,000 ns
- Read 1 MB sequentially from disk: 3,000,000 ns
- Read 1 MB sequentially from SSD: 494,000 ns

**In 2020:**
- L1 cache reference: 1 ns
- L2 cache reference: 4 ns
- Branch mispredict: 3 ns
- Mutex lock/unlock: 17 ns
- Main memory reference: 100 ns
- Compress 1K bytes with Zippy: 2000 ns
- Send 2K bytes over commodity network: 44 ns
- Read 1 MB sequentially from memory: 3000 ns
- Round trip within same datacenter: 500,000 ns
- Disk seek: 2,000,000 ns
- Read 1 MB sequentially from disk: 825,000 ns
- Read 1 MB sequentially from SSD: 49000 ns

## Comparison of Cache Sizes 
![comparison](https://thepracticaldev.s3.amazonaws.com/i/mc6x66frnuvfu9d9q5gh.jpg)<center><i>Image source: [Tweet by Tim Chase](https://twitter.com/gumnos/status/1066058931036987392)
</i></center>
<i>Reference: [berkeley.edu](https://people.eecs.berkeley.edu/~rcs/research/interactive_latency.html)</i>
I'm helping you to refactor/restructure your C++ code for free if...
Tags: refactoring, restructuring
Published: 2018-11-23 10:09:00

---
title: I'm helping you to refactor/restructure your C++ code for free if...
published: true
description: 
tags: refactoring, restructuring
---

Hi Everyone,

I would like to write some articles and publish them here, on my blog and maybe at other places as well. The goal would be to show how to write good quality, object oriented C++ code and how to refactor/restructure already existing bad quality code through real world examples. For that I would need some inputs.

If
-You have a code written in C++
-You are not satisfied with its quality
-You have no idea how to improve it
-You have nothing against publishing your code
-You need support and suggestions how to do it better

Just write me a message and we can discuss the details!

Thanks in advance!
I ❤ Kotlin, inline function edition
Tags: android, kotlin
Published: 2018-11-23 09:54:44

---
title: I ❤ Kotlin, inline function edition
published: true
description: There are many instances of loving Kotlin since I started using it at work for our Android app, here's one of the latest reasons
tags: Android,Kotlin
cover_image: https://industryolog.com/wp-content/uploads/2017/07/kotlin.jpeg
canonical_url: https://andrewemerson.io/post/kotlin-inline-fun-love/
---

_This post was also published on my personal site at [andrewemerson.io](https://andrewemerson.io/post/kotlin-inline-fun-love/)_

Over the last year, I have been exclusively writing new Android code (and converting old code) in Kotlin. It's such an expressive, succint and fun (excuse the `fun` pun) language to write with. I won't go into all the reasons right now plus many others have [written](https://m.signalvnoise.com/how-i-fell-in-love-with-a-programming-language-8933d5e749ed) about this before.

Today I want to share a small snippet which demonstrates a recent warm and fuzzy feeling I got writing in Kotlin. 

I have been working on a requirement to measure network calls in our app using an OKHttp [`NetworkInterceptor`](https://github.com/square/okhttp/wiki/Interceptors) and log the stats to our analytics platform. 

The obvious way to write this is something like this (code is simplified):

```kotlin
fun intercept() {
        // ...
        val start = SystemClock.elapsedRealtime()
        val result = doSomethingWeWantToMeasure()
        val duration = SystemClock.elapsedRealtime() - start
        log(duration)
        // ...
}
```

This works fine but the _meat_ of the function's logic is polluted with measurement code making it harder for your colleagues to grok what's going on.

### Enter `inline` generic function with lambda

Here's how an inline function can help this code:

```kotlin
fun intercept() {
        // ...
        val result = measure { doSomethingWeWantToMeasure() }
        // ...
}

inline fun <T> measure(action: () -> T) {
        val start = SystemClock.elapsedRealtime()
        val result = action()
        val duration = SystemClock.elapsedRealtime() - start
        log(duration)
        return result
}
```

Better, no? Now I can concentrate on reading what the `intercept()` function's main intention is without skipping over lines of measurement code. We also benefit from the option of reusing that code in other places where we want to profile performance.

### What is `inline`?

I am still quite new to this so this may not be 100% for the experts but my simple explanation is:

> `inline` allows you to call a function with a lambda argument within a closure (`{ ... }`) rather than passing the lambda like `measure(myLamda)`.

You can read the longer, more technical (and possibly more accurate) explanation [here](http://kotlinlang.org/docs/reference/inline-functions.html).

In the mean time, happy Kotlin-ing and feel free to ask questions or add your favourite Kotlin _warm-and-fuzzies_ in the comments.
How Blockchain can disrupt the Supply Chain?
Tags: blockchain, supplychain
Published: 2018-11-23 07:54:21

---
title: How Blockchain can disrupt the Supply Chain?
published: true
description: Blockchain technology can help bring traceability across the supply chain of any product. The technology enables shippers, manufacturers and customers to gather data, examine trends and conduct predictive monitoring.
tags: #blockchain,  #supplychain
---
Free in browser email signature generator
Tags: email, signature, tool, vue
Published: 2018-11-23 06:56:10

---
title: Free in browser email signature generator
published: true
description: In browser email signature generator
tags: email, signature, tool, vue
---

![](https://thepracticaldev.s3.amazonaws.com/i/can5d01k1n9d5owxyktw.png)

MySigMail is a free, in browser, email signature generator without creating account

http://mysigmail.com

Why another one?

There were two goals:

Do something simple, useful and free.

I needed a signature. :)

Those web tools for creating signatures that I was able to find did not suit me, some of them were paid, others free but required to create an account to start using them.

So I decided to make my own, simple, free and without creating an account.

In the application, you can save, download, import signature projects.

While there is only one template, of course soon I will add others. I just don't have a lot of free time right now.

Thank you for your attention!
Website Redesign V2
Tags: gatsby, react, javascript
Published: 2018-11-23 06:35:34

---
title: Website Redesign V2
published: true
description: Redesign of my website using Gatsby JS
tags: Gatsby, React, JavaScript
---

With 2018 coming to an end soon I was able to release V2 of my website over Thanksgiving holiday. Coincidentally this is also my second year as a developer so I'll be able to keep these releases in sync with my years of experience. What’s new? Everything! V2 was completely redesigned from the ground up with a little design inspiration from [Tania Rascia](https://www.taniarascia.com/"). I switched from using create-react-app to Gatsby. The reason for this switch was to keep my blog on Github via Markdown files and also take advantage of Gatsby blazing fast speed with SSR. As you can see from the results below I was able to increase each area on the lighthouse test.

!["Old site performance"](https://res.cloudinary.com/smithmanny/image/upload/c_scale,f_auto,h_500,q_auto:best/v1542907305/old-site-performance_uws4hm.png)
!["New site performance"](https://res.cloudinary.com/smithmanny/image/upload/c_scale,f_auto,h_500,q_auto:best/v1542907305/new-site-performance_d2ixpo.png)

With this version release of my website, I wanted to switch the focus from learning more about me to more about programming by putting the blog posts front and center. With this change, people would immediately be focused on my new blog posts and are able to learn something new within the first few seconds of visiting my website. 

Another slight change I made was the color scheme. I still am not completely satisfied with my color scheme, but I wanted to go for a Miami Dolphins theme. I originally planned on releasing this site with the option of choosing between a light and dark theme, but because of a bug with styled-components and Gatsby, I postponed this feature until further notice. Curious as to what else I used to build this site? Well let’s see:

* Gatsby
* Hosting & DNS: Netlify
* CSS: styled-components
* Analytics: Google Analytics (looking for free alternatives 🤔)
* Blog: Markdown files hosted on Github 
* Icons: Font Awesome