teleren/devto huggingface dataset:
A Guide to Angular 8's Differential Loading
Tags: angular, javascript, typescript
Published: 2019-06-12 17:57:56

**TL;DR:** Angular 8 is here! Learn all about one of its coolest new features: differential loading. Differential loading lets you serve up different bundles to different browsers and make your application even faster!

Angular 8 has only been out for about a week at the time I’m writing this, but there’s already been 17,000 “What’s New” articles published. Rather than throw my own take on the pile, I’ll refer you to the [official Angular release announcement](https://blog.angular.io/version-8-of-angular-smaller-bundles-cli-apis-and-alignment-with-the-ecosystem-af0261112a27) but here are the high points:

- No, Ivy isn’t ready yet (it’s an opt-in preview).
- No, [Bazel](https://bazel.build/) isn’t ready yet (it’s an opt-in preview).
- [Builders](https://blog.angular.io/introducing-cli-builders-d012d4489f1b) allow you to extend and customize the CLI. For example, you’re now able to [deploy to Firebase](https://github.com/angular/angularfire2/pull/2046) and other providers from the CLI.
- There’s [improved support for web workers](https://v8.angular.io/guide/web-worker), such as the ability to generate them from the CLI and use them in your application.
- Rather than using the “magic string” syntax specific to Angular to do lazy loading, you’ll be able to use the [standard `import()` syntax](https://next.angular.io/guide/deprecations#loadchildren-string-syntax). You can even perform this automatically for your app with the [`angular-lazy-routes-fix`](https://github.com/phenomnomnominal/angular-lazy-routes-fix) tool.
- The new [unified location service](https://v8.angular.io/guide/upgrade#using-the-unified-angular-location-service) improves migration from the AngularJS `$location` service. 
- The Angular team has created a simplified [Getting Started Guide](https://next.angular.io/getting-started).
- There’s a new [Deprecation Guide](https://v8.angular.io/guide/deprecations) to assist users with updating Angular.
- [Differential loading](https://v8.angular.io/guide/deployment#differential-loading) is turned on in the CLI by default.

In this article, I want to dive into that last one: differential loading. What is that? Why does it matter? What do I need to do about it (if anything)?

[Continue reading ](https://auth0.com/blog/angular-8-differential-loading/) 📖

![Angular illustration](https://cdn.auth0.com/blog/illustrations/angular.png)
Organizational Tacos: Sometimes It's Okay to Deviate from Familiar Patterns
Tags: react, beginners, discuss
Published: 2019-06-12 17:55:41

Today we were discussing an application that has this very basic design:

```html
<TacoContainer>
  {isTacoDetailsActive ?
    <TacoDetails /> :
    <TacoList /> }
</TacoContainer>
```

## Presentational and Container Component Pattern

This article isn't about the above pattern, so if you're already versed in its many names—e.g., here is a 2015 [article on Medium](https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0) by Dan Abramov bearing the same name—you may skip this brief section.

In the context of this application, `TacoContainer` is the component where all the action happens. It fetches data and maintains the state of `isTacoDetailsActive`, a variable we are using in this [ternary statement](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) that will determine which component is visible, `TacoDetails` or `TacoList`.

The other two components simply receive data from `TacoContainer` and display, or _present_ them to the user. That's not to say they couldn't have their own state to manage, but for the purpose of this discussion, let's assume they do nothing other than display the many tacos we are about to enjoy or the complete details of an individual taco. If you're ever in Annapolis, MD, I will take you to the most authentic little diner with the best … actually, let me get back on track.

## Ultimately, it is for you to decide

I remember spending hours on these kinds of details when I was learning Angular. There was an _Angular way_ to do just about everything, and I wanted to create beautiful, conforming code that followed a plan. 

In the end, there were things that didn't make sense for our team of two, so we made some changes. Eventually I learned that _ultimately, it was for me to decide_. That didn't protect me from making wrong decisions, but it did provide the freedom to learn and grow by attempting things outside of the norm.

## The Question of the Day

Our discussion was based on this question: if `TacoDetails` and `TacoList` aren't sharing any state, and if they are both operating with independent data calls, is there anything wrong with moving that logic out of `TacoContainer` and into their respective components?

My answer: _"Ultimately, it is for you to decide._"

Temptation is a funny thing. Some run toward it as fast as possible, depending on what it is, and, after gaining a little experience, others will recognize temptation as the gateway to consideration. It's situational, of course. If I'm tempted to refactor my code, I pause and consider what it will be like for the developer who comes after me. I never pause and consider whether I should eat tacos. :man_shrugging::taco::taco::taco:
Why do recruiters hide the name of the company? 🤷‍♂️
Tags: hiring, discuss
Published: 2019-06-12 17:40:41

Ugh, another recruiter just messaged me on LinkedIn about some opportunity at some undisclosed company. This is about the hundredth time this year. 

I feel blessed that so many recruiters ping me, however the roles are hardly ever for positions I would be interested in. Then to top it off, the recruiter leaves off the name of the company. They all do it.

![](https://media.giphy.com/media/NlCtOwpyUp15e/giphy.gif)

Today I worked up the gumption to actually ask one of them why. The recruiter replied "Unfortunately adding the name of my client would make my job pointless so that is why it is not there."

It's totally unreasonable to think your job is pointless if you put the name of the company on the initial communique. This seems sensible at first glance, but it's totally not. 

Interviewing for a new job shouldn't be like a suspense movie.

![](https://media.giphy.com/media/pC8uNEr5Y5DzO/giphy.gif)

The job of a recruiter is to forge relationships. Recruiting is largely about matchmaking. The recruiter has the relationship with the company. You don't. Without naming the company it's like going on a blind date. If you had the name of the company you could do a little research about them. Let's not waste both of our time.

It's not like you really have the option to cut and run once you see the name of the company. That is unless you know someone working at the company and that person will refer you internally. The odds of that happening are slim to none. Recruiters have much more experience selling your skills than you do. Once the recruiter has contacted you, it would be a fool's errand to contact the company directly just to get lost in their bureaucracy. It can also take dramatically longer going down this path.

Actually it can get much worse, but that's a topic of another post.

![](https://media.giphy.com/media/nknFriks5Yu6A/giphy.gif)

Good recruiters are hard to find. If you happen to work with one that treats you well, maintain an open line of communication. You will be rewarded.


What do you think?
Self Taught Developer Resources
Tags: selftaught, tutorial, resources
Published: 2019-06-12 17:22:36

Just wanted to pass on a sweet podcast I found at [La Vie en Code](https://www.lavieencode.net/).  [Nicole Achambault](https://twitter.com/lavie_encode) is a self-taught Intermediate Web Developer, blogger, and podcast host who has dedicated herself to supporting the self-educated coder. I have downloaded her series on ["Dissecting the Web Developer Roadmap."](https://www.lavieencode.net/podcast/030-dissecting-the-web-developer-roadmap-basics/) So far, it has been invaluable in helping me to understand key concepts. 
So, if you're like me and feel like a deer in the headlights on this WebDev superhighway, Nicole is your girl. In this series, she de-mystifies terminology, like Git, SSH, and Semantic Versioning and moves on to explain the front-end and back-end in episodes two and three. I have to say, it feels comforting to know there is someone like Nicole in my corner.
What inspires you about programming?
Tags: discuss, programming
Published: 2019-06-12 16:46:41

Hello fellow programmers! 🙋‍♂️

We all already know, programming is awesome and makes a lot of fun.
You can do virtually anything. From creating applications over to programming machines up to creating images of black holes.


My questions to you are:
What inspires you about programming?
Why do you have started to learn to program?
What websites (besides dev.to) do you visit, to get inspired?


Let us discuss!
Alexa, abre el curso de desarrollo de Skills de Alexa…
Tags: amazonecho, alexaskills, alexa
Published: 2022-05-20 16:18:15

---
title: Alexa, abre el curso de desarrollo de Skills de Alexa…
published: true
date: 2019-06-12 14:52:06 UTC
tags: amazonecho,alexaskills,alexa
canonical_url: 
---

![](https://cdn-images-1.medium.com/max/1024/0*EUnGjrGspTujlVRG.jpeg)

Hoy en día la tecnología evoluciona a un ritmo sorprendente, tanto así que los dispositivos que nos permiten ejecutar diversas actividades mediante la voz ya es una realidad y su dispersión en la sociedad toma cada vez más terreno.

La semana pasada, [German Viscuso](https://twitter.com/germanviscuso), Technical Evangelist de Amazon para Alexa, ha lanzado un curso **gratuito** (en Español) para aprender a desarrollar Skills de Alexa. Este curso se encuentra disponible en la plataforma [KeepCoding](https://plataforma.keepcoding.io/p/curso-desarrollo-alexa-skills) y cubre una amplia variedad de temas clave.

Susodicho comienza con un vídeo de 20 minutos titulado “Creando skills desde cero”, y sigue con un temario bastante específico, con algunos temas que nos ayudarán a entender cómo funciona Alexa y cómo podemos desarrollarle habilidades para ella. El contenido cubre desde la creación de una Skill básica de tipo “Hola Mundo” a la comunicación con APIs externas y el soporte para el nuevo lenguaje de presentación de Alexa APL:

– i18n de skills (26:20)  
– Diálogos (29:00)  
– Memoria y persistencia (26:54)  
– Acceso a APIs de ASK (23:58)  
– API de recordatorios (46:34)  
– Acceso a APIs externas (31:52)  
– Introducción a APL (57:14)

> “En este curso gratuito aprenderás a hacer una skill de Alexa de forma progresiva. Comenzaremos con un Hello World y de a poco iremos agregando más elementos y características con lo que te convertirás en un verdadero gurú del desarrollo de skills.”

Para realizar el curso, los requerimientos técnicos son muy básicos y es imprescindible crear una cuenta en el portal de [desarrolladores de Amazon](https://developer.amazon.com/es/alexa/).

¿Te apuntas?.. **Inscríbete** [AQUI](https://plataforma.keepcoding.io/p/curso-desarrollo-alexa-skills/?product_id=1157593&coupon_code=CURSO-ALEXA-SKILLS-WWWHATSNEW&preview=logged_out)

* * *
Redux in 2019?
Tags: react, redux
Published: 2019-06-12 16:42:42

---
title: Redux in 2019?
published: true
description: Discussion about Redux and if it still makes sense
tags: react, redux
---

I noticed that many new projects adopt either GraphQL and/or React Hooks. Neither of these solve the same issues as Redux... On the other hand it does seem to reduce the need for using Redux. Here at Stream we're still using redux... 

How do you all feel about Redux in 2019, do you think it's still useful/relevant?
Easily create 2-state, SVG-powered transitions with vue
Tags: vue, showdev, opensource
Published: 2019-06-12 16:38:25

---
title: Easily create 2-state, SVG-powered transitions with vue
published: true
description: Easily add slick transitions between two icons to your vue applications.
tags: vue, showdev, opensource
cover_image: https://raw.githubusercontent.com/kai-oswald/vue-svg-transition/master/assets/demo.gif
---
With the library [`vue-svg-transition`](https://github.com/kai-oswald/vue-svg-transition) you can easily add micro-animations to your vue application. 

So how does this library work?
Basically one SVG is scaled down while the other SVG is scaled up simultaneously. Using the right timing this creates a very nice transition between these two.

![Animations with vue-svg-transition](https://raw.githubusercontent.com/kai-oswald/vue-svg-transition/master/assets/demo.gif)
## Installing
```shell
npm i vue-svg-transition
```
```js
import Vue from 'vue';
import SvgTransition from 'vue-svg-transition';

Vue.use(SvgTransition);
```

## Usage
Using [`vue-svg-loader`](https://www.npmjs.com/package/vue-svg-loader), we can import SVGs and use them like vue components.
This leads to a very concise syntax.
```vue
<template>
    <svg-transition>
        <MyIcon slot="initial" />
        <MyOtherIcon />
    </svg-transition>
</template>

<script>
import MyIcon from "./assets/MyIcon.svg";
import MyOtherIcon from "./assets/MyOtherIcon.svg";

export default {
    components: {
        MyIcon,
        MyOtherIcon
    }
}
</script>
```
And that's already all the magic. By default the transition triggers on `click`, but you can also pass `hover` or `none` with the `trigger` prop. 
```vue
<svg-transition trigger="hover">
<!-- your icons -->
</svg-transition>
```
You can also trigger the transition programmatically using `ref`.
```vue
<svg-transition ref="transition" trigger="none">
<!-- your icons -->
</svg-transition>

<script>
export default {
    mounted() {
        this.$refs.transition.performTransition();
    }
}
</script>
```


{% github kai-oswald/vue-svg-transition %}
Send mail with php on localhost
Tags: php
Published: 2019-06-12 16:18:43

---
title: Send mail with php on localhost
published: true
description: 
tags: php
---
dev environnment

PHP 7.2.11
Laragon

Hello Guys,

please, help me,
I am developing  a website using PHP. i want to send (email on localhost to my gmail account.

here are my sendmail.ini file config

[sendmail]

smtp_server=smtp.gmail.com
smtp_port=587
smtp_ssl=auto
error_logfile=error.log
debug_logfile=debug.log
auth_username=account@gmail.com
auth_password=*************
force_sender=account@gmail.com


And i set the sendmail path in php.ini file

Also i disable two factors authentication and enable Less secure application access in my gmail  account  setting


So

when i send the email, it worked and i receive it in format text in the output directory localized in C:\laragon\bin\sendmail\output *but not in my gmail account inbox*

Here is the error that i get in error.log file (19/06/12 15:50:53 : Must issue a STARTTLS command first. r3sm21418441wrr.61 - gsmtp<EOL>)
★ A package to control the flow of time
Tags: laravel, php, testing
Published: 2020-01-02 23:26:36

---
title: ★ A package to control the flow of time
published: true
date: 2019-06-12 15:56:09 UTC
tags: laravel, php, testing
canonical_url: https://freek.dev/1378-a-package-to-control-the-flow-of-time
---

Imagine you're building that your app can notify your user, but you don't want to send more than one notification in a timeframe of five seconds. How are you going to test the time aspect? Do you have to create a test that takes five minutes?

Luckily the answer is "no". If you're using the popular [Carbon](https://packagist.org/packages/nesbot/carbon) library, you can set the value that the library considers "now". You can do this using `Carbon::setTestNow($now)` where `$now` is a instance of `Carbon\Carbon`.

In the test suites of my projects and package I often added code like this:

```php
protected function setNow(string $time, $format = 'Y-m-d H:i:s')
{
    $now = Carbon::createFromFormat($format, $time);

    Carbon::setTestNow($now);
}

protected function progressSeconds(int $seconds)
{
    $newNow = now()->addSeconds($seconds);

    Carbon::setTestNow($newNow);
}

protected function progressMinutes(int $minutes)
{
    $newNow = now()->addMinutes($minutes);

    Carbon::setTestNow($newNow);
}

protected function progressHours(int $hours)
{
    $newNow = now()->addHours($hours);

    Carbon::setTestNow($newNow);
}
```

Because I was tired of coding this over and over again, I decided to a new small, handy package called [spatie/test-time](https://github.com/spatie/test-time). Using the package, you can freeze the time with:

```php
// time will not progress anymore

TestTime::freeze();
```

Alternatively, you can pass in a carbon instance that will be used as the current time.

```php
TestTime::freeze($carbonInstance);
```

There's also no need to add separate functions like `progressSeconds`, `progressMinutes` and so on... You can progress the time with any of the carbon functions starting with `add` or `sub`.

```php
TestTime::addMinute();

TestTime::subHours(5);

// you can also chain calls
TestTime::addMonth(3)->addYear();
```

Here's an example where I used it in a real world project:

> Dogfooding myself with the newly released spatie/test-time package ⏳[https://t.co/L0clvjrgRI](https://t.co/L0clvjrgRI)[#php](https://twitter.com/hashtag/php?src=hash&ref_src=twsrc%5Etfw) [#testing](https://twitter.com/hashtag/testing?src=hash&ref_src=twsrc%5Etfw) [pic.twitter.com/xkDFaXpTsf](https://t.co/xkDFaXpTsf)
> 
> — Freek Van der Herten ? (@freekmurze) [June 12, 2019](https://twitter.com/freekmurze/status/1138879576023674881?ref_src=twsrc%5Etfw)

Happy tinkering with the time!
Rust future(stream) timeout
Tags: rust, future, stream, timeout
Published: 2019-06-12 15:55:44

---
title: Rust future(stream) timeout
published: true
description: timeout in rust
tags: Rust,future,stream,timeout
---

打开tokio-timer可以看到timout
```rust
#[must_use = "futures do nothing unless polled"]
#[derive(Debug)]
pub struct Timeout<T> {
    value: T,
    delay: Delay,
}
```

很简单的结构，value就是我们要加timeout的future或者stream，delay就是多久之后就timeout（：

看看他实现的Future和Stream trait
```rust
impl<T> Future for Timeout<T>
where
    T: Future,
{
    type Item = T::Item;
    type Error = Error<T::Error>;

    fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
        // First, try polling the future
        match self.value.poll() {
            Ok(Async::Ready(v)) => return Ok(Async::Ready(v)),
            Ok(Async::NotReady) => {}
            Err(e) => return Err(Error::inner(e)),
        }

        // Now check the timer
        match self.delay.poll() {
            Ok(Async::NotReady) => Ok(Async::NotReady),
            Ok(Async::Ready(_)) => Err(Error::elapsed()),
            Err(e) => Err(Error::timer(e)),
        }
    }
}

impl<T> Stream for Timeout<T>
where
    T: Stream,
{
    type Item = T::Item;
    type Error = Error<T::Error>;

    fn poll(&mut self) -> Poll<Option<Self::Item>, Self::Error> {
        // First, try polling the future
        match self.value.poll() {
            Ok(Async::Ready(v)) => {
                if v.is_some() {
                    self.delay.reset_timeout();
                }
                return Ok(Async::Ready(v));
            }
            Ok(Async::NotReady) => {}
            Err(e) => return Err(Error::inner(e)),
        }

        // Now check the timer
        match self.delay.poll() {
            Ok(Async::NotReady) => Ok(Async::NotReady),
            Ok(Async::Ready(_)) => {
                self.delay.reset_timeout();
                Err(Error::elapsed())
            }
            Err(e) => Err(Error::timer(e)),
        }
    }

```

都是正常去poll value，如果ready了就直接返回，如果没有ready，那么再去poll dealy看看是否timeout，如果没有timeout返回notready，如果timeout了那就返回time elapsed error.

非常简单的逻辑实现了timeout（：

如果我要方便的使用timeout可能需要use tokio::prelude::FutureExt;
```rust
fn timeout(self, timeout: Duration) -> Timeout<Self>
    where
        Self: Sized,
    {
        Timeout::new(self, timeout)
    }
```
其实自己用Timeout::new也可以，但是xxx.timeout看着舒服一些
Good projects / challenges to get better at Docker?
Tags: docker
Published: 2019-06-12 15:46:55

I'm a frontend dev. I love UX, CSS, JavaScript / React, GraphQL, Node but I've never enjoyed devops and infrastructure. 

I know the very basics of Docker but I hate using it. Our pipeline at work is quite complicated so when something breaks Ive never any idea how to fix it. 

What are some good projects or challenges to get more comfortable with Docker? I found Wes Bos's course great for learning JavaScript as it was lots of little tasks that got incrementally harder. Im finding it hard to motivate myself as any cool side project ideas that I have don't need Docker.
Introducing Scene.js Library to Create Timeline-Based Animation
Tags: react, css, javascript, opensource
Published: 2019-06-12 15:13:24


Introducing Scene.js Library to Create Timeline-Based Animation

It is an animation library that I made for 3 years.
I worked hard on my own time.

Check out my project at the following link.
https://github.com/daybrush/scenejs

If you like it, press the star.


### Examples
https://codepen.io/collection/DLWxrd/
https://daybrush.com/scenejs

### Article
https://medium.com/@daybrush/introducing-scene-js-library-to-create-timeline-based-animation-fcb955458c35



If you have the features or questions you want, please register the issue or write down the questions at any time.

Thank you
What are your favorite Linux utility/productivity tools?
Tags: discuss, linux, utilities
Published: 2019-06-12 15:11:23

---
title: What are your favorite Linux utility/productivity tools?
published: true
description: 
tags: discuss, linux, utilities
---

I love Linux and one thing I love about it is that you can set it up *just right* for yourself to make yourself super productive and make working in Linux very pleasant.

What are your favorite tools to setup and use?

EDIT: I was writing out a list of my own tools and that ended up turning into [a blog post about my favorite linux tools](https://dev.to/antjanus/my-favorite-linux-tools-12be). :)
Understanding JavaScript async/await in 7 seconds
Tags: javascript, webdev, beginners, showdev
Published: 2019-06-12 15:10:27

Have you been struggling to learn the new Async/Await syntax in ES2015? Well, Good news, here is a short 7 seconds animations to help you visually understand the difference between the old-good callback pattern and the new Async/Await syntax. Enjoy!


{% tweet 855824609299636230 %}
MacOS Catalina: Top 3 features I liked most
Tags: discuss
Published: 2019-06-12 15:06:35

---
title: MacOS Catalina: Top 3 features I liked most
published: true
description: Here are the top 3 features I liked in new macos. Zsh as drfault shell, photos app and sidecar. What is yours favourite?
tags: discussion
---
Hello Folks,

I recently installed MacOS Catalina on my macbook pro. Pretty stable TBH.

First thing I noticed is that now we have `zsh` as default shell instead of `bash`. I think it is great. And i am pretty excited about it in stable releasw. What is your thought on this?

Next thing that i really liked about is `sidecar` which can help to use our ipad as secondary display. I did not try it yet but it sounds awesome and i am eagerly waiting to give it a try. I will put down my experience in comment section later.

Last but not the least, I liked the uodate came for photos app. We have various options and aling with that app is gettting intellugent to display our best pictures.

What are the top 3 features you like most in MacOS Catalina?

Note down your thoughts in comment section below.