teleren/devto huggingface dataset:
7 Developer's Destructible Career Habits.
Tags: codenewbie, career, productivity, programming
Published: 2021-03-19 19:18:00

I would be sharing shortly on seven habit, that can be of great destruction to a programmer's career!

**If these tips are pointing out at you, you've got to stop!**
Let the journey, ready to aid career enhancement begin🚀

### -   No Coding Organization

There is nothing worth than a developer who doesn't care about clean code and architecture! Writing codes that can be understood by both newbies and experience developers is an outstanding feature.

Learn about coding organization and clean code!

### - Not Helping Others

Strong people don't put others sown they lift them up. Share what you know to others. This keeps you also to know more or still refresh something you've once known

Don't keep it to your self :)

### - No Planning, Just Coding

There is an old saying "hours of programming can save you weeks of coding" Failing to plan ahead is the beginning of experiencing bug 
Always spend some time to plan on what you want to build

### - No Thanks I Got It

There is no shame in asking people for help. It doesn't show weakness, it shows the ability of becoming better tomorrow!

### - Reinventing The Wheel 

If there is a fully documented library that is doing the work perfectly, then use it.

### - I'm The Best Attitude 

The moment you think you are the best is the moment you stop learning. 
Be humble at all times and listen to what others are saying. 

There might be something pertinent in what they want to teach.


### - Work And Life Balance

Don't want to be burn out!
Take breaks i.e. (don't think about work when you are out with friends! :)
Your personal life is as important as your career! :)

Please kindly comment below for feedback and you can link up with me on [Twitter](https://twitter.com/chryz_codez) and on this platform for more engagement🤝!
What is JavaScript?
Tags: javascript, webdev
Published: 2021-03-19 19:13:21

**First of all I want to say something important, you all are or might be aware of programming language Java, it has nothing to do with JavaScript okay so lets move forward.**

Today anything from anywhere around the world is available, thanks to **Internet**. We can buy clothes, order our groceries, book flight tickets and much more. But wait a minute, how are we able to do such things? We are able to do such things just because of some people crazy people who wrote some hundred thousands lines of program using some programming language.

**JavaScript** is lightweight, flexible and interpreted programming language. With the help JavaScript we can add different features in our web application which makes the user experience simple and easy. It can be used in Front-end (i.e. the client side) as well as Back-end (i.e. the server side) of a web application due to which all the web developer loves this language.

It was first introduced a way back in 90’s in **1995** as to insert different programs to web pages and applications in the browser known as Netscape Navigator. And because of it’s simplicity and functionality all the major web browsers adopted JavaScript. Since then many changes and upgrades are made in this language and the modern web applications on which you interact and move around just like this DEV site, is possible.

As I said earlier that Java has nothing to do with JavaScript, many people started using the popularity and fame of JavaScript for marketing purpose. Then a standard document was released which was about how the JavaScript language should work. This standardization was done by *Ecma* *International* *Organization*. Thus JavaScript got another name known as **ECMAScript**. Hence it was used at many places and in the mean time it also went through many upgrades and new version were released. The latest version is the ES6 version which is mostly adopted by all the browsers. In this time many databases started using it like MongoDB and it was introduced to the server side i.e. Back-end by **NodeJS**.

Today there are so many frameworks and libraries available in JavaScript that you can do anything you imagine. The most famous ones are **ReactJS** which is developed by *Facebook*, **VueJS** and **AngularJS**.

So you reached the end of the blog, thanks a lot for reading the whole blog 😀

Check the other blogs too.

Thanks.
Summarizing Namaste 🙏 JavaScript EP02 (How Js code is executed and Call stack)
Tags: javascript, help, namastejavascript, callstack
Published: 2021-03-19 18:48:47

Thank you Akshay Saini for this beautiful series. Just summarizing your lessons for whenever I need a quick recap. Same for others. Hope it helps.

Execution context is created in two phases:
#####1-> Memory creation or allocation phase
#####2-> Code execution phase

Now first see memory creation phase.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c49rmv3yn2qeuoaohthy.png)

In above image, there is a simple js code and a rough diagram of execution context parts.
Js will allocate memory to all the variables and functions.

###Note: All variables in first phase are assigned a value of undefined

When js encounters var __n__, it allocates **n** a memory with a value **undefined**.
Similar happens to **square2** and **square4**.
In case of function, a key named **square** is allocated in memory with a value (whole square function code {...}).
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/083ff8jdcikvg873v6fo.png)

Now see Code execution phase.
Js once again runs line by line and executes the code.
At line 1, it assigns the actual value(2) instead of undefined which was assigned in phase 1.
At line 2, it doesnt find anything to execute and goes to line 6.
At line 6, function is invoked.
Think of function like a mini program.So, when a mini program aka function is invoked, **a whole new execution context is created.**

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r5hn8kd7vkuieemn0m3t.png)

Since, new execution context is created. Memory and code execution phases are repeated.

Memory phase 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/93hqnijf1uikrnspp84b.png)

Code execution phase
First it will assign **num** with value 2.
Then, first line of function is executed and the result which is **4** is assigned to **ans**.

**return** states that return the value to the place it was invoked or return back to the origin from where it was invoked.
So, second line of function is executed and the execution is back to its origin.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/598h0qj2s4hnj9mbjulj.png)

**The function execution context is deleted after completion**
Same thing happens at line 7 and its execution context is also destroyed after completion.
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b2lpxquczdnuu947kj87.png)

After doing all executions, global execution context is also destroyed after completion.

##How does Js manages these execution context if there are alot of functions inside function or else case?
Answer is **Call Stack**
Js has its own call stack. Call stack maintains the order of execution of execution contexts.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/00mrbcw7es65f1uv3a1v.png)

GEC-> Global execution context
E1-> First execution context

After completion E1 is destroyed. Then E2 is pushed and is destroyed after completion.
At last after all executions, GEC is also deleted.
Script to Mark Text in article
Tags: javascript, css
Published: 2021-03-19 18:40:16

Hi guys! My first post here, and this is my script what let user to mark text of the article that he find interesting or useful.

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

On text selection under cursor will appear block with 2 buttons - <b>mark text</b> and <b>copy text</b>. 

If user clicked on 'mark text' - selected text will be surrounded with <mark>&lt;mark&gt;</mark> tag and highlighted. Also all text, what user marked will be collected into list in bottom right corner:

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

Nothing special with <b>"copy text"</b> button - it just copies text :)

Idea for this script comes to my mind when I worked on site for sea mans, where articles are big and very hard to read.

JSFIDDLE https://jsfiddle.net/Lestrae/po931gmq/12/

<i>I know one bug in this script, but I hope you don't find it :D</i>
Facing error with OpenCV in Ubuntu?
Tags: ubuntu, python
Published: 2021-03-19 18:27:55

*`cv2.error: OpenCV(3.4.2) /tmp/build/80754af9/opencv-suite_1535558553474/work/modules/highgui/src/window.cpp:632: error: (-2:Unspecified error) Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'.`*

Is this what you got as error ?

To solve this problem 

Install cmake
```
sudo snap install cmake --classic
```

Still facing the problem ?
Try installing 
```
sudo apt install libgtk2.0-dev
sudo apt install pkg-config
sudo apt install libopencv-*
```


Error
*`QObject::moveToThread: Current thread (0x5618076ecfe0) is not the object's thread (0x561807941d80). Cannot move to target thread (0x5618076ecfe0)`*

If you are using anaconda then try installing pyqt
```
conda install pyqt
``` 

I hope it helped you :)
Basics of Encryption, Types of Encryption & Encryption Algorithm
Published: 2021-03-19 18:16:20

 

BASICS OF ENCRYPTION
Encryption has become part of every person’s everyday life. It helps to defeat the cybercriminals and snoopers. The online traffic will be clear and visible to the prying eyes by definitely using VPN. In the US legislative push people and limit ways to use encryption. The EARN IT Act which is set by the government will be the best practice for tech companies. The encryption and its algorithms can be of various types that help you to understand better about what is encryption.

 

Must Read – What is Encryption?

What’s an Encryption Type? 
In the types, the main thing is to deal with the way that encryption processes operate. The three significant forms of encryption type are:

 

Asymmetric: Asymmetric cryptography is one of the common forms of encryption used on today’s internet. It is also known as public-key cryptography. The data in this type of encryption can be secured by using a pair of keys. There are two types of keys used in the encryption process, one is the public key and another one is the private key. 
The encryption services provider and also used to apply initial encryption is the public key. Ensure that it will usually change on a regular basis so that it can be protected from the hackers. The main work of the private key is to decrypt data once it reaches its destination. The holding of the private key is with the user or recipient only.The asymmetric encryption will be ubiquitous on the web. The asymmetric encryption used in Bitcoin, APIs payment, and many more. This will ensure that the credit card details will be secure. It is a slower encryption type as compare to symmetric encryption due to this it is mostly used to encrypt small pieces of data.

 

Symmetric: A single key is used in the symmetric encryption. In this, the two nodes of the information are encrypted and decrypted by a single key. By using random-number generators the key will be created and they are grades of sophistication. The best symmetric encryption will be weaker than the asymmetric alternatives. The main benefit of symmetric encryption is its speed. As well have discussed the only key is used in this type so data can be encrypted and read must faster.
 

Hash functions: Hash functions slightly vary in features than symmetric and asymmetric encryption. For the data protection purpose, the hash functions turn the plaintext into impenetrable code. The main aim of the hash function is to convert an input into a predetermined output. The size of the input does not matter either it is small or large; it will create a hash for the same fixed length. In the conventional sense, there is no decryption as the hash created will not turn back into the input. It is a very powerful tool but at the same, it also seems less useful than standard encryption.

Read more
[Basics of Encryption](https://comparecheapssl.com/basics-of-encryption-types-of-encryption-encryption-algorithm/)
How to scrape all the Google Play reviews from any app
Tags: scraping, google, play, reviews
Published: 2021-03-19 18:11:05

## Scrape Google Play review

Manual extracting even for 25 reviews is a really boring job. Fortunately, there are some services that will do with a decent price or even with a Free tier.

In the following post, I'll describe the extraction process of any amount of reviews from any app/movie/book into csv/excel files (check out my other posts on how to do it via API).

## Getting started

1.  Create an account at [Outscraper](https://outscraper.com/google-maps-extractor/) - the service we are going to use to extract the data.

2. Open [Profile](https://app.outscraper.com/profile) and connect a valid credit card. There is a [Free Tier](https://outscraper.com/google-play-reviews-scraper/) that will be refreshed each month. It should be enough for some basic usage and you will not be charged for the usage belove the Free Tier.

3. Copy link to any app, movie, or book.

4. Open Google Play scraper service and insert the link or app ID to the textbox [like this](https://app.outscraper.com/google-play-reviews?query=com.facebook.katana). Be aware that you can use IDs only for apps (like Facebook app ID: com.facebook.katana).

5. Select language, sorting, and other parameters:
![Screen Shot 2021-03-19 at 8.03.13 PM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bz2idmte3ys3ub6rbokx.png)

6. Start the extraction.

7. Go to [the tasks](https://app.outscraper.com/tasks) page and check for results.

8. Download the results:
![Screen Shot 2021-03-19 at 8.07.25 PM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5m6lcoask3apmwjhqvtn.png)

9. Open the file:
![Screen Shot 2021-03-19 at 8.15.57 PM](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2vs020gazym4b46n28am.png)
 
## Some extra
 
Use the promotion code `SCRAPER2021` on [profile page](https://app.outscraper.com/profile) to receive a 10% discount.
What was your win this week?
Tags: discuss, weeklyretro
Published: 2021-03-19 17:57:04

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Happy Friday!


**Looking back on your week — what was something you're proud of?**

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Landing a new job
- Playing an instrument ... or whatever else might spark joy ❤️ 

---

Happy Friday!

![Spongebob excited in band uniform](https://media.giphy.com/media/oJGqcAvg5stm8/giphy.gif)
Docker: Running Linux Container with a Non-Root user
Tags: docker, container, devops
Published: 2021-03-19 17:50:10


> Common way of Running Container 


```
arun@controller:~$ sudo docker run -it ubuntu bash 
Unable to find image 'ubuntu:latest' locally
latest: Pulling from library/ubuntu
83ee3a23efb7: Already exists 
db98fc6f11f0: Already exists 
f611acd52c6c: Already exists 
Digest: sha256:703218c0465075f4425e58fac086e09e1de5c340b12976ab9eb8ad26615c3715
Status: Downloaded newer image for ubuntu:latest
root@27e9f62a1021:/# 
root@27e9f62a1021:/# whoami 
root
root@27e9f62a1021:/# 

```


> You can pass user-id and group-id as a argument to run a container with different user


```
arun@controller:~$ sudo docker run --rm -it -u $(id -u ${USER}):$(id -g ${USER}) ubuntu bash 
groups: cannot find name for group ID 1000
I have no name!@186e2848baf1:/$ whoami
whoami: cannot find name for user ID 1000
I have no name!@186e2848baf1:/$ id
uid=1000 gid=1000 groups=1000
```
COVID-19 tracker with HTML, CSS and JAVASCRIPT || Implementing free api
Tags: html, css, codenewbie, javascript
Published: 2021-03-19 17:40:39

COVID-19 tracker with HTML, CSS and JAVASCRIPT || Implementing free api

In this Post I have used free api to get the covid-19 data and show them with the help of HTML, CSS and JS. The free api provides the data of COVID-19 as per the country query.

I have used fetch in js to get the data from api. 
GOOD LUCK

Stay home stay safe   <img src="https://atheistiran.com/wp-content/uploads/2020/03/corona-virus.png" width="200px">

Get the full github code 
https://codepen.io/Bilal1909/pen/rNWEQmd

Demo 
https://codepen.io/Bilal1909/pen/rNWEQmd
Summarizing Namaste
🙏 JavaScript EP01 (Execution Context)
Tags: javascript, namastejavascript, executioncontext, help
Published: 2021-03-19 17:40:26

Thank you Akshay Saini for this beautiful series. Just summarizing your lessons for whenever I need a quick recap. Same for others. Hope it helps. 

## "Everything in Js happens inside an Execution Context"

### What is an execution context ??

We can say execution context is like a container in which whole Js runs.

Execution context consists of two parts:
#####1->Memory or Variable environment
#####2->Code or Thread of execution

### Js is not possible without execution context.

![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1sbe0el0r7g22clcrth.png)

In first part, all the variables and functions are stored here as key value pair. When I say functions it means whole function code is assigned as a value.

In second part, all the Js code is executed line by line.

###Js is a synchronous single threaded language.

To understand this, single thread means Js can execute one command at a time.
So, synchronous single threaded means it will execute code one at a time and cannot move forward(next line of code) without finishing previous one.
Day 32
Tags: 100daysofcode
Published: 2021-03-19 17:39:12

Day 32/100 of #100DaysOfCode

codewars | Asynchronous JavaScript - callbacks, promises and async-await

Hours coded: 1.5
Lines of code: 77
Keystrokes: 1150

via @software_hq's #vscode extension https://www.software.com/100-days-of-code
Buenas prácticas al escribir código #2
Tags: buenaspracticas, desarrollo, codigolegible
Published: 2021-03-19 17:35:31

Puedes revisar la primera parte de [Buenas Practicas](https://dev.to/veronicaguamann/buenas-practicas-al-escribir-codigo-1-2-consejos-4e5m) por si aún no lo haz leído, ahí te menciono consejos acerca de como puedes escribir correctamente los nombres y comentarios independientemente del lenguaje de programación.

En esta oportunidad te voy a mostrar dos tips más. y es acerca de:
**#1. El Lenguaje**
Pero no hablo del lenguaje de programación, sino del lenguaje o idioma en el que deberíamos programar.

Todos sabemos que el Ingles es uno de los idiomas más utilizados, y la mayoría de información en cuanto a programación, está en este idioma, tutoriales, documentación, actualizaciones, sintaxis, palabras reservadas para escribir código, en fin.

Por eso **es super importante aprender este lenguaje o por lo menos las bases para poder escribirlo**, independientemente de nuestro idioma ya sea español, portugués, italiano etc. siempre vamos a encontrar el código escrito en **INGLES**.

Entonces una buena práctica es escribir los nombres, de métodos, variables, clases, interfaces, etc.. etc.. etc.. **todo debe ser en ingles**, si aún no lo haces, te invito a que inicies, te iras dando cuenta en el campo laboral que es así como se maneja.

El siguiente punto es:
**#2. Simplifica y reutiliza el código**
Con esto quiero decir que **no siempre debemos tener todo el código en una clase o en un solo método**.

Con esto vas a generar código poco mantenible, porque si tienes que cambiar una cosa debes buscar que, en donde esta, y cambiar todo a lo que afecta este cambios.

Una buena práctica es **encapsular métodos, y llamarlos en donde se los necesite**. podemos inclusive crear una nueva clase para guardar métodos que vamos a utilizar en varias partes del código. 

Eso nos ahorrara muchas líneas de código y nos permitirá hacerlo escalable y mantenible.

Si sabes más técnicas que nos ayude a tener un código limpio, coméntalo para que los demás aprendamos y para profundizar del tema en otro post.

#Conclusión

Aprende Ingles y escribe todo tu código en este idioma, y reduce tu código encapsulando métodos que uses muchas veces, y has el código entendible y fácil de mantener.

Nos vemos en [Twitter](https://twitter.com/veronicaguamann) e [Instagram](https://www.instagram.com/veronicaguamann/) ;)
Implementing custom `isFalsy()`
Tags: javascript, webdev, codenewbie, beginners
Published: 2021-03-19 17:15:11

```js
const isFalsy = (value) => {
  const isUndefined = value === undefined;
  const isNull = value === null;
  const isEmptyString = typeof value === "string" && !value.trim();
  const isEmptyArray =
    typeof value === "object" && Array.isArray(value) && 
        value.length === 0;
  const isEmptyObject =
    typeof value === "object" &&
    !Array.isArray(value) &&
    Object.keys(value).length === 0;

  return (
    isUndefined || isNull || isEmptyString || 
    isEmptyArray || isEmptyObject
  );
};
```
---

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Twitter](https://twitter.com/codedrops_tech) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript  
**[codedrops.tech](https://www.codedrops.tech/)**
Scroll Image From Top To Bottom
Tags: css, javascript, 100daysofcode, html
Published: 2021-03-19 16:53:37

the day 89 of challenge #100DaysOfCode

Scroll Image From Top To Bottom Using HTML5 & CSS3

Demo : https://scroll-image.netlify.app/

Code : https://github.com/saidMounaim/100DaysOfCode/tree/main/Day89
New Switch-Case Logic in Python
Tags: python, news, programming, datascience
Published: 2021-03-19 16:51:17

{% youtube 2qJavL-VX9Y %}

Python 3.10 is beginning to fill-out with plenty of fascinating new features. One of those, in particular, caught my attention - structural pattern matching - or as most of us will know it, switch/case statements.

Switch-statements have been absent from Python despite being a common feature of most languages.

Back in 2006, PEP 3103 was raised, recommending the implementation of a switch-case statement. However, after a poll at PyCon 2007 received no support for the feature, the Python devs dropped it.

Fast-forward to 2020, and Guido van Rossum, the creator of Python, committed the first documentation showing the new switch-statements, which have been named Structural Pattern Matching, as found in PEP 634.

Let's take a look at how this new logic works.