teleren/devto huggingface dataset:
AYDT - 01 ( Are You Doing This ) - One step towards Ninja Land.
Tags: webdev, tutorial, beginners, bestpractice
Published: 2019-07-05 16:59:36

---
title: AYDT - 01 ( Are You Doing This❓ ) - One step towards Ninja Land.
published: true
description: AYDT - ( Are You Doing This? ) is a coding series that explains the common coding mistakes people make while learning to code.
tags: #webdev, #tutorial, #beginners, #bestpractice
cover_image: https://thepracticaldev.s3.amazonaws.com/i/1zbwq7dodwl34d1rmwex.png
---

When you make a mistake, change your perspective to view that in a different angle. Mistakes are the one that makes you wise.

**Master oogway** once said,

![master oogway quotes](https://thepracticaldev.s3.amazonaws.com/i/snctkcvvldebh9zz2jao.jpg)

Accidents make you stronger when you move forward with the lessons it taught you, no matter what the field is. So is coding.

During my initial stages when I started to code, I've faced hard times in understanding the underlying concepts of coding.

Along the way, I learned bits and pieces that made me one step ahead of my previous version.

In this coding series, **AYDT** I'll explain the basic things to keep in mind while writing a piece of code. 

###**Are You Doing This❓- Clearing the Console!**

Most of the developers use logs to test whether their code is working the way it was supposed to be. It's a good way of debugging but, some of us fails to clear the logs while moving the code to production.

something like this,

In Javascript

```
console.log("I failed to clear my logs ☹️");
```

In Java,

```
System.out.print("I failed to clear my logs here too!!! ☹️");
```

You can find a lot more debugging ways once you start mastering the language.


You can Push the code to production without clearing the logs. Of course, it won't make any difference in the functionality nor it is going to affect it. But, is it a good practice?

Ask yourself.

Consider yourself as a user. Which one of the following console will you appreciate?

This?

![Bad Console Representation](https://thepracticaldev.s3.amazonaws.com/i/0o76q29303swrfqsilet.png)

Or this?

![Good Console Representation]
(https://thepracticaldev.s3.amazonaws.com/i/36mzmbooi3nda2ws3bi7.png)

"**Make your code clean by clearing the logs. Just because the user can't see, doesn't mean we can take that for granted.**"

###**Bonus tip :**

While going through the portfolio of a Web Developer I came across this.

![Good Console]
(https://thepracticaldev.s3.amazonaws.com/i/tx8r0tknejzqcn4fh0up.png)


Awesome right? 😉

You can check it out the same in the dev tools of the site over here: http://seanhalpin.io/

This is how you engage your user 😎

Next time you try to log something in the console,

**Remember:** A fellow developer living somewhere in the world is going to look at your code. 🤪

Cover image courtesy: https://www.codeninja.com.sg/
Progress Button Microinteractions with VueJS
Tags: codepen, javascript, vue, showdev
Published: 2019-07-05 16:38:32

<p>I rewritten the Javascript source code, from using jQuery library into using VueJS framework.</p>

<p>Also I made it into a component, so this may be reused easily.</p>

<p>There is few changes in CSS, specially in transition. Then in Javascript, I changed some of the logic for changing the classes, and animations.</p>

<p>This is also a good opportunity for me to learn/practice the $emit, callback, and $refs of VueJS.</p>

<p>Quoted from old description: "Recently, I've been interested more in studying microinteraction, so I made an example button for uploading with microinteraction."</p>

<p>Here is the link for the old pen: 
<a href="https://codepen.io/takaneichinose/pen/KjBBOZ" target="_blank">https://codepen.io/takaneichinose/pen/KjBBOZ</a></p>

{% codepen https://codepen.io/takaneichinose/pen/wRXryM %}
Configure Azure MFA for applications
Tags: azure, azuresecurity
Published: 2019-07-05 16:01:50

---
title: Configure Azure MFA for applications
published: true
description: Configure Azure MFA for applications
tags: Azure, Azure Security
---

Configure Azure MFA for applications

1. Sign in to the Azure portal by using a Global administrator account.
2. Browse to Azure Active Directory > Conditional access.
3. Select New policy.
4. Name your policy.
5. Under users and groups, select Select users and groups, select a group, and then select Done.
6. Under Cloud apps, select Select apps, choose the cloud applications for which you want to enable Azure MFA, select Select, and then select Done.
7. Review the Conditions section, and then select the conditions you want.
8. Under Grant, make sure that Grant access is selected, select the Require multi-factor authentication check box, and then select Select.
9. Set Enable policy to On.
10. Select Create.

**MFA is now enabled for selected applications.**

**Configure Azure MFA for passwords**

1. In the Azure portal, open the Azure Active Directory blade.
2. Select Users.
3. At the top of the Users blade, select Multi-Factor Authentication. The Azure MFA management portal opens.
4. Select service settings.
5. Scroll to app passwords, and then select the app passwords option you want to use.
6. Select save.

**MFA is now enabled for users passwords.**
Has Javascript gotten any better?
Tags: javascript, discuss
Published: 2019-07-05 15:58:06

Let me start by saying, I'm not a front-end developer and I've typically stuck with PHP or Python for back-end development, Vue for simple front-end components and Bootstrap for styling. Like most developers, I've dabbled in other languages. But when I just want to get things done, these are the obvious go-to's for me. They are expressive and have obvious ways of going about things. Even putting a framework on top of PHP or Python has a fairly easy learning curve.

But I know that my front-end development skills are lacking. If it's more complicated than Bootstrap and a basic Vue component, I'll probably spend a lot of time combing through Stack Overflow looking for solutions.

Knowing this lack, I will occasionally dip my toe into the Javascript pool. Every JS framework assumes a working knowledge of Javascript before you can really get anything serious done. So I know that before I even look at Angular, React, etc I need to learn the ins and outs of Javascript first. Each time I've attempted to improve my Javascript skills, I've just become frustrated by how finicky and help-baked Javascript seems to be.

Am I the only one who feels this way? Has Javascript just gained mass acceptance despite it's many and significant flaws? And are all of these JS frameworks effectively an effort to hide those flaws?

If the article linked below from 2017 is any indication, I'm not the only one who feels this way about Javascript. (Fair warning, the cover image for the article isn't exactly SFW. Exposed breasts.)

[Hackernoon: The Javascript Phenomenon Is A Mass Psychosis](https://hackernoon.com/the-javascript-phenomenon-is-a-mass-psychosis-57adebb09359)

But I wanted to get the Dev.to community's take on this.

Comments, constructive criticism and links to resources that will help a back-end developer become a reasonably competitent front-end developer are all welcome.

Am I actually stupid or is Javascript just gaslighting me?
Closures: Using Memoization
Tags: javascript, beginners, webdev
Published: 2019-07-05 15:26:34

One of the core tenets of Functional Programming is that a function should return the same value if given the same input, every single time. Memoization is the practice of taking a function that is recursive or iterative and making it run faster. This is usually by caching the values it processes. 

```javascript
const multiplyCache = {}

const multiplyBy2 = num => {
  if (multiplyCache[num]) {
    return multiplyCache[num]
  }
  const total = num * 2
  console.log('Loading...') // To represent this process taking time
  multiplyCache[num] = total
  return total
}

console.log(multiplyBy2(5))
console.log(multiplyBy2(2))
console.log(multiplyBy2(5))
console.log(multiplyBy2(2))

// The first time we run the function with 5 and 2, we get Loading... 
// before we get the total. The second time with each, we fetch 
// it from the cache instead.
```

This very basic example is how caching works. We store our results in the object so we can refer to them later, letting it take far less time to do so.

So where do closures play into this? Well, they give us even more power with memoization, allowing us to hold onto our cached values as well as keep them protected. 

```javascript
const specialNum = () => {
  let cache = {}
  return name => {
    if (cache[name]) {
      return cache[name]
    }
    console.log('Generating special number...') // To represent this process taking time
    const rand = Math.floor(Math.random() * 3 + 1)
    cache[name] = rand
    return rand
  }
}

const generateSecretNum = specialNum()

const specialNumBrian = generateSecretNum('brian')
const specialNumPiper = generateSecretNum('piper')

console.log(specialNumBrian) // Will generate, since it's the first time.
console.log(specialNumPiper) // Will generate, since it's the first time.
console.log(specialNumBrian) // Returns cached value.
console.log(specialNumPiper) // Returns cached value.

// Like above, we only get "Generating secret..." the first time. 
// The key difference here is, our cache variable is protected 
// inside of our closure and can't be accessed 
// from the outside.
```

I hope you can see how closures combined with memoization can be a powerful combination. We're making the function run faster, by returning the cached value. At the same time, we're also safeguarding our cache by using a closure.

An awesome tool to have in the belt, I'd say!
Bug Bounty Hunter
Tags: bugbounty
Published: 2019-07-05 15:22:14

---
title: Bug Bounty Hunter
published: true
description: Hi, Mubassir Kamdar is an Ethical Hacker And Security Researcher from Karachi,Pakistan,With over years of experience in cyber security, Mubassir Kamdar identified major security flaws in world's well known companies. This includes Eset, Facebook, Uber, Sony and many others. A huge number of Halls of Fame and Certificates were rewarded as a token of appreciation from these companies.
tags: #bug-bounty #security #cyber
The real reason your “diversity hire” leaves
Tags: inclusion, diversity, womenintech
Published: 2019-07-05 14:27:10

Contrary to the title above, there are many reasons why people in general leave a company; pay, distance from home, *insert generic sugar coated reason for leaving*. But in my experience, diversity hires leave because companies don’t truly believe in diversity as they promised in the interview.

A company will claim to care about diversity but all the games in break room are enjoyed primarily by men. All executives are men, most events are designed for the men, all executives mingle with the men. This creates a culture that is clearly designed for men, and leaves little room for women to fit in anywhere. I don’t mean that there’s some form of testosterone entry fee, I just mean the culture is brogrammer compliant. There is no active effort to include anyone that is not a quintessential developer.

Many companies show very little desire to deviate from the norm — if it ain’t broke don’t fix it. They’ve yet to experience the true effects of a diverse team.

I’m gonna use Hollywood to explain what I mean. Let’s take Brooklyn nine-nine as an example, they are truly a diverse cast. Every character has an equally important role, their roles are independent of their race or gender. If Rosa or Captain Holt left, you would notice, it wouldn’t be the same without anyone of them. They could make an episode with just the 2 of them and it would still be funny. Their differences truly add to the humor of the show and in turn make it great.

In contrast, if you take a movie like The Other Woman, Nicki Minaj, whom I love, had absolutely no impact on the movie whatsoever. You could take out all her scenes and the movie would make sense. She was clearly there for some quota I’m assuming Hollywood is starting to impose. Many companies that say they care about diversity end up being exactly like this.

In the tech world, the Nicki equivalent would be the one who always has to do the documentation, gets a report using a script already written for them. They’re always given the same type of mundane tasks while their peers are pushed or mentored. They are left out of design meetings, technology upgrade decisions are made without their input and just overall subtle exclusion.

A diversity hire dreams of finding a Brooklyn nine-nine job but constantly find themselves in a ‘The Other Woman’ situation. Basically what happens is your diversity hire realizes they deserve better than just being the sassy black friend with great advice and funny one liner jokes. They will leave because they are too qualified to not be taken seriously. They will leave to pursue a challenge that is currently a luxury for their peers. They will leave because brogrammers are gross and no one wants to see that.

Until companies truly understand the benefits or need for diversity, not just a BEE Score need, then they will most likely always hemorrhage diversity hires.
Daily Challenge #8 - Scrabble Word Calculator
Tags: challenge
Published: 2019-07-05 14:21:17

---
title: Daily Challenge #8 - Scrabble Word Calculator
published: true
series: Daily Challenge
description: A Scrabble Word Calculator challenge.
tags: challenge
---
Everyone loves a game of Scrabble! Your challenge today is to calculate the scrabble score of a given word. 

Scoring per tile:

![Here is the scoring per tile](https://thepracticaldev.s3.amazonaws.com/i/fmqkymihsn08q9hzmkcn.jpg)

To make things even more challenging, please consider additional scoring as follows:

> Double letter (doubles the value of the letter)
-A double letter will be represented with an asterisk after the letter. he*llo would make a double letter on the e.

> Triple letter (triples the value of the letter)
-A triple letter will be represented with two asterisks after the letter. he**llo would make a triple letter on the e.

> Double word (double the value of the word after letter rules have been applied)
-A double word is represented by the word ending in (d)

> Triple word (triple the value of the word after letter rules have been applied)
-A triple word is represented by the word ending in (t)

> A blank (the letter given will score 0)
-A blank tile will be represented with a caret after the letter or asterisk is the letter has a double or triple letter value. he^llo would mean the e scores 0.

> Bonus 50!
-If the word is a seven letter word an additional 50 points are awarded.


Good luck and happy coding! 

[This challenge comes from user grantw1991](https://www.codewars.com/kata/scrabble-word-calculator) on Codewars

_Thank you to [CodeWars](https://codewars.com/), who has licensed redistribution of this challenge under the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause)!_

_Want to propose a challenge for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
What is the Difference Between Augmented Reality and Virtual Reality App Development?
Tags: arappdevelopment, appdevelopment, vrappdevelopment
Published: 2019-07-05 13:56:26

![augmented reality app development and virtual reality app development](https://d32myzxfxyl12w.cloudfront.net/assets/images/article_images/246569db0e4ad5f8ca3e320634e5fa6d8bb10300.png?1560508989)

These two terms are often confused, in spite of the differences between augmented reality and virtual reality app development.

AR applications let 2D or 3D graphics elements be put into a real-world environment and interact with it based on the position and orientation of the camera. VR technology provides an interactive artificial world for a user acting within a simulated environment.

AR works with special algorithms and needs sensors to determine the position and orientation of the camera. In such a way it is possible to render any 3D graphics at any location and see the content on a device’s screen. Besides, devices can locate graphic elements with high accuracy, as a result, it is possible to interact with life-size models in real time, walk around them, come up to, move away from, or even go through them.

VR also needs much work with math algorithms and sensors. Virtual reality is a simulated environment where users are immersed and can see everything with their own eyes. Graphics move together with the users so they can see a totally realistic environment.

These technologies have many application areas where they can be useful.

Augmented reality expands the borders of the real-world environment and creates new opportunities for business. AR could reach $70-75 billion in revenue by 2023, but the revenue for VR could be around $10-15 billion according to research by Digi-Capital. 

Its popularity and forecasts of further growth must motivate entrepreneurs to consider AR app development to create a digital business. If you have ever considered this possibility, then you’ve thought about augmented reality app development cost.

I suggest you should take a look at this [article](https://mlsdev.com/blog/89-how-much-does-an-augmented-reality-app-cost) to find out more about AR development, how to create augmented reality apps, and their cost.
How to fix the white screen problem in Wordpress 
Published: 2019-07-05 13:40:26

WordPress is one of the most popular website builders, which is widely used for building websites. It is the first choice of today users. While using it, you may encounter by the white screen of the death suddenly. It makes inaccessible to both the visitors and administrators. Here, we are going to discuss some common errors that arise with WordPress white screen of the death, most possible causes and fast troubleshooting solutions. To fix white screen errors in Word Press, you can call [WordPress support](https://www.wordpresssupport.co/) team immediately.

[Read More](https://wordpresstipssupport.blogspot.com/2019/07/how-to-fix-white-screen-problem-in.html)
How to fix the white screen problem in Wordpress 
Tags: wordpress
Published: 2019-07-05 13:37:19

WordPress is one of the most popular website builders, which is widely used for building websites. It is the first choice of today users. While using it, you may encounter by the white screen of the death suddenly. It makes inaccessible to both the visitors and administrators. Here, we are going to discuss some common errors that arise with WordPress white screen of the death, most possible causes and fast troubleshooting solutions. To fix white screen errors in Word Press, you can call [WordPress support](https://www.wordpresssupport.co/) team immediately.

## Why does a white screen issue in WordPress happen?

A WordPress white screen of death is mainly caused by PHP errors or memory limit exhaustion. First of all, you need to decide while or not the admin on your website is working. If the front-end of your website is dropped down and admin is working, higher chances for you that have a faulty theme or plugin. A white screen of the death might show different results on the base of browsers like Google chrome. This really provides a warning message saying, “This page is not working and is not able to handle the application.

## Easy Ways to fix white screen issues in WordPress
### 1- Clear your cache
Clearing your cache is the easy way to fix the white screen of death in the WordPress. When you can access the admin panel easily, unluckily the front and end phase of the site is showing a blank screen issue, you can clear out the cache by the certain tools. This issue is mainly caused by a caching plugin and can be resolved quickly from the admin panel.

### 2- Checking other website problems
When you have one more instance of WordPress running on a server, check carefully if other websites are having similar problems. It can assist you to remove several possibilities. For example, an issue on one [WordPress website](http://wordpress.org/) and not the others can cause-

Faulty plugins
Bad themes
Custom coding problems
Compromised files from hacks or malware
If the white screen is shown on all of your websites, there may be many problems with the server. In this case, you need to contact the web hosting provider or network administrator.

### Disable Plugins
The wrong Plugins can create all types of problems on a site. Whether several developers attempt to create everything compatible, often these add-ons split each other. As a consequence, a website can stop working. There are many ways that you can deactivate plugins-

Admin Panel- You need to log into the admin panel and go to “plugins” button and deactivate them all.

### Delete through FTP
If you are not able to log into the admin panel, you can remove plugins with the help of FTP. It may be a very easy way to come out from this issue. Still, if you’ve any issue, you can call the WordPress support team instantly.

Oringinal Content: [https://wordpresstipssupport.blogspot.com/2019/07/how-to-fix-white-screen-problem-in.html](https://wordpresstipssupport.blogspot.com/2019/07/how-to-fix-white-screen-problem-in.html)
JavaScript Rap
Tags: jokes, javascript, lyrics
Published: 2019-07-05 13:17:04

---
title: JavaScript Rap
published: true
description: dedicated to my first love - JavaScript
tags: jokes, JavaScript, lyrics
---

I got a new love
She took my heart
Her name is JavaScript
she got nothin' but "good parts"

I kept seeing her at work
But I didn't know her language
So I would copy/paste
"Hello" and what my name is

All the devs at work hating
They were crass men
They said they preferred
those with class, plus stacked in the backend

But that's what made my love,
JavaScript so special
She don't stick to the script
Any environment she's flexible

JavaScript stepped my
career game up for days
No effort, she taught me 
built in methods to get arrays

I told her this is how we function 
 all facts 
We're on a higher order,
So after an argument I need a callback. 

Took her to the library
To see how she would React
Yeah she had me
She chose a classic - great Gatsby
Help with React Hooks and event handlers
Published: 2019-07-05 13:00:24

I'm quite new to React so bare with me:) I recently started using React hooks and I realized that you cannot use hooks within event handlers.  This is a little confusing to me but maybe I am not understanding something.  I am able to use useSetState hook within an event handler with no issues, so this confuses me.  One issue my team is facing is this - how to call a hook when an event is being fired in a class that isn’t even in your react code?