teleren/devto huggingface dataset:
Weekly Retro #1 - Python, React, Express, etc
Tags: weeklyretro, python, react, javascript
Published: 2019-11-24 12:28:24

I like the idea of looking back, digesting what you have learned and sharing it to people who will be able to relate to it.

I learned a lot of things this week. 

*1) Python - List Comprehensions*

I'm a new learner of Python and so far I'm enjoying it. I'm subscribed to Trey Hunner and Python Morsels. Check it out!

So there a syntax in python for shortcuts of for loops and even nested loops, which I still find confusing, still need to get used to it. It's called list comprehensions.

So this:

```python
doubled_odds = []
for n in numbers:
    if n % 2 == 1:
        doubled_odds.append(n * 2)
```

Can be translated to:

```python
doubled_odds = [n * 2 for n in numbers if n % 2 == 1]
```

*2) React and Express with uploading files to Google Cloud Storage*

I have done uploading to AWS using AWS Amplify. So now I had a task to use GCP instead. You can check my post here about that: https://dev.to/idiglove/file-upload-with-react-express-and-google-cloud-storage-with-folder-structure-2i5j

*3) Amazon coding challenges*

I didn't do a good job with that. I really need to practice more.

Here's a list of some possible questions that they will ask.

https://leetcode.com/discuss/interview-question/344650/Amazon-Online-Assessment-Questions


Cheers,
FM
📷 How to take a screenshot of a webpage with JavaScript in Node.js (using puppeteer) 
Tags: javascript, webdev, puppeteer
Published: 2019-11-24 12:14:46

Automatically creating a screenshot of a webpage used to be hard. Using `puppeteer` it became quite simple. Puppeteer is a headless Chrome Node.js API. So you can programmatically do everything you can do everything with it programmatically, that you manually can do with the Chrome browser.

So let's create a screenshot of my blog over at [codesnacks](https://codesnacks.net).

First, we'll have to install puppeteer of course. Run 

```sh
npm i puppeteer
```

to install puppeteer.

```javascript
const puppeteer = require("puppeteer");

// we're using async/await - so we need an async function, that we can run
const run = async () => {
  // open the browser and prepare a page
  const browser = await puppeteer.launch()
  const page = await browser.newPage()
  
  // set the size of the viewport, so our screenshot will have the desired size
  await page.setViewport({
      width: 1280,
      height: 800
  })

  await page.goto('https://codesnacks.net/')
  await page.screenshot({
      path: 'codesnacks.png',
      fullPage: true
  })

  // close the browser 
  await browser.close();
};

// run the async function
run();
```

![Codesnacks Screenshot](https://thepracticaldev.s3.amazonaws.com/i/01f9y81vflib08ixp8do.png)

That snippet will create a screenshot of the whole page, that's 1280 pixel wide. Of course, you can also set other sizes. The screenshot will be saved in the same directory your script lives in. You can change the directory and name of the file in the `path`.

That's a super simple way to create screenshots. Please consider following me, if you're interested in what else you can do with puppeteer and if you don't want to miss any of my upcoming articles in this series.
JavaScript: private fields proposal 
Tags: javascript
Published: 2019-11-24 11:00:16

---
title: JavaScript: private fields proposal 
published: true
description: Maybe we just don’t need private fields in JavaScript? Maybe introducing private fields to a language in which class keyword is nothing more than syntactic sugar isn’t such a good idea. 
tags: js, javascript 
cover_image: https://images.unsplash.com/photo-1459347268516-3ed71100e718?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80
---


JavaScript — as a language — grows larger every year. It shouldn’t be surprising that the process of introducing new features to JS can cause a lot of turmoil. Programmers usually held strong opinions about their tools so it’s rather expected that any change to JS spec will be discussed relentlessly by developers. However, some of the changes proposed by TC39 Committee (body responsible for EcmaScript standard) arouse more resistance than others. A proposal that recently caused a lot of negative reactions was class fields proposal that — among others — tries to add to the language private class fields.

The current form of the candidate is a result of combining two earlier proposals — viz. one introducing public fields and another proposing private class fields. Consequently, the proposal allows us to declare class fields inside the class body but outside constructor function and — besides — it introduces two kinds of class fields — public (properties) and private. 

[More on medium](https://medium.com/virtuslab/private-fields-public-worries-b8c34d16c372)
A MongoDB survival pill
Tags: mongodb, beginners, database, javascript
Published: 2019-11-24 10:41:02



When you think about Web development, there are tons of **technologies**, **tools**, & ~~**_blah blah_**~~ things to keep in mind. The chances of getting overwhelmed becomes 🔝.

Same goes with **Databases**. Today, we are talking about the _non relational_ database.

![mongodb](https://res.cloudinary.com/techlead/image/upload/v1574591801/Dev.to%20posts/lwumugci178qjqqfyq6j.png "logo from official site")

## MongoDB 😅

> A quick guide for handling MongoDB database from our local machine through command prompt 💻

---
# Let's get started

* Show All Databases 🔎

```javascript
show dbs
```


* Show Current Database 👨‍💻

```javascript
db
```

* Create Or Switch Database ⏭

```javascript
use <database_name>
```

* Drop Database 🔥

```javascript
db.dropDatabase()
```


* Create Collection 👨‍🔧
> "collection" is similar to _"table"_ in the **SQL** .

> We call "_tables_" as "_collections_" in **MongoDB** .
> 
> Here, _'posts'_ is the name of our collection.

```javascript
db.createCollection('posts')
```

* Show Collections 🔎

```javascript
show collections
```

### Now, we have created a 'collection' called "**posts**" & then we will populate our collection with some data. To do that paste below schema into command prompt 👇


### Insert Row


```javascript
db.posts.insert({
  title: 'Post 1',
  body: 'Hello, this is post one',
  category: 'Sports',
  tags: ['young', 'stadium'],
  user: {
    name: 'Jayesh Tembhekar',
    status: 'author'
  },
  date: Date()
})
```

> ### To speed up the insertion, we can insert _**multiple rows**_ at a time like this...

* Insert Multiple Rows 🥇


```javascript
db.posts.insertMany([
  {
    title: 'Post 2',
    body: 'Hello, this is post two',
    category: 'Technology',
    date: Date()
  },
  {
    title: 'Post 3',
    body: 'Hello, this is post three',
    category: 'Politics',
    date: Date()
  },
  {
    title: 'Post 4',
    body: 'Hello, this is post four',
    category: 'Entertainment',
    date: Date()
  }
])
```

_to be continued..._

## **_Have a great day !_**

**Author:** [_Jayesh 🧡_](https://www.instagram.com/jayesh.2112)
Refer friends and earn free monitoring quota
Tags: php, laravel, productivity
Published: 2019-11-24 10:24:57

From the first day [Inspector](https://www.inspector) goes public I decided to not spend thousends of euro in direct advertising, but instead I wanted to build a real relationship with my users and talk openly about their needs and how the Inspector should improve to provide even more value.

This is why I decided to start writing articles on value and benefits that other developers could get using my product in their real life. Moreover, we offer a "completely free access tier", with no credit card and no deadline.

That was the result:

![](https://miro.medium.com/max/1299/1*6uAvFalRULxQKvOL1v6gkw.png)
![](https://miro.medium.com/max/804/1*poKp-zCui8I8QKiZqdrdSw.png)
![](https://miro.medium.com/max/391/1*S6UFmygHpIsub8nwMvpx_A.png)

We aim to grow organically by focusing on our customers and our technology.

Many of the organizations we work with have joined based on recommendations from others, and **we’ve been hard at work brainstorming a good way to say thank you to folks who have encouraged new groups to sign up.**

## How the Inspector referral program works

Navigate to: Organization -> Referrals

![](https://miro.medium.com/max/2234/1*_JV2w5DgiddaGOXN51rJ_A.png)

We provide you a link with a unique code attached.

> Simply share this link in your preferred social networks or via a blog post to get 1000 transactions per day extra for the next 6 months scaling up your plan on each new user sign up.

As you can imagine it works with cookies. When people visit the registration page through your link, Inspector set a coockie in their browser to remember that this user come from your recommendation.

**This coockie does not have an expiration date, to give you the maximum chance of getting the free quota even if the user registers his account two months later.**

## Conclusion

If you want learn more about Inspector visit our website - [https://www.inspector.dev](https://www.inspector.dev) - and start monitoring your application for free in just two minutes to find out issues before your application users do.

Thank you so much for reading it. To make Inspector more sophisticated and mature, it will not be possible to accomplish without your help. Don’t hesitate to share your thoughts on the comment below or drop in live chat on our website! Let’s make it together.

### Thank you for all your support!
Homepage: [https://www.inspector.dev](https://www.inspector.dev)

Facebook: [https://www.facebook.com/inspector.realtime/](https://www.facebook.com/inspector.realtime/)

Twitter: [@inspector_rt](https://twitter.com/inspector_rt)

Contact me: [valerio@inspector.dev](https://www.inspector.dev)
I Don't Know Javascript Coercion, Do You?
Tags: javascript, tutorial, beginners, webdev
Published: 2019-11-24 08:46:58

# I've made a grave mistake

In a video I published a few weeks ago, I made a rather basic mistake.

Given the following variables...
```js
    let threeString = "3";
    let threeNum = 3;
```
What does this expression evaluate to?
```js
    threeString + threeNum
```
If you're smarter than I was an hour ago, you'll know that it evaluates to `"33"`.

![Gordon Ramsay - Youre a string mate](https://thepracticaldev.s3.amazonaws.com/i/7iacvhazay46q1kjq6sf.jpg)

# Why does it do that?

According to ECMAScript, as summarized by [Valentino](https://www.valentinog.com/blog/coercion/):

> If x is String or y is String then return ToString(x) followed by ToString(y)

In other words, if there is an expression with the <kbd>+</kbd> operator, and one of the values is a string, it will always coerce the values into a string.

# Final Thoughts
I like to think I'm not completely dumb. I've been building websites/web apps in Javascript for about four years now. However, we all make mistakes. Even the most basic ones! Own up to them, and we'll all learn something. I know I did!

If you want to see my mistake in action, check out the video below!

{% youtube _3th_0JN-mc %}

And the follow up video, which I made before this mistake I made was pointed out...

{% youtube xYYsLyep0Ho %}
GitHub PR Review, stop wasting time on code review!
Tags: github, codequality, review, docker
Published: 2019-11-24 09:29:08

Stop wasting time on code review!

Are you tired of looking at several GitHub repositories with many pull requests from your team or organization?
On each repository, you have many tab browsers with filters?

[GitHub PR Review](https://github.reviews/) is the tool you need!

[GitHub PR Review](https://github.reviews/) is an interface to simplify GitHub pull requests management.

## How it works?

### Built for developers

Track all pull requests from your teams, or your own pull requests, and make a code review easier.

### Sort your pull requests

You can use both modes, label or filter and sort your pull requests.

With filter mode, you can search for issues and pull requests globally across all GitHub, or search for issues and pull requests within a particular organization.

![Filter mode](https://thepracticaldev.s3.amazonaws.com/i/h2q46tad1mtztd7apxrm.png)

Or, with label mode, you can sort you pull requests on four blocks _Review needed_, _Accepted_, _Changes requested_ and _WIP_.

![Label mode](https://thepracticaldev.s3.amazonaws.com/i/j3vuzwzziwyazkvfpbva.png)

### Increase your productivity

In one single page you have all your watched repositories with the related
pull requests and your notifications sorted by repositories.

## Self hosted

If you want to use it on your own server, you need to install Docker and Docker compose, clone the repository and execute: `make start-prod`

## Price

It's totally free, without any ads and your informations will **NEVER** be sold to any company.

## Fork me on GitHub

Do you want to contribute to [Github PR Review](https://github.com/babeuloula/github-pr-review/)? Feel free to fork this repository and propose your pull request!
Why do I write?
Tags: writing
Published: 2019-11-24 09:22:20

A lot of times, I had an idea to write about and then I start thinking should I write about it now? Is it an important thing to write about? Will it get a good reaction from readers, or will any body be interested to read it at all? Is it the good time to post an article, or should I wait to rush hour to get more likes, and comments? 
Most of times after this storm of questions the idea is dead before it has been born.

This morning I was wondering "Why I write?". I have also intended to start a Youtube channel soon, and have prepared for it and waiting for some equipment to start filming the first video. But again, "Why do I do so?". Then I remembered how I was thinking before that it would be a great thing if one could leave something that could change somebody's life to the better. And what can do so more than a useful knowledge even if it is a small tiny piece of knowledge. A way to make this world a better place.

I decided to write every piece of information that I learn, talk about it, teach it to others without thinking in any reaction, self-fulfillment through it. I decided to make the benefit of others the main goal and any other thing comes after it.
The only way to do is to do
Tags: beginners, programming, practice, advice
Published: 2019-11-24 08:33:15

---
title: The only way to do is to do
published: true
description: 
tags: beginners,programming,practice,advice
cover_image: https://thepracticaldev.s3.amazonaws.com/i/snl59u70z5t34encuxdj.jpg
---

So I developed a passion for coding during my final year in high school back in 2013. I was introduced to it by a friend. I tried learning to code on my own but it seemed impossible at that time because the concepts were just too complex for me to grab(my brain wasn't much developed for coding, i guess).

     In late 2013, i got admission to college to study IT. I was excited because i thought i could finally learn to code since my program had some coding classes.
Unfortunately, it turned out to be a nightmare. Most of my coding classes were all theory and little or no practice. I remember writing an exam on data structures and algorithms in C++, we were asked to write code on paper. over 90% of students in my class including me felt more confused about coding than we were  before entering college.

    I decided to f*ck the college classes and learn programming on my own. So i did some research on which language language to learn and I decided to learn Java. I'm more of a books guy than a video tutorial so i got 'Introduction to Java' by Y. Daniel Liang. It was a good book and i really understood most of the java concepts because of that book. I did same for Android programming and MySQL.

   By 2017, I had a lot of theoretical knowledge in programming but no practical experience. I knew that in order to be a programmer, I needed to write code. But I was afraid to take on projects because when I decide to start a project, all I have is a blank text editor and nuclear missiles going off in my head.(LOL)
I didn't know how to plan the project and design the architecture of my app. This feeling of confusion continued for almost 2 years until I realized one thing: "The only way to do is to do".

  In January 2019, i decided to start working on projects no matter how little i know. So i started work on one of my ideas and it has been extremely frustrating and unbelievably satisfying. I hit a bump in the road, i learn how to solve it and by doing that I've learnt a lot of stuff i never knew existed. and more importantly, I've built my confidence to write code and eliminated my fears.

  So to all my newbies who are confused and feel like don't know where to start, start small. Pick a project, come up with your feature list, take the features one by one and learn how to implement that feature in your language of choice. By the time you realize, you've become an actual programmer with so much confidence in writing code. Let Google be your friend and may the source be with you.
which framework do you suggest for server beginner ? why?
Tags: framework, developer, beginners
Published: 2019-11-24 08:06:31

some classmate or friend ask me about start framework of server . myself develop microsoft framework but i don't suggest it! maybe python or java is bether.in the my country(iran) all the startup run as php or java there are any startup with .net!please tell me about your country and in you opinion which framework of server do you suggest for beginner  ?why?
Things you need to know about Tagged Template Literal in JavaScript
Tags: tutorial, javascript, webdev
Published: 2019-11-24 07:24:12

In simple words: [JavaScript](https://buginit.com/category/javascript/) Tagged template literal is a function call that uses a [template literal](https://buginit.com/javascript/all-you-need-to-know-about-template-literals/) to get its arguments.
Here is a tagged function example:

```javascript
greet`I'm ${name}. I'm ${age} years old.`;
```

Don't get yourself confused, In the above example, `greet` is a function that takes three arguments
1. The first parameter is an [array](https://buginit.com/tag/arrays/) containing all of the text from our template literal.
2. The 2nd to infinity parameters in our function are the variables to be inserted into our tag function.
Here I'll show you the greet function from inside in detail.

```javascript
// creating name and age variable 
var name = 'buginit';
var age = 1; 

// creating a greet function
function greet(strings, name, age) {
  var str0 = strings[0]; // "I'm"
  var str1 = strings[1]; // ". I'm"
  var str2 = strings[2]; // "years old."
  console.log(name) // buginit
  console.log(age) // 1
}

// calling greet function here and passing 
// name and age variable that we created above
greet`I'm ${name}. I'm ${age} years old.`;


```


Explanation: First we created two variables called `name` and `age`.

Then we defined the `greet` function,

And then called the `greet` function with those two variables and some strings around using Tagged Template Literals. So the `greet` function will receive all the strings as an [array](https://buginit.com/tag/arrays/) in the first argument and those variables in the rest of the arguments as shown in the above example please read comments inside example.

I hope you got the picture in your mind.

Wanna see more example and real-word examples check this out [A Complete Guide: Tagged Template Literal In JavaScript](https://buginit.com/javascript/a-complete-guide-tagged-template-literal-in-javascript/)


---

Originally published at [buginit.com](https://buginit.com/javascript/a-complete-guide-tagged-template-literal-in-javascript/) on October 9, 2019. For latest updates follow [buginit](https://buginit.com)
How Do You Work Under Pressure?
Tags: productivity, challenge
Published: 2019-11-24 07:10:35

When you get tasks that take a long of time and don’t have enough time, feel fear and worry about it, you have to think of high-pressure moments as a (fun) challenge, not a life-or-death threat, because seeing pressure as a threat undermines your self-confidence, elicits fear of failure, impairs your short-term memory, attention, judgment, and spurs impulsive behavior. then remind yourself that this is just one of many opportunities. Is this high-pressure situation a good opportunity? Sure. Is it the only opportunity you will ever have for the rest of your life? Probably not.
but in fact, it is realistic to think that additional opportunities will come your way, also Focus on the task, not the outcome. Instead of worrying about the outcome, worry about the task at hand until you don't lose the time.

Then Take control. In a pressure moment, there are factors you have control over and factors you don't. 
But when you focus on those "uncontrollable," you end up intensifying the pressure, increasing your anxiety, and ultimately undermining your confidence, write Weisinger and Pawliw-Fry. What you want to do is focus on the factors you can control. and take a flashback to your past successes. Be positive before and during high-pressure moments. In what comes as a surprise to no one (but bears repeating anyway), cultivating a positive attitude goes a long way. Get in touch with your senses this helps you to focus, some persons listen to music — or make some. "What makes this pressure solution so effective is that it reduces the culprit behind choking — increased anxiety,". Create a pre-performance routine, so it can a "pre-routine" that prevents you from becoming distracted and be calm down. finally, Share the pressure to reduce anxiety and stress.
📚 Awesome links from dev.to and around the web #6
Tags: react, career, ux, inertiaj
Published: 2019-11-24 06:52:05

Hey fellow developers and designers 👋🏽


## ✍🏽 Links you might find interesting
⭐ [I rebuilt my portfolio, now it has 100 lighthouse score. How did I do that](https://dev.to/saurabhdaware/i-rebuilt-my-portfolio-now-it-has-100-lighthouse-score-here-s-how-i-did-477a) - @saurabhdaware

⭐ [How to tackle a technical interview using soft skills](https://dev.to/kiarathedev/how-to-tackle-a-technical-interview-by-using-soft-skills-2dkn) - @kiarathedev

⭐ [Make your personas great again in 7 simple steps](https://uxdesign.cc/personas-e60c1c06ead1)

⭐ [The Web Almanac is a comprehensive report on the state of the web, backed by real data and trusted web experts.](https://almanac.httparchive.org/en/2019/table-of-contents)

⭐ [Framer's Guide to react](https://www.framer.com/books/framer-guide-to-react)
---
## ✨ Random delights from around the world

⭐ [Lighthouse CI](https://github.com/GoogleChrome/lighthouse-ci) - Automate running Lighthouse for every commit, viewing the changes, and preventing regressions

⭐ [Inertia.js](https://inertiajs.com) - Build single-page apps, without building an API. Inertia.js lets you quickly build modern single-page React, Vue and Svelte apps using classic server-side routing and controllers.

⭐ [bruno-simon.com](https://bruno-simon.com) - A fun personal website for Bruno Simon, a Creative developer living in Paris, freelancer, former lead developer at Immersive Garden, former developer at Uzik and teacher.

---
## 🙈 Shameless Plugs

[Follow me on Twitter](https://twitter.com/intent/follow?screen_name=kudapara), I post mainly about programming, design and some updates on the projects I'm working on.

---

> Make it work, make it right, make it fast
– Kent Beck

---

Cheers 🥂
[@kudapara](https://twitter.com/kudapara)
5 Steps to Become a Freelance Web Developer
Published: 2019-11-24 06:26:37

Let’s face it, becoming a freelance web developer has some important perks. For beginners, it can be done from nearly anywhere in the world (Costa Rica, anyone?), or right from the convenience of your own home. You also have the right to establish and control your own schedule, hourly rates, and workflow. Last, but far from least, is the fact that web development is one of the most in-demand industries to be working in at the time. The demand is only growing, so the potential to find clients and to have a fruitful career is strongly in your 
favor!

1. Learn as Many Technologies/Languages as You Can
2.Dot Your I’s and Cross Your T’s
3. Build Your Freelancing Website
4. Market Your Services
5. Stay Current

For More detail visit: https://www.ixlytechnologies.com/web-development.php