teleren/devto huggingface dataset:
Authentication for the REST of Us
Tags: todayilearned, authentication, javascript, video
Published: 2020-03-25 15:24:04

---
title: Authentication for the REST of Us
published: true
description: Authentication is a complicated subject that is hard to grok, let’s unpack all kinds of auth concepts and examine how we can apply them to our applications.
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/zyw81ndfybie20p54r43.png
tags: todayilearned, authentication, javascript, video
---
*As we look ahead to [CascadiaJS 2020](https://2020.cascadiajs.com) (🤞🏽) I thought I'd share some of the awesome talks from our 2019 event. Enjoy!*

## Divya Sasidharan

![divya sasidharan](https://begin-static-p6uw2-production.s3.us-west-2.amazonaws.com/forest-1dg/images/speakers/divya-sasidharan.jpg)

Authentication is a complicated subject that is hard to grok, let’s unpack all kinds of auth concepts and examine how we can apply them to our applications.

[Watch the talk (26:08)](https://cascadiajs.com/talks/authentication-for-the-rest-of-us/)
Ternary Operator
Tags: codenewbie, beginners, javascript, tutorial
Published: 2020-03-25 15:22:43



Came across it when traversing the sea of JS. I don't know why, but it looks so elegant. And I like it so much I've decided to write about it.

_tl:dr version: Basically it's a substitute for the "if" statement._

### The premise ###

The passage bellow is a straight copy from the [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Conditional_Operator) website. 

> The conditional (ternary) operator is the only JavaScript operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is truthy followed by a colon (:), and finally the expression to execute if the condition is falsy. This operator is frequently used as a shortcut for the if statement.

**_This means, you can write an entire "if" statement using just ":" and "?"._**

### Example ###

Let's say we're asking a user to input his name with prompt, and then we would like to print out his name with a "greeting". If the user doesn't input anything, we will assign a default value. 

**if statement**
```javascript
const userName = prompt("Gief me your name!!");
const userGreeting = " waddles around like recieving a prostate exam";
 
if (userName === "") {
	const userNameDefault = "Yo'momma";
	console.log(userNameDefault + userGreeting);
} else {
	console.log(userName + userGreeting);
} 
```
**ternary operator**
```javascript
const userName = prompt("Gief me your name!!");
const userGreeting = " waddles around like recieving a prostate exam";
 
userName === ""
	? (userName = "Yo'daddy") + console.log(userName + userGreeting)
	: console.log(userName + userGreeting);
```
**ternary operator with template literal**
```javascript
const userName = prompt("Gief me your name!!");
const userGreeting = `${userName} waddles around like recieving a prostate exam`;
 
userName === ""
	? (userName = "Yo'daddy") + console.log(userGreeting)
	: console.log(userGreeting);
```

What the MDN files don't mention if you have more expressions to execute. You can simply chain them together with '+'. 

### Conclusion ###

As you see, the code is shorter and looks a little easier to read once you've got used to it.
What is a test in software development?
Tags: testing, shell, basics
Published: 2020-03-25 15:22:13

When joining a new project (and maybe even in a previously unknown programming language) we can get overwhelmed by the complexity of the test suites. Sometimes it can even be a nightmare to run them, not to mention understand what is going on. There are lots of levels the tests can be run on.

Let's start with the basics.

### Anything that checks if a requirement is met is a test.

How do we apply this mindset in real life?

In software engineering, we want something that we can run and immediately see if what the project requires is what the solution provides.

Fortunately, we have the concept of an `exit status`. Well behaved commands return such a status (sometimes called `exit code`). A `0` means that the command finished successfully. A non-zero value is usually considered to be an `error code`.

If a command utilizes this concept it is a perfect tool to use for testing.

We can print the `exit status` on unix-like operating systems with `echo $?`.

The simplest example is the `test` command:

```bash
test -e a-non-existent-file.txt
echo $?
# returns: 1

test -e .
echo $?
# returns: 0
```

This is already a ready-to-use test. We can put it into a CI/CD pipeline which will fail if the README file is missing.
CodeLand is going distributed!
Tags: codeland, meta, conferences
Published: 2020-03-25 15:21:18

---
title: CodeLand is going distributed!
published: true
description: 
tags: codeland, meta, conferences
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/5m5dvqravn4hv4r71j99.png
---
Last month, [we opened up early bird tickets](https://dev.to/devteam/codeland-2020-early-bird-tickets-50f2) for the fourth annual CodeLand conference, originally scheduled to be hosted in NYC this July.

Due to the Coronavirus crisis, we’ve decided to shift our efforts away from an in-person event, and towards a fully virtual experience.  Today we are formally announcing [CodeLand:Distributed, a 2-day remote conference (July 23-24)](http://codelandconf.com).

We have also significantly reduced ticket prices to help make the conference more affordable than ever. **The first day of talks and remote networking is now accessible to everyone on a pay-what-you-want model (as little as $0) and the second day of workshops is just $25 USD**. 

![codeland-distributed-logo](https://dev-to-uploads.s3.amazonaws.com/i/n2kj0ahzpl4glt0yi6if.png)

We’re embracing this change as an opportunity to put on a truly wonderful event for a much wider group of attendees all around the globe.  We’re excited that more developers of all backgrounds and experience levels will be able to join us for thought-provoking discussions, hands-on workshops, fun surprises, and serendipitous networking opportunities.

We’ll still have two days of inspiring talks and educational workshops designed to level up your career. We’ll still have our industry’s best speakers and up-and-coming innovators. Our team is dedicated to making sure that the CodeLand:Distributed experience reflects the positive energy, inclusion and value that you have come to expect.

Come July, the global coding community will need opportunities to come together more than ever, as we all cope with social distancing and ongoing health crisis. Please mark this event on your calendar and RSVP early.

We’re looking forward to creating a unique space for the community to gather, learn, and draw inspiration from one another. 

### [Join us by grabbing your ticket today.](https://codelandconf.com/)

Happy Coding!

_P.S. We have refunded all ticket purchases for CodeLand:NYC. If you are one of these ticket holders and have not already received an email from us, please let us know at codeland@codenewbie.org. Additional questions may also be answered on our updated [FAQs](https://codelandconf.com/faq)._
CSS Animation: The King and the Fly
Tags: codepen, showdev
Published: 2020-03-25 13:59:45

---
title: CSS Animation: The King and the Fly
published: true
description: A CSS animation of a king and an annoying fly.
tags: codepen, showdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/gh1yf0kwdqk3uhmfglss.png
---

[A CSS animation of a king and an annoying fly](https://codepen.io/alvaromontoro/full/dyojLvx).

You can turn on/off the animations (off by default). If you turn them on, the sound of the fan working like crazy will make for the buzzing of the fly 😋😳

{% codepen https://codepen.io/alvaromontoro/pen/dyojLvx %}

I was thinking about adding some ~~candelabra~~ and maybe ~~a couple of guards/knights~~ (one done, one to go). Any suggestions?
Aloia CMS: Compatibility with Laravel 6 and 7
Tags: laravel, php, showdev, webdev
Published: 2020-03-25 14:48:01

This post is part of the release notes I published on [the documentation website for Aloia CMS](https://aloiacms.com). So it's not a fully-fledged blog post.

Aloia CMS version 2.0.0 and 3.0.0 have been released! This is all done in an effort to support the newer Laravel versions. 
The major update from last month (1.0.0) was only compatible with Laravel 5. These new major versions added the support 
for Laravel 6 and Laravel 7.

## Which one should you use for your project?
These two major versions are all related to the major version changes in Laravel. So picking a version for your project is quite simple:

- Laravel ^6.0 uses version ^2.0
- Laravel ^7.0 uses version ^3.0

## Removed deprecated code
In version 1.0.0, a lot of code from version 0.x was deprecated. Everything that was marked as deprecated in 
version 1.0.0 has been removed as of version 2.0.0. If you want to see the full list of deprecations, you can read about 
it in the [Release notes for version 1.0.0]({% link _posts/2020-02-19-version-1-0-released.md %}#deprecations).

## Backward compatibility
The new code that was introduced in version 1.0.0 has not been changed and will work exactly as it did in version 1.0.0.
Interview With Nate Barbettini: OAuth, GraphQL, Event Sourcing
Tags: podcast, graphql, architecture
Published: 2020-03-25 14:18:08

---
title: Interview With Nate Barbettini: OAuth, GraphQL, Event Sourcing
published: true
description: The latest episode of the loosely coupled show where we talked to Nate Barbettini about topics like OAuth, GraphQL, Event Sourcing, etc.
tags: podcast, graphql, architecture
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/c42hhvrhzkg2u154ywra.PNG
---

Derek Comartin (@codeopinion) and I interviewed [Nate Barbettini](https://twitter.com/nbarbettini) about topics like OAuth and why it can be confusing, domain-driven design, graphQL, event sourcing and more!

Nate is the co-founder and CTO of Cobbler and a former Microsoft MVP.  He previously worked at Okta as a developer advocate and is the author of the Little ASP.NET Core Book.

We had lots of fun just chatting it up! Check it out if those topics interest you 👍.

{% youtube 3HZpTjtrRdg %}
Neural Network Basics: Training a Neural Network
Tags: machinelearning
Published: 2020-03-25 13:51:54

In the [previous post](https://dev.to/_akshaym/neural-network-basics-building-a-neural-network-56e4), we discussed how the perceptrons connect to form a layer of a neural network and how these layers connect to form what is called a deep neural network. In this post, we will start with an example and learn how a neural network is trained. Further, we will discuss, how the network computes loss.

## Example

Let us consider an example problem where we want to predict whether a student will pass or fail a class given the number of lectures attended(x<sub>1</sub>) and the number of hours spent(x<sub>2</sub>) on the final project by the student.

We can represent this problem with the following model:

![Basic Model](https://dev-to-uploads.s3.amazonaws.com/i/on8acbct3moa33ndyaer.png)

To make a prediction, we need to initialize the weights(W). We can start by initializing weights randomly. Now let us say, for a student who attended 4 lectures and spent 5 hours on the final project, the model predicted output of 0.1 or 10%. But in reality, the student passed the class. We need a way to tell our model that the predicted output was wrong so that the model can adjust its weights to predict an output closer to the actual value. This can be done by defining a loss function:

![Loss Function](https://dev-to-uploads.s3.amazonaws.com/i/wacrcsk57buvil5eolhh.png)

We can average up the loss for each training set sample to calculate the final average loss. This is also called the **cost function** or **empirical loss.**

![Loss Function](https://dev-to-uploads.s3.amazonaws.com/i/5enbwzqoc2h90hbox99a.png)

## Loss

We can use different loss functions for different models depending on the output produced by the model. Some of the common functions include **mean squared error loss** & **binary cross-entropy loss**

**Mean Squared Error Loss** can be used with models that produce continuous numbers as output. An example of this would be predicting the score of a student or the price of a house.

![Mean Squared Error](https://dev-to-uploads.s3.amazonaws.com/i/szss7oo74v3lj8dwtff8.png)

**Binary Cross-Entropy Loss** can be used with models that produce a probability between 0 & 1. An example of this would be predicting whether a student will pass or fail.

![Binary Cross Entropy Loss](https://dev-to-uploads.s3.amazonaws.com/i/ws8acoy29d8yhp2t5hiu.png)

The final piece left in training the model is to optimize the loss. By optimizing we mean that we want to minimize the loss of the model over all the inputs in the training data. This can be achieved by using an optimization algorithm called **Gradient Descent**.

## Conclusion

In this post, we learned how loss is calculated for a neural network. In the next post and final post, we will learn about the Gradient Descent Algorithm and how it can be used to minimize the loss so that our model can predict outputs with better accuracy.

I would love to hear your views and feedback. Feel free to hit me up on [Twitter](https://twitter.com/_akshaym).
Top 6 Reasons the Time is Now for DevSecOps in the Federal Government
Tags: cybersecurity, government, devsecops, featured
Published: 2020-03-27 20:27:56

---
title: Top 6 Reasons the Time is Now for DevSecOps in the Federal Government
published: true
date: 2020-03-25 13:45:00 UTC
tags: Cybersecurity,government,devsecops,featured
canonical_url: https://blog.sonatype.com/top-6-reasons-the-time-is-now-for-devsecops-in-the-federal-government
---

[![Top 6 Reasons the Time is Now for DevSecOps in the Federal Government](https://blog.sonatype.com/hubfs/GettyImages-1154438278.png) ](https://blog.sonatype.com/top-6-reasons-the-time-is-now-for-devsecops-in-the-federal-government)

Underpinning all modern technology - software and hardware - is a supply chain. However, even as “software eats the world,” or we could argue “ate the world,” there is still too little understanding of the software supply chain, with continued focus on hardware. The reality, however, is that software is much easier to pollute than hardware. While there has been an increase in awareness around the need for a coordinated application security strategy, the federal government has historically focused on playing strong defense, putting up walls at the perimeter, and at the end of the digital supply chain.

It’s time to shift more security resources further left. In this way, the government can play better offense at the beginning of the digital supply chain so that federal agencies can better protect themselves and the American citizenry.

 ![](https://track.hubspot.com/__ptq.gif?a=1958393&k=14&r=https%3A%2F%2Fblog.sonatype.com%2Ftop-6-reasons-the-time-is-now-for-devsecops-in-the-federal-government&bu=https%253A%252F%252Fblog.sonatype.com&bvt=rss)

<a href="https://blog.sonatype.com/top-6-reasons-the-time-is-now-for-devsecops-in-the-federal-government">Read more at the Sonatype blog</a>
Inspiring Stories: Chanel Lee
Tags: iwd2020, womenintech, devlive, azureheroes
Published: 2020-03-25 13:43:58

---
title: Inspiring Stories: Chanel Lee
published: true
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/urahwc4gf0hdk78ribl7.png
description: In honor of International Women's day, we are interviewing inspiring women from our community who are going to share the story of how they got into Tech and how they got to where they are today. In this post, I interview one of the colleagues: Chanel Lee
tags: iwd2020, womenintech, devlive, azureheroes 
---
As a society we tend to focus on titles and roles, and we forget that behind each title there is a person who has a story to tell. And truly every person’s story is unique.
In honor of International Women's day, we interview inspiring women from the community on the story of how they got into Tech, and where they are today.

In this post, I interview one of my colleagues [Chanel Lee](https://www.linkedin.com/in/chanel-lee-39787a22/), who works as an Azure Specialist at Microsoft, in Denmark.


#Meet Chanel Lee

Coming from a traditional family, education had less priority for girls. All my childhood, I’ve been told: *I'll be nothing when I grow up!*
I’ve been fighting for it all my life. I’ve been struggling to make things right. I believe that's how a superhero learns to fly!
Today I am proud to be a ninja at Microsoft, believing in my super power. I'm stubborn as hell, and I keep pursuing my dreams!

**When did you first become interested in technology and what sparked this interest?**
When I found logic in tech. 

** What education do you have?**
I have a Bachelor degree in computer science, and hold a diploma in science.

**Describe your way towards your first job in tech; how did you land this job?**
I was lucky that CS graduates were in high demand after I graduated. Life is about continuous learning, so I just picked a job where I needed to write some embedded mobile OS that I had no clue about. It was fun!

**Do you have any role models that influenced you?**
Society in the 20th century seems to dictate that women aren’t good at tech stuff. And I gonna prove them wrong.

**Who were/are your biggest supporters in your career?**
All my customers. Their satisfaction and feedback are all the motivation I need.

![Chanel Lee](https://dev-to-uploads.s3.amazonaws.com/i/pajph8fopyuk89ffvdiz.jpg)

**Tell us more about your current job – e.g. what do you like most about your role?**
I work as a ninja, my mission is to explore new technology, to help my customers solve their technical issues, or to optimize their existing development processes! I love my role as I get to work with all these fun missions. 

**What does your typical day look like?**
Learning is part of my work. I try to keep my days stress-free, and to keep learning.

**What do you do in your free time?**
I use physical workouts to train my mental strength. Running to train my determination, Pilates. and yoga to train my agility, and playing golf to train my temper. 

**What advice would you give to women and girls who dream about a career in tech?**
*Challenge your limit, don't limit your challenge.*
Developing Rails apps using an iPad
Tags: discuss, rails, ruby, ipad
Published: 2020-03-25 13:23:26

**Question.  Does anyone use an iPad to develop Rails applications?**

I need to reduce the weight of my work bag and have been thinking about trying out an iPad.  

That the new iPad magic keyboard might look amazing has nothing to do with this question.  ;)

My main areas of concern are:
* Editor
* Console / SSH
* SFTP

All reasonable comments or ideas appreciated.
[Ubuntu] Ubuntu 20.04 ‘Focal Fossa’ will be there
Tags: linux, ubuntu
Published: 2020-09-22 12:30:32

---
title: [Ubuntu] Ubuntu 20.04 ‘Focal Fossa’ will be there
published: true
date: 2020-03-25 13:22:56 UTC
tags: Linux,Ubuntu
canonical_url: https://khalifa.tn/ubuntu-ubuntu-20-04-focal-fossa-will-be-there/?utm_source=rss&utm_medium=rss&utm_campaign=ubuntu-ubuntu-20-04-focal-fossa-will-be-there
---

This is a special year full of events, certainly, with the CODIV-19 disease epidemic. The Ubuntu community still wondering the new Ubuntu LTS release baptized “Focal Fossa”.

![](https://i2.wp.com/khalifa.tn/wp-content/uploads/2020/03/fossa.jpg?fit=700%2C400&ssl=1?v=1585142570)

The 20.04 release is the successor of 18.04 release that will end in the year of 2023. Every LTS release is  **supported for 5 years**.

The official release date will be April, 23, 2020. The Milestones throughout the _Focal Fossa_ development cycle include:

- **Testing week** : January 9, 2020
- **UI Freeze** : March 19, 2020
- **Ubuntu 20.04**   **Beta:**  April 2, 2020
- **Kernel Freeze** : April 9, 2020
- **Release Candidate:**  April 16, 2020

This is the list of new features and changes that will be scheduled to land in this newest release of Ubuntu:

- New Theme “Yaru Theme”
- **[GNOME 3.36](https://www.omgubuntu.co.uk/2020/02/gnome-3-36-features)**
- **[Linux Kernel 5.4](https://www.omgubuntu.co.uk/2019/11/linux-5-4-kernel-release-features)**
- **Improved ZFS install support**
- **New wallpaper**
- **Smaller .iso image**
- **Lightning extension added to Thunderbird**
- **Multi-monitor support in GDM**
- **Gaming-related improvements**
- **[Better GNOME Shell performance](https://www.omgubuntu.co.uk/2019/10/ubuntu-improves-gnome-shell-performance)**

![](https://i1.wp.com/khalifa.tn/wp-content/uploads/2020/03/light-grey-orange-exploration.jpg?fit=700%2C394&ssl=1?v=1585142602)

_Source: [omgubuntu](https://www.omgubuntu.co.uk/2019/10/ubuntu-20-04-release-featuresomgubuntu)_

The post [[Ubuntu] Ubuntu 20.04 ‘Focal Fossa’ will be there](https://khalifa.tn/ubuntu-ubuntu-20-04-focal-fossa-will-be-there/) appeared first on [C.Khalifa](https://khalifa.tn).
How can I make this React Project Pass some Tests?
Tags: react, javascript, functional
Published: 2020-03-25 13:18:56

Hello everyone! I just concluded the first project in the ‘Front End Libraries course’ on FreeCodeCamp - The Random Quote Machine, using React JS. The app is working, but it’s failing almost all the tests in the test suite. How can I make it to pass all the tests?

The project - https://codesandbox.io/s/charming-hill-fvi4f

The Test Requirements - https://www.freecodecamp.org/learn/front-end-libraries/front-end-libraries-projects/build-a-random-quote-machine

The test suite - https://codepen.io/freeCodeCamp/pen/MJjpwO

Thank you for your help.
Daily Challenge #212 - DNA to RNA
Tags: challenge
Published: 2020-03-25 13:00:28

---
title: Daily Challenge #212 - DNA to RNA
published: true
series: Daily Challenge
description: convert DNA nucleic acid bases with RNA ones. 
tags: challenge
---
Deoxyribonucleic acid, DNA is the primary information storage molecule in biological systems. It is composed of four nucleic acid bases Guanine ('G'), Cytosine ('C'), Adenine ('A'), and Thymine ('T').

Ribonucleic acid, RNA, is the primary messenger molecule in cells. RNA differs slightly from DNA its chemical structure and contains no Thymine. In RNA Thymine is replaced by another nucleic acid Uracil ('U').

Create a function which translates a given DNA string into RNA.

For example:
`DNAtoRNA("GCAT") returns ("GCAU")`
The input string can be of arbitrary length - in particular, it may be empty. All input is guaranteed to be valid, i.e. each input string will only ever consist of 'G', 'C', 'A' and/or 'T'.

###Tests
DNAtoRNA("TTTT")
DNAtoRNA("GCAT")
DNAtoRNA("GACCGCCGCC")

Good luck!

***
_This [challenge](https://www.codewars.com/kata/5556282156230d0e5e000089/python) comes from torret 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 idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_