teleren/devto huggingface dataset:
5 best practices for clean coding in JavaScript
Tags: javascript, vue, react
Published: 2020-09-10 12:40:29

> “Even bad code can function. But if the code isn’t clean, it can bring a development organisation to its knees.” — Robert C. Martin (Uncle Bob)

Clean coding means that you write code for your later self and your co-workers and not for the machine. Your code must be easily understandable for humans.

Here are some of the clean coding practices which I follow while writing Javascript code. These are not framework-specific practices and can be used with any framework.

**1. Write simple code**
Code should be simple enough to understand. For example, if we have to write a method that takes an array of number and return the new array with each number in array double its value. This can be implemented as.
![Alt text of image](https://miro.medium.com/max/1400/1*xQyzv2NiEGuWSMh8AytC2w.png)
Instead of the above code, we should do it like this.
![](https://miro.medium.com/max/1400/1*cXpg6hLmoxq4BRVtpkJH8Q.png)

**2. Write linear code**
Nested code is hard to understand. Always write the linear code as much as possible. It makes our code simple, clean, easy to read and easy to maintain thus makes developer life easier.

For Example, let’s write a function which sends the email to the issue owner.

![](https://miro.medium.com/max/1400/1*gnRgaofYbb5kv-iFKx68WQ.png)
Now let’s look at the same code implemented with async/await

![](https://miro.medium.com/max/1400/1*G7vTcYXjHd4KBRpw_F568w.png)
Let’s look at another example
![](https://miro.medium.com/max/1400/1*oqEojwKjF-FINxv1QOeeDQ.png)
Now let’s look at the same code implemented with the **fail-fast approach**.
![](https://miro.medium.com/max/1400/1*g4zorQL15q8Jq6Vjf-gJBQ.png)

**3. Better naming of variables and methods**
It improves code readability and code become easier to maintain. Names should be meaningful and have context. By reading the name of function or variable one should understand its purpose. Example
![](https://miro.medium.com/max/1400/1*-_iLwRYiZcsNxGHBSxvhow.png)
Always make affirmative names. So instead of *isNotActive* use *!isActive*

**4. Functions should do one thing**
Function should not be larger than 20–25 lines. Smaller the function is better. Function should either modify or query something but not both. Consider the following code.
![](https://miro.medium.com/max/1400/1*lDl_Qen9WWnZaMiG23qbIg.png)
The same thing can be done in a cleaner way
![](https://miro.medium.com/max/1400/1*O3J6wE0ruVNRUJxViW6ocA.png)

**5. Use ESLint, Prettier and latest JavaScript**
Always use ESLint and Prettier to make common coding style across developers, find syntax error and code formatting. Use JavaScript latest features to write code, like de-structuring, spread operator, async-await, template literals, optional chaining and more. Some Examples are
![](https://miro.medium.com/max/1400/1*MKfiyv-GbZn5SF8UhQQOkg.png)
***
I hope this post has been helpful and thanks for reading. The feedbacks are always welcome.
How to Learn CUDA Programming Essentials?
Published: 2020-09-10 12:34:45

# How to Learn CUDA with hands on? 

CUDA is a parallel  computing platform and application programming interface (API) model  created by NVIDIA. When it was first introduced, the name was an acronym  for Compute Unified Device Architecture, but now it's only called CUDA. 

## Install CUDA
### Windows
To use CUDA on your system, you will need the following installed:

    A CUDA-capable GPU
    A supported version of Microsoft Windows
    A supported version of Microsoft Visual Studio
    the NVIDIA CUDA Toolkit

### Linux
Use Ubuntu, get the NVIDIA driver, and install CUDA Toolkit.

    apt-get install cuda 

## An Interactive Course
If you don’t want to spend money to buy time on the AWS (e.g. Linux Accelerated Computing Instances) or Google compute engine, you can locally use GPGPUSim and Docker (see the CUDA Programming Essentials example https://school.scientificprogramming.io/course/lesson/cuda-programming-essentials/7/219) and use up to CUDA Toolkit 4.0 which is just enough to learn CUDA! You can get GPGPUSim with a detailed documented project from online. It was developed at the University of British Columbia by Tor Aamodt along with his graduate students
The best part of it is that you can use the ready-made version on a Docker and detailed information from CUDA GPU Simulator Container, check it! Docker GPGPUSIM. 

To start with CUDA, you'll need a course that shows and tells you the CUDA programming by developing simple examples with a growing degree of difficulty starting from the CUDA toolkit installation to coding with the help of block and threads and so on. This course covers:
- GPU Basics
- CUDA Installation
- CUDA Toolkit
- CUDA Threads and Blocks in various combinations
- CUDA Coding Examples
  - Vector addition
  -  Matrix multiplication

## Requirements
-  Basic C or C++ programming knowladge

## Try now!
https://school.scientificprogramming.io/course/cuda-programming-essentials/7
Looking to Land Your First Dev Job? Set Yourself Apart
Tags: devjournal, beginners, codenewbie, career
Published: 2020-09-10 12:33:43

_This post was originally published on September 10, 2020 on [my blog] (https://alexlsalt.github.io/blog)._

Yesterday, I published the second Q&A episode I've done on my podcast, [The Ladies Code Collective Podcast] (www.ladiescodecollective.com/podcast), and I wanted to share some insight from it here - specifically around finding your first job as a junior developer.

There’s a really, really big learning curve to learning how to program. 

It starts off relatively easily - we learn how to build web pages with HTML and CSS and then we start to dabble into true programming (JavaScript, Ruby, etc).

The thing here is that once we do, there’s not necessarily the same level of learning acquisition with programming as there is with learning to write HTML and CSS. 

The sheer level of depth associated with actually getting good (and dangerous!) with programming sometimes takes years to learn.

I’ve said this before, but learning to program (especially if we’re learning it on our own) is essentially: 

1) learning and becoming fluent in a new language and 
2) teaching our brain to think in an altogether different way than it has before.

And we can’t really rush that along.

So, when people take on the task of getting into programming with the lofty aspiration of getting a job in a matter of months, I think we’re looking at the exception more than the rule.

Employers are often searching for mid- to senior-level developers. That’s why it can feel difficult to break into traditional employment as a junior developer -- simple supply and demand. 

There are more junior developers when companies need fewer juniors; and there are fewer mid- to senior-developers actively looking at any given time when there are more positions open for those.

I think companies want to hire tried-and-tested developers, which *does* make sense. In other words, we can’t just expect to learn the basics of programming and then break into a perfect developer role.

We have to work hard, get really, really, undeniably good at what we do, and we have to set ourselves apart.

And the way to do that is by following your own unique creative impulses and to build really interesting, different projects that your peers aren’t creating. 

And getting to that point requires practice, showing up to your code editor everyday, learning new things, using your imagination, and building projects that you can proudly showcase and will turn employers’ heads at least enough to give you a chance to explain what you’ve made and why you’re awesome.

----------


P.S. Did you know I have a podcast with new episodes each Wednesday? Go listen [right over here >>] (https://www.ladiescodecollective.com/podcast)

![The Ladies Code Collective Podcast cover art](https://dev-to-uploads.s3.amazonaws.com/i/e9bnxljvfrdjeti7fvbr.png)
Predictive Maintenance and Machine Learning
Tags: machinelearning
Published: 2020-09-10 12:28:34

![So, What’s Predictive Maintenance (PdM)](http://perfectial.com/wp-content/uploads/2020/09/Predictive-maintenance-02-scaled.jpg)

On the huge promise of predictive maintenance.

In industry, machinery downtime can lead to penalties, degrade a company’s core operations, and cause dire reputational damages.

It’s essential for both small enterprises and the Walmarts of the world to have a well-rounded, well-tested maintenance strategy in place to reduce the likelihood of sudden outages or breakdowns happening and mitigate all associated risks.

A proper approach to maintenance can help enhance, quickly, the overall reliability and performance of a company, while also substantially reducing the operational costs it incurs.

In 2018, Amazon had an outage that lasted for about 60 minutes and lost nearly $100m in sales as a result.

The recent proliferation of connected technologies and predictive machine learning algorithms has had a profound effect on how companies conduct their equipment management; these recent advancements have enabled firms to ditch, almost completely, the practices of traditional reactive (RM) and preventive (PM) modes of maintenance and start embracing data-driven predictive maintenance (PdM) instead.

In this article, we’ll explain accessibly the key differences between RM, PM, and PdM and discuss some of the AI models commonly used for condition-based machinery monitoring.

The post [Predictive Maintenance: How Machine Learning Models Help Reduce Prevent/Repair Costs and Break Limitations of Traditional Maintenance Approaches] (https://perfectial.com/blog/predictive-maintenance-with-machine-learning/) appeared first on [IT Consulting Company Perfectial] (https://perfectial.com/).
Daily Developer Jokes - Thursday, Sep 10, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-09-10 12:00:00

---
title: "Daily Developer Jokes - Thursday, Sep 10, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Thursday%2C%20Sep%2010%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258f70cd7f.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ Are computers dangerous?

___A:___ Nah, they don't byte. They just nibble a bit.
 -->
S1E08: The Future of Hackathons
Published: 2020-11-18 00:42:09

---
title: S1E08: The Future of Hackathons
published: true
date: 2020-09-10 12:00:00 UTC
tags: 
canonical_url: https://anchor.fm/xrseapod/episodes/S1E08-The-Future-of-Hackathons-ejdd11
---

Hackathons are not just for developers. They are an opportunity for everyone to get together to find innovative solutions quickly. With social restrictions, the getting together is the hard part. Does that mean Hackathons are dead? We don't think so and neither do our guests, Nandini Ranganathan and Trond Nilsen. First, subscribe then tune in. We'll talk about the growing opportunities,  the new best practices and the future for virtual hackathons.

We'd love to hear what you think.

--- Send in a voice message: https://anchor.fm/xrseapod/message
Indian Travel Store
Published: 2020-09-10 11:30:01

Indian Travel Store is a one-stop solution company in tourism with diverse packages to explore every nook and corner, no matter whether it’s Himachal, Leh-Ladakh or Andaman Island. Our young enthusiastic team, who is lovely and passionate, takes pride in their cooperative approach in planning your dream holiday as per your budgets, plans, and desires. With an enriched experience of more than 7 years, we are privileged to have an active family of 60,000 + loyal patrons across India. Your support and honest feedback inspire us to perform even better to maintain your trust in us as the No. 1 travel and tours company. We would love to keep you, our precious travel buddies updated on all the latest travel news. Be it the first snowfall in HP.
COVID-19 stats I wanted to see, and unanswered questions
Tags: covid19, datascience, rstats, discuss
Published: 2020-09-10 11:28:49

The most obvious thing I always see in the news is, why report daily confirmed and daily deaths? What about **normalization** for population, demographics, and geospatial effects (and other factors)?

So, I managed to find my own answer, and US and India aren't necessarily number one and number two...

https://rpubs.com/patarapolw/covid19

![covid top ranks](https://dev-to-uploads.s3.amazonaws.com/i/surtr75fwf489dvl0aoy.png)

It seems that Peru and Brazil aren't doing well. US isn't that good -- it is within 10th ranking.

However, in [this dataset](https://covid.ourworldindata.org/data/owid-covid-data.csv), there are many other collected columns, such as test counts, number of beds, and population densities. So, how do I analyze?

Lastly, I have problems related to R language itself,

- Can I use Jupyter Notebook? -> R-Python-Julia-JavaScript interop
- How do I create GitBook, or something VuePress-like?
- How can my website update every day?
- How can graphs' interactivity be better?
Github Action to get response time details of a URL in a scheduled interval
Tags: actionshackathon, showdev, opensource, github
Published: 2020-09-10 11:12:17

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)
Being an opensource enthusiast, I am pleased to announce my first Github Action project as a submission to Github Actions hackathon in Dev.to please bear any mistakes that I may have made.

### My Workflow
[Note]: # (Make sure to include the name of your GitHub Action and share where it's being used!)
**Scheduled Ping** is a Github Action that sets a scheduled time interval to ping at your given **URL** and show you the response time details using cURL.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/shcbeivngz2ulzw5shk8.png)

### Submission Category: 

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)
**Wacky Wildcards**


### Yaml File or Link to Code

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% github link_to_your_repo %}` to share a GitHub repository)
You can integrate this Action in your workflow using this YAML

```yaml
name: Scheduled Ping
# This workflow is triggered at a scheduled interval of every 30 minutes
on:
  schedule:
    # * is a special character in YAML so you have to quote this string.
    # /30 denotes that it will run once every 30 minutes
    - cron:  '*/30 * * * *'

jobs:
  pinger_job:
    name: A job to ping
    runs-on: ubuntu-latest
    env:
      URL: ${{ secrets.URL }}
    steps:
      - id: ping
        uses: sisodiya2421/pinger@master
```

For more details on how to set up your `URL` for Scheduled Ping Action check out the Github Action Repo

{% github https://github.com/sisodiya2421/pinger/ %}


### Additional Resources / Info

You can make changes to your workflow as per your own requirements like in place of using `schedule` event as a trigger to your workflow use may use `push` or `pull` events.

You also have the flexibility to change the time interval just by using [POSIX cron syntax](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5ovh01xhzems17ufhho9.png)

Here's [Link](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) on how to add `URL` as a secret in your repo.

Check out Scheduled Ping Action at [Github Marketplace](https://github.com/marketplace/actions/scheduled-ping)

It has been a great journey from learning what is Github action to making a custom action of my own. Going through the docs I am pretty much sure the possibilities are endless.
Marketing Automatisierung mit drei All-in-One-Tools im Vergleich
Tags: onlinemarketing, automatisierung, chat, email
Published: 2020-09-10 11:55:31

---
title: Marketing Automatisierung mit drei All-in-One-Tools im Vergleich
published: true
date: 2020-09-10 10:56:54 UTC
tags: OnlineMarketing,automatisierung,chat,email
canonical_url: https://j0e.org/marketing-automatisierung/
---

![Marketing Automatisierung](https://j0e.org/wp-content/uploads/2020/09/marketing-automatisierung.png)

    Lerne wie du Marketing Automatisierung einfach und umfassend mit einem All-in-One-Tool in den Griff bekommst.

[Marketing Automatisierung mit drei All-in-One-Tools im Vergleich](https://j0e.org/marketing-automatisierung/)
That time when I coded a Virtual Voice Assistant
Tags: ai, machinelearning, python, voiceassistant
Published: 2020-09-10 10:52:43

That time,when i decided to code a virtual voice assistant as my Python(Intermediate) Capstone Project.
After learning Python for about 2 months,I had this urge to implement everything that I had learnt in one weekend project.
So I coded a virtual voice activated assistant.

The assistant uses NLP for its main functionality.
It scrapes the web for you,opens webpages,tells you the time,temperature,precipitation and date,performs mathematical operations,analyses your sentiment,tells you the corona virus cases recorded,translates your statement to other languages,does wikipedia searches for you and sends email
It also has Wake Word activation(hot word detection).

The code,is definitely not the best.You would find way better codes,for the same exact project,but it gets the job done.
If you find anything cringe-worthy in the article or the code itself,Be Kind,and please let me know!

The code for the project,can be found on my GitHub.
{% github ViswamberPrasad/Virtual-Voice-Assistant %}
GIT
Tags: git, firstyearincode, html
Published: 2020-09-10 10:50:10

#Introducción
##Introducción
###Introducción
####Introducción

{% gist https://gist.github.com/fernandomatiasdv/e8b8d354bd21ab2f801a5f619ddd7d8f %}


es simplemente _el texto_ **de relleno** de las imprentas y archivos de texto. Lorem Ipsum ha sido el _texto de **relleno**_ estándar de las [industrias](http:www.google.com) desde el año 1500, cuando un impresor (N. del T. persona que se dedica a la imprenta) desconocid.
<!-- This won't show up in the content! -->

![Imagen Random](https://dev-to-uploads.s3.amazonaws.com/i/s6efp7z0ceo7z23p292u.JPG)

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |


{% youtube jHSlIRMGq2o %}

<ul>
<li>Uno</li>
<li>Dos</li>
<li>Tres</li>

</ul>
Let's get Started with Containers on Azure
Tags: azure, webdev, tutorial, go
Published: 2020-09-10 10:43:43

#### 📺 018 - Erik St.Martin 🎙️ Frank Boucher


{% youtube P0GC698GV-I %}

So many are talking about containers and Docker. But why should we use them? In wish scenario could we prefer containers instead of Virtual Machine (VM) or Platform as a Service (PaaS)? In this episode Erik join Frank to demystify the containers and shows how to use them in Azure.

We will start by creating a very simple application, in this case it will be with Go but it's doesn't matter in this case. Then we will containerize it with Docker.

Once a light version of the application was available in a container Erik show us how to deploy it into Azure. We create a Azure Container Registry and then use it to deploy in Azure Container Instance and [inside a webapp](https://docs.microsoft.com/en-ca/azure/app-service/tutorial-custom-container?pivots=container-linux&WT.mc_id=allaroundazure-blog-St.Erik).

---

### Useful Links

🔗 [Automate container image builds in the cloud when you commit source code](https://cda.ms/1tK)

🔗 [Automate container image builds when a base image is updated in an Azure container registry](https://cda.ms/1tL)

🔗 [Quickstart: Deploy a container instance in Azure using the Azure CLI](https://cda.ms/1tM)

🔗 [How To Deploy Containers to Azure ACI using Docker CLI and Compose](https://cda.ms/1tP)

🔗 [Run a custom Docker image in App Service](https://cda.ms/1tQ)

🔗 [Azure Kubernetes Service (AKS)](https://cda.ms/1tR)

🔗 [Create an ingress controller in Azure Kubernetes Service (AKS)](https://cda.ms/1tS)


---

### Learn more on Erik St.Martin

🔗 Twitter: https://twitter.com/erikstmartin

🔗 bio: https://developer.microsoft.com/en-us/advocates/erik-st-martin


☁️
WHAT DOES AN RPA DEVELOPER DO?
Published: 2020-09-10 10:34:05

With the [RPA](https://fastpathautomation.com/en/) sector quickly expanding, numerous people are curious about what an RPA developer really does and what criteria must he face. In the following, we will show you accurately what it implies to be an RPA developer.

Human worker or robot worker?

RPA empowers developers to examine the software system surpassing any borders, being continuously exposed to innovation and transformation. The main benefit of [UiPath RPA](https://fastpathautomation.com/en/) is that it can be implemented in most fields and any business, despite its dimension. By RPA, multiple dull tasks are automated, so you can assign more time to expand your company. In this way, you significantly reduce the working time for specific activities and minimize human mistakes, hence reaching the highest performance in the smallest period.

RPA brings concomitantly artificial intelligence and human intelligence to produce a business atmosphere beneficial to increase and improve. These two kinds of intelligence combine strengths to simplify processes and optimize monotonous actions. RPA drives with safe moves the society towards a new trend in terms of productivity and performance, immediately reaching unbelievable stages.

What do you need to be an RPA developer?

To be an RPA developer, you regularly necessitate technical abilities. When it comes to RPA development, talent is left aside, demanding a lot of hard work and practice in this domain. Thus, if you desire to become a certified RPA developer, it is essential to train as much as possible to develop your particular abilities. As an RPA developer, you must constantly discover the most suitable solution to contextual difficulties and apply your expertise to execute the solutions you have considered.

What an RPA developer concretely does is to create, design, and implement robots that streamline the processes of a business, operating side by side with people. An RPA developer utilizes software and programming data to build instruments and procedures to automate any tasks. A good perception of people and company requirements is needed to perform these tasks. In extension to the traditional programming abilities, to be an RPA developer you additionally necessitate logical thinking.

The RPA developer has the responsibility to examine the process before implementing the automation and until the effects of the process arrive, thus probing how the activity has developed with the support of robots. Professions in RPA development are possibly the most fascinating because no day is comparable to the other, continuously examining new platforms and applications, facing uncommon circumstances and opportunities.