teleren/devto huggingface dataset:
Daily Tips 1: Augmented Assignments
Tags: tutorial, todayilearned, beginners, codenewbie
Published: 2020-12-03 18:01:59

This is my 1st Daily Tips for programmer.

Many developers, especially junior developer when they dealing with simple math operation they will be doing something like this:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3ov9ezo5uid1bme249yl.png)

There's no wrong with that code above. But we can simplify with Augmented Assignments. Basically, an Augmented assignment is generally used to replace a statement where an operator takes a variable as one of its arguments and then assigns the result back to the same variable. 

Instead of assigning `x` variable with `x = x + 1` we can make them more clean like this.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/j4g96024md2q7rdz0664.png)

So, how?

Let's see other simple math operation

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/of50pjl7dmkhe7nxwg0f.png)
Brew and M1 Chip are now friends
Published: 2020-12-03 17:56:50

Brew has been updated with initial support for those new quick Apple M1 chips.

[https://brew.sh/2020/12/01/homebrew-2.6.0/](https://brew.sh/2020/12/01/homebrew-2.6.0/)

"macOS Homebrew running natively on M1/Apple Silicon/ARM has partial functionality. We recommend installing into /opt/homebrew and forbid installing into /usr/local (to avoid clashing with the macOS Intel install and allow their usage side-by-side). We currently recommend running Homebrew using Intel emulation with Rosetta 2."
Binary: The Arecibo Message
Published: 2020-12-03 17:54:56

The message sent in 1974 from the Arecibo radio telescope
toward the globular cluster M13 consisted of 1679 “bits” of
information. A “0” is represented by an “off” radio pulse,
while a “1” is represented by an “on” radio pulse.

`00000010101010000000000001010000010100000001001000100010001001011001010101010101010100100100000000000000000000000000000000000001100000000000000000001101000000000000000000011010000000000000000001010100000000000000000011111000000000000000000000000000000001100001110001100001100010000000000000110010000110100011000110000110101111101111101111101111100000000000000000000000000100000000000000000100000000000000000000000000001000000000000000001111110000000000000111110000000000000000000000011000011000011100011000100000001000000000100001101000011000111001101011111011111011111011111000000000000000000000000001000000110000000001000000000001100000000000000010000011000000000011111100000110000001111100000000001100000000000001000000001000000001000001000000110000000100000001100001100000010000000000110001000011000000000000000110011000000000000011000100001100000000011000011000000100000001000000100000000100000100000001100000000100010000000011000000001000100000000010000000100000100000001000000010000000100000000000011000000000110000000011000000000100011101011000000000001000000010000000000000010000011111000000000000100001011101001011011000000100111001001111111011100001110000011011100000000010100000111011001000000101000001111110010000001010000011000000100000110110000000000000000000000000000000000011100000100000000000000111010100010101010101001110000000001010101000000000000000010100000000000000111110000000000000000111111111000000000000111000000011100000000011000000000001100000001101000000000101100000110011000000011001100001000101000001010001000010001001000100100010000000010001010001000000000000100001000010000000000001000000000100000000000000100101000000000001111001111101001111000
`
Until this beginning
Tags: firstpost, introduction, aboutme
Published: 2020-12-03 17:52:32

What I am now
---
I am software engineer at [Zoho](https://www.zoho.com), currently working on front end. I work with VanillaJS, HTML, CSS. That's it, no frameworks or libraries (except jquery, because it makes DOM manipulation much easier). Apart from that, we(me + my team members ) code whatever we need, like

* **Router** - takes care of hash based front end routing
* **Layouts** - decides which HTML must be loaded where and loads the needed script for the same.
* **UI Components** - buttons, checkbox, radio button, dropdowns, inputs, tabs, etc.
* **Data model** - own model which stores data at client and syncs/updates with server whenever needed

Hence, my experience with nodejs and nodejs based front end development is quite minimal. I am a noob when it comes nodejs, nodejs libraries and frameworks like react, vue, webpack and many more. 
So, I very much rely upon the dev community and open source resources available online to learn more about web development.

> _I guess it is never too late to learn something new._

Hoping to learn something new everyday 😊

Before job
---
I studied Electronics and Communications Engineering, for which my interest never really took off (maybe because I didn't have any exposure in that field). I liked the engineering mathematics behind it though (Fourier transform, Laplace transform, Partial differentials and Probabilities & Random process), such fascinating stuff to know. I don't remember most of it, but it was good to know how brilliant people deduced these stuff back in those days.

The one field that really drew my attention was Image Processing. With the help of MATLAB, I used to try crazy stuff like coding filters, edge detections, RGB -> HSL/HSI, etc. Even I dwelled deep about JPEG compression and how it works. Possibilities were many and time was never a constraint in those days.

Thats when I found `I too can code`.

Why I say `I too` is because I was told I could never become better at coding. In fact, my computer science teacher at school insisted me not to take CSE for further studies.
I was so naive back in school. But, without even realising I absorbed the basics quite well.

It all came back to me during my placements. I give myself some good credit for putting in the hard work and effort to practice quantitative aptitude and all previous coding interview questions at Zoho. This paid off. I joined Zoho by Mar 2017 as Member Technical Staff.

----


> It's been quite a journey, `from school to office`.
> Looking forward for the better future I am going to build for myself and the people around me.

----

##### Cheers 🥂 & Peace ✌️ 
##### [Vignesh D](https://twitter.com/vigneshd96)
How you can execute terminal command on server via UI from client-side?
Tags: html, javascript, terminal, github
Published: 2020-12-03 17:51:18

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0oxebgrqn3qa45etxez2.jpg)


Hey folks, What am I saying, is it possible to execute command on server via UI from client-side with few lines of code?
Yes, possible.

### How? 
Let me tell you.
1. Make your own UI for enter command and send that command to server with suitable method and request.(use fetch, axios, etc.)

2. Make a basic server with your favourite libraries, now add one another library with name `execa`.

### What `execa` do?
`execa` is a js library for execute `.exe` file with one line of code.
like this

```javascript
// your code ....

const execa = require('execa')
let output = execa.sync(command).stdout // pass your command as a args

// your code .... 
```
Now send this output in res and you can get the output of terminal.

### Cons
you can't execute all command, because `execa` is execute only one line command and then close the cmd. When you run command, `execa` open new cmd and execute command, then close cmd. So your 'cd dir' command run successfully but cmd closed and next time open new cmd, so we can get old path and `cd dir` goes vain. 

##### here I give you link of simple project on github, learn and enjoy :smile:

{% github Utsav-Ladani/Html-and-Terminal no-readme %}
Should I start blogging?
Tags: beginners, career, productivity, discuss
Published: 2020-12-03 17:30:22

Hi everyone!

This is the very first public blogpost of my entire career since I started 10 years ago

I'm writing this post because I've found that blogging more often will improve my written communication and also will increase my visibility across the IT market once I'm a backend/DevOps developer who wants to evolve by sharing my experience with the community.

Also, I'm posting this willing to get any kind of feedback that could help me somehow to start posting articles/blog posts or even start a youtube channel!

I'm looking for any tips/hints/guidance that would make me create content that must need to be concise, packaged, and with a substance that could catch the interest of other developers that are either learning new stuff or improving their own knowledge. 

Finally, want to thank you for spending your time reading the post.
Const Is A Lie In JavaScript & Mastering Unit Testing
Tags: javascript, webdev, productivity, tech
Published: 2020-12-03 17:29:36

Lately, I've been posting a bunch of really fun content in a series called Mastering Unit Testing on Twitter. The latest tweet is here on the difference between DAMP and DRY in unit testing.

Please go give it a look and like/retweet.

**Const is a Lie in JavaScript**


The const keyword in JavaScript is a lie and a waste. I recently tweeted about how const is a waste and had a lot of interesting discussions.

But here's the thing about const in JavaScript: it ONLY makes sure that the reference isn't reassigned. But when you use a keyword like const, it implies to you that the thing you're creating is constant, and will remain unchanged throughout the life of the reference. But that's not true. That's not what const does. Even with the best IDE's of today, nothing about this changes.

So this is totally valid:

![image](https://cdn-images-1.medium.com/max/800/0*ZrWkFBfbBcUtcF4x?)

In JavaScript, we use variables that point at primitives sometimes, but we very frequently point at objects/classes that hold multiple pieces of related data. Even if we use const, this data can be changed at will as above.

Ultimately, const is a little better than a comment when you declare a variable.

So there are two ways to improve this. First, follow the long time tradition of making constants all uppercase.

![image](https://cdn-images-1.medium.com/max/800/0*KBr2Ew50BK8hgneQ?)

The second and even cooler way is to use the Readonly type in TypeScript. Thanks to Val Neekman for this sample:

![image](https://cdn-images-1.medium.com/max/800/0*lNkN9wdfKvywRmZr?)

And now, you get REAL constants, not half ones…

Happy Coding!

Signup for my newsletter [here](https://thinkster.io/?previewmodal=signup?utm_source=devto&utm_medium=blog&utm_term=constisalie&utm_content=&utm_campaign=blog).

Visit Us: [thinkster.io](https://thinkster.io?utm_source=devto&utm_medium=blog&utm_term=constisalie&utm_content=&utm_campaign=blog) | Facebook: @gothinkster | Twitter: @GoThinkster
Lets Start With BigData !!
Tags: bigdata, hadoop
Published: 2020-12-03 17:28:08

 👉 https://shashwatsingh71.medium.com/bigdata-problem-2c7bf90fca55

This is My first post on DEV ... So, I am going to Share my blog which is related to BigData <With Complete Information> !! 


Give The Clap If u Like it ❤ !!

Thank You
How to remove a number from an array with JavaScript
Tags: javascript, beginners
Published: 2020-12-03 17:19:55

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/e36whbxbrs41rmlkyo0u.jpg)

How to remove a number from an array with JavaScript? Let me show how to do it:

```
const input = [1,2,3,4,5,6,8,5];
const removeNumber = 5;
const result = input.filter(
    item => item != removeNumber
);
```

Above example uses [array.prototype.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) function. It iterates over all array items, and returns only those satisfying [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions). As a result, old array stays intact, while a new array called result contains all items that are not equal to five.

## Online demo

You can test it yourself online: [jsfiddle](https://jsfiddle.net/ngtkd7ua/)

You can visualize how [array.prototype.filter](https://summonthejson.com/blogs/news/array-prototype-filter) like this:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/nbh1xfo9199u63x1ehqc.gif)

# Considerations

## Code quality

Array.filter.prototype is far the most readable method to remove a number in this case. It leaves little place for mistakes and uses core JS functionality.

## Why not array.prototype.map?

Array.prototype.map is sometimes consider as an alternative for array.prototype.filter for that use case. But it should not be used. The reason is that array.prototype.filter is conceptually used to filter items that satisfy arrow function (exactly what we need), while array.prototype.map is used to transform items. Since we don't change items while iterating over them, the proper function to use is array.prototype.filter.

## Support

As of today (2.12.2020) 97,05% of Internet users [browsers support](https://caniuse.com/?search=Array%20filter) array.prototype.filter. So generally speaking it is safe to use. However, IE6 - 8 does not support it. So if your use case requires support for these browsers there is a nice [polyfill](https://vanillajstoolkit.com/polyfills/arrayfilter/) made by Chris Ferdinanti.

## Performance

Array.prototype.filter is great for most use cases. However if you are looking for some performance improvements for advanced data processing you can explore some [other options](https://stackoverflow.com/questions/31459395/why-using-for-is-faster-than-some-or-filter/31471843) like using pure for. Another great option is to rethink if really array you are processing has to be so big, it may be a sign that JavaScript should receive reduced array for processing from the data source.
Shallow Copy vs Deep Copy in JAVASCRIPT
Tags: javascript, webdev, programming
Published: 2020-12-03 17:19:32

Shallow copy and deep copy are used to copy objects in javascript. Before directly jumping into the differences first let's see why objects are not copied using `=` operator.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qpc64dx9zf0m6gvqcksx.PNG)

`=` operator makes a reference to the same memory location and does not actually copy. Let's understand it with the example-

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/bl9q0cyjzg6irappu5ck.PNG)

Thus it is clear from the example that `a` and `b` are both references to same memory location.So we cannot copy using `=` operator.

#Shallow Copy

It is used to copy objects which are not nested(i.e. do not contain another object within them). There are two methods -

1.using spread(...)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0e6zoncbtgctwcw516ls.PNG)

Here when `c` is modified,`a` remains the same so `c` is a copy of `a`.

2.using Object.assign() method

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/5n00arekxso8339qhelf.PNG)

Here when `d` is modified, `a` remains the same so `d` is a copy of `a`.

#Deep Copy

Deep copy copies the objects irrespective of whether it is nested or not.It uses JSON.stringify() and JSON.parse() methods.Let's understand it with an example that has nested objects-

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fdm9bea1yynmqpmqah11.PNG)

Applying one of the methods of shallow copy-

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4eh5fvhit9v509lazegk.PNG)

Observe that when the nested object of `b` is modified `a` also gets modified. The reason behind this is `shallow copy` in case of nested objects use the reference of nested objects and only make copy the parent object.

Applying JSON.stringify() and JSON.parse() methods for deep copy-

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/hvf2zey6ej4dt2oc52td.PNG)

Here when the nested object of `c` is modified `a` remains the same.
>I hope this blog helped you understand the differences between `Deep Copy` and `Shallow Copy` in javascript.
Do I Need CSRF Token?
Tags: beginners, ask, help, discuss
Published: 2020-12-03 17:11:14

---
title: Do I Need CSRF Token?
published: true
description: 
tags: beginner,ask,help,discuss
//cover_image: https://direct_url_to_image.jpg
---
Do I need to implement CSRF Token even though my backend and frontend apps are seperated?
FlameCon: Talks about Flutter's largest game engine
Tags: flame, flutter, gamedev
Published: 2020-12-03 17:10:45

Don't miss FlameCon 2 in less than a week!

I will be speaking about the Effects API in Flame and following that the brilliant community member @missionctrl will be speaking about how they built pseudo-3D support for their game.

https://flame-engine.org/flamecon
What is FTP?
Published: 2020-12-03 16:49:50

While talking to a colleague at work, FTP came up in the conversation and I didn’t know anything about it, so I decided to research it. Here is what I found!

FTP stands for File Transfer Protocol, it's a way to transfer files between computers. You use FTP to access a remote computer on a network to get or receive files. Originally, FTP existed as one of the original programs for accessing information on the Internet, before HTTP became the way to access web browsers! 

Being a web developer, we can use FTP to make changes to a website. One way to use FTP is by using a web browser to communicate with the FTP server. A web browser is convenient when a user needs access to large directories. However, it is said to be less reliable and slower than using a dedicated FTP program. An FTP client is the most common way for web developers to use FTP. An FTP client provides a lot more freedom and usability compared to other methods. As a web developer, you will probably need to use FTP with an FTP client to access a website that you are managing. Furthermore, FTP makes it easier to create and remove directories as well as read a large number of files on the server.

I hope you enjoyed my brief intro to FTP, thanks for stopping by!
Supervised And Unsupervised Learning
Published: 2020-12-03 16:48:54

Supervised learning as the name indicates the presence of a supervisor as a teacher. Basically supervised learning is a learning in which we teach or train the machine using data that is well labeled which means some data is already tagged with the correct answer. After that, the machine is provided with a new set of examples(data) so that the supervised learning algorithm analyses the training data(set of training examples) and produces a correct outcome from labeled data. 
Unsupervised learning

Unsupervised learning is the training of a machine using information that is neither classified nor labeled and allowing the algorithm to act on that information without guidance. Here the task of the machine is to group unsorted information according to similarities, patterns, and differences without any prior training of data. 

Unlike supervised learning, no teacher is provided that means no training will be given to the machine. Therefore the machine is restricted to find the hidden structure in unlabeled data by our-self.
Advent of Code 2020 Solution Megathread - Day 3: Toboggan Trajectory
Tags: adventofcode, challenge
Published: 2020-12-03 16:44:12

---
title: Advent of Code 2020 Solution Megathread - Day 3: Toboggan Trajectory
published: true
description: In day three, we've got a 2D grid, trees, and a toboggan, and we're going to be churning powder on some rational slopes.
series: Advent of Code 2020
tags: adventofcode, challenge
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/kijlffstcsxipy155bto.png
---

We're on to Day 3 now!  I'm seeing a bunch of cool languages getting submitted, which is really fun.  Let's get to the puzzle!

## The Puzzle

In [today’s puzzle](https://adventofcode.com/2020/day/3), we're trying to toboggan down a foresty slope to get to the coast for our trip.  But trees aren't conducive to safe sledding, so we're checking our options carefully before starting.  2-D grids are a staple of Advent of Codeses past, and we've seen things dealing with rational slopes too.  But it'll be interesting seeing how you decide to sled down *these particular* rational slopes. 😉

## The Leaderboards

As always, this is the spot where I’ll plug any leaderboard codes shared from the community.

```
Ryan's Leaderboard: 224198-25048a19
```

If you want to generate your own leaderboard and signal boost it a little bit, send it to me either in a DEV message or in a comment on one of these posts and I'll add it to the list above.

## Yesterday’s Languages

Updated 03:06PM 12/12/2020 PST.

| Language   | Count |
|------------|-------|
| Python     |     5 |
| Ruby       |     3 |
| Rust       |     3 |
| JavaScript |     2 |
| Raku       |     1 |
| COBOL      |     1 |
| PHP        |     1 |
| Elixir     |     1 |
| C          |     1 |


Merry Coding!
Pie & AI: Pune - Expert Interview | Sanyam Bhutani
Tags: deeplearning, machinelearning, kaggle, ai
Published: 2020-12-03 16:36:02

"Pie & AI: Pune - Expert Interview | Sanyam Bhutani" is a Pie & AI event hosted by DevsCollab in partnership with deeplearning.ai.

Sanyam Bhutani is an ML Engineer and AI Content creator at H2O.ai. He is a x1 Master, x2 Expert, and in the top 1% on Kaggle.

Sanyam also hosts an amazing podcast, Chai Time Data Science. He interviews a lot of great and experienced ML practitioners on the podcast. Watching these interactions is quite riveting and insightful. Do check it out!

On 5th December 2020, we've got the opportunity to interview the man himself. We will interact with Sanyam and see how his roadmap was for getting into AI. If you have any questions for him, join us on the event day.

Registration Link - https://www.eventbrite.com/e/pie-ai-pune-expert-interview-tickets-130833443351
Welcome Thread - v102
Tags: welcome
Published: 2020-12-03 16:34:41

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

![Hello Sun](https://media.giphy.com/media/uFlGZaUeQ7rv6B55io/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!**
"X things that you must do to be Y"
Tags: mentalhealth
Published: 2020-11-27 09:53:51

Hey lovely people :heart:,

Lately I have been scrolling a bit through articles (on Dev, but also general subjects) and the thing I see a lot are article titles like:
- 10 things you must know as a good Software Developer;
- 5 things you should not do as a beginner;
- 8 mistakes beginners make;
- etc.

You get the idea of it. 

## What's up?
I have noticed these titles trigger me (and probably others too) to click it. It's a call to action and makes you curious. I also noticed, at least for me personally, it bothers me a bit. Why? Because it kind of seems to be a 'command' to do something. And if you don't, you're not doing the best you can. Or you're not following 'the norm' (at least what is considered to be the norm according to the writer of the article).

I'm not sure if I'm alone in this feeling, but if not, my advise for everyone would be: try to put things a bit more in perspective for yourself a bit.

## Putting things in perspective
What helps for me is rephrasing it like for example "*This writer thinks that* these are the 10 things you should know...". This makes it less of a "statement" and helps myself decide if I actually want to read it or not. In the end, it's only the writer's opinion and not the truth.

As I know the developer community, probably everyone has some awesome things they want to learn. And that's already great! Good is good enough. Does the article fit within your current priority/goal? Then it can be useful. If not? No worries, titles are not alive and can't judge you. And even if they did, you have the perfect motivation to not read on a subject and focus on what is important for YOU.

Hope this pep talk-ish article helps the ones that need it. You're doing an amazing job :sparkles:!