teleren/devto huggingface dataset:
7 Tricks I Use To Rewrite JavaScript Code From My Early Days
Tags: javascript, programming, webdev, refactorit
Published: 2021-05-26 12:19:54

For the past four years, I have been working on a Cordova app that runs on JavaScript. The codebase has grown to the point where working on it often feels like wandering through streets and alleys of a large city. And looking at some of the earlier modules feels like sauntering into old buildings I originally constructed years ago.

While my JS coding has evolved over this time, I often run into code in the app that feels inefficient and outdated - and it bothers me to the point where I usually feel compelled to eventually refactor it so that it is more compact, readable, and understandable.

Here are <a href="https://betterprogramming.pub/7-approaches-to-rewriting-javascript-from-my-early-days-c6ada526d55f?sk=943c7f6366a06aa724d18451671cb35d">7 time-tested tricks</a> I use to rewrite my JavaScript code from those early days, published this month in Better Programming. I hope you find them useful. Enjoy!
AI algorithm families
Tags: beginners, datascience, machinelearning
Published: 2021-05-26 12:18:01

Different families of algorithms solve different problems. We don't necessarily need to be experts in the details of each one, but having a grasp on what problems they can solve, and how they generally work, equips us with more tools when making decisions.

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

Traditional search algorithms are useful where several actions are required to achieve a goal, like finding a path through a maze. These algorithms evaluate possible states and attempt to find an optimal path . Typically, we have too many possible solutions to brute-force.

![From Chapter 2: Search fundamentals in Grokking Artificial Intelligence Algorithms](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1bhwnr7kvqlihgcl2ebs.png)

Biology-inspired algorithms are wondrous things happening all the time. The cooperation of ants in gathering food, the flocking of birds, estimating how brains work, and the evolution of organisms to produce strong offspring. These have inspired algorithms that are useful in AI.

![From Chapter 4: Evolutionary algorithms in Grokking Artificial Intelligence Algorithms](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5u8gwps3dyajacil94uy.png)

Traditional machine learning algorithms leverages statistics to training models to learn from data. The umbrella of machine learning has a variety of algorithms that can be harnessed to improve understanding of relationships in data, to make predictions and decisions.

![From Chapter 8: Machine learning in Grokking Artificial Intelligence Algorithms](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mp6czapkx5s42m1u6rq5.png)

Deep learning algorithms are a broader family of approaches and algorithms that are used to achieve narrow intelligence and strive toward general intelligence. It attempts to solve general problems like vision, speech, and reasoning. It often leverages artificial neural networks.

![From Chapter 9: Artificial neural networks in Grokking Artificial Intelligence Algorithms](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pu9nzr02qopqkimbhrtm.png)

Reinforcement learning algorithms are based on behavioural psychology and use feedback from actions performed to learn what sequences are more beneficial. Reinforcement learning is useful when you know what the goal is but don’t know what actions are reasonable to achieve it.

![From Chapter 10: Reinforcement learning with Q-learning in Grokking Artificial Intelligence Algorithms](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zjwaoyd5xgxft4gcejbo.png)

Create your own mental map of AI! If you enjoyed this thread, check out my book, Grokking Artificial Intelligence Algorithms: [http://bit.ly/gaia-book](http://bit.ly/gaia-book), consider [following me](https://twitter.com/RishalHurbans) for more, or join my mailing list for infrequent knowledge drops in your inbox: [https://rhurbans.com/subscribe](https://rhurbans.com/subscribe).
Day 7/30 : FAQ Accordion Section using HTML and CSS
Tags: html, css, webdev, tutorial
Published: 2021-05-26 12:12:36

Welcome to Day 7 of this [Challenge](https://dev.to/somanathgoudar/30dayschallenge-30-days-extreme-html-css-challenge-50k1). This is what I created today. 

**➜ Here is the Demo :**
![FAQ Accordion Section](https://1.bp.blogspot.com/-Owhv4SbZ_Ro/YKOcuRymQSI/AAAAAAAAACA/b1NDJx2Lr2APphp-midZbR6rTjJ1VD3-wCLcBGAsYHQ/s600/p7.gif)

**➜ Video Tutorial :**

{% youtube qdYY4a-qPTk %}
**➜ Source Code :**
https://www.futurecodersweb.com/2021/05/faq-accordion-section-using-html-and-css.html


**➜ Instagram Post and Reel for Day 7 :**
[See Post and Reel](https://www.instagram.com/future_coderss/)

------------------------------------------------------------------

Hey, If You don't know what is happening here. Don't Worry, I am doing a crazy challenge 😅. Read More about it from the post below.

{% link https://dev.to/somanathgoudar/30dayschallenge-30-days-extreme-html-css-challenge-50k1 %}

**Support Me :**
👉 Buy me a Coffee: https://www.buymeacoffee.com/somanathgoudar
👉 [Follow Me on Instagram](https://www.instagram.com/somanath_goudar/)
👉 [Follow Future Coders on Instagram](https://www.instagram.com/future_coderss/)
👉 [Subscribe to My Main Channel](https://www.youtube.com/channel/UC_nTrhTr5fnBGjOxnkPUmmA)
👉 [Subscribe to Channel Created for this Challenge](https://www.youtube.com/channel/UCzGSyMOf2jPt1MkNBB3SJ3g)

------------------------------------------------------------------
เปิด IntelliJ จาก command line terminal ใน macOS
Tags: intellij, commandline, terminal
Published: 2021-05-26 12:08:19

ถ้าเราอยากสามารถเปิด IntelliJ ตอนที่เราอยู่ที่ terminal ได้เลย เราต้องไปเพิ่มคำสั่งเองได้เลย
ไปสร้างไฟล์ ชื่อ `idea` ไม่ต้องมีนามสกุลที่ `/usr/local/bin/` 
ใส่คำสั่งในการรัน IntelliJ เข้าไปในไฟล์
```
#!/bin/sh

open -na "IntelliJ IDEA.app" --args "$@"
```

  `-n` : ถ้ามี IntelliJ เปิดอยู่แล้วให้เปิดหน้าต่างใหม่
  `-a` : ระบุว่าให้เปิดโปรแกรมชื่ออะไร


จากนั้นเปลี่ยน permission ให้สามารถรันได้ 
```
chmod +x /usr/local/bin/idea
```

เท่านี้ก็จะสามารถเปิด intelliJ จาก terminal ได้แล้ว

```
idea myfolder
```
หรือ เปิดไฟล์

```
idea myfile.md
```

ง่ายไหม
What Are Biometrics? The Pros/Cons of Biometric Security
Tags: security, biometrics
Published: 2021-05-26 12:01:23

#### 🔑 Biometrics are measurable human traits or characteristics that are often used in biometric authentication to verify a user’s identity for cybersecurity purposes.

### <br>
Biometrics are measurable human traits, characteristics, or behaviors that can be used to verify a person's identity. For example, a person's face or fingerprints are unique to them and can be measured. So they're often used to identify a person in law enforcement applications.

Biometrics have been used for identity verification[ since 1883](https://www.nlm.nih.gov/exhibition/visibleproofs/galleries/biographies/bertillon.html) when French criminologist Alphonse Bertillon first used body measurements to identify repeat offenders. Today,[ biometric authentication](https://auth0.com/blog/3-critical-trends-in-biometric-authentication-in-2019/) is[ growing in popularity](https://community.spiceworks.com/security/articles/2952-data-snapshot-biometrics-in-the-workplace-commonplace-but-are-they-secure) for enterprises because biometrics are an[ effective](https://www.researchandmarkets.com/reports/5021766/biometrics-driven-by-standardized) way to control access to sensitive information, devices, or physical locations.

However, biometrics aren't impenetrable and come with increased privacy risks. So any organization seeking to utilize biometrics to verify employees or end users should pay close attention to how they implement biometric identification systems.

Below is what executives need to know about using biometrics for their organization.

![How Biometrics Work](https://images.ctfassets.net/23aumh6u8s0i/1PBtpzTeahMOcqlpm1MoL3/09f0029a9c41c405493f0549b51a7397/Biometric_2.jpg)



[Read more...](https://auth0.com/blog/what-are-biometrics-the-proscons-of-biometric-security/?utm_source=content_synd&utm_medium=sc&utm_campaign=security)
Daily Developer Jokes - Wednesday, May 26, 2021
Tags: jokes, dailydeveloperjokes
Published: 2021-05-26 12:00:02

---
title: "Daily Developer Jokes - Wednesday, May 26, 2021"
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=Wednesday%2C%20May%2026%2C%202021"
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/5e12590f4ba3c.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:___ What do you call a computer that sings?

___A:___ A-dell.
 -->
How to create a VPC, subnet, and networking setup in AWS using terraform?
Tags: terraform, aws, networking
Published: 2021-05-26 11:51:40

## Overview

AWS is a very big and complex platform. Creating a SAAS on AWS can be a daunting task, especially if you are not familiar with AWS. There are so many configurations about VPC, subnets, security groups, etc to be created before you even begin provisioning your application/database servers. The UI and documentation can be very confusing. 

So I prefer a script/code-based approach to creating infrastructure. Terraform is a popular choice to create your AWS infrastructure programmatically. This how-to guide helps you create a basic networking stack using terraform that you can use to create your SAAS. 

## What you will create?

If you are starting a new SAAS project and planning to run your infrastructure on AWS, then you are going to need 

A VPC1 public/private subnet per availability zoneNetworking set up like a public internet gateway and a private NAT gatewaySecurity group to control ingress/egress traffic 

The overall setup will look like below - 

![Our Setup](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ev9uv65v2oo6cc7d0251.jpeg)

## What you will need?

AWS Account with programmatic access Terraform (>0.12) installed on your operating system and binary is included in your system's PATH. 

If you are using mac, you can get terraform using homebrew easily. 
```
$ brew tap hashicorp/tap
$ brew install hashicorp/tap/terraform

# To verify everything is right, check version 
$ terraform version
Terraform v0.15.1
on darwin_amd64
```

## Continue reading this ... 
The remaining steps to build this are available in a nicely written walkthrough here - 

https://walkthrough.so/pblc/pHjklthzWFvI/how-to-create-a-vpc-subnet-and-networking-setup-in-aws-using-terraform
CLEAN CODE : PICK ONE WORD FOR ABSTRACT CONCEPT
Tags: codequality, cleancode, goodnames
Published: 2021-05-26 11:39:31

Actually i am reading the *Clean Code* book of Robert C. Martin , and i find that the section on the namings is quite helpful , i will talk here about the part **PICK ONE WORD FOR ABSTRACT CONCEPT**

# A - CHOOSE AN ABSTRACT CONCEPT
for example the fact to retrieve or to get something from a place A to a place B , we do not have a universal word for it 
it is fine Bob will take the word **retrieve** where Mary will go for **get** , Fine the problem is in another part 

# B - STICK WITH THE WORD THAT YOU CHOOSE 
here is the fight , we go through a big source code and we find that for a same thing we have differents words . how painful is for us to represent that code base in our mind.
i will finish with what the book says about this.

>Likewise, it’s confusing to have a controller and a manager and a driver in the same code base. What is the essential difference between a DeviceManager and a Protocol-
Controller? Why are both not controllers or both not managers? Are they both Drivers really? The name leads you to expect two objects that have very different type as well as
having different classes.


It helps future readers to gain deep understanding and do not forget that the internal quality of our code is our identity as a developer
have a nice day
Understanding Docker: part 34 – Context
Tags: docker, devops, beginners, cloud
Published: 2021-05-26 11:37:04

---
title: Understanding Docker: part 34 – Context
published: true
description: Serie of sketchnotes about Docker. Explaining in a visual way Docker principles.
tags: Docker, DevOps, beginners, Cloud
series: Understanding Docker in sketchnotes
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/azrsk0xuslv2s8qgn6hx.jpg
---

Understanding Docker can be difficult or time-consuming. In order to spread knowledge about Cloud technologies I started to create sketchnotes about Docker. I think it could be a good way, more visual, to explain Docker (and other technologies like Kubernetes and Istio).

We continue the series of Docker sketchnotes with a focus about Docker contexts.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/azrsk0xuslv2s8qgn6hx.jpg)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/by5tsi0twoz2j6rp0zkr.jpg)

As usual, if you like theses sketchnotes, you can follow me, and tell me what do you think. I will publish others sketchs shortly :-).

If you are interested, I published all the sketchnotes on Docker (and new ones!) to make a "book" of 93 pages: ["Understanding Docker in a visual way"](https://gumroad.com/aurelievache#YTLzM).
Wednesday Links - Edition 2021-05-26
Tags: java, spring, jvm, reflection
Published: 2021-05-26 11:32:21

Hacking third-party APIs on the JVM (8 min read)🥷
https://blog.frankel.ch/hacking-third-party-api-jvm/

Secure Rate Limiting with Spring Cloud Gateway (5 min read)✋
https://piotrminkowski.com/2021/05/21/secure-rate-limiting-with-spring-cloud-gateway

Demystifying JVM Memory Management (12 min read)🚀
https://foojay.io/today/demystifying-jvm-memory-management/

Visualize the architecture of your Java app in IntelliJ IDEA, in 2 ¹/₂ minutes (3 min read) 📐
https://dev.to/appland/visualize-the-architecture-of-your-java-app-in-intellij-idea-in-2-minutes-2dp7

Do we need comments in our code? (12 min read)🤔
https://trishagee.com/2021/05/14/do-we-need-comments-in-our-code/

Large pages and Java (7 min read)🎪
https://kstefanj.github.io/2021/05/19/large-pages-and-java.html

Spring Boot 2.5 is now GA (1 min read)🎉
https://spring.io/blog/2021/05/20/spring-boot-2-5-is-now-ga

Spock 2.0 released (1 min read)🎉
https://spockframework.org/spock/docs/2.0/release_notes.html

jvmti-tools (30 sec read)🧰 
https://twitter.com/gunnarmorling/status/1396418270207619077
Quick take on Angular Imports
Tags: angular, typescript
Published: 2021-05-31 10:42:38

---
title: Quick take on Angular Imports
published: true
date: 2021-05-26 11:28:19 UTC
tags: Angular,TypeScript
canonical_url: https://myowntake.hashnode.dev/quick-take-on-angular-imports
---

Good morning ☕!

A quick take that I'd like to share before I forget it.

## What?

Working in Angular with many packages, sometimes VSCode doesn't "see" a new package and we've just installed and forces us to import it manually to get the IntelliSense for that module.

## Why?

That's because Angular CLI adds a property in the "tsconfig.app.json" under "compilerOptions" called "types". [Typescript documentation](https://www.typescriptlang.org/tsconfig#types) says: "If types is specified, only packages listed will be included in the global scope."

It means that since it's specified in our tsconfig.app.json it will overwrite all other typings that typescript may find in our node\_modules folder.

## How?

Just remove it, and Typescript will get every typing in our node\_modules folder.

Thanks to [maximedasilva](https://github.com/maximedasilva) for finding this out!
Top Websites and Books for Developers
Tags: rprogramming, python, datascience, beginners
Published: 2021-05-26 10:47:10

Hello folks,
The following Websites and Books are very useful for the developers who are willing to apply for the roles of Data Analyst, Data Engineer and Data Scientist.

1) Udemy
https://www.udemy.com/
The courses offered by Udemy are affordable and effective. So, before getting started learn Python and R(Optional) from Udemy. 
For learning R, SQL, Statistics and Data Science course I recommend to opt for the following courses:-
-> R Programming A-Z: R for Data Science.
-> SQL(Learning SQL is very important for a Data Analyst) MySQL for Data Analytics and Business Intelligence.
-> Statistics for Data Science and Business Analysis.
-> Complete 2020 DataScience and Machine Learning Bootcamp.

2) DataCamp
https://www.datacamp.com/
The courses offered by DataCamp are very effective for Data Scientists and they are developed especially for Data Scientists.

3) Coursera
https://www.coursera.org/in
The courses offered by Coursera are very useful and the following courses are very useful:-
-> Machine Learning and Deep Learning by Andrew Ng(American Computer Scientist).

4) LinkedIn Learning
https://www.linkedin.com/learning/
The courses offered by LinkedIn are useful and they are designed in a very compact format:-
-> Tableau Essential Training(Data visualisation tool) is one of the good course offered by LinkedIn.

The following book, Python for Data Analysis by OREILLY is an extraordinary book for beginners:-

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wkjhmu9eivgcqsm6dvor.jpeg) 

If you are interested in doing Data Analysis using R language then study the following books:-

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8h1ijq3c6ltw20rwhocg.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4874rc6a17vjq31c1v9v.png)

Download the Books, 
-> R for Data Science by OREILLY
-> Practical Data Science with R
-> Python DataScience Handbook by OREILLY
-> Tableau Visualisation
-> Data Analysis using Excel
-> Data Mining
-> DataScience Cheatsheet
-> DataScience Interview Questions from the following link:-
https://github.com/ruthvikraja/DataScience-Books.git

Also, Complete MySQL for Data Analysts is available from the following link:-
https://ruthvikraja-mv.medium.com/mysql-bootcamp-from-zero-to-hero-for-data-analysts-8a716992ee78

Thank you, 
Bye for now...
Automating the Elgato Key Light
Tags: node, automation, smarthome, api
Published: 2021-05-26 10:42:24

As video conference calls are now part of my daily life, I decided to investigate how I can look better in front of my webcam. After some research, I bought an Elgato Key Light Air to help illuminate my face better.

So far, I'm delighted with the purchase. The key light has definitely improved how I look on video calls. But having to turn it on every time I have a video call and then turn it off when the call ends is a pain.

I considered leaving the light on throughout the work day, but the light can be quite searing to my eyes when it's shining at me for an extended period of time.

I then put on my software engineering hat and wondered, "Can I automate this inconvenience away?". As it turns out, I can.

## Elgato Key Light REST API

The Elgato Key Light and Key Light Air devices actually have a web server (listening on port 9123) built in. The web server exposes a REST API:
```
GET /elgato/lights
```

This endpoint returns the status of the key light.

**Sample Response**
```
{
    "numberOfLights": 1,
    "lights": [
        {
            "on": 1,
            "brightness": 9,
            "temperature": 262
        }
    ]
}
```

For updating the key light, there's a PUT action endpoint:
```
PUT /elgato/lights

Content-Type: 'application/json'
--data-raw '{
  "Lights": [
    {
      "Temperature": 344,
      "Brightness": 100,
      "On": 1
    }
  ]
}'
```

This endpoint allows you to set the attributes of the key light. You can set the brightness and temperature, including turning it on or off.

This means that I can turn the Elgato Key Light off and on by interfacing with its REST API endpoints.

## A Node.js script
I created  [a Node.js script that toggles on and off the Elgato Key Light](https://github.com/jasonheecs/elgato-key-light-automator). I then bound the execution of the script to a keyboard macro. So now, I can tap a key to turn the Key Light on and off. :D

## Conclusion
It is relatively easy for one to interface with an Elgato Key Light or Key Light Air using its built-in REST API. You can even integrate it into your smart home via something like  [Homebridge](https://github.com/homebridge/homebridge) .
9 kostenlose Performance Plugins, die deine Website schneller machen
Tags: wordpress, cache, geschwindigkeit
Published: 2021-05-26 16:42:25

---
title: 9 kostenlose Performance Plugins, die deine Website schneller machen
published: true
date: 2021-05-26 10:37:40 UTC
tags: Wordpress,cache,geschwindigkeit
canonical_url: https://j0e.org/9-kostenlose-performance/
---

![9 kostenlose Performance Plugins für WordPress](https://j0e.org/wp-content/uploads/2021/05/kostenlose-performance-plugins.png)

Jeder möchte eine Website, die schnell lädt. Es gibt viele Faktoren, die beeinflussen, wie schnell deine Webseite lädt. Einige dieser Faktoren liegen unter deiner Kontrolle, andere wiederum nicht. Wenn du alle Faktoren, die du nicht kontrollieren kannst, eliminieren willst, gibt es einige kostenlose Plugins, die dir helfen können.

Wer seinen WordPress Blog schneller machen möchte, kann im Content Management System sogenannte Performance Plugins …

[WordPress schneller machen](https://j0e.org/9-kostenlose-performance/)
Value of connecting
Published: 2021-05-26 05:12:15

I'm 3 months into changing careers from 15 years working as a Casino Manager to becoming a Full Stack Developer. I'm currently working through Springboards Software Engineering Bootcamp and there are new challenges every day. I try to stay positive as much as I can, even when you feel like you have no idea what you're doing. Mostly my strategy so far has been to just sit down and push on, and I think it's been working out pretty well.

Another thing that I have found that has helped me a lot, is listening to experienced developers talk. What I mean is, anytime you have the chance to listen to an experienced dev talk, take advantage of it. Whether that being through webinars, meetups, social media or mentorship. You can find great people out there that are willing to help newbies succeed. I think mentorship is one of the most important things to find if you're trying to get into software development and I hope to one day be able to give back.

To myself, and anyone else reading, remember to get out there, meet new people in your desired field, share ideas, look for ways to contribute and remember to listen to the ones already doing it.