teleren/devto huggingface dataset:
Day 141 : Understand
Tags: hiphop, code, coding, lifelongdev
Published: 2020-05-27 23:18:38

_liner notes_:

- Professional : Had a couple of Talk Prep Sessions today. Got to share any tips that we have learned from doing the Vonage Developer Day. Got some really good insight. Also got a chance to speak with a coworker that lives in Scotland. Helped out with a question in our community Slack channel. Did some research into open-wc.

- Personal : Got another feature of my side project working. That's 2 out of 3. It looks like garbage, but it works, haha. Had to rework the logic to get it working the way I wanted.

![A waterfall surronded by ice in Goðafoss Waterfall, Iceland](https://dev-to-uploads.s3.amazonaws.com/i/xyziuzlh0eiz3ks4whnx.png)

I don't understand. The world is facing a pandemic. At the time of writing this, over 350 thousand people have died (more tha 100 thousand in US) due to the virus. In America in 2020 over 30 million people have lost their jobs and many access to healthcare with it. With all of this, people still found it necessary to kill Black people for being Black. I don't know. Going to call it a night early.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube -2IJdXp8c48 %}
80/100 100daysofcode Flutter
Tags: 100daysofcode
Published: 2020-05-27 23:06:51

day 80/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

Today learn get address dan convert from google map api
https://github.com/triyono777/100-days-of-code/blob/master/log.md
That flag argument is yelling at you
Tags: refactoring, improvement, cleancode, simplicity
Published: 2020-05-29 10:05:12

---
title: That flag argument is yelling at you
published: true
date: 2020-05-27 23:00:00 UTC
tags: refactoring, improvement, cleancode, simplicity
canonical_url: https://gsferreira.com/archive/2020/05/that-flag-argument-is-yelling-at-you/
---

Sometimes the code yells at you trying to warn you that something is wrong.

Flag arguments are one of those cases. Adding a Boolean argument to condition the execution is an easy fix, but we are doing the wrong thing.

By adding a flag argument to a function, it's clear that we are ignoring the Single Responsibility Principle. The code is yelling at us, trying to explain that. No doubt.

Let's take a look. When a function has a flag argument, we will find something like this (or even worse) in the implementation:

![Flag Argument](https://gsferreira.com/images/that-flag-argument-is-yelling-at-you-flag-argument.png)

Wouldn't be better to have something like:

![Flag Argument Refactor](https://gsferreira.com/images/that-flag-argument-is-yelling-at-you-refactor.png)

When writing code, remember that the goal is to simplify our client's life.
React Components explained to a dummy.
Tags: React, JavaScript
Published: 2020-05-27 22:55:33

Every time I try to learn new concepts, I try adding the "dummy" keyword behind my search to ensure I get the nitty-gritty of the concept. For example, if I am to learn about containers and Images in docker, I type in my search engine "Containers and Images explained to a dummy". 
The reason I do this is to ensure I don't just cram the concept, but so that I  can easily explain in plain English what the jargons in the official documentation describes.

Having said that, let's jump right into the business of today: Components in React JS.

Components in English language is defined as a part or element of a larger whole. For example, a car can be divided into doors, windshield, side mirrors, seats, etc. All of these makes up the car. Similarly, React components divides the user interface into various working pieces, and deals with each piece in isolation.

For example, a web page can entail body, nav-bar, header, search box, etc. All of these various components makes up the web page.


In React, there are:
1. Function components.
2. Class components.

Function components:
Function components are basically JavaScript functions that accepts a props(properties) object argument and returns a react element.
Let's see an example:

``` JavaScript
function greetings(props){
      return <h1> Hi, {props.name} </h1>;
}
```

Class components:
A class component is a JavaScript class that extends the React component class, in turn giving it access to the react lifecycle method like render.

Example:

``` JavaScript
Class Greetings extends React.Component{
render(){
    return <h1> Hi, {props.name} </h1>;
      }
}
```
Day 8: React Native 
Tags: react, reactnative, codenewbie, challenge
Published: 2020-05-27 22:51:58

Today I took a break from my freeCodeCamp Javascript practice to revisit a course I took on creating React Native applications. 

About three months ago when I was still struggling to understand React, I mistakenly purchased a react native course on Udemy. Ironically, this course was the first course I took that helped me understand regular React, which was a bit backwards, but it worked. I recently received a job inquiry regarding becoming a React-Native developer, which is something I never really thought about but actually have the skills for thanks to that mistake.

I like using React Native, I think that it's an amazing tool that developers can use to create deployable app-store apps using the beloved React framework, which has easily become my go-to front-end language and preference. For the next few days I will continue working on a shopping list application that I began today and will hopefully have it deployed by early next week.
Diun 3.0 available with 3 new notification providers
Tags: docker, devops, notification, go
Published: 2020-05-27 22:08:59

---
title: Diun 3.0 available with 3 new notification providers
published: true
description: Receive notifications when a Docker image is updated on a Docker registry.
tags: docker,devops,notification,golang
---

{% github crazy-max/diun %}

Diun 3.0 is now available with 3 new notification providers and some enhancements.

## Amqp

You can send notifications to any amqp compatible server. The JSON response will look like this:

```json
{
  "diun_version": "0.3.0",
  "status": "new",
  "provider": "file",
  "image": "docker.io/crazymax/swarm-cronjob:0.2.1",
  "mime_type": "application/vnd.docker.distribution.manifest.v2+json",
  "digest": "sha256:5913d4b5e8dc15430c2f47f40e43ab2ca7f2b8df5eee5db4d5c42311e08dfb79",
  "created": "2019-01-24T10:26:49.152006005Z",
  "platform": "linux/amd64"
}
```

## Script

You can also use a script or program as a notification provider. Following environment variables are passed to the process and will look like this:

```
DIUN_VERSION=3.0.0
DIUN_ENTRY_STATUS=new
DIUN_ENTRY_PROVIDER=file
DIUN_ENTRY_IMAGE=docker.io/crazymax/diun:latest
DIUN_ENTRY_MIMETYPE=application/vnd.docker.distribution.manifest.list.v2+json
DIUN_ENTRY_DIGEST=sha256:216e3ae7de4ca8b553eb11ef7abda00651e79e537e85c46108284e5e91673e01
DIUN_ENTRY_CREATED=2020-03-26 12:23:56 +0000 UTC
DIUN_ENTRY_PLATFORM=linux/adm64
```

## Microsoft Teams

And also send notifications to your Teams team-channel using an [incoming webhook URL](https://docs.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/what-are-webhooks-and-connectors):

![Microsoft Teams notification](https://dev-to-uploads.s3.amazonaws.com/i/ww3xj3ir394aarl2ar5i.png)

Let me know if you have any questions or if you are waiting for new features!

---

Support this project by [**becoming a sponsor on GitHub**](https://github.com/sponsors/crazy-max) 👏 or by making a [Paypal donation](https://www.paypal.me/crazyws) to ensure this journey continues indefinitely! 🚀

Thanks again for your support, it is much appreciated! 🙏
A Ruby on Rails Roadmap
Tags: ruby, rails, codenewbie, beginners
Published: 2020-05-27 22:08:25


> **Are you a beginner or newbie looking to get started with Ruby on Rails?** I've compiled some **FREE** resources to help you get started in just **under 6 hours**...

I had the opportunity to learn Ruby and Ruby on Rails during my time at Flatiron School and almost immediately **fell in love**. 

Ruby is an extremely accessible language and, in my opinion, a really ideal first programming language. It's a dynamically typed, expressive language that lends itself to being human readable and just a joy to work with. 

Recently (as in, today) a [friend](www.twitter.com/amdev83) popped into the [Code Cafe Online](www.twitter.com/codecafeonline) Discord and asked for advice on learning Ruby on Rails. As a result, I ended up putting together this beginner Ruby on Rails Roadmap of free video courses! 

If you're a beginner looking to learn Ruby on Rails, or a developer with experience in other languages looking to add Ruby or Ruby on Rails to your skill set, this should help you get started...

### Step 1: Ruby Crash Course
> **Time Commitment:** 4 Hours

{% youtube t_ispmWmdjY %}

### Step 2: Ruby on Rails Crash Course
> **Time Commitment:** 1 Hour

{% youtube pPy0GQJLZUM %}

### Step 3: Ruby on Rails REST API Tutorial
> **Time Commitment:** < 1 Hour

{% youtube QojnRc7SS9o %}

In just under 6 hours, you've gone from a total Ruby newbie, to a Ruby on Rails wiz kid! 🎉

I hope this little learning roadmap is useful to all the future Rubyists out there! If you ever need help or get stuck on your learning journey, you can find me on [Twitter](www.twitter.com/thecodepixi) and here on DEV. I'm always happy to help debugging some Ruby code!  

xx - Emily/TheCodePixi
Selenium 4 / Python
Tags: python, selenium, firefox, webdriver
Published: 2020-05-27 22:07:52

---
title: Selenium 4 / Python
published: true
description: Testing Selenium 4.0.0a5 with Python and Firefox webdriver
tags: python, selenium, firefox, webdriver
---

Hi there,

Yesterday, after more than one year without working in one of my pet projects, I cloned the repository in a new Ubuntu desktop 20.04

Most of the GUI code worked out, but it wasn't the case for the Selenium bits. So I decided to take a closer look, and then, I realized that Selenium python bindings had been updated from the stable version 3.141.0 to the new pre-release 4.0.0a5

After many tries, I was only getting these messages:

```python
DeprecationWarning: executable_path has been deprecated, please pass in a Service object

DeprecationWarning: firefox_profile has been deprecated, please pass in a Service object
```

So, I took a look to the [source code](https://github.com/SeleniumHQ/selenium/tree/master/py/selenium/webdriver/firefox) and, finally, I was able to solve the issue:

```python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from selenium import webdriver
from selenium.webdriver.firefox.service import Service
from selenium.webdriver.firefox.options import Options

# Options
options = Options()

## Option for using a custom Firefox profile
options.profile = '/home/t00m/.basico/opt/webdrivers/basico.default'

## Enable headless
options.headless = False

# Specify custom geckodriver path
service = Service('/home/t00m/.basico/opt/webdrivers/geckodriver')

# Test
browser = webdriver.Firefox(options=options, service=service)
browser.get('https://dev.to')
print(browser.title)
browser.quit()
```



__Bonus track__

My application needs to load a page via _SSO_. In the past, I used a timeout. Now, I keep the timeout but I've added the following code to skip it if it loads the page faster:

```python
# Extra imports
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By

# Test
timeout = 10
browser = webdriver.Firefox(options=options, service=service)
browser.get('https://dev.to')

try:
    element_present = EC.presence_of_element_located((By.ID, 'snack-zone'))
    WebDriverWait(browser, timeout).until(element_present)
except TimeoutException:
    print("Timed out waiting for page to load")
finally:
    print("Page loaded")
print(browser.title)
browser.quit()
```

_Take care. Stay safe._
Procrastination ( The ugly monster)
Tags: discuss
Published: 2020-05-27 21:59:31

Hey folks, So I started my journey in teaching myself programming. I read a lot that I spent literally days and weeks just reading articles or following posts written by someone about his journey in learning. My issue is that while reading is great but I feel like I am just wasting my time instead of learning something or building a project. What tips do you have regarding time management?
Human Readable Magazine Issue #3 is out!
Tags: magazine, programming, learning, news
Published: 2020-05-27 21:21:17

---
title: Human Readable Magazine Issue #3 is out!
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/piex240k0zw00zf10r9b.png
published: true
description: 
tags: magazine,programming,learning,news
---

I'm very proud to announce the publication of the third issue of Human Readable Magazine. Check it out here: <https://humanreadablemag.com/issues/3>

The only positive thing about the quarantine is all the extra time I was able to put into this issue. It's almost double the size of the last and we have some new contributors that I'm extremely happy to have worked with like [John D. Cook](https://www.johndcook.com/) and [Bart Filipek](https://www.bfilipek.com). And not to forget the amazing cover work by [Enisaurus](https://humanreadablemag.com/issues/3).

For a taste of our article quality, Michele Caini's [C++20 Unspoken Features](https://humanreadablemag.com/issues/3/articles/cpp20-the-unspoken-features) is free to read.

Also I finally implemented Dark Mode, added credits section, fixed a few bugs and layout issues and even added a crossword puzzle that nobody asked for.

Truly our best one yet!
100 Days of SwiftUI — Day 7
Tags: 100daysofswiftui
Published: 2020-05-27 21:20:22

---
title: 100 Days of SwiftUI — Day 7
published: true
date: 2020-05-27 21:19:47 UTC
tags: 100daysofswiftui
canonical_url: https://zeitschlag.net/100-days-of-swiftui-day-7/
---

[Seventh day](https://www.hackingwithswift.com/100/swiftui/7) means seventh blogpost. Today was the second day about closures. I still find them hard, but they somehow make more sense to me now. I also appreciate that Paul split this into two days.

Instead of reading the text I watched the videos again and I really like, that Paul reads the code out loud instead of just showing it. It makes it much easier to understand, what the code does. This helped me to understand closures a bit more, especially when it comes to closures as return-values from a function, for example.

Maybe I should give this a try from time to time, too? Some people buy [rubber ducks](https://en.wikipedia.org/wiki/Rubber_duck_debugging) for this and apply this technique to [debugging](https://twitter.com/catalinmpit/status/1264177239903666176).

<!--kg-card-end: markdown-->
CSS Transitions for Multiple Properties on One Element
Tags: css, transitions
Published: 2020-05-27 21:18:02

---
title: CSS Transitions for Multiple Properties on One Element
published: true
description: How to declare more than one transition property in CSS when 'transition: all 1s ease' won't do.
tags: css, transitions
canonical_url: https://www.clairecodes.com/blog/2020-05-26-multiple-css-transitions/
---

This caught me out recently so I thought it was worth documenting in a blog post.

How do you define a CSS transition for multiple properties on the same HTML element?

The [CSS `transition` property](https://developer.mozilla.org/en-US/docs/Web/CSS/transition) defines the effect between two different states of an element. `transition` is a [shorthand property](https://developer.mozilla.org/en-US/docs/Web/CSS/Shorthand_properties), which means it combines other CSS properties in single declaration. The resulting shorthand is simpler to read and write. Other common shorthand properties are `margin`, `background` and `font`.

An example of applying a transition to every transitionable state on an element is:

```css
.menu {
  transition: all 1s ease;
}
```

The `transition` property here includes definitions for `transition-property`, `transition-duration` and `transition-timing-function`. (We could also add `transition-delay`.) Using the shorthand saves us from writing out three separate declarations.

The example above sets a transition for [every animatable property](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_animated_properties) on the element. You may need to be more specific, for example only transitioning the font color:

```css
.menu {
  transition: color 1s ease;
}
```

How do we extend this to transition both the font color and the margin, but with the same duration and timing function?

Even if properties share certain values, they can't be combined in the transition shorthand. Instead, write out each property declaration in full and comma separate each one:

```css
.menu {
  transition: color 1s ease, margin 1s ease;
}
```

An alternative is to write single declarations instead of using the transition shorthand. The following code achieves the same effect as the previous example:

```css
.menu {
  transition-property: color, margin;
  transition-duration: 1s;
  transition-timing-function: ease-out;
}
```

I've created this [CodePen example illustrating both methods for adding transitions](https://codepen.io/clairecodes/pen/YzybKyM?editors=1100) to an element where you can edit the code and experiment further.

{% codepen https://codepen.io/clairecodes/pen/YzybKyM %}
Azure Managed Identity explained in plain English in 5 mins with a step by step demo
Tags: azure, beginners, identity, cloud
Published: 2020-05-27 21:11:56

---
title: "Azure Managed Identity explained in plain English in 5 mins with a step by step demo"
published: true
description: Azure Managed Identities - explained in plain English in 5 mins with a step by step demo
cover_image:
tags: #azure, #beginners ,#identity , #cloud
---

{% youtube 1EoiGnQq14Y %}

This is the ridiculously simple animated explanation of Azure Managed Identities (managed identity) - we will cover System Assigned, User Assigned, the difference and a step by step demo in 5 minutes. 

For more animated Azure videos and simplified Azure content and podcasts please check out https://www.azuremonk.com/video #managedidentities #azure #azurein5minutes #managedidentity #azuresecurity #identity

Services that support Azure Managed Identities - https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/services-support-managed-identities 

Official documentation - https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview

Use SQL DB with managed identity - https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/tutorial-windows-vm-access-sql
Do you think ageism in tech is improving?
Tags: discuss
Published: 2020-05-27 20:58:47

There's often been talk in tech communities about how there's a degree of ageism involved in hiring in software development that is worse than in a lot of other professional industries, i.e. young people get hired, old people do not. 

As the industry continues to grow I hear less about ageism in tech and I'm wondering if it's evolving and is less of an issue now than it was 10 years ago, and if it will continue to improve.

Or am I way out of touch and it's still a rampant issue?
What Project for backend
Tags: backend, codenewbie, beginners, discuss
Published: 2020-05-27 20:43:33

---
title: What Project for backend
published: true
description: how to showcase ourselves as backend developer
tags: backend, codenewbie , beginners , discuss
---

There are times when I feel backend developer are left out of twitter world. There are so many amazing projects to showcase for frontend devlopers who can code in JS /CSS/ HTML.

Not sure what are similar things we can do as a backend developer. What will you do if you want to project yourself as a strong backend devlopee in punlic. What projects you ll build and display ?
A small tip for debugging a Node.js app
Tags: node, javascript, debug
Published: 2020-05-27 20:39:25

![debug gif](https://media.giphy.com/media/10eJOwQ9BKrF72/giphy.gif)
<center><a href="https://giphy.com/gifs/bears-10eJOwQ9BKrF72">Source from GIPHY</a></center>
## Introduction

I recently came across a bug in production (or what appears to be a bug), but I couldn't really track the source of the problem. From the description I was given (screenshots and text) I kinda knew where the error could have happened... but I didn't know how 😵. I mean... really, how did this happen?! I tried to simulate the bug on a staging environment and on my local machine first, but the code worked as expected.

It was through my colleague that I got introduced to this npm module that I'll talk about next, and I consider it to be a very useful tool in troubleshooting problems.

This short post is aimed at helping you troubleshoot better when there are bugs in your Node.js app. So let's get right into it!


## Debug module
I was not aware of the [debugging capabilities of Express.js](https://expressjs.com/en/guide/debugging.html) and after I learned this, I came across this [debug npm module](https://www.npmjs.com/package/debug). You can use it to create a **tracing** log function, and add extra information so that you have the values you need to "simulate" what happened in a section of your code. To create this `trace` function you just need this code:
```js
import createDebug from 'debug'
const debugLog = createDebug(`server:<my module name>`)
const trace = debugLog.extend('trace')
```

The parameter you pass to the `createDebug` function is the name of your module, but I added a prefix to it - "server:". This is a convention of the library that allows you to **separate features**. If you're interested check more info. [here](https://www.npmjs.com/package/debug#conventions).

Then you can use it simply like this:
```js
const isEmpty = //...
trace(`logging my vars... isEmpty:${isEmpty}`)
```


or to format better some values, like arrays, you can use the [library's formatters](https://www.npmjs.com/package/debug#formatters):
```js
const arrayWithGoodies = ["sup", "hello", "bugs happen...", "so we need to " + ⛏]
trace('arrayWithGoodies: %O', arrayWithGoodies)
```

You can also create other functions like these and each one has it's own color, that I believe can be configurable:
```js
const info = debugLog.extend('info')
const warn = debugLog.extend('warn')
const error = debugLog.extend('error')
```

## Conclusion
I'm sure there are a lot more interesting features in this library, but that's all I know for now. I hope you enjoyed reading this small post. Leave a comment with any feedback, and I'd gladly respond 😃.

Check out my previous post [What is production-ready code](https://dev.to/bolt04/what-is-production-ready-code-3dip), where I write about some of the **code properties** that software developers are expected to know.