teleren/devto huggingface dataset:
TypeScript 3.0: Exploring Tuples and the Unknown Type
Tags: javascript, typescript
Published: 2018-08-21 18:41:36

---
title: TypeScript 3.0: Exploring Tuples and the Unknown Type
published: true
description: Learn how TypeScript 3.0, a typed superset of JavaScript, improves tuples type and introduces a new 'unknown' top type!
tags: #javascript #typescript 
canonical_url: https://auth0.com/blog/typescript-3-exploring-tuples-the-unknown-type/
---

TypeScript 3.0 is out! It comes with enhancements for the type system, compiler, and language service. This release is shipping with the following:

* Project references let TypeScript projects depend on other TypeScript projects by allowing tsconfig.json files to reference other tsconfig.json files.

* Support for defaultProps in JSX.

* Tuples in rest parameters and spread expressions with optional elements.

* New unknown top type! It's the type-safe counterpart of any.

For this blog post, we are going to focus on the enhancements made to tuples and the unknown type! 

[Read on 🏙](https://auth0.com/blog/typescript-3-exploring-tuples-the-unknown-type/?utm_source=dev&utm_medium=sc&utm_campaign=whats_new_typescript)

![TypeScript 3.0: Exploring Tuples and the Unknown Type](https://thepracticaldev.s3.amazonaws.com/i/vcpn8ub9ihh1au6eouub.png)
What are your top 3 Python opensource standalone applications (CLIs/Desktop apps/etc)?
Tags: discuss, python
Published: 2018-08-21 18:32:04

---
title: What are your top 3 Python opensource standalone applications (CLIs/Desktop apps/etc)?
published: true
description: 
tags: #discuss #python
---

I am working on a Python project and want to be inspired by **clean, idiomatic, well-architected and tested code base**. 

I have seen all the `awesome*` repositories on Github but they generally link to libraries or frameworks. 
I'm looking for applications which you'd use with a cli or a GUI. It would be great if you could link to their codebase.

Thanks!
Who is hiring? (As of August 2018)
Tags: whoishiring
Published: 2018-08-21 17:57:52

---
title: Who is hiring? (As of August 2018)
published: true
description: Members of the dev.to community sharing open job opportunities at their companies.
tags: whoishiring
---


This is our monthly thread where community members share openings at their companies.

Here a few ground rules:

- Please only post if you are personally part of the hiring company (no recruiting firms)
- Please provide brief background on what your company does
- Only one post per company (you can list multiple openings in the post)

Consider using this template:

```
Company Name | Job Title | Location | Remote or Onsite | (optional) Salary Range | Sponsor visa?

About the company — background, size, etc (1-3 sentences)

About the role(s) — languages, requirements, etc (1-3 sentences)

Do you sponsor visas?

How to Apply — email or application link
```

---

We also wanted to share some quick careers-related notes from our fantastic Sustaining Sponsors.

### Digital Ocean

> At **DigitalOcean**, we're simplifying cloud infrastructure for developers. Here you'll get to work with some of the smartest and most interesting people around; solving unique and complex technical challenges on a scale matched by few companies. If you get excited about stretching yourself in new ways, developing yourself to your fullest potential, with amazingly supportive friends and colleagues; [we want to talk to you](https://www.digitalocean.com/company/careers/?utm_source=devto&utm_medium=display&utm_campaign=Devto_2018_Brand)!

### Underdog

> **Underdog.io** has connected thousands of candidates with hundreds of growing organizations in New York and San Francisco. Candidates can join the platform in 60 seconds. If approved, they get connected directly to its network of hiring managers and founders at top technology companies. If you're ready to simplify your job search and get your name in front of hundreds of companies in NYC and SF, please go ahead and [apply today](https://underdog.io/?utm_medium=homepage&utm_source=devto&utm_campaign=homepage2018-aug-11&utm_content=engineers-tech-companies)!

### Timber

> Timber is a new kind of cloud-based logging platform designed for applications and developers. We help engineering teams spend less time debugging and more time shipping. We’re a growing, Brooklyn based company used by thousands of developers all over the world and currently hiring for a variety of positions — see them all [here](https://jobs.timber.io/?utm_source=devto&utm_medium=newsletter&utm_campaign=devto_aug).
What are your thoughts on running code at the edge?
Tags: discuss, askdev, edge, network
Published: 2018-08-21 17:48:31

---
title: What are your thoughts on running code at the edge?
published: true
description: Good or bad, what are your thoughts?
tags: discuss,askdev,edge,network
---

tl;dr: We've about to be deploying new systems to run code (properly) on the edge, and there's been some internal debate - so I thought I'd ask the dev community: **what are your thoughts on running code on the edge?**

Our infrastructure contains some PHP applications, and more recent ones are in Python or Node, we have edge nodes that deliver our application, and we some some proprietary sync software to keep all our edges in sync for files.

After much internal debate, we've decided to scale our infrastructure at the edge, instead of forking over tons of money for AWS, Azure, GCP, etc. - we already have reliable edge nodes in place, which can deliver content in under 30ms in most places(all over NA, some of SA, England, 60% of general Europe(AMS, DE, etc)), the issue we've had in the past is when you hit our edge, we then poll our backend in Canada, this causes a long wait time for users (*static files are hosted at the edge, we're talking dynamic content here*). Presently, it's significantly cheaper to roll our own infrastructure, instead of rely on something like [Fastly](https://fastly.net) to use.

Our running plan is for NA to start, we're going to deploy 4 instances of our application at the edge and monitor metrics on an isolated *beta* environment, and invite our consumers to test it. We're hoping by doing this, to bring our load time down from 220ms to sub-30ms all across NA.

There are some downsides, such as keeping data in sync - to which we're not concerned now, this is why we want to do a beta test to see where we need to improve.

Some developers have embraced this, some have maintained a strong stance against - given this, what's your stance on running code on the edge?
Do you even refactor, bro?
Tags: refactoring
Published: 2018-08-21 17:44:45

---
title: Do you even refactor, bro?
published: true
description: 
tags: refactoring
---
You are surrounded by a horribly implemented functionality made up of multiple files of hundreds of lines each that barely crawls while doing its job. 

The front-end is a mountain of copy-pasted HTML templates using very "!important" CSS coupled with highly redundant and confusing JavaScript functions that who knows where they are called from or how to even use.

Back-end looks innocent with only a couple calls but it absolutely stinks from the amount of workarounds that the current architecture didn't account for and the repetitive boiler-plate code for each entity in it.

Your task is to refactor this beast while keeping all its functionality intact. How would you tackle this monster? 

(a.k.a. What are the more generic steps you use while refactoring?)
What the... hoisting?
Tags: javascript, hoisting, behavior
Published: 2018-04-27 20:47:35

---
title: What the... hoisting?
published: true
description: A short overview on "Javascript Hoisting".
tags: javascript,hoisting,behavior 
---

Hoisting in Javascript... has always been a **really bad** behavior of the language itself.

#Why are you doing this for me?

If you dunno what I'm talking about, that's what (in short words) the hoisting is:


```javascript
console.log(test)
// -> undefined
var test = "I'm not here";
```

As you can see, when I'm calling the _console.log(test)_ the variable itself, has not been declared at all!.

But Javascript is a bad guy that chooses to declare it for you.
Here's what happened:


```javascript
//javascript will declare the variable, moving it at the TOP of it's scope
var test;
console.log(test)
// -> undefined
test = "I'm not here";
```
this is really confusing, and should not happen at all!.

And we've not finished yet, because this also happens into function's scope.
Like this:


```javascript
function test(){
  return test;
  var test = "I'm not here";
}

console.log(test())
// -> undefined
```

##And also happening with a function itself!.

If we move the call to _console.log(test)_ at the top of the call stack, the 
function _test()_ should not exists...


```javascript
console.log(test())

function test(){
  var test = "I should not be here";
  return test;
}

// -> "I should not be here"
```

Nothing to do... Javascript is moving the function to the top of the Scope... so you can call a function, before you declare it...

But wait:


```javascript
console.log(test)
// -> undefined
var test =function test(){
   var test = "I'm not here";
   return test;
}
``` 
Why there's an _undefined_ if we can call a function, before we declare it?

Because, in this last code, only the _var test_ declaration has been moved to the top, and not the function assigned to It.

##Let's RECAP!

**Everytime** you declare a _var_ into a scope or write a function declaration, **Javascript HOISTING moves those at the TOP of their scope without their value**.


<center>No way... I'm leaving!</center>

![alt text](https://i.imgur.com/4jop4FB.gif "Logo Title Text 1")


#So... **"Let"** and **"Const"** ...they are our salvation!

Let's look at what happens with _Let_ and _Const_ if we try to do the same dirty stuff:


```javascript
function test(){
	return confusing;
  	let confusing = "Finally!";
}

console.log(test())
//-> ReferenceError: can't access lexical declaration `confusing' before         initialization
``` 

**AH AH!** so, here you're!

and the same happens with const:


```javascript
function test(){
	return confusing;
  	const confusing = "Still Safe!";
}

console.log(test())
```

**Can you guess, what happens with "let" and "const" in the global scope?**

![alt text](https://m.popkey.co/8b80f7/Nv8Gx.gif "Logo Title Text 1")

Because let is a "block scope local variable" and you need to put it into a block to unleash it's power...

<center>_But this is another story_</center>


![alt text](https://media3.giphy.com/media/udRSyh5yLCqKQ/giphy.gif "Logo Title Text 1")
Tech Stack and Cloud Infrastructure to choose for your StartUP.
Tags: help, discuss, cloud, startup
Published: 2018-08-21 15:51:55

---
title: Tech Stack and Cloud Infrastructure to choose for your StartUP.  
published: true
tags: help, discuss, cloud, startup
---

Hello, What are the Tech Stack (front-end, back-end, and data stores), and cloud Infrastructure (AWS) needed to build faster and with less cost for operations. Product is a Web application and iOS/Android app.

Thanks,
Suri
Setting a Proxy in Ubuntu
Tags: ubuntu, proxy
Published: 2018-08-21 15:11:33

---
title: Setting a Proxy in Ubuntu
published: true
description: 
tags: ubuntu,proxy
---

To configure the proxy in Ubuntu you can set it in different places:


## apt 

In order to use apt with a proxy you have to edit the `/etc/apt/apt.conf` file with the following:

```
Acquire::http::proxy "http://username:password@host:port/";
Acquire::ftp::proxy "ftp://username:password@host:port/";
Acquire::https::proxy "https://username:password@host:port/";
```

## Environment Variables

To add the proxy as an environment variable, edit the `/etc/environment` file with the following:

```
http_proxy=http://username:password@host:port/
ftp_proxy=ftp://username:password@host:port/
https_proxy=https://username:password@host:port/
```

## gtk3 programs

For gtk3 programs, use the proxy settings in `network settings`.

I got the information from: [https://www.quora.com/How-do-I-set-the-proxy-setting-using-Linux-command-line-on-Ubuntu-14-04]
Enter Your Data Manually in PowerBI
Tags: powerbi, enterdatamanually, powerbienterdata
Published: 2018-08-21 14:56:39

---
title: Enter Your Data Manually in PowerBI
published: true
description: There might be a time where you have a small data set that you are interested in working with to create a visualization in PowerBI. In this video, it walks you through how to enter your data manually to create a visualization.
tags: PowerBI, Enter data manually, PowerBI enter data
---

{% youtube g6o5n92JxHU %}
My 3 Simple Tips For Being A Productive Remote Developer
Tags: career, discuss, productivity, remote
Published: 2018-08-21 14:13:32

---
title: My 3 Simple Tips For Being A Productive Remote Developer
published: true
description: Here are 3 simple tips that help drive and motivate me to be the best remote developer I can be.
tags: career, discuss, productivity, remote
---

<img src="https://media.giphy.com/media/11jQqqyF4S5MWY/giphy.gif">

When I started at my company [Fusion Media Group](https://kinja.com), I had to make a personal decision 8-months in, to move out of state in order to afford to take care of my mom. It was a big responsibility to take on, but I did it. My company accepted my request to go remote full-time and my journey working from home began.

I initially thought it would be difficult to get adjusted, but I quickly noticed that I kept waking up at the same time that I normally did, as if I were still going to the office. I quickly learned that this was a key takeaway that helped maintain my productivity.

## Start Early

When I woke up and started my day early, using time that was spent commuting, immediately went toward starting work quicker (it may have also been the overall feel-good sensation of it being quiet mornings that affect my mind in a positive way.) A fair amount of my immediate colleagues are in Budapest 🇭🇺, so getting extra time in the morning also meant getting extra time with my overseas colleagues. Between the two, I felt a lot more productive using my morning energy to put toward reading emails and writing code than sitting on the train.

## Be Present

At my company, if you're on Slack, you've more than likely seen my name in a channel. It's because I'm active. I ensure that I'm as communicative as possible with people, but I'm also just present. An unfortunate side effect of being a remote employee, is the potential for getting lost amongst the people who are physically at your office. If you ensure that you're present and people know that you're there, you can avoid falling through the cracks.

Whenever I can or have a reason to, I try to visit my office. Something that I took the liberty of doing recently was organizing our company Hackathon. Not only was it something that I was passionate about wanting to do, but it also gave me a reason to go back to the office and see my colleagues again. I found it to be a big boost in my own morale, but also my colleagues' morale that I had a reason to visit, and wanting to do something inclusive.

## Stay "In The Know"

I do my absolute best to stay "in the know" with everything in my field. I do this by subscribing to a lot of feeds and keyword digests (ie. #JavaScript on Medium). I read a lot, and I practice a lot. Ensuring that I'm at the top of my game helps to maintain my productivity as a developer, in general, but also helps when you have a reason to post in Slack, like an interesting article.

* * *

I hope these 3 simple tips provide food for thought on how you can increase your own productivity as a remote developer. What are some of your productivity tips?
PHP loop patterns
Tags: php, loop, patterns, fun
Published: 2018-08-21 13:38:22

---
title: PHP loop patterns
published: true
description: 
tags: php, loop, patterns, fun
---

Some patterns created with (nested) loops. Please comment if you have any.


**Code:**


```php
for ($i = 0; $i < 10; $i++) {
    for ($j = 0; $j < 10; $j++) {
        if (in_array($j, [0, 9, $i]) || in_array($i, [0, 9, 9 - $j])) {
            echo "#";
        } else {
            echo ' ';
        }
    }
    echo "\n";
}
```

**Output:**


```
##########
##      ##
# #    # #
#  #  #  #
#   ##   #
#   ##   #
#  #  #  #
# #    # #
##      ##
##########
```

---
React JS for Smart TV - discussion
Tags: discuss, react, smarttv
Published: 2018-08-21 13:10:45

---
title: React JS for Smart TV - discussion
published: true
description: A starter post to discuss about ReactJS on SmartTV
tags: #discussion #reactjs #smarttv
---

Hi,

I'm developing an App for SmartTV with React JS (well, trying to, haha) and was wondering if anyone have done something similar or know something about.

I'm not using React Native because the TV brands that 

This post is to share knowledge about that topic and have a good conversation.

Feel free to ask something about it, I would be glad to answer what I know, :3

To start a discussion, I will ask: someone has implemented a way to handle navigation by arrow keys on the keyboard?
Is this a bug or, am I missing something? "Cached tag list is too long"
Tags: devto, post, bug
Published: 2018-08-21 12:58:32

---
title: Is this a bug or, am I missing something? "Cached tag list is too long"
published: true
description: 1 error prohibited this article from being saved- Cached tag list is too long (maximum is 64 characters)
tags: DevTo, Post, Bug
---

I wanted to edit my previous post and save it back. But, every time it throws this error. Can someone please help? 

{% user andy %}

![Cached](https://thepracticaldev.s3.amazonaws.com/i/n6xu6bmrw59wac8tteq9.PNG)
<figcaption>Cached tag list is too long (maximum is 64 characters)</figcaption>
Quick tip for vs code users.
Tags: vscode, webdev, beginners
Published: 2018-08-21 12:42:37

---
title: Quick tip for vs code users.
published: true
description: How to add dictionary suggestions to the vs code
tags: vscode,webdev,beginners
cover_image: https://cdn.pixabay.com/photo/2013/07/12/14/48/dialog-148815_960_720.png
---


Have you ever make a spelling mistakes while typing inside the markdown files or bored of typing long words in vs code.

Here is a quick tip for you there is an extension called [Dictionary completion](https://marketplace.visualstudio.com/items?itemName=yzhang.dictionary-completion)
which helps to give the quick suggestions of the related keywords we are typing.

![vscode auto complete](https://thepracticaldev.s3.amazonaws.com/i/6nfojjt6jqpuujrlcubh.gif)


Once you installed open your settings in vs code and add the below code in your workspace settings.

```
{
    "[markdown]": {
        "editor.quickSuggestions": true
    }
}
```


Hope you enjoyed happy coding.
traçabilité & DLT / Blockchain
Tags: dlt, blockchain, cloud
Published: 2018-08-21 12:06:27

---
title: traçabilité & DLT / Blockchain 
published: true
description: opinion - traçabilité & DLT / Blockchan
tags: DLT, Blockchain, Cloud
---
Les projets "blockchain" ne font que décaler le problème. Il ne faut pas raisonner cloud et penser plus large..

https://www.lemagit.fr/actualites/252446603/Supply-Chain-pourquoi-la-Blockchain-ne-regle-pas-seule-les-problemes-de-tracabilite
.Net Core, amélioration des performances
Tags: netcore, csharp, fsharp
Published: 2018-08-21 12:03:07

---
title: .Net Core, amélioration des performances
published: true
description: actualité - .Net Core 2.1, amélioration des performances 
tags: .Net Core, CSharp, FSharp
---

https://blogs.msdn.microsoft.com/dotnet/2018/08/20/bing-com-runs-on-net-core-2-1/

https://blogs.msdn.microsoft.com/dotnet/2018/04/18/performance-improvements-in-net-core-2-1/
Angular 6: “ng test” with Jest in 3 minutes
Tags: angular, jest, unittest, webdev
Published: 2018-08-21 11:55:42

---
title: Angular 6: “ng test” with Jest in 3 minutes
published: true
description: How to integrate Jest with Angular CLI
tags: angular, jest, unit test, webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/qjl0nbxydm9frcgd9x28.png
---

Hey folks.

Today I’m going to show you how to setup your Angular CLI workspace to work with [Jest](https://jestjs.io/) *while keeping it clear of boilerplate code*.

I'm not going to explain why you should choose Jest over Karma, assuming you already did that choice, however I will give you a [link](https://www.xfive.co/blog/testing-angular-faster-jest/) to an article that explains the reasons.

So let’s get started!

## Setting up Jest


####Remove Karma related stuff:
  
```
npm remove karma karma-chrome-launcher karma-coverage-istanbul-reporter karma-jasmine karma-jasmine-html-reporter
rm src/karma.conf.js src/test.ts
```

####Install [@angular-builders/jest](https://github.com/meltedspark/angular-builders/tree/master/packages/jest) and `jest`:
```
npm i -D jest @angular-builders/jest
```

####Update your Typescript configurations:  

Although you run your unit tests with Jest, Protractor (e2e tests) still [has to use Jasmine](https://github.com/angular/protractor/issues/3889). Due to this fact it’s possible that you favorite IDE will get confused with the typings and will propose you Jasmine types in unit tests or Jest types in e2e test. In order to avoid that kind of problems you have to specify the types explicitly:

In *tsconfig.spec.json* (*src* directory or project roots, used by Jest):

```
"compilerOptions": {
 ...
 "module": "commonjs",
 "types": ["jest"]
}
```

In *tsconfig.json* (root directory, used by IDE):

```
"compilerOptions": {
	...
	"types": ["jest"]
}
```


####In *angular.json* change `@angular-devkit/build-angular:karma` to `@angular-builders/jest:run`:
```
"projects": {
    ...
    "[your-project]": {
         ...
         "architect": {
                ...
                "test": {
                          "builder": "@angular-builders/jest:run"
                          "options": {
                                ...// see below
                          }
```
Detailed description of `options` object can be found [here](https://github.com/meltedspark/angular-builders/tree/master/packages/jest#builder-options).


This is it, now you can run your tests with Jest.

## Running the tests with Jest

* To run tests for all the projects in workspace: `ng test`
* To run tests for a specific project *my-project*: `ng test my-project`
* You can specify [Jest CLI options](https://jestjs.io/docs/en/cli.html) either in builder options (useful when it is a persistent config) or right to `ng test` as a parameter (useful when it is a one-timer).  <br>
For example to run a single test:  <br><br>
`ng test --testNamePattern="My test suite My test case"`

## Further reading
If you’d like to learn more about builders and even considering creating one of your own check out [this](https://dev.to/meltedspark/angular-cli-6-under-the-hood-builders-demystified-2975) article.
Challenge: Write the recursive Fibonacci algorithm in a different language.
Tags: challenge, beginners, fun
Published: 2018-08-21 11:11:23

---
title: Challenge: Write the recursive Fibonacci algorithm in a different language.
published: true
description: Quick and fun challenge
tags: challenge, beginner, fun
---


__Hellow [DEV](dev.to) community, how are you?__

Can we challenge ourselves in this fun "game"?

Let's see how many languages we can enumerate by writing the Fibonacci recursive algorithm on the comments. Are you in?

__EDIT__: this is not about having the fast/better code, just to have some fun