teleren/devto huggingface dataset:
Getting Started with Angular 9
Tags: angular
Published: 2020-03-10 18:30:33

We were working on the Angular 8 platform and did this to upgrade all Angular dependencies (global and local) to Angular 9. 

The first thing to do is to create a new Angular project. Then look at the package.json file just created.

```json

 "devDependencies": {
    "@angular-devkit/build-angular": "~0.803.25",
    "@angular/cli": "~8.3.25",
    "@angular/compiler-cli": "~8.2.14",
``` 

Does it look like that? If so good. You are running Angular version 8.

Now type in *ng update*

**Dev Dependencies**

After the update, you should see this:

```json
"devDependencies": {
    "@angular-devkit/build-angular": "~0.900.5",
    "@angular/cli": "^9.0.5",
    "@angular/compiler-cli": "~9.0.5",
    "@angular/language-service": "~9.0.5",
```

If you don't then run 

- ng update @angular/cli @angular/core* (again)

This should update the dev dependencies, but it didn't work for us.  

We then tried this:

- npm install @angular/cli@latest --save-dev 
- npm install @angular/core@latest --save-dev

The upgrade was not totally clean as many warnings were shown.  We just ignored them all.

Then type in *ng serve* and you should see this!

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/6uqe1j09e79ovqyy4jcb.PNG)

If you are still having issues, look at the package.json file and see if the angular and material stuff is showing the same versions. Then type in ng --version to see the global versions.  (Repeat the steps above until it works).
Some tips from when you work from home 
Tags: smartworking, remoteworking, coronavirus, virus
Published: 2020-03-10 18:05:12

---
title: Some tips from when you work from home 
published: true
description: Some tricks for the occasional "work from home"
tags: smartworking,remote working,coronavirus,virus
cover_image: https://www.incimages.com/uploaded_files/image/970x450/getty_599676014_250056.jpg
---

Here are some tricks for the occasional "work from home": many of us are working from home right now due to the coronavirus flu and I'd like to share what I've learnt in these years of constant (but not full) work from home.

**Maybe they can be applied also to freelancers**, but they are more used to work from home and they get their working routine very early...

* **Respect the usual morning routine**: shower, brush your teeth…
* **Dress casual if you want**, but dress yourself (no pajamas) and always put your shoes on (this tricks your mind into thinking you’re not home for "lazyness")
* **Wake up at the same time you wake up when you go to the office**
* **Do your laundry, bed, etc... BEFORE actually start working** (avoid housing distractions!)
* **Find a silent spot in your home away from kids**, if you have any. Discard this if you have to watch for your kids while working from home (you’re my hero in this case)
* **Take your time**. If you are used to get a coffee around 11am in the office, do the same at home
* **Lunch break of 1 hour? Make a 1 hour break**. Usually eating at your desk? Do a speed lunch even at home.
* **If you usually leave the office at 6pm, stop working at 6pm**
* **If you need Internet connection stop every torrent**/heavy download you may have on your own network
* **Check the VPN** (or whatever connection you use) the night before (or better, some time in advance) in order to be ready in case of problems.
* **NO TV!** (just put some music on if you feel bored)
* **Do some little walk around the house** every hour
* **Drink plenty of water**
Recursion of lists of numbers
Tags: challenge, discuss, javascript
Published: 2020-03-10 17:43:25

Implement a function `sum`, which will be executed multiple times with **n** integers. There are 3 levels of difficulty:

## Easy

For example:

```
sum(2,3)() 
result: 5

sum(9,3)() 
result: 12
```

## Medium

For example:

```
sum(2,3)(1,3)()
result: 9

sum(9,3)(2,2)(1,1,2,1)(9)() 
result: 30
```


## Hard

[Hint] This final challenge, think of solutions that are off the beaten path.

Create a generic case where `sum` will seemingly have many calls and the parameters for a given execution will always be 1 or more integers. 

For example:

```
sum(2,3)
result: 5

sum(2,3)(1)(2,2)
result: 10

sum(2,3)(1,3)(9,10)
result: 27

sum(9,3)(2,2)(1,1,2,1)(9) 
result: 30
```

Good luck and have fun!

Matt.
SOS! CSS is eating my timeline!
Tags: help, css, beginners
Published: 2020-03-10 17:26:55

<h3>"You thought CSS was going to be easy!"</h3>

It only took one attempt at pure vanilla CSS to see where things go awry. Deciding on a structure before you begin is complicated, and CSS is already hard! I am now sold on the argument that no one should be writing pure CSS. 

<h3>Where to begin then?</h3>

My understanding of CSS frameworks and libraries—and the landscape of the two—is a bit shaky to begin with. I am having a hard time even weeding through potential directions to start looking. Some qualities I'm looking for:

<li>Quickest to visually tolerable
<li>Lightweight, fast
<li>FW/lib/method aligns with future CSS work

It <em>doesn't</e> have to be:

<li>Devastatingly gorgeous - if I need to make it prettier I will do the hard work
<li>Idiot proof - I don't need it to abstract away CSS writing process

To give a little context here was my impression of a few frameworks:

<li>Bootstrap seems convenient but too heavy. Might be suitable for professional contexts where specs are sacrificed for short turnarounds.
<li>CSS-in-JS seems too heavy and like it will die in the near future.
<li>Utility-class frameworks and libraries seemed not any easier than pure (BEM) CSS. It felt more suited to managing large projects or many projects over time.

Can anyone recommend a CSS framework or library for young devs like me?
Build Social Education Platform
Published: 2020-03-10 17:17:13

Greetings, I am 18 years old from Myanmar and I have started learning web technologies at age 13. 
We have no more social platforms for communication and collaborate with a team at online. I got an idea to build one Knowledge sharing platform.

So, here is what kind of features should be added for this web app? definitely different from Facebook.

I prefer MERN to use. please give me some suggestions.

I need some helps from you guys...
Hope you all guys can help me !!
Sushi Game Jam: ArmPG Devlog Video!
Tags: showdev, gamedev, learning, video
Published: 2020-03-10 17:14:46

{% youtube fa2Jm3PzBd8 %}

In January, we made a [game prototype](https://sushicodes.itch.io/armpg) on our [Twitch stream](https://www.twitch.tv/sushicodes).

In February, I wrote a [devlog about our game](https://dev.to/sushicodes/sushi-game-jam-armpg-2oon) here on dev.to.

In March, we finally finished the video for the devlog!  If you haven't yet, check out all three - and let me know what you think!
Effective Java Tuesday! In Public Classes, Use Accessors, Not Public Fields
Tags: java, effective, encapsulation, architecture
Published: 2020-03-10 16:59:33

---
title: Effective Java Tuesday! In Public Classes, Use Accessors, Not Public Fields
published: true
description: A dive into chapter sixteen of Effective Java
tags: java, effective, encapsulation, architecture
series: Effective Java Review
canonical_url: https://blog.scaledcode.com/blog/effective-java/effective_java_use_accessors_not_fields/
---

Today we have a pretty quick and easy topic. Very much related to our previous item about keeping accessibility as low as possible. Today's topic is about using accessor methods instead of providing public access to fields. 

The core of what this chapter comes down to is to resist the urge to make fields of a class publicly accessible. By making these items accessible we surrender the encapsulation of the class and all the benefits it brings. You can't change the representation of the data, enforce invariants, or perform other actions when a field is accessed. While many _hard-core_ object oriented programmers, as Effective Java puts it, will say that all fields should have accessors and none should be accessible outside of the class Effective Java disagrees in some cases. While it agrees that this should be the case with _public_ classes, it suggests that this may be unnecessary with package-private and private classes. The main reason for this pitch is that you can avoid the visual clutter while still keeping safety as the blast radius is low when changes need to be made. It's up to you and your organization if you agree (below I will share a way to decrease the clutter).

What about other exceptions? Exposing constant values from a class can be acceptable in some cases. There are still trade-offs, For example you cannot change the internal representation of the value nor can you do auxiliary actions when data is accessed. However, you can enforce invariants in that there isn't any varying of data in constants.

Finally, how can we lessen the visual clutter of accessors. As pitched numerous times in this blog series, _Lombok_ again comes to the rescue. Lombok has the `@Getter` and `@Setter` annotations that do just as they sound like, provide getters and setters. This allows very low clutter in your code and you still get the ability to implement the method yourself later and enforce invariants, do auxiliary actions, etc. 

That's it for this chapter. It's pretty straightforward and simply allows you to keep control of your classes. With modern tooling it doesn't even create much clutter.
Install Particular Version of Package - NPM
Tags: npm, node, javascript
Published: 2020-03-10 16:59:33

We all know normally Install npm package like this.
$ npm install express
+ express@4.17.1 added 50 packages from 37 contributors and audited 126 packages in 3.262s
found 0 vulnerabilities 
This method install a newer version or latest version of that package.
But if we want to install particular version of package then follow it.
Synax: npm install [package]@[version] 

$ npm install express@4.16.1
+ express@4.16.1 added 48 packages from 36 contributors and audited 121 packages in 2.986s
found 0 vulnerabilities
Can anyone become a developer?
Tags: discuss, learning, developer
Published: 2020-03-10 16:48:17

A couple of days ago I made a comment in Youtube referring that anyone can become a developer. My thought was tested by another user, who claimed that you also need talent. Otherwise, everyone would be working as a developer, making 100k per year.

I believe talent does help in learning things faster and achieve the very top of any field. But I also believe that everything can be learned if you:
* have a strong "why"
* the correct resources for learning(based on the individual)
* dedication

In my view, it doesn't matter how good you're in maths, logical thinking, communication etc. It does help, but if you want it and put in the hours, you'll get there. 

It applies not only to programming but also other activities in life like singing, learning an instrument, sports, stock trading etc.

**What do you believe? Can anyone become a developer?**
3 Tips for Making a Good Refocusing Reader Attention With Copywriter Tricks Even Better
Tags: beginners, marketing
Published: 2020-03-10 16:43:31

There are many tricks and tactics that copywriters use to help readers get and stay engaged in the copy. Because when a reader is engaged, they’re more likely to follow through on the call to action. This means more conversions, more sales, and a stronger business.
One of the tactics that copywriters use is formatting. Now, formatting can mean a lot of things. It can be as basic as the margins on the side of your page. However, for the sake of copywriting, it generally includes a few tried and true elements. Let's take a look at these formatting elements and how they can be used to refocus your reader's attention.
1. Images and Graphics

One of the easiest ways to refocus reader attention is to use a compelling and relevant image. We’re not talking about graphs or charts at the moment. We’re talking about simple images that can be used to effectively break up the copy.

How does it help refocus attention? Well, it works in several ways. The image may appeal to the reader or tap into some related emotions. This response re-engages them in your copy. It can also give them a visual break. Let’s face it; it can be difficult to focus on the content when it’s a page of words. Attention wanders and you lose your reader. Images help break it up.

2. Bullets and Lists
Another way to help refocus your reader is to utilize lists or bullets. This is particularly useful when you’re highlighting benefits in your copy. The sentences or bullets are usually short and sweet. They’re organized in an easy-to-read manner. And they are usually active and contain strong words that capture reader attention. It’s another way to break up the visual content too.

3. Font, Font Size and Color
Some copywriters enjoy using other methods to help the reader focus their attention on the words that matter most. You might choose to underline or place a particular word in bold lettering to show the reader that the word is important. It helps refocus their attention when the word resonates with them. You can do this same thing by changing the size or color of the font or by changing the font itself. The idea is the same – focus reader attention on a word or phrase that re-engages them in your copy.
Finally, subheadings are a fantastic way to help a reader move through your copy effectively. Subheadings can contain powerful words and compelling information. Think of them as mini-headlines. They are important and the more powerful your subheadings are, the more engaged and focused your reader will be.

http://www.techieankit.in/2020/03/3-tips-of-copywriter-tips-tricks.html

Source: www.techieankit.in
Become a Self-taught Developer
Tags: softwaredevelopment, selftaught, coding
Published: 2020-03-10 16:30:09

I got an opportunity to watch Traversy's Video on YouTube "Become a self-taught Developer". It is very helpful for me so I am sharing here the important contents he taught on the video.

01.  **Pick up the End goal** :- choose which area you want to grow, type of 
    working environment you are looking for, what are you naturally good at and 
    suitable type of Developer Jobs(based on **security, pay scale**)

02.  **Choose a programming language**:- 
    Figure out which programming language you want to learn
    learn the fundamentals 
    choose a Text editor or IDE you are comfortable with
    Remember you can always switch to/learn another language

03.  **Find Resources and Build a curriculum**:-
      You can choose any of the resources based on your learning method
      Books,Documentations, Resource websites,Video courses,online courses, 
      and challenge websites.

04.  **Find a community**:-
      Find a mentor(If possible)
      Join an online community
      Start talking with other Developers
05.  **Create your own project**:-
     Start building something 
     Use other people's code as reference
     Get some idea from other people's code

06.  **create your own portfolio**:-
     Show a live version of your project and Source code

07.  **Contribute to open source**:-
     Give your experience with real-life projects
     collaborate with other Developers
     learn and Use GitHub
     It may add value to your resume

08.  **Create an online presence**:-
     Maintain a Linkedin and Twitter Account
     Upload all of your works to GitHub and Keep it well documented
     Write Articles,Tutorials,Videos(Have your own blog, websites etc)

09.  **Prepare & Apply to jobs**:-
     All boxes should be checked before coming to this point
     Prepare for Interview, Create a Resume,Cover Letter
     Search for jobs in your area that you are looking for things you know
     Apply even if you don't have a degree
     Remember it is your first job not your last job.
CSS Media Queries for Accessibility
Tags: css, html, webdev
Published: 2020-03-10 16:22:03

## `-ms-high-contrast`

`-ms-high-contrast` is a Windows-only media query used to set styles when the high contrast setting is active. The media query has 3 states -- `active`, `black-on-white` and `white-on-black`. These states except for `active` corresponds to 2 specific default settings available for Windows.

### Accessibility Use Case

A uses case that someone would use this is to set a dark or light version of an image.

{% codepen https://codepen.io/koralarts/pen/RwPxjqj %}

## `prefers-color-scheme`

`prefers-color-scheme` allows someone to style their website depending on the user's theme preference -- `light`, `dark` or `no-preference`.

### Accessibility Use Case

Some people are sensitive to light and it's possible that the user has set their preferred colour scheme to either light or dark. With this query, the website can automatically select a dark or light theme for the user when they visit the website.

{% codepen https://codepen.io/koralarts/pen/bGdwpog %}


## `prefers-reduced-motion`

`prefers-reduced-motion` is used to know whether or not the user doesn't want animations or unnecessary movement to be happening on the website -- `reduce` or `no-preference`.

### Accessibility Use Case

Someone who's sensitive to too much movement might want less animations happening on the website. The website might pause any videos being played by default when someone comes to the website.

{% codepen https://codepen.io/koralarts/pen/WNvddyb %}
Angular 9's Best Hidden Feature: Strict Template Checking
Tags: angular, javascript
Published: 2020-03-10 16:05:41

---
title: Angular 9's Best Hidden Feature: Strict Template Checking
published: true
description: Find and report more errors than ever with Angular 9's Ivy compiler, strict template checking.
tags: #angular #javascript 
canonical_url: https://auth0.com/blog/angular-9s-best-hidden-feature-strict-template-checking/
---
We have likely read about some of the benefits of the Ivy compiler and runtime. It's faster. It makes smaller bundle sizes. And it has many other great new features that are introduced in Angular 9. Yet one of the most compelling and useful features is one we don't hear as often.

What if Angular could find bugs in our existing code? Hidden bugs that we may not notice. Subtle bugs that could cause problems? Angular 9 and the Ivy compiler do just that.

The new feature is known as strict template checking. Angular has been checking expressions and bindings within the templates of our applications for years. But with Angular 9, it finds and reports more errors than ever. It is pretty cool that we could have bugs in our templates right now, and this new feature reports them to us so we can fix them.

Seeing is believing, so let's see some examples. We'll kick things off using Angular 8, and we'll progress to Angular 9. We'll also adjust some compilation settings. These differences help us see where Angular 9 can detect additional errors that Angular 8 could not.

[Read on 📖](https://auth0.com/blog/angular-9s-best-hidden-feature-strict-template-checking/?utm_source=dev&utm_medium=sc&utm_campaign=angular9_stc)
Delete multiple Microsoft Teams using the script 
Tags: microsoftteams, script, powershellcore, office365cli
Published: 2020-03-10 16:04:20

---
title: Delete multiple Microsoft Teams using the script 
published: true
description: Delete multiple Microsoft Teams using Office 365 CLI and PowerShell Core script.
cover_image: https://rjesh.com/assets/images/2020-02-25-1.jpg
tags: [MicrosoftTeams,Script,PowerShellCore,Office365CLI]
---

This is a cross-post from [rjesh.com](https://rjesh.com/delete-all-teams/)

Lately, I have been working on creating a Teams template using Graph APIs and PnP Tenant template. Quickly, I accumulated a lot of Teams and decided to do a clean-up. I have achieved it by combining [Office 365 CLI](https://aka.ms/o365cli) with PowerShell Core. My goal is to delete only the specific teams and not everything in my tenant, and for all my test teams I have used a naming convention which starts with 'RJ'.

> [Install PowerShell Core](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-7)

> [Install Office 365 CLI](https://pnp.github.io/office365-cli/#installation)

```sh
## Get teams to delete
$teams = o365 teams team list -o json `
--query '[?starts_with(displayName, `RJ`) == `true`].id' `
| ConvertFrom-Json

foreach ($team  in  $teams) {
    Write-Host  "Deleting..."  $team -ForegroundColor Green
    o365 teams team remove -i $team --confirm
}
```

Above is a very simple script (✌🏼yay it works in Mac, PC and even in Cloud Shell ), the key thing to notice here is [@office365cli](https://twitter.com/office365cli) support for --query parameter which uses [JMESPath](http://jmespath.org/). In the query parameter, I have used starts_with function to get only my test Teams which starts with the display name 'RJ' and used team remove command to get rid of them.

You can change the query parameter as required to get the filtered result. For example, if you want to get all Teams except "Mark 8 Project Team"

```sh
 o365 teams team list -o json --query '[?displayName != `Mark8 Project Team`]'
 ```

> **Note** Just like me If you are wondering, even after deleting the Teams it still shows up in the Teams App then you should read this - [techcommunity post](https://techcommunity.microsoft.com/t5/microsoft-teams/deleted-team-still-appearing-in-apps/m-p/1054677) which details about the latency of few hours required.

If you want to delete the Office 365 groups then use the below script

```sh
## Get groups to delete
$groups = o365 aad o365group list -o json `
--query '[?starts_with(displayName, `SET`) == `true`].id' `
| ConvertFrom-Json

foreach ($group  in  $groups) {
    Write-Host  "Deleting..."  $group -ForegroundColor Green
    o365 aad o365group remove -i $group --confirm
}
```

Photo by [Philipp Katzenberger](https://unsplash.com/@fantasyflip?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com).
The irreplaceable developer
Tags: startup, watercooler
Published: 2020-03-01 20:01:29

Imagine one day, the developer who wrote 95% of the product is about to leave. What would you do?

I was worried knowing the fact that one day, the rest of the team will have to maintain the codebase. FYI, the codebase is not badly written compared to another system I have worked before. I was having a hard time dealing with impostor syndrome. The code, that I wrote, wasn't working at all. Hearing the news the main developer would leave the team soon, making the negativity in me even more.

All of that negative thought keep coming at me. I even had a thought of leaving so I would avoid any errors I would make while maintaining the codebase. Then I realised, the worst thing could happen is the time taken to solve bugs would take longer. I wasn't sure that I can continue the high code quality like the other guy but I told myself that at least I will work hardest possible to keep the system running smooth. 

A couple of weeks later, there was a bug in the system that I attempted to fix it without asking the main developer for help. It took me a while to solve it. But I proud of myself for fixing it without any help. After that, I pushed the commit to production without running test (just joking, I didn't). 

Have you ever been in a situation like me? If yes, what did you do to overcome the fear?