teleren/devto huggingface dataset:
Currying in javascript!!
Tags: javascript, react, beginners, webdev
Published: 2021-08-20 16:47:39

### What is currying ?

Currying is an advanced technique of working with functions. It is a transformation of functions that translates a function from callable as f(x, y, x) into callable as f(x)(y)(z).

Example : 
```javascript
//Normal function
function add(x, y){
  return x + y
}

add(1, 2) //3

//Curried function
function add(x){
  return function(y){
    return x + y
  }
}

add(1)(2) //3
```

### Why currying
With currying we can break function in to pieces and can reuse those pieces.

"Breaking function in to pieces and reusing" does it sounds crazy ? 🤔

Here is an basic example : 
```javascript
function add(x){
  return function(y){
    return x + y
  }
}

const addTen = add(10)

addTen(5) //15
addTen(90) //100
```

Now lets see simple real world example

```javascript
function logger(type){
  
    function createLogRequest(endPoint){
      return function(data){
        return fetch(`<DOMAIN>/${endPoint}`, {
          method: 'POST',
          body: data
        })
    }
  }

  
  const sendLogs = createLogRequest(type)
  const showLogs = console[type] || console.log
  
  const transformData = (data) => `${new Date()} : ${JSON.stringify(data)}`
  
  return function(logData){
    const data = transformData(logData)
    sendLogs(data)
    showLogs(data)
  }
}

const infoLog = logger('info')
const errorLog = logger('error')
const warningLog = logger('warning')

infoLog("Some Info....")  //Calls /info api and shows info with date
errorLog("Some Error....") //Calls /error api and shows error with date
warningLog("Some Warning....") //Calls /waningr api and shows warning with date
```

#### Function memorisation will be easy
```javascript
const add = a => {
  const memo = {}
  return b => {
     return c => {
       const storedResult = memo[`${a}+${b}+${c}`]
       if(storedResult) return storedResult
       console.log('evaluating')
       const result = a + b + c
       memo[`${a}+${b}+${c}`] = result
       return result
     } 
  }
}

const addOne = add(1)
const addThree = addOne(2)
addThree(5)
addThree(5)
addThree(6)
```


### Can we convert normal function to curry function 🤔 ?
Yes of-course with the following code we can use function in both curry and normal way.

Here is an example for that
```javascript
function curry(func) {
  function curried(...args) {
    if (args.length >= func.length) {
      return func.apply(this, args);
    } else {
        return function(...args2) {
          return curried.call(this, ...args,...args2);
      }
    }
  };
  return curried.bind(this);
}


const add = (a,b,c) => a + b + c

const curriedAdd = curry(add)

//curried
curriedAdd(1)(2)(3) //6

//normal
curriedAdd(1,2,3) //6

//curried + normal
curriedAdd(1,2)(3) //6

```

Hope you learned something new and interesting 🤨 

Thank you!!!
CodeCast | About Us
Published: 2021-08-20 16:45:28

{% youtube eqehwwFnSoM %}



Made by developers, for developers, CodeCast is creating a space for developers to learn, engage and live interactively. 

Our software allows you to learn and teach code while others are able to directly interact with it as its being written.
CodeCast is free to use! Check us out today at codecast.io.
BLOGS
Making Your First Cast: https://info.codecast.io/blog/how-to-...
Using The Player: https://info.codecast.io/blog/how-to-...
Twitter: https://twitter.com/CodeCastApp
Instagram: https://www.instagram.com/codecastapp/
CodeCast | How To Use The Studio
Published: 2021-08-20 16:43:54

{% youtube dzlKc6rr0LU %}



Follow along with us casting from our studio.

VIDEO LINKS
To Download the Studio: https://info.codecast.io/download
Link to Cast Created in Video: https://www.codecast.io/casts/6OeLwzB...

A BIT ABOUT US
Welcome to CodeCast.

CodeCast is a Vancouver-based tech startup. We strive to bring forward a community and platform that makes use of our software. Easily copy and share your code in a way never before seen!

CodeCast is free to use! Check us out today at codecast.io.

BLOGS
Making Your First Cast: https://info.codecast.io/blog/how-to-...
Using The Player: https://info.codecast.io/blog/how-to-...

Twitter: https://twitter.com/CodeCastApp
Instagram: https://www.instagram.com/codecastapp/
CodeCast | Introduction to CodeCast
Published: 2021-08-20 16:41:56


{% youtube dzlKc6rr0LU %}





Welcome to CodeCast.

CodeCast is a Vancouver-based tech startup. We strive to bring forward a community and platform that makes use of our software. Easily copy and share your code in a way never before seen!

CodeCast is free to use! Check us out today at codecast.io.

BLOGS
Making Your First Cast: https://info.codecast.io/blog/how-to-...
Using The Player: https://info.codecast.io/blog/how-to-...

Twitter: https://twitter.com/CodeCastApp
Instagram: https://www.instagram.com/codecastapp/

￼
twitter.com
CodeCast (@CodeCastApp) | Twitter
The latest Tweets from CodeCast (@CodeCastApp). Made by developers for developers, CodeCast allows you to live stream & share your projects with your viewers in real-time. Code interactively with #Codecast. Canada
What makes a 10x engineer?
Tags: discuss, healthydebate, 10x, career
Published: 2021-08-20 16:38:01

---
title: What makes a 10x engineer?
published: true
description: I'm curious what you think makes a truly valuable team member.
tags: discuss, healthydebate, 10x, career
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ur5agy1nu1lk4210i8bf.jpeg
---

*Cover image by Cbaile19, CC0, via Wikimedia Commons*

I know the fashionable take is that [there's no such thing as a 10x engineer.](https://www.quora.com/Is-there-any-actual-evidence-that-10X-engineers-exist) And I'll agree that the idea from very early in the history of the software industry, the idea that one developer could literally do the coding work of ten of her colleagues, was probably never true and certainly isn't true now. 

Can you code ten times better than someone else? Yes, a baby. You can code ten times better than a newborn baby. Congratulations.

But I do think there's such a thing as a 10x engineer because I believe there are people who *make their team ten times better*.

Be it through mentorship, documentation, or making sure everyone starts standups on time, I'm curious what you think makes a truly valuable team member.

So what *does* make a 10x engineer?
Javascript AWS SDK v3 S3 guide
Tags: aws, javascript
Published: 2021-08-20 16:35:44

That is way too many acronyms in the title, yet they almost seem necessary. I promise I'm not trying to out-SEO you.

With the new `v3` update to the Javascript AWS-SDK, you can use the sdk quite a bit differently. You don't have to, but the new way can reduce the amount of code you import at runtime, and thus _can_ be "more performant." At the moment of writing this article, there aren't a lot of docs on it either. So this article is just as much for me as is it for you!

The major difference is that you now import/require a very bare "client", and send your commands through that client. 

```js
// The "old" way
const { S3 } = require('awk-sdk')
const s3 = new S3(s3Config)
const object = await s3.getObject(objConfig).promise()
```

```js
// The "new" way
const { S3Client, GetObjectCommand } = require('@aws-sdk/client-s3')
const s3Client = new S3Client(s3Config)
const object = await s3Client.send(new GetObjectCommand(objConfig))
```

So, some things to point out:

- Note that you can install only the client you need, not the whole AWS SDK library. In this case, you only have to `npm install @aws-sdk/client-s3`. This reduces the space on disk and the install time :thumbsup:
- You only need to import/require the exact functions you need from the client, e.g. `GetObjectCommand`. This reduces the amount of code you need at runtime :thumbsup:
- You send the command you want through the client, and a promise is returned by default instead of needing to call `.promise()` :thumbsup:

Here's the [v3 documentation homepage](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/) if you want to explore it as well. I wouldn't say it's _bad_, per se, but I wouldn't say it's good either. It does seem extensive though.
Pin Match JS
Tags: 100daysofcode, javascript, beginners, webdev
Published: 2021-08-20 16:29:06

#100daysofcode [ day -10 ]
Today I did a pin match. You can create a pin and if it matches, it will show you success otherwise it will show you an error.

live Site: https://100daysofcode-day10-alsiam.netlify.app/
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1cbr9yso3dxoqx8dl1ic.png)
#DEVCommunity #bootstrap  #webdevelopment
Portfolio Website Design with HTML & JavaScript
Tags: webdev, html, javascript, css
Published: 2021-08-20 16:25:32

![Portfolio Landing Page by Code Savvy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ob603gt1toly2thm2kfv.png)

Hello Dear Developers, In this post we'll create a Portfolio Page design using HTML, CSS & Some of the Powerful JavaScript Animations from GSAP Library.

Please Watch Below **Full Video Tutorial**

{% youtube uNPola_h_Oo %}

If you want to skip the tutorial and want to grab the **source code**, follow below given **Repo link** : 
[Repository Link](https://github.com/ananikets18/Portfolio-Landing-Page-Design-HTML-CSS-Javascript-GSAP)

#### ⏱ Outline
* 0:00 - Intro
* 0:34 - Structure
* 4:21 - Setting CSS
* 4:48 - Wrapper
* 5:05 - Left Menu
* 5:20 - Logo
* 6:04 - Social Icons
* 7:34 - Nav
* 8:58 - Large Text
* 9:36 - Red Box
* 10:27 - See Photos
* 11:01 - Desc Content
* 13:08 - Slide
* 13:30 - Overlay
* 14:26 - Navbar Links JS
* 15:11 - TweenMax (GSAP) Animations

👍 Thanks for watching!

Happy Coding :)
What is HTML - HyperText Markup Language?
Tags: html, codenewbie, beginners, webdev
Published: 2021-08-20 16:01:44

![coding varsity cover image](https://www.codingvarsity.com/_next/image?url=%2Fimages%2Fcover-image.png&w=640&q=75)

HTML stands for **Hypertext Markup Language**. The browser uses it to structure content on a web page. HTML also describes the basic layout of a web page. 

## What is HyperText?
**HyperTexts** are texts that link a page to another page on the same website or another site. By default, links are underlined and have blue text color. 

[I am a HyperText](#)

## HTML is a Markup Language 
HTML is not a programming language but a markup language. HTML uses tags as markup to annotate different types of content in a web page. For example, HTML has the `<img>` tag for an image, and for a paragraph, it has a `<p>` tag. 

```html
<p> I am a paragraph</p>
<img src="/media/codingvarsity-logo.jpg" alt="coding varsity logo" />
```
## HTML Tags
HTML Tags give special meaning (semantics) to the text they enclose. 

```html
<h1>
  I am the most significant heading
</h1>

<p>
  I am a paragraph
</p>

<html>
  I contain whole HTML Document 
</html>
```

> All HTML Tags are case insensitive. You can write them as you like `<TITLE>` or `<title>` or even `<Title>`. All versions are correct. 


## HTML Document
Let’s go through a simple HTML document and learn about few tags that we can use to create a web page. 

```html
<!DOCTYPE html>
<html>
  <head>
    <title>I am a title</title>
  </head>
  <body>
    <h1>I am a heading</h1>
    <p>I am a paragraph</p>
    <img src=”/media/codingvarsity.jpg” alt=”codingvarsity logo”/>
  </body>
</html>
```

### `<!DOCTYPE html>`
`<!DOCTYPE html>` is the required preamble in all HTML documents. Its purpose is to tell the browser to render the document in the latest version of HTML.

### `<html>`
`<html>` tag is the container for all HTML elements and is the root of an HTML document. 

### `<head>` 
`<head>` tag contains meta-information about the web page. These pieces of information are not displayed on the screen but are used by the browsers and search engines to understand the content of the document. 

### `<title>`
`<title>` tag is used to add the title of the document. 

### `<body>`
`<body>` tag contains the main content of the document and is displayed in the browser window. 

### `<h1>`
`<h1>` tag is used to add the most significant heading in the document. A web page should contain only one `<h1>` tag. 
 
### `<p>`
`<p>` tag is used to add a paragraph in the document.

### `<img>`
`<img>` tag is used to embed an image in the document. 

We will learn about every tag in more detail in another article. 

## Summary
* HTML stands for HyperText Markup Language.
* Hypertexts are texts that one web page to another web page. 
* HTML tags give special meaning to the text they enclose. For example, to create a paragraph we use the `<p>` tag. 
* All HTML tags are case insensitive. 
* `<!DOCTYPE html>` is required in all HTML documents to instruct the browser to render the document in the latest version of HTML.
First time guest on a Podcast.
Tags: podcast, rails, ruby, beginners
Published: 2021-08-20 15:57:16

Hey everyone, 

I'm exited to start blogging again but in the meantime, I wanted to share a link to a podcast that I was a guest on recently. 
https://www.codewithjason.com/code-with-jason-podcast/episodes/103-from-junior-to-intermediate-with-aweys-ahmed-q0qcp5wc/

It was an honour to be a Guest on Jason Swett's podcast. In the episode we discussed how new developers can level up and some of the obstacles that new developers face. 

I hope you enjoy the podcast and I would checkout Jason's other podcasts and material as well. https://www.codewithjason.com
Improve your Github Profile
Tags: github, githunt, codenewbie, markdown
Published: 2021-08-20 15:52:39

Hello fams, this post is a response to a request made by a <mark>dev</mark> about how I beautified my GitHub landing page. For most developers, GitHub serves as a place where most devs spent a reasonable amount of their time. 

![image](https://media.giphy.com/media/eO3V8dApQNJ96/giphy.gif?cid=ecf05e476vvsuvzn5b73wuodswxdppfeztqb7ykxr50oozyx&rid=giphy.gif&ct=g)

## Prerequisites
🔗 Knowledge of markdown  

🎯 First, you need a GitHub account (of course 😁), SignUp, and create a repo.

![newrepo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7bb35qqjblq0f6vafa22.PNG)
 ---

 🎯 Ensure you name it your exact GitHub profile name. 
![naming](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6zwol44vo2sa5y6jshp.PNG)
 
🎯 Next, go to the `readme.md` and click on the pencil highlighted
![edit](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zefo4kymfvkll7jsijde.PNG)

---

🎯 Now the fun part, you need a Github readme generator.
 [Click here to generate readme by rahuldkjain](https://rahuldkjain.github.io/gh-profile-readme-generator/)

The Github readme page generator looks like this 👇🏼.
![genera'](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vcqsbglq5zztiqwad6b5.PNG)

Check the languages and the tools in your development and click <mark>Generate Readme </mark>
![gre](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2q9ekm02looj1bs3gkzf.PNG)

---

🎯 When done properly, you should have something like this👇🏼
![resul](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/et4qfq32fbggscrwqry4.PNG)
  
🎯 For the image part. Choose your desired image, use photoshop or canva to edit to taste. Then all you need to do is click from your image location and drag into the readme in edit mode.

## Here is my GitHub profile after following the steps
{% github drsimplegraffiti/drsimplegraffiti %}

[How to drag and drop in the readme](https://user-images.githubusercontent.com/70065792/130259041-5974f86e-602f-4ab3-8bfa-397c3a3d2160.mp4)

## Resources
[Read me generator](https://rahuldkjain.github.io/gh-profile-readme-generator/)
[Reference video by 
Khushboo Goel](https://www.youtube.com/watch?v=LooNWF67jrk&t=5s)

Thanks 🙌🏽 for reading
I18n and React, a simple and easy solution
Tags: i18n, typescript, package, frontend
Published: 2021-08-20 15:40:53

[![package](https://badge.fury.io/js/%40nexys%2Freact-i18n.svg)](https://www.npmjs.com/package/@nexys/react-i18n)


Internationalization can be a headache and is oftentimes heavy; both in terms of code size and overhead.

With this in mind, I wrote a very simple, lightweight package for react (7.1kB minified, no dependencies).

## Unconventional features:

### Backend independent

It can be linked to any backend. I assume here that the list of translations is stored somewhere on the internet (typically served from the backend). 

Once loaded, the list of translations is stored in the local storage so that the application can be reloaded quickly.

### Untranslated strings

I have always found it hard to know which strings were translated and which were not. With this package, we store all the untranslated strings in an array in the local storage, so that you can see at anytime all the missing strings - all you need to do is browse through the application. 


## Features

* `n` languages
* string interpolation
* typescript
* 0 dependencies
* Built with react in mind, but can be used with any JS framework.

## Get it!

* Github: https://github.com/nexys-system/react-i18n
* NPM:  [![package](https://badge.fury.io/js/%40nexys%2Freact-i18n.svg)](https://www.npmjs.com/package/@nexys/react-i18n)
Fibonacci Sequencer
Tags: python, fibonacci
Published: 2021-08-20 15:37:12

```python
# fibonacci_sequence.py
#   This program computes the nth Fibonacci number where n is a value input
#   by the user.
# by: Scott Gordon

def main():
print("***** Welcome to the Fibonacci Sequencer *****\n")

    n = int(input("Enter the value of n: "))
    curr, prev = 1, 1
    for i in range(n-2):
        curr, prev = curr+prev, curr

    print("The nth Fibonacci number is", curr)


if __name__ == '__main__':
    main()
```
Simple work with Git Fork
Tags: git, fork, github, bitbucket
Published: 2021-08-20 15:26:19

> "A fork is a copy of a repository that you manage. Forks let you make changes to a project without affecting the original repository."

[Link for github docs](https://docs.github.com/en/github/collaborating-with-pull-requests/working-with-forks/about-forks)

# On the start

We have 2 repos

- **original** `github/OWNER/original`
- **forked** `github/YOU/forked`


In forked repo we can check our settings

```bash
$ git remote -v
> origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
> origin  https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
```

On the next we need to add original repo as **upstream**

```bash
git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
```

Now we should see

```bash
$ git remote -v
> origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (fetch)
> origin    https://github.com/YOUR_USERNAME/YOUR_FORK.git (push)
> upstream  https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch)
> upstream  https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (push)
```

# Get changes from original to forked

```bash
git fetch upstream
git checkout main
git merge upstream/main
```

# Creating Pull Request from forked to original

```bash
# FORKED repo

# make changes

git add .
git commit -m "message"
git push
```

Then go to forked repo on github and create Pull Request.


![PR on github](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dit11pxe9tf2j5oq9mr6.png)

# Workflow

To keep workflow clean: 

✅ original → forked

⛔ forked → original (do it only when you are sure what are you doing!)
Awesome little online helpers
Tags: awesome, online, helper, tools
Published: 2021-08-20 15:08:13

---
title: Awesome little online helpers
published: true
description: 
tags: awesome, online, helper, tools
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u7in4ew1gt94631rgyls.jpg
---
Hi, 👋 today I would like to ask for your contributions!  Everyone knows those neat little tools, those really helpful websites, those that you come back to every so often, those that make your life so much easier!

I started an "Awesome List" to collect those tools, for easy reference, and to easily find them when in need ;)

https://github.com/KeyboardInterrupt/awesome-little-online-helpers

Please! add your awesome little online helper to the List.

If you have an awesome Tool for, i don't know, a design, artificial intelligence or whatever profession/topic, please feel free to also add a new category/section as well :D

If you don't feel like forking, and making a PR, just comment 
on this article, I will look through them and incorporate them.

Thank you very much! ❤ 👍
Has Anyone Landed an Entry Level Cyber Security Job?!!
Tags: cybersecurity, security, privacy, computerscience
Published: 2021-08-20 15:04:24

(I'm aware I'm new so my posts won't reach many people) but has anyone here landed a job in Cyber?
If so, respond to this post, I'd love to connect and network!!!

#cybersecurity #hacking #security #hacker #technology #infosec #ethicalhacking #cybercrime #linux #hackers #tech #cyber #informationsecurity #programming #kalilinux #malware #cyberattack #privacy #coding #ethicalhacker #pentesting #cybersecurityawareness #hack #datasecurity #dataprotection #it #python #computerscience #informationtechnology #bhfyp
🧨 The 7 Most Common Types of Cybersecurity Attacks in 2021
Tags: security, cybersecurity
Published: 2021-08-20 15:02:34

### 🔍 Learn which `cybersecurity` tactics and tools will help you combat today’s common `cyberattacks`.

### <br>

With more people working remotely or online post-2020, the [FBI reports](https://thehill.com/policy/cybersecurity/493198-fbi-sees-spike-in-cyber-crime-reports-during-coronavirus-pandemic) that cybercriminals are quadrupling the number of cyberattacks they use to disrupt online activities. Research also shows the impact to organizations and their users from a single successful cyberattack is growing each year.

For example, in 2017, nearly [_197 million records_](https://www.statista.com/statistics/273550/data-breaches-recorded-in-the-united-states-by-number-of-breaches-and-records-exposed/) were exposed due to data breaches. In 2020, that number [grew to 37 billion](https://pages.riskbasedsecurity.com/hubfs/Reports/2020/2020%20Year%20End%20Data%20Breach%20QuickView%20Report.pdf), even though the overall number of data breaches had decreased. And IBM reports that the costs are growing for organizations that fall victim to these attacks in countries like the United States, where the average cost of a data breach grew from $7.91M to $8.64M between [2018](https://www.ibm.com/downloads/cas/861MNWN2) and [2020](https://www.ibm.com/security/data-breach).

Many of the methods cybercriminals use to breach organizations rely on human error. Even your sharpest employees can become your greatest weakness if they click on a malicious link without realizing it. However, other cyberattacks exploit gaps in your [data security](https://auth0.com/blog/what-is-data-security/) efforts to gain access to sensitive data.

Below are seven of the most common cyberattacks your organization will face in 2021 and the ways to protect yourself against the data breaches they have the potential to cause.

[Read more...](https://auth0.com/blog/the-7-most-common-types-of-cybersecurity-attacks-in-2021/?utm_source=content_synd&utm_medium=sc&utm_campaign=security)