teleren/devto huggingface dataset:
An alternative way of looking at your career as a developer
Published: 2021-11-03 18:26:48

The computer scientist, Bret Victor, empowers people to think the unthinkable. 

He’s become famous for it. And he’s done it with an approach to his career (and life) that’s not normal.

I’ll explain Bret’s approach.

--

## Bret is fascinated by ideas.

He believes great ideas in the form of art, story & invention give meaning to people’s lives. 

Hence, bringing ideas into the world is one of the most important things people do.
 
## So he asks: What tools create a healthy environment for ideas to grow?

Let’s take coding. Here’s how a normal code environment works:

![normal-coding-environment-example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nlw78uqe8jt7o1zv04qu.gif) 

Your time is spent working in the code blindly.

To better nurture ideas, Bret invented a different coding environment.

Here Bret's coding environment, next to this picture:

![bret-victors-code-environment-1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/buk7qy8xs68ezurt8he5.gif) 

Say you add code for the sky and sun.

![bret-victors-coding-environment-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mctryvn5rdfkvge0uyuf.gif)

That's become Bret’s principle: 

> “Creators need an immediate connection to what they create.”

Meaning if you make a change, you see the effect immediately. 

When he notices that principle is violated, he takes it as his responsibility to fix it.
 
Here's another example.

In this game, we want the little guy to bounce through the
little passageway.

![bret-victors-time-space-example-1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/awtc4pl0igdbwgkx57ok.gif)

He built in immediate controls of space and time.

![bret-victors-time-space-example-2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t9ly30ua0926i89uw1a4.gif)
 
So Bret has this principle — that creators need an immediate connection.

When he notices it being violated. He builds tools to right that wrong.

## But why is this important?

As a technologist, you can recognize a wrong in the world. And you can have a vision of what a better world could be. 

You can dedicate yourself to fighting for that principle. Social activists typically fight by organizing. But you, you can fight by inventing.

The takeaway is that this lifestyle is an option that’s available to you. And it’s one you’re not going to hear much about. 

You can choose to sleepwalk through life and accept the tech world defining you by a skill. But you don't have to.

If there’s something in the world you feel is a wrong. Then you can have a vision for what a better world could be. And you can find your principle

So after this, think about what matters to you. What you believe in. What you might fight for

Decide to define your life your way.

--

If you’d posts like this on your twitter feed, follow [@stackbit on twitter](https://twitter.com/stackbit).
Welcome Thread - v149
Tags: welcome
Published: 2021-11-03 18:18:35

---
title: Welcome Thread - v149
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![Jenny Slate saying Welcome](https://media.giphy.com/media/3o72EWpXXrrFvEsZPO/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Scratching the surface of Javascript Callbacks 
Tags: javascript, programming, webdev, codenewbie
Published: 2021-11-03 18:11:09

## What is Callback functions
As we know in javascript functions are objects , that means we can pass them as arguments to other functions and call them inside the outter function 


#### Lets see a small example####

When you pass swallow() function as parameter reference to chew function is likely to execute swallow() at some point . In that case swallow() is called **callback function**

```
function chew(callback) {
   //Chew the food
   callback();
}

function swallow() {
    // ...Swallow the food
}

chew(swallow);

```
Here its important to notice that swallow is passed as an argument to chew() **without parenthesis** , because parentheses execute a function where in callback scenario we want to pass only a reference to the function and let the chew function to execute it 

#### Refactoring Normal Functions into Callback
Imagine you have a general-purpose function that does some complicated work and find the open processes and returns a big dataset as a result . This function could be called **findProcesses()** . Imagine also we need to kill each process individually in different method (kill())

```
var findProcesses = function () {
    var i = 1000, // Big loop
    processes = [], //empty array to store all the processes
    found; //the next proceess is found

    while(i) {
        i -= 1;
        processes.push(found)
    }
    return processes;
};

//function that hide the process from DOM
var kill = function (processes) {
    var i = 0 , max=processes.length;
    for (;i<max; i +=1) {
        processes[i].style.display = "none";
    }
}

//executing
kill(findProcesses());
```

Note that in the above example the implementation is inefficient because kill has to loop again through they array of processes returned by findProcesses(). It would be better and more efficient if we could avoid this loop and kill the process as soon as we selecting them in findProcesses.
**Lets do it by using callback ...**

```
//findProcesses function supporting callback
var findProcesses = function (callback) {
    var i = 1000,
    processes = [],
    found;

    //check if callback is callable 
    if (typeof callback !== "function") {
        callback = false;
    }

    while (i) {
        i = -1;

        //complex logic

        //call callback
        if(callback) {
            callback(found)
        }

        processes.push(found);
    }
    return processes;
}

//callback function 
var kill = function(process) {
    process.style.display = "none";
}

//find process and kill them as you go
findProcesses(kill)
```

The above implementation with callback is straightforward and more efficient because it doesn't need repeat the loop process second time in kill() method

##Wrap up
Now you are loaded with a extra gun on your pocket, take the time to use it in your codebase to make your code faster and more efficient
Trying to Understand Closures Better by Writing About Them
Published: 2021-11-03 18:01:43

**Closures** are created between a function and a variable whenever a function is *not* a **pure function**. A pure function is any function that only relies on variables declared within the function and the parameters of the function.


Example of a pure function:
```
function pure(a) {
  var b = 1;
  return a + b;
}
pure(1); // -> 2

// This function only uses the argument passed in the "a"
// parameter, and the variable "b" declared in the function.
// This makes it a pure function.
```

Example of a not-pure function (function with a closure):
```
var b = 1;
function impure(a) {
  return a + b;
}
impure(1); // -> 2

// This function is not a pure function, as it relies on the
// variable "b" which is declared outside of the function.
```


In the above function "impure," a closure is created between "var b" and the place where the variable is called in the function. This closure allows that value to be accessed in real time, even if the value of the variable changes:
```
var b = 1;
function impure(a) {
  return a + b;
}
b = 2;
impure(1); // -> 3
```


Really, a closure is just a way to dynamically store the values of variables (or other functions) for future use. This can be useful for keeping certain values alive and accessible even after a function ends:
```
function pure(a){
   return function impure(b) {
      console.log(a + b);
   }
}
const closureFunct = pure(1)
closureFunct(1) // -> 2
```
In this example, a closure is formed between the "impure" function and the parameter "a" from the "pure" function. This closure will dynamically store the value of "a," even after the function ends.
आखिर ये सट्टा मटका है क्या?
Tags: javascript
Published: 2021-11-03 17:57:15

<a href="https://sattamatkabom.mobi/">सट्टा मटका</a>प्रारंभ में, यह खेल मुंबई में शुरू किया गया था। अब यह पूरे देश में फैल गया है। भारत में `सट्टा` आमतौर पर` जुआ` शब्द का हिंदी रूपांतरण है। `मटका` (मटका किंग या सट्टा मटका) शब्द एक ऐसे बर्तन को संदर्भित करता है जिसका उपयोग संख्याओं को चुनने के लिए किया जाता है। सट्टा मटका जुआ है और कल्याण मटका विशेषज्ञ है जो सभी सत्ता मटका खेल चलाता SATTA BOM वेबसाइट पर लोग बिना किसी जोखिम के कल्याण मटका गेम खेल सकते हैं। ज्यादातर लोग कल्याण मटका गेम को सिर्फ इसलिए खेलते हैं क्योंकि यह गेम सरल गेम है और इससे बहुत पैसा कमाया जा सकता है ।
कल्याण मटका क्या है और कैसे खेलें?
Published: 2021-11-03 17:55:34

कल्याण मटका भारत का सबसे लोकप्रिय सत्ता मटका खेल है। सत्ता मटका के सबसे बड़े बाजार कल्याण मटका के बारे में आपने सुना ही होगा। कल्याण मटका कल्याणजी भगत के नाम से शुरू हुआ है । कल्याण मटका एक प्रकार का जुआ या लॉटरी गेम या गेम है जो भारत में बहुत खेला जाता है । कल्याण मटका की भारत में लोकप्रियता दिन-प्रतिदिन बढ़ती जा रही है। हम आपको सट्टा न्यूज़ पर कल्याण मटका से संबंधित सभी प्रकार और लाभों के बारे में पूरी जानकारी देंगे। इस खेल में एक मटके में १ से १०० नंबर की पर्चियां बनाकर डाली जाती है। बर्तन या मटके के पर्चियों में से कोई एक पर्ची (१ से १०० में se) निकली जाती है। फिर जो नंबर सामने आता है, उस नंबर के व्यक्ति द्वारा इस गेम का विजेता घोषित किया जाता है। बहुत लोग कल्याण मटका गेम पर दांव लगा रहे हैं। सत्ता मटका के बहुत सरे बाजार है: - मधुर मटका, गाली मटका, इंडियन मटका, वरली मटका, कल्याण मटका, कुबेर मटका, मायापुरी और मुंबई मटका। <a href="https://sattamatkabom.mobi/">सट्टा मटका</a>
Contributed to Assessor
Published: 2021-11-03 17:54:50

# Overviews
Assessor is an open-source Resume Analyzer and Ranking tool for recruiters and candidates. The main idea is to simplify the hiring process by shortlisting candidates based on their resumes. This project is quite interesting to me because it's using NextJS, which is the current React framework that I have been learning currently.

#Process and Issues
I started by asking the owner to allow me to work on the issue. After getting accepted, I forked Assessor repo and created a new branch. For the first time, I was really hard for me to navigate to the find to work on. Also, because I was new to NextJS so I had to watched a big tutorial in Youtube in order to understand how NextJS work, how they use pages instead of <code>react-router-dom</code>. Because the owner wanted the tool to allow multiple uploads. I had to make several changes because at that moment, the tool can only read 1 upload at a time. After that, I created validations based on the issue and implemented them to my code. I sent him a pull request after everything worked fine. One of the biggest problems I faced was that the tool only allowed user for single upload. I had to understand the codes first and created a completely new array <code>useState([])</code>. I also needed to fixed the output that renders to browser too.  Files validation were not so hard, since it only took me a bit to do the research.

# Code Explanation
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wjgfokwxa7axxj83jxc.PNG)

- Created <code>useState([]) <code>files</code> which is an array to store user's resumer upload.
- Check if file is valid or not with isFileValid().
- Files must be a <code>pdf</code> file and not exceed 10MB
- Created fileChange() to check user's file when they just uploaded the files because saving to the database. 

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

-Set <code>onChange</code> attribute to <code>input</code> so that when the change happens, it will call fileChange()

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

- The tool now will read a list of files instead of the single file. Read each file in <code>files</code> and list them out to the browser

# About the owner
The owner did not help me much. I worked on my own nearly completely. Also I sent him a pull request but he has still not replied yet.

#Links:
Repo: https://github.com/Yashdew/Assessor
Issue: https://github.com/Yashdew/Assessor/issues/37
Pull request: https://github.com/Yashdew/Assessor/pull/41
Day-1 React-Js Clock
Tags: javascript, css, html, react
Published: 2021-11-03 17:48:11

I made a clock today using React and Javascript. You can access it from the link below.


Github : https://github.com/mahmuutcaan/Day-01-ReactJs-Clock

DEMO : https://goofy-varahamihira-259ad3.netlify.app

Instagram : https://www.instagram.com/mcancati

Linkedn : https://www.linkedin.com/in/mahmutcancati/
React Router {day 33}
Tags: 100daysofcode, javascript, webdev, react
Published: 2021-11-03 17:36:03

#100daysofcode    #day33

Today's learning is React Router. 

React Router is a standard library for routing in React. It enables the navigation among views of various components in a React Application, allows changing the browser URL, and keeps the UI in sync with the URL. ... The application will contain three components: home component, about a component, and contact component.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dcbmb6hwg2egcmsux2b7.png)
#DEVcommunity
#react #learning #programming #javascript
My First JS game with no canvas
Tags: javascript, webdev, beginners, programming
Published: 2021-11-03 17:19:15

This is my First game I created using JS
You can download it to try it
https://drive.google.com/file/d/1FFV8POcX7-9IAMB5Kv-ubDg5bQ9-c1jS/view?usp=drivesdk
From 1 to 10 how much they give me to be new programming and be my first game
Introspective Marketing
Tags: freelancers, marketing, changingcareers
Published: 2021-11-03 17:20:07

---
title: Introspective Marketing
published: true
date: 2021-11-03 17:17:49 UTC
tags: freelancers,marketing,changingcareers
canonical_url: https://medium.com/@bass41992ben/introspective-marketing-c5a0e9372249
---

![](https://cdn-images-1.medium.com/max/1024/0*KwZJh21HTqS-Bltj)
_Photo by Anthony Tori on Unsplash_

I’ve been doing a lot of reading, thinking, and listening to marketing. Specifically I have been reading and listening to a lot of what Seth Godin has to say on marketing because I connect with how he thinks about the world and others.

One of the things that is becoming clearer to me is that if I am trying to serve people I have to do the harder work of thinking through ‘what change I am trying to make?’

This is really interesting because I cannot answer that question for myself at this point but this is what I have been thinking through the past few months.

I have been thinking through, ‘whenever I enter a job, why do I spend more time thinking through other things in the company and what problems need solving rather than doing the job I was hired to do?’ I want to make sure we are working towards the right things rather than just doing what we’ve always done.

By asking myself ‘what change am I trying to make,’ I think I am moving to a place of being able to answer this question. At my job, in my work, what change am I trying to make? Who am I trying to serve?

Overall, my thought is this, the best marketing forces you to look inward because and then you will have more solid reasons for doing what you are doing and for connecting with your audience. You will know who you are trying to serve and who you are not trying to serve. You will refine what change you are trying to make.
Contributed to AvBot Charts
Published: 2021-11-03 17:15:50

# Overviews
AvBot Charts is a Bot created to find data of the Airport based on user's request. Data contains name of the airport, the location, observed time, wind, temperature, etc. This bot is still in developing step but it is supported by a lot of businesses and developers. Also, the bot can link to discord and it has its own server.
# Process and Issues
I asked the project owner to work on an issue which is adding a command-line to the bot so that it will list all playbooks that are disabled, since the current features only allow the bot to display airport and playbooks that are enabled. After getting accepted, I forked and started a new branch. Since in this semester, I have learnt how to create a CLI tool so I was quite familiar with this project. However, this project used completely different packages compared to my CLI tool so I needed to read documents, including <code>commander</code>, <code>chalk</code>. There is also a big problem related to understanding code since this is a big project that contains a lot of folders and files. After reading all the functions, and understanding them, I started to code. I sent pull request after, and the owner asked me to changes some features. He wanted me not to create a function but include it into a big function that contains other options of CLI. He also wanted me to check the code to pass the <code>lint</code>. After fixing the code, I sent him the final pull request and still waiting for his response.

# Code explanation
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l6a9pk8ifmc2wug4rlv0.PNG)

- Creating a new option to read <code>-ld</code> or <code>--list-disabled</code>
- Creating a code block to handle that option.
- Using readdirSync() to read the <code>playbooks</code> directory
- Reading every single JSON file in <code>playbooks</code> and check if <code>enable: false</code>
- Returning them to terminal.

# About the owner
He was very friendly towards me. He invited me to the AvBot Charts server and treat me as a contributor that made me feel being valuable. He also instructed me what should look like in the output so I was less confused. Certainly, I will contribute to this project in the future.

# Links
Repo: https://github.com/drph4nt0m/avbot-charts
Issue: https://github.com/drph4nt0m/avbot-charts/issues/353
Pull request: https://github.com/drph4nt0m/avbot-charts/issues/353
MongoDB best alternative is MangoDB :) Try it
Tags: mongodb, beginners, javascript, database
Published: 2021-11-03 17:12:07

Hello friends, 
I would like to discuss about new mangodb.

*Official documents says about 
MangoDB:*

MangoDB is set out to become the de-facto open-source alternative to MongoDB. MangoDB is an open-source proxy, which converts MongoDB wire protocol queries to SQL, and uses PostgreSQL as a database engine.

*Why do we need MangoDB?*

MongoDB is a life-changing technology for many developers, empowering them to build applications faster than using relational databases. Its easy-to-use and well-documented drivers make MongoDB one of the easiest to use database solutions available. However, MongoDB abandoned its open-source roots, changing the license to SSPL - making it unusable for many open source and commercial projects.

Most MongoDB users are not in need of many of the advanced features offered by MongoDB; however, they are in need of an open-source database solution. Recognizing this, MangoDB is here to fill the gap by providing an alternative.

You can use docker too:
```docker run --rm -it --network=mangodb_default --entrypoint=mongosh mongo:5 mongodb://mangodb/```

Visit  at www.mangodb.io, get in touch, and sign up for updates on the project.

GitHub: 
https://github.com/MangoDB-io/MangoDB
Video: A No-Code Workflow to Send a Message to Slack
Tags: nocode, workflows
Published: 2021-11-04 21:17:38

---
title: Video: A No-Code Workflow to Send a Message to Slack
published: true
date: 2021-11-03 16:54:33 UTC
tags: NoCode,Workflows
canonical_url: https://maxkatz.org/2021/11/03/video-a-no-code-workflow-to-send-a-message-to-slack/
---

In this video you will learn how to build your very first [Okta Workflows](https://help.okta.com/wf/en-us/Content/Topics/Workflows/workflows-main.htm) flow. The workflow shows how to build your very first workflow.

[![A workflow to send a message to Slack](https://katzmax.files.wordpress.com/2021/11/helloworld-workflows2.png?w=1024)](https://katzmax.files.wordpress.com/2021/11/helloworld-workflows2.png)<figcaption>_A workflow to send a message to Slack_</figcaption>

The workflow does the following:

- Scheduled to run every 5 minutes
- Gets the current time
- Creates a text message
- Sends the message to a Slack channel.

{%youtube -gR6zmy9UQU %}

Want to learn more about Okta Workflows? [Try these step-by-step tutorials](https://help.okta.com/wf/en-us/Content/Topics/Workflows/Tutorials/tutorials-workflows-learn.htm).
Getting started with Django project
Tags: django, python, beginners, codenewbie
Published: 2021-11-03 16:35:48

## Short introduction (you can skip this part)
Hello everyone! I am a software developer graduated recently and working in some personal projects. During the development process I've come across multiple issues and I decided to start writing on this platform for a couple of reasons: 
- helping other fellow developers by giving a set of steps I've follow in order to develop different software projects 
- I see this platform as a good way to 'save notes' and reinforce my knowledge by trying to explain it to others
- improve my writing skills 
- make new connections
I hope you find this content helpful! 

## Setting up a new Django project
For my projects development I use the following: 
- Visual Studio Code (VS Code), an easy-to-use IDE. Download from [here](https://code.visualstudio.com/download)
- The latest version of Python: download from [here](https://www.python.org/downloads/)
- The latest version of Django which can be installed using pip package manager (described below)

Create a new folder for your Django project and open VS Code. You can drag your work folder and drop it on the 'Explorer' section on the left side of VS Code and then click 'Add folder to workspace' from the dialog box that appears. This will add a new workspace and your folder will always appear on the Explorer section unless you remove it. 
From the menu bar on top of VS Code click *Terminal - New terminal* (if you have multiple work spaces, you'll have to choose the one you want to work with) or use the shortcut *Ctrl + Shift + `*. The terminal appears on the bottom but I prefer to keep it on the right side by right-clicking on top of "Terminal" and choosing 'Move to the right". 
Create a virtual environment (venv) using the following command: **python -m venv envName** 
Then activate your venv: **envName\Scripts\activate.bat** (the path should be in the same folder as the env)
Install Django: **pip install django**
Create your Django project: **django-admin startproject myProject .** (note the dot at the end, it will make sure not to create an additional folder called 'myProject' inside your existing folder)
Now you have your first Django project and you can run it using this command: **python manage.py runserver** 
A link will appear on the terminal and you can open it by copying and pasting it on your favorite browser or pressing Ctrl button and the link.
1 line of code: How to get the shortest string of an Array
Tags: javascript, webdev, performance, codequality
Published: 2021-11-03 16:11:35

 ```javascript
    const shortestString = arr => arr.reduce((prev, curr) => prev.length < curr.length ? prev : curr);
```

Returns the shortest string entry of an Array of strings.

---

## The repository & npm package

You can find the all the utility functions from this series at [github.com/martinkr/onelinecode](https://github.com/martinkr/onelinecode)
The library is also published to [npm as @onelinecode](https://www.npmjs.com/package/@onelinecode/onelinecode) for your convenience.

The code and the npm package will be updated every time I publish a new article.

---

Follow me on [Twitter: @martinkr](http://twitter.com/_martinkr) and consider to [buy me a coffee](https://www.buymeacoffee.com/martinkr)

Photo by [zoo_monkey](https://unsplash.com/@zoo_monkey) on [Unsplash](https://unsplash.com/s/photos/fuji)

---