teleren/devto huggingface dataset:
Understand Angular 9|8|7 Route Resolvers
Tags: angular, angular987, routeresolvers, angularrouteresolvers
Published: 2020-02-01 19:27:59

---
title: Understand Angular 9|8|7 Route Resolvers
published: true
tags: Angular ,Angular 9|8|7,Route Resolvers, Angular Route Resolvers
canonical_url: https://www.positronx.io/angular-7-route-resolvers/
---

The post [Understand Angular 7 Route Resolvers](https://www.positronx.io/angular-7-route-resolvers/) appeared first on [positronX.io](https://www.positronx.io).

Today we are going to understand **Route resolvers in Angular 7**. In order to display data fetched from an API, we have to route a user to a component. Then we should call a method in the service of `ngOnInit` hook to fetch the required data. The component is capable of showing a loading indicator of the data. 

However, Angular 7 offers a better method named route resolver. With the help of route resolver, you will be able to fetch data before the component is ready.

[Click here to read more](https://www.positronx.io/angular-7-route-resolvers/)
Decorators 
Tags: python, devtips
Published: 2019-03-20 19:10:02

---
title: Decorators 
published: true
description: Python Decorators
tags: Python, devtips
---
"Decorators are quite a useful Python feature. However, it can seem that any resources or insights surrounding them makes the whole concept impossible to understand. But decorators are, in fact, quite simple. [Read on] (https://owlskip.com/s/py-decor), and we’ll show you why."
Mainstream is not a Bad Thing
Tags: learning, career, development
Published: 2019-03-20 18:11:17

---
title: Mainstream is not a Bad Thing
published: true
description: A little piece on why being part of the mainstream is not a bad thing.
tags: learning,career,development
cover_image: https://thepracticaldev.s3.amazonaws.com/i/ov9097ggoy01isss3jia.jpg
---

Have you ever felt that you are loosing track of all new technologies on the market?

Software development is a fast moving target. You constantly have to learn new things and I think that's actually a great benefit. However, it can also put people under a lot of pressure to learn every new JavaScript framework popping up.

So while I think it is very important to read about and experiment with new technologies and languages, it's not bad to be part of the mainstream.

By mainstream I mean well-established technologies that are used for a at least a couple of years in production by a large percentage of people. 

It's actually not that easy to find out what mainstream is in certain areas. There are e.g. StackOverflow statistics about what people ask questions but that may also mean that some technology is overly complicated or badly documented. You could look at GitHub repositories but that only covers the open source bubble of the industry. Then you could look at the job offers which represents mainstream the best in my opinion.

I myself work in the Java bubble (but this article can probably be applied to field of technology) and I remember when I read the [Snyk survey](https://snyk.io/blog/jvm-ecosystem-report-2018/). I went to through all the results and thought: "Well, we do pretty much what the majority of voters do". But I had the kind of feeling that we're "only mainstream" and not "bleeding edge".

It reminds me of some pop culture phenomenons. I think about the movie "Titanic", the book series "Harry Potter" or some pop music artists like "The Beatles". For all of those, I didn't want those pieces of art to be good because it was "too mainstream" (OK, the Beatles are not mainstream nowadays but I would consider it as a band that still a lot of people like) and I thought I'm just too smart for this (and I'm not). 

But at some point in time, I decided to give it a try and had to admit that I really enjoyed it.

Although this analogy seems far-fetched, the point is that mainstream is by definition something that a majority of people (and that includes a lot of smart people as well) can agree on it to be good.

So, swimming in the main stream is not necessarily a bad thing. It means, that you will likely get a job and that you might know most of the technologies there. Keep on learning new things but don't feel bad if you're part of the mainstream.

*Photo by [Bennett Williamson](https://unsplash.com/photos/LIeBDNb2jEU?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on Unsplash*
We have 2 New Items in the DEV Shop— just in time for Spring!
Tags: devshop, meta
Published: 2019-03-20 16:46:43

---
title: We have 2 New Items in the DEV Shop— just in time for Spring!
published: true
description: 
tags: devshop, meta
cover_image: https://thepracticaldev.s3.amazonaws.com/i/klu8tsl0zwmu4w1kzhzg.jpg
---

I'm super excited about The DEV Shop's newest spring arrivals. They will make heads turn, and guaranteed* to get compliments everywhere you go. 

![](https://thepracticaldev.s3.amazonaws.com/i/zzz5hvkgcki7jqb1qj7j.jpg)
The [Daisy DEV hat](https://shop.dev.to/collections/new-arrivals/products/flower-dev-hat) is not only a hat, it's a feeling. Put it on and you'll be transported to a place where your tests always pass, your merges succeed and the only bugs are lucky ladybugs. 

![](https://thepracticaldev.s3.amazonaws.com/i/nrbzp90l9mu699le454p.jpg)
This embroidered [bomber jacket](https://shop.dev.to/collections/new-arrivals/products/dev-bomber-jacket-1) is classy AF. It's probably the coolest thing we've sold yet. It goes with almost everything and is the perfect compliment to what you're packing for that upcoming conference. 

_*Alright, let's be honest, we can't actually guarantee this. But if they don't, we think you're hanging around the wrong people._
Kafka Shell - Supercharge Your Apache Kafka CLI
Tags: kafka, apache, cli, showdev
Published: 2019-03-20 16:37:24

---
title: Kafka Shell - Supercharge Your Apache Kafka CLI
published: true
description: Kafka shell is a supercharged, interactive Kafka shell built on top of the existing Kafka CLI tools.
tags: kafka, apache, cli, showdev
cover_image: https://camo.githubusercontent.com/93262b8faa2313ffb7dfeccb60662b23c2b0b5f6/68747470733a2f2f692e696d6775722e636f6d2f62316f4e545a5a2e706e67
---

# Kafka Shell
Are you working with the Apache Kafka command line tools? Ever had trouble remembering what options are available, or remembering URLs for your clusters? Kafka shell to the rescue!

[Kafka Shell](https://github.com/devshawn/kafka-shell) is a supercharged, interactive Kafka shell that is built on top of the existing Kafka command line tools. It features auto completion, auto suggestion from history, key commands, and much more. It's an open source project I just released, built with Python.

## Features
Auto completion of Kafka commands, options, and configuration options.

![Auto Completion](https://camo.githubusercontent.com/33e27a2cab87d8e8eddeb1ba10e6cc2f75ec980f/68747470733a2f2f692e696d6775722e636f6d2f666b777a4f6b762e706e67)

Configuration of clusters, schema registries, and properties that will be automatically added to commands being run.

![Configuration](https://camo.githubusercontent.com/5202bd45b24b607602fd10a7c80e0a8ebec13336/68747470733a2f2f692e696d6775722e636f6d2f334a6a4978794c2e706e67)

## Supported Commands
Kafka shell currently supports a lot of most popular Kafka command line tools, such as Kafka-topics, kafka-console-consumer, and more. I plan to add the rest after I get some initial feedback!

* `kafka-topics`
* `kafka-configs`
* `kafka-console-consumer`
* `kafka-console-producer`
* `kafka-avro-console-consumer`
* `kafka-avro-console-producer`
* `kafka-verifiable-consumer`
* `kafka-verifiable-producer`
* `kafka-broker-api-versions`
* `kafka-consumer-groups`
* `kafka-delete-records`
* `kafka-log-dirs`
* `kafka-dump-log`
* `kafka-acls`
* `ksql`

## Get It Now

Let me know what you think -- and I hope this can help improve working with Apache Kafka. :) 

{% github devshawn/kafka-shell %}
Firefox Javascript Bug on arrays and Vue ? 
Tags: firefox, bug, array
Published: 2019-03-20 16:08:54

---
title: Firefox Javascript Bug on arrays and Vue ? 
published: true
description: its me o Firefox bug ? 
tags: Firefox, Bug, Array 
---

I have the following issue: 
i defined an array:

and need to assign a value to this method and the array: 


```
{
Arr=[],

SetOption(index,data){

    Arr[index] = data 

}
```
Accessible Emoji's 
Tags: a11y, webdev, html
Published: 2019-03-20 14:06:57

---
title: Accessible Emoji's 
published: true
description: Using Unicode emoji's in html
tags: a11y, webdev, html
cover_image: https://thepracticaldev.s3.amazonaws.com/i/a4fmj58dkbsxho6er7qt.jpg
---

I recently published an article on [building accessible forms](https://dev.to/finallynero/building-accessible-forms--46ke) and this is kind of a sequel, OK not a sequel but it is a post you might need if you want to build accessible applications.

So I was working on my portfolio site today and I needed to add an emoji to a paragraph, I thought of using font awesome icons but I didn't want to use them because I was going to add an extra dependency to my site so the obvious option for me was to use Unicode because it has the exact icon I needed.

A lot of other times I have used Unicode in my HTML I just dumped it in the markup without even thinking of the accessibility concerns.

{% codepen https://codepen.io/finallynero/pen/pYZmmv default-tab=html,result %}

I was about to repeat that today until I held myself back and said this doesn't look accessible, I made some research and it actually isn't.

First of all, the emoji is an image and there is nothing that indicates that it is in the above demo. So we have to use `ARIA: img role` attribute to identify the element as an image. Secondly, use the `aria-label` attribute to give the emoji an accessible name.

{% codepen https://codepen.io/finallynero/pen/EMpBdE default-tab=html,result %}

Remember it is important the internet and its contents remain accessible to everyone.
Most Popular Development Posts Of The Week (20 March 2019)
Tags: javascript, webdev, react, vscode
Published: 2019-03-20 14:30:46

---
title: Most Popular Development Posts Of The Week (20 March 2019)
published: true
tags: javascript,webdev,react,vscode
canonical_url: https://medium.com/daily-now/most-popular-development-posts-of-the-week-20-march-2019-3dce126472f5
cover_image: https://cdn-images-1.medium.com/max/1024/1*suWDQMFiz0iQcwRrQUhNiQ.jpeg
---

> You don’t learn to walk by following rules. You learn by doing and falling over

We would like to welcome to our exclusive list of sources the following amazing blogs: [Lambda](https://lambda.grofers.com/), [Instagram](https://instagram-engineering.com), [Flutter Community](https://medium.com/flutter-community), [Angular In Depth,](https://blog.angularindepth.com) [codecentric](https://blog.codecentric.de/en/), [React Native](https://facebook.github.io/react-native/blog/), [React](https://reactjs.org/blog), [Kotlin](https://blog.jetbrains.com/kotlin/) & [Spring](https://spring.io/blog). This batch is focused on backend and mobile development, hope you will like them 🥳

They are already available in your New Tab! 👩‍💻

- [34 most popular GitHub JS repositories in March’19](https://app.dailynow.co/r/1644946f2f2b2972dfd03c969659abe7) by [Iren Korkishko](https://medium.com/u/1b826d0247a4)
- [Five behaviors of great coders](https://app.dailynow.co/r/73129caf7e770626c48b96a79e1bbda2) by [Keith McNulty](https://medium.com/u/a859aab532a0)
- [Confessions of a Bad Programmer](https://app.dailynow.co/r/ea519b4f821d72305e08b92e122823f9) by [Guy Manzurola](https://medium.com/u/3137f96e72e5)
- [JS Design Patterns](https://app.dailynow.co/r/f3d7ffecf355b547d1f1cd3cc28b8ef2) by [Jorge Moller](https://medium.com/u/329d486a68ca)
- [10 HTML Element You Didn’t Know You Needed](https://app.dailynow.co/r/9ae259e474ba70ac3e2963918a5a3eeb)
- [Laxxx.js — A simple JS library to create beautiful animations when you scrollllllllll](https://app.dailynow.co/r/a48863f122730ef579b6b3638e3031e3)
- [Where is the Web Going?](https://app.dailynow.co/r/3c57d5f59d80c529791a694b30d35d2e) by [Nir Eyal](https://medium.com/u/295258f6269d)
- [Exploring The Latest Web Design Trends Together With Be Theme](https://app.dailynow.co/r/c18d8cd8f61f8bf92df19670878aab29)
- [12 VS Code Extensions you should consider using](https://app.dailynow.co/r/055cd5a01b49f329ac883289eacf2e85) by [Simon LH](https://medium.com/u/581a74170cf5)

* * *

[_Thanks to Daily_](https://www.dailynow.co/) _developers can focus on code instead of searching for news. Get immediate access to all these posts and much more just by opening a new tab._

![](https://cdn-images-1.medium.com/max/1024/1*m8Uf-6F4Q5AOp_wW6tbKSQ.jpeg)
What is an if statement?
Tags: beginners, tutorial, learning, devtips
Published: 2019-05-31 09:31:37

---
title: What is an if statement?
published: true
tags: beginners, tutorial, learning, devtips
canonical_url: https://www.codetips.co.uk/beginner/what-is-an-if-statement/
---

> An if statement, in programming terms, is a condition statement. When the condition is satisfied, it performs an action (or block of code)

 ![What is an if statement?](https://www.codetips.co.uk/content/images/2019/03/if-statement_walk-outside.jpg)

If you ever asked yourself how apps or websites decide if a view should be shown; chances are there is an `if` statement.

An `if` statement is the most basic method to decide if a certain block of code should be executed or not based on a condition.

You can liken it to making a simple decision: _**"Should I go outside and take a walk?"**_

If the answer to this is _**Yes**_ you have to put on your shoes (that's the block of code that needs to be executed if the condition is met). So in programmatic terms, it could look something like this:

<!--kg-card-begin: markdown-->
```
if (takeWalkOutside) {
    // put on your shoes
}
```
<!--kg-card-end: markdown-->

If you decide not to go outside (the `takeWalkOutside` condition is not met), the action of putting on your shoes (the code inside the if statement) is skipped.
It's the passion talking ..
Tags: passion
Published: 2019-03-20 13:37:38

---
title: It's the passion talking ..
published: true
description: An emotion-filled mail when your best efforts are not being appreciated
tags: #passion 
---

An emotion-filled mail when your best efforts are not being appreciated:
"Last but not least, a little bit of faith in the team is necessary to go forward. 
We don't mind if a better team replaces us, because we are really proud how a small team has given their best effort to make the project a success so far.
A bad product would never have attracted billion dollar companies to feature their product in the app, and this gives us all the more reason to give even more effort, but we do need everyone to put their trust on the team.

I think this long email with explanation has eaten up  a lot of time, so will need to get off for now.

Apologies in advance, if this sounded a little harsh, probably it's the passion talking :)" 

-- M
Get started with Dart (Free Egghead.io course)
Tags: dart, webdev, beginners, javascript
Published: 2019-03-20 11:36:39

Hello friends👋 It's with great excitement to announce that I have released my first ever Dart course on Egghead.io! It's free to watch and it only takes half an hour to go through it.

The purpose of this short course is to give you an overview of the language features and tooling of the Dart ecosystem. This will provide you with a base knowledge to be able to build web, server and mobile applications.

Here's what we'll cover in this short course:

1. [**Setup Your First Dart Project on Mac**](https://egghead.io/lessons/dart-setup-your-first-dart-project)
2. [**Setup Your First Dart Project on Windows**](https://egghead.io/lessons/flutter-setup-your-first-dart-project-on-windows)
3. [**Setup Your First Dart Project on Linux**](https://egghead.io/lessons/flutter-set-up-your-first-dart-project-on-linux)
4. [**Understand Built-in Types in Dart**](https://egghead.io/lessons/dart-understand-built-in-types-in-dart)
5. [**Understand Variables and Constants in Dart**](https://egghead.io/lessons/dart-understand-variables-and-constants-in-dart)
6. [**Define Optional Named and Positional Parameters for Functions and Methods in Dart**](https://egghead.io/lessons/flutter-define-optional-named-and-positional-parameters-for-functions-and-methods-in-dart)
7. [**Control Flow Statements in Dart**](https://egghead.io/lessons/flutter-control-flow-statements-in-dart)
8. [**Understand Classes and Inheritance in Dart**](https://egghead.io/lessons/flutter-understand-classes-and-inheritance-in-dart)
9. [**Define Interfaces and Share Class Members through Mixins in Dart**](https://egghead.io/lessons/flutter-define-interfaces-and-share-class-members-through-mixins-in-dart)
10. [**Capture and Return Asynchronous Values with Futures in Dart**](https://egghead.io/lessons/flutter-capture-and-return-asynchronous-values-with-futures-in-dart)
11. [**Capture and Handle Data Sequences with Streams in Dart**](https://egghead.io/lessons/flutter-capture-and-handle-data-sequences-with-streams-in-dart)
12. [**Manage Package Dependencies with Pub**](https://egghead.io/lessons/flutter-manage-package-dependencies-with-pub)

And [**going beyond the basics**](https://www.patreon.com/creativebracket) for my Patrons.

→ [**Watch the full course**](https://egghead.io/courses/get-started-with-dart)
→ [**Download the Free "Get started with Dart" 35-page eBook**](http://eepurl.com/gipQBX)

---

## Sharing is caring 🤗

If you enjoyed reading this post, please share this through the various social channels. Also, check out and [**subscribe to my YouTube channel**](https://youtube.com/c/CreativeBracket) (hit the bell icon too) for videos on Dart.

[**Subscribe to my email newsletter**](http://eepurl.com/gipQBX) to download my Free 35-page **Get started with Dart** eBook and to be notified when new content is released.

**Like, share and [follow me](https://twitter.com/creativ_bracket)** 😍 for more content on Dart.
Django Tutorial: Building and Securing Web Applications
Tags: django, python, webapp, auth0
Published: 2019-03-20 11:07:17

---
title: Django Tutorial: Building and Securing Web Applications
published: true
description: Learn how to use Django to build web applications easily, and Auth0 to make the process even faster and more secure.
tags: #django #python #webapp #auth0
canonical_url: https://auth0.com/blog/django-tutorial-building-and-securing-web-applications/
---

In this article, you will learn about developing and securing Django web applications. You will go through the whole process: from scaffolding a new Django project, to adding an identity provider (Auth0 in this case), to using Django admin feature to facilitate entity (e.g., products, contacts, etc.) management.

[Read on 🙌](https://auth0.com/blog/django-tutorial-building-and-securing-web-applications/?utm_source=reddit&utm_medium=sc&utm_campaign=djangotut_webapp)

![Django Tutorial: Building and Securing Web Applications](https://thepracticaldev.s3.amazonaws.com/i/3ww6ntxi6t139hkhezry.png)
Flutter vs React Native: A Broad Comparison
Tags: flutter, reactnative, mobileapp, javascript
Published: 2019-03-20 10:40:02

---
title: Flutter vs React Native: A Broad Comparison
published: true
description: 
tags: flutter, react native, mobile app, javascript, 
---
Making portable mobile applications have always been a crucial mainstay of the tech business but developing apps for multiple platforms has been an issue for quite a while. Apart from having to maintain and manage two teams such as one for Android and one for iOS, there’s always a gap between the applications developed as they are made by totally different teams. That is the thing which birth an idea to make cross-platform mobile applications.
There are many solutions available now but the right one is to create compiled apps which give you the exact performance of the real native application. Google's flutter and facebook's react native are the two contenders in this. 
React Native is an open source framework released on GitHub that paved the way for uniting both the iOS and Android platform’s native APIs. However, Google’s Flutter has been a revolutionary move, which allows you to create Android and iOS highly responsive native apps at the same time.

Flutter vs React Native - A quick comparison

https://thepracticaldev.s3.amazonaws.com/i/f4as3obc7bz5he26zxbu.jpg

Read more about the interesting war between two tech giants here:- https://www.bridge-global.com/blog/flutter-vs-react-native-war-of-tech-giants/
/* intentionally left empty */
Tags: programming, cleancode
Published: 2019-03-21 21:00:09

---
title: /* intentionally left empty */
published: true
tags: programming,clean code
canonical_url: https://vladimirj.dev/intentionally-left-empty/
---

![Header](https://cdn-images-1.medium.com/max/2560/1*_c7QqMOJmXlA5Kef58JtJw.png)

_A long time ago somewhere in India empty spaces were creating a lot of problems. Numbers were being written without zeros, and believe me, it’s hard to write numbers when you replace zero with an empty space.  **11** and **1 1** looked almost the same. That’s why zero was created._

_In its early beginnings, zero meant **“intentionally left empty”**._

Let’s now travel back to the present, and see if empty spaces are causing trouble in the life of an average software developer. There are probably places in your code base where it’s not clear if something is a mistake or if it was left intentionally empty.  Sometimes we don’t need the implementation of `initialize()` in every child method, so we would just create an empty implementation instead of an abstract method.

{% gist https://gist.github.com/VladimirWrites/55f85baf89738654731da4b4fe0e68d4 %}

I know that comments are not great, but in this case, I would suggest adding them. With the added comment, there is no confusion whether the empty method is a mistake or not.

{% gist https://gist.github.com/VladimirWrites/8017f5571208bfe242043892d333516b %}

Another example when we need an empty method is when we want to omit the behavior of the parent’s implementation. This clearly breaks [Liskov substitution principle](https://en.wikipedia.org/wiki/Liskov_substitution_principle).

![1](https://cdn-images-1.medium.com/max/800/1*ToXLL1aet69THe2qxuwCmQ.jpeg)

However, sometimes you can’t control all the code that you are using, so you have to make compromises.

{% gist https://gist.github.com/VladimirWrites/12914c528512fc2c3ce0ce2a3b252577 %}

Then, there are those notorious listener implementations, with a lot of methods that are usually not needed. Here is one example from the Android world:

{% gist https://gist.github.com/VladimirWrites/9a609f1f074892fc11c0beee8a48ab28 %}

Finally, when working on a new feature, you can’t build it all at once. Inevitably, you will have parts of the code that are unfinished. This is not really a problem, it just needs to be clearly marked as unfinished with a simple `TODO`.

{% gist https://gist.github.com/VladimirWrites/9b1b89f80beb6464b537e79e79c22c37 %}

Please don’t leave your methods empty. If the method is intentionally left empty, simply leave a comment for your fellow developers or for your future self.

_Thanks for reading! If you enjoyed this story, please click the ❤️ button and share to help others find it! Feel free to leave a comment 💬 below.
Have feedback? Let’s be friends [on Twitter](https://twitter.com/VladimirWrites)._