teleren/devto huggingface dataset:
🤬 What's your opinion on Linters, Prettiers, and Testers?
Tags: javascript, webdev, discuss, productivity
Published: 2021-12-30 21:36:37

I’ve been working on a project recently and a bunch of people suggested that I should start using a testing system. This testing system was working for a while but then someone else suggested that I should start using a linter. The linter ended up breaking all of my testing code, and before long I had spend nearly three hours getting them working together. 

[Here was the project if you want to check it out](https://github.com/fairfield-programming/backend-server/)

After that, I was told that the code was inconsistently formatted, so I needed to add a prettier system. All of my engineers are now telling me that they have lost countless man-hours battling against this new integration system.

So, I’m getting rid of it. My entire linter system, code grading, beautifier, etc. is gone. And, I’m replacing it with [my own solution](https://github.com/fairfield-programming/eaf-linter/)- if you want something done right, you have to do it yourself. 

**I want to hear what struggles you have had with your “systems to boost efficiency”, or if you think I am completely wrong and should shut up.**
Let's Understand Some OOP ( Object Oriented Programming ) terms easily.
Tags: oop, programming, beginners, letsunderstand
Published: 2021-12-30 21:35:54

> I Always Hated some unable to understand rocket scientific level words in Object Oriented Programming for a Beginners.

> So Because of that I Created a list of Some Simple Words Suitable for that Object Oriented Programming terms.

---

### Inheritance :-

**Cloning** -> Process of Cloning Item From One Object's Class to Another Class. Also Ability to modify some things without damaging already using original class.

---

### Multiple Inheritance :-

**Cloning from additional** -> Process of Cloning The data from Two or More Objects Simultaneously.

---

### Polymorphism :-

**Making Portable** -> Process of adding a way to use Some Functions / Methods of One Object or Class to another. make it portable to use like function named paintingTheVehicle() to other objects like Car, Truck, Motorcycle, Hot Wheels and some other things.

---

### Abstraction :-

**Hinding Internal Details From End User** -> Process of Hiding Data from Actual Customer or End User of Software like Net Banking Software and User Don't need to know how the bank works to net banking.

---

### Encapsulation :-

**Hiding Internal Details From Other Programmers or similar** -> In Software Industry Some Developer Creates Some projects which can be used by multiple other software developers like projects of `pip` in `python`, `npm` in `nodejs` and `gem` in `ruby`. for security and universal usability of that part we use encapsulation. Process of Hinding AKA Securing The data from other programmers and delivering our software or class or object as package to other things. For Example In Banking Software A Bank employee don't need to know the customer's plain password at all even if both are user of same software but at different level.

---

### Base Class :-

**Parent Class** -> Used as Parent Class In `Inheritance` and Multiple Parents in `Multiple Inheritance`.

---

### Derived Class :-

**Child Class** -> Used as resulting class With help of Parent Class AKA Base Class or Classes.

> This Blogpost Cover Photo Was Created / Designed by [Markus Spiske](https://www.pexels.com/@markusspiske) from [Pexels](https://www.pexels.com/)

***

## Conclusion

If you found this useful then please share this and follow me! Also check out Buy Me A Coffee if you want to support me on a new level!

[![Buy me a coffee](https://cdn.buymeacoffee.com/buttons/default-yellow.png)](https://www.buymeacoffee.com/shriekdj)

> Don't Hesitate to leave some comments for further understanding like some more terms. bye bye 👋
tailwind css |text size|font familly|letter spacing|font style|font weight|line height|text align
Tags: tailwindcss, tutorial, webdev, beginners
Published: 2021-12-30 21:27:43

tailwind css |text size|font familly|letter spacing|font style|font weight|line height|text align
https://youtu.be/l0fRM6MLw24
If you liked our content help us by subscribing on the channel and leaving a nice comment
100 Days Of Learning - Day 1
Tags: 100daysofcode, 100daysofx, codenewbie, freecodecamp
Published: 2021-12-30 21:23:45

---
series: 100 Days of Learning
---

Hello everyone, welcome to my #100DaysOfLearning challenge.

## My learning goals today are:

- Complete section 24 "Introducing the World of the DOM" in Colt Steele's [Web Developer Bootcamp](https://www.udemy.com/course/the-web-developer-bootcamp/) course
- Review FCC frontend projects and start one

## What I completed:
- Section 24 from the Colt Steele course, with all exercises saved in Codepen [here](https://codepen.io/collection/KpkzMJ?sort_by=item_created_at)
- Started Section 25 in the same course - DOM events! (I'm very excited to start this)


## What I learned:
Today I reviewed DOM methods including:
- element.getAttribute()
- element.setAttribute(attr, value)
- document.createElement(element)
- element.append()
- Node.appendChild()


## My goals for next time:
I want to try to be more descriptive in what I'm learning, and also try to practice more on my own beyond the exercises in the course. I'm enjoying copying the exercises into Codepen and trying them there, and I've been including some of my notes as comments on the exercises, but it would be worth exploring those ideas further.

Next time I plan to continue the section on Events and actually look over the FreeCodeCamp frontend projects.

-----
Photo by <a href="https://unsplash.com/@heykellybrito?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">J. Kelly Brito</a> on <a href="https://unsplash.com/collections/xj3Y8-lHOXo/dev-blogs?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Node.JS CRUD operation
Published: 2021-12-30 20:23:50

Node.JS is an open-source server environment. It is based on JavaScript. As JavaScript is a single-threaded language and so the node is also a single-threaded JavaScript runtime. Because of JavaScript's asynchronous behavior, it gives us a feel of the multithreaded language. Node is extremely fast. And it helps us to create dynamically populated web pages and to communicate with another server even with databases and can also make changes if needed.

It’s extremely, fast scalable, and its non-blocking behavior makes it extremely popular. Its non-blocking behavior helps it to achieve efficiency in handling a data-heavy workload request and serving it properly.

Today I’m gonna talk about CRUD operation. If you are familiar with Node.js then you have already known that what CRUD operation is.
C - create
R - read
U - update
D - delete

With this 4 combination, it is called CRUD operation. 
Create: By this method, you can basically write on the database. You can get any data from the front-end and update those on the database by this create operation.

Read: By this method, you can basically read data from the database and deliver them on the front-end so that we can use them in our front-end application.

Update: By this method, we can basically update any document on the database.

Delete: If we need to delete anything from the database then we can simply do that thing easily with this delete method.
An Event Driven ETL Process: Use Step Functions, AWS Glue and Lambda to Orchestrate an ETL Process
Tags: aws, devops, python, acloudguru
Published: 2021-12-30 21:20:13

This post is my solution walkthrough for the Acloud Guru challenge to build an event driven ETL process. The challenge details can be found [Here](https://acloudguru.com/blog/engineering/cloudguruchallenge-python-aws-etl). I really like going through and solving these challenges since these give me a scope to learn so many things which are involved in completing the challenge. In this post I will describe my approach to the challenge and walk through step by step about deploying the solution. Hopefully this will help others get some pointers for the challenge and learn few things.  

More details can be found here: https://amlanscloud.com/etlpython/
#1 - Points of reflection (8 kyu) Codewars Kata
Tags: javascript, tutorial, 100daysofcode, beginners
Published: 2021-12-30 21:18:59

##  #1 - Points of reflection (8 kyu)

**Instructions:**
"Point reflection" or "point symmetry" is a basic concept in geometry where a given point, P, at a given position relative to a mid-point, Q has a corresponding point, P1, which is the same distance from Q but in the opposite direction.

Task
Given two points P and Q, output the symmetric point of point P about Q. Each argument is a two-element array of integers representing the point's X and Y coordinates. Output should be in the same format, giving the X and Y coordinates of point P1. You do not have to validate the input.


**My notes:**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/81if59dbm9yldwfykkz1.jpeg)


**My solution:**

```javascript
function symmetricPoint(p, q) {
  return [2*q[0]-p[0], 2*q[1]-p[1] ]
}
```

**Explanation**
I found the formula for getting the P1 coordinate, the formula is P1(2Qx - Px, 2Qy - Py), then I just passed this formula with the array index positions and returned the result as an array

[My Github](https://github.com/Cesardlr)
[My twitter](https://twitter.com/cesar__dlr)
[Solve this Kata](https://www.codewars.com/kata/57bfea4cb19505912900012c)
Debouncing in Javascript using a custom function or Lodash library.
Tags: javascript, debounce
Published: 2021-12-30 21:06:05

**What A Debounce function is**

Wait, you are a Javascript developer trying  to implement a function to only fire after an interval from when a certain action or event is triggered and you have tried and still not gotten it the right way.

Worry no more as I would put together two ways of doing this the right way without you getting to crack your head so hard and that is what a debounce function solves.

**1.) Debouncing using a custom JS function**

```js
const debounceTime = (fn, T)=>
{
let timer;
  return function() {
    if(timer) clearTimeout(timer)
    timer=setTimeout(fn, T)
  }
}
```

This function takes in two parameters,   a function, `fn()` to be debounced and the time interval, `T` to wait for the action to run.

Example, we want a callback function that would be called after 1000 Milliseconds or 1 seconds, we would just call the debounceTime function with parameters of the callback function and 1000 Milliseconds.
The function would log "I debounced after 1 seconds" just after 1 second in the console.

```js
debounceTime(()=>{
console.log("I debounced after 1 seconds")
}, 1000)
```


**2.) Debouncing using a Lodash**
For you to be able use the lodash package on your Node.js Environment,
you have to first install the lodash package using `$ npm i --save lodash` for npm or `$ yarn add lodash` for yarn through your command line interface, 
after that, you import it into your the file you want to apply it.
import {debounce} from "lodash"

```js
debounce(()=>{
console.log("I debounced after 1 seconds")
}, 1000)
```

The above use case would work exactly as the example using the custom JS function

I hope it helped 😀 😀 😀
Thanks for reading and Happy coding!!!
Learning about OOP in JavaScript
Tags: javascript, launchschool
Published: 2021-12-30 20:44:25

---
title: Learning about OOP in JavaScript
published: true
description: In which I sort through the OOP options...
tags: JavaScript,LaunchSchool
cover_image: https://upload.wikimedia.org/wikipedia/commons/d/d6/Timeless_Books.jpg
series: LaunchSchool-JS-120
---
## In which I make a resolution to blog
I am one class into my [LaunchSchool](www.launchschool.com) experience, and so far it living up to my expectations.  Coming from a 'jack-of-all-trades-one-person-IT-department' at my small school, LaunchSchool seems to be offering some much needed polish to my technical background.

## JS-120 - Or How I Learned To Stop Worrying and Love OOP
Consider learning about OOP in JavaScript - definitely some ideas that I'm used to, but also some new twists.  Props to LaunchSchool's mastery method - if I had a hazy understanding of object references then prototypes would be straight out.

So for today, a brief summary of the OOP patterns (did I mention I'm an amateur - if you are reading this for information...maybe go elsewhere)
1. Constructor functions
1. OLOO - (objects linking other objects)
1. ES6 classes

### Constructor functions
```JavaScript
function Car() {
  //code
}

let myCar = new Car();
```
Things to note:
* the `new` keyword is crucial - our constructor function won't actually return anything, but invoking with `new` causes the creation of a new object (and it is set as the execution context - i.e. `this` within the constructor), and the implicit return of the new object - also `Car.prototype` is assigned to the `[[Prototype]]` property of our new object.

### OLOO - Objects Linked to Other Objects
```JavaScript
let CarPrototype = {
  init(params){
     return this;
   }

  drive(){
  }
}

let car1 = Object.create(CarPrototype).init(args);
```
Here we make a prototype object and use `Object.create()` to set up the prototypal relationship - the conventional `init` method is used to set initial properties easily.  Notice how `init` returns `this` - absolutely necessary for method chaining to work.

### ES6 classes
```JavaScript
class Car {
  constructor(params){

  }

  drive() {

  }
}
let myCar = new Car(args);
```
Coming from my dabbling in Java and Python, this is the pattern I am naturally drawn to.  Note the `constructor` method - invoked with the use of `new`, and will be important when subclassing.

### Remaining questions I have, in no particular order
1. Is one pattern generally used?
1. What are the gotcha's for each method - (for instance, subclassing with constructor functions seems to have some quirks)?
Free mock interviews with an ex-FB engineer for anyone with an Oculus Quest 2
Tags: programming, interview, career
Published: 2021-12-30 20:21:29


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/acjpbxip25xkhrpvqeei.png)

Hey everyone,
I'm looking for anyone who wants a free mock interview session in VR. The only requirement is that you have an Oculus Quest 2!

After the interview, I'll provide you with detailed feedback about what went well and what didn't.

If you are interested, join the [discord](https://discord.gg/M8944Xz26m) and message `dan#9955`

### A little about me:

I worked at FB for 4 years and now I run the interview prep community [Hackpack](https://hackpack.io/).
Creating a Selenium grid with Docker Compose and run python tests.
Tags: docker, selenium, sdet, python
Published: 2021-12-30 20:19:38

We are going to use docker compose for creating a Selenium grid and run some basic python tests against the grid.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xjx26qu5ksgjg0whzfd7.png)

As always the files can be found on [GitHub ](https://github.com/delrayo/DockerComposeSeleniumGrid).


1. Download the repo, 
2. Open a terminal in the repo folder
3. Execute "docker-compose up -d".

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lwe88vsj07ys1jrpwaft.png)
 
That will spin up the grid, when docker finish preparing your grid you should go to http://localhost:4444/grid/console  just to verify that everything is ok.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jr8q4z549wkslu63q43i.png)
 

And then just run a simple test against this grid. 
For doing this you should create a new selenium driver pointing to the grid, if you are using python is something like this for chrome : 

```
driver = webdriver.Remote(
   command_executor="http://127.0.0.1:4444/wd/hub",
   desired_capabilities={
            "browserName": "chrome",
        })

driver1 = webdriver.Remote(
   command_executor="http://127.0.0.1:4444/wd/hub",
   desired_capabilities={
            "browserName": "chrome",
        })

driver2 = webdriver.Remote(
   command_executor="http://127.0.0.1:4444/wd/hub",
   desired_capabilities={
            "browserName": "chrome",
        })
```

You can find a test example file in https://github.com/delrayo/DockerComposeSeleniumGrid/blob/main/test.py


Hope this helps you on your testing.
1 package to solve all your frontend web3 problems
Tags: javascript, react, npm, startup
Published: 2021-12-30 20:16:19

When you think about Web3.0 what first comes into your mind?

Bitcoin, metaverse, nft, insane amount of money and Elon Musk. These are the things a regular person can think of, but what about tech geeks and programmers. The obvious thing that come into their mind is the battle between thousands of lines of code, handling blockchain node, interacting with its data which is humongous and trying to connect user's wallet to his website.

Solving few problems at a time, [web3-react-wallet](https://www.npmjs.com/package/web3-react-wallet) is doing its best to let us win this weird battle by providing a single source of truth (SSOT) where all the frontend web3 problems went down to this blackhole and we get a purified library that provides `multiple wallet support`, `switching user's wallet chain`, `typescript` and more.

I know you already start installing the package from npm but don't forget to visit the source code on GitHub to learn more:
https://github.com/MusabShakeel576/web3-react-wallet
CryptoPals Crypto Challenges Using Rust: Fixed XOR
Tags: programming, rust, cryptography
Published: 2021-12-30 19:29:37

This is [Challenge 2](https://cryptopals.com/sets/1/challenges/2) of [Cryptopals](https://cryptopals.com) challenges implemented in Rust language.

## Context
Given two hex encoded strings of similar length we have to return xor of it.
[XOR (or, Exclusive OR)](https://en.wikipedia.org/wiki/Exclusive_or) is a binary operation (like AND, OR) on bits. XOR gives true/1 as when the two inputs differ, otherwise false/0:

```
|  A  |  B  |XOR(A^B)|
|-----|-----|--------|
|  0  |  0  |    0   |
|  0  |  1  |    1   |
|  1  |  0  |    1   |
|  1  |  1  |    0   |
```

So, theoretically you can convert hex to binary and xor them to get output, like:

```
10110011 ^ 01101011 = 11011000
```

To solve the challenge with Rust, we can make use of `hex` crate to decode hex strings to bytes vec, zip the two vecs, then perform xor byte by byte to get XORed bytes. And finally encode xored bytes to hex:

```rust
use hex::{decode, encode};

pub fn fixed_xor(hex1: &str, hex2: &str) -> String {
    let bytes1 = decode(hex1).unwrap();
    let bytes2 = decode(hex2).unwrap();

    let xor_bytes: Vec<u8> = bytes1
        .iter()
        .zip(bytes2.iter())
        .map(|(&b1, &b2)| b1 ^ b2)
        .collect();
    encode(xor_bytes)
}
```

And we're done.


See the code on [Github](https://github.com/theNvN/cryptopals-crypto-challenges/blob/master/src/set_1_basics/c2_fixed_xor.rs).

Find me on:
Twitter - [@heyNvN](https://twitter.com/heyNvN)

[naveeen.com](https://naveeen.com)
Creating a GUI/Basic Window with TKINTER(Python)
Tags: tkinter, python, code
Published: 2021-12-30 20:00:24

Installing Tkinter

First, make sure that you have python installed, we recommend installing python 3.9+. Also make sure to install a text editor or a IDE, almost every operating system comes with a text editor, windows comes with notepad. You can also download popular IDE's like Visual Studio Code, Pycharm, Sublime Text.



After that, make sure you have installed tkinter. tkinter is automatically installed once you have installed python. But you can check to confirm you have it installed, there are two ways that you can do this, the first method is that you simply open cmd on windows, terminal on mac, and if you are on linux, you probably know how to open the terminal. After you have done that, type this following command:



pip3 install tkinter



If this command returns you with something like requirement already satisfied, then you have it installed if it gives you an error that pip3 is not a command than try typing this in to the terminal:



pip install tkinter



This should give you the same result as pip3, if this gives you the same error, than that means you have not installed pip, there is no need to install pip again just for the sake of this tutorial.



The second method to verify if tkinter is installed is to simply open a file and type:



from tkinter import *



If this does not show any error, that means that it is installed, if it does show a error, make sure to install it through pip or any other means.



 Creating the window

To create the basic window, first type this command:



from tkinter import *



this will import the tkinter module.



then, after that type this command:



root = Tk()



This is important, as if you do not do this then, well, the whole code will not work



after that, type this command:



root.mainloop()



The end code should look like this:



from tkinter import *



root = Tk()



root.mainloop()



Make sure to put all the code inside the 'root = Tk()' and 'root.mainloop()'.



Now lets edit some more details.



Below root = Tk(), put this code:



root.geometry('400x400')



This is telling tkinter the size of the window, you can change this to whatever you want!



Then type this:



root.title('This is a windows')



This is teling tkinter what the name of the window should be.



the end result should look like this



from tkinter import *



root = Tk()

root.geometry('400x400')

root.title('This is a window')



root.mainloop()



and there you go! that is how to create a basic window in tkinter, hope this tutorial helped!
Dec 30: Dev Holidays Guide ⛄️
Tags: stateofdevs, bahhumbugtip, mentalhealth, tips
Published: 2021-12-30 19:20:15

Bah Humbug Tips are my own way of coping & recovering from burnout & holiday stress.

###🎄  Today's Bah Humbug Tip of the Day. 
{% twitter 1476606517134577685 %}

######🎁 Today's Options 
{% twitter 1476606522536841223 %}

You can find more tips here & on [Twitter](https://twitter.com/stateofdevs). Let me know in the comments if any of these tips helps.

> If you're struggling w/ burnout & open to sharing your story, please [take the State Of Devs survey](https://stateofdevs.com/helps/dev). 🗳 Thanks!