teleren/devto huggingface dataset:
Week-1 into Machine Learning and my dopamine addiction.
Tags: machinelearning, flutter, appdevelopment, beginners
Published: 2020-05-29 19:13:22

Hey influential developers! As I promised you, that every Friday, I'm going to upload a new blog, this just "Another" guy who wants to learn machine learning is back again, excited to tell more about my machine learning journey as well as an app I built with the help of Flutter. 

But there is also something else I wanna tell you. I'd like to express what I've felt this last week. I write these blogs here on Dev.to because I feel that we, The aspirants, the learner and the leaders of change are a family, and so writing something here will add value to our community.

My city is been under complete lockdown since like three months now. I even had to celebrate my 18th birthday at home video calling my friends! These last couple of months have been terrible on my mental health. I felt like I was squandering my time and procrastinating! I had like a crush and I don't how I gathered the courage to message her! But I did! We continued texting for like two weeks and I found myself doing nothing but waiting for her reply all day. It was like I needed that dopamine shot every minute. Until I realised that going through this emotional turmoil is not worth it. I was feeling useless.

But I have been trying to turn things around and I have found ways to be productive even during these tough times.

I'll share with you how I was able to do it in the next blog because now, it's time for..... Machine Learning!!

I've been able to do quite a lot of progress in my course. I've learned below mentioned things this week:
1. Cost and Hypothesis function.
2. Linear regression algorithm.
3. Gradient descent.
4. Matrices and vectors.

I know this doesn't seem too much but I would rather like to dive deep into the concepts, to take little more time with things and create a strong base than just trying to finish a course.

Furthermore, this week I also made a quiz app and a personality tester app using Flutter. Flutter is a pretty neat framework. Everything in Flutter is a widget! I mean what else could a developer want! It also has awesome documentation on its site. I think I'll like to see what more Flutter has and so I'll also be learning Flutter side by side.

For the next week, you'll have the following reasons to read my blog:

In the coming week, I plan to make personal expenses manager app and also learn multivariable linear regression. Also, don't you all forget about the resources, tips and tricks I'll give you, which I used to overcome my dopamine addiction and procrastination. I'll also tell you if I was able to complete one of the goals on the goal chart, which is, read any four books by this Sunday.

Please support me by liking my blogs and following me.
do younger developers have an advantage over older developers? 
Tags: discuss, codenewbie
Published: 2020-05-29 18:44:46

I often hear that companies favour young devs compared to old devs. Probably because it costs less to do so.
However, I also hear that experience is the number one reason a dev is usually hired. Also when companies are hiring, they look for people with 5 years of experience, etc. 

Do you think think young devs have advantage, or the opposite is the case?
NG-Select Opinions
Tags: ngselect
Published: 2020-05-29 18:36:06

[Ng-Select](https://ng-select.github.io/ng-select#/data-sources) is an open source project, it is *not a part* of Angular.io, but could be mistaken to be a part of Angular. 

For native Angular select support, use material's [mat-select](https://material.angular.io/components/select/overview) component instead.

**Options**

The ng-select component can do everything under the sun. Sometimes it shines, other times it's cloudy. 

The shiny parts are that for simple list it's great, fast and easy to use.

Complex object bindings needing labels and options templates are difficult.

**Binding**

For example, you want a person's first-name and last-name to appear in the drop-down box. This simple thing requires templates. Once templates are used, the default filters don't work. Instead you must create your own filters. Not well documented at all. 

To debug, you'll need to single step into the JavaScript of the tool, which is quite long and tedious to do.

**Summary**

Next time I need a Select Angular control, I'll skip the ng-select and head over to the mat-select instead.
My First GitHub Action!
Tags: github, bash
Published: 2020-05-29 18:33:52

I wrote a [GitHub action](https://github.com/MarounMaroun/shell-checker) for running [ShellCheck](https://www.shellcheck.net/) on shell files in your PR.

## Usage

Create a file `checker.yml` inside `.github/workflows`:

```yaml
on: [pull_request]

jobs:
  shell-check:
    runs-on: ubuntu-latest
    name: Shell Checker
    steps:
      - uses: actions/checkout@v2
      - uses: marounmaroun/shell-checker@v1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          severity: 'info'
          exclude: ''
```

You can set the severity to one of: "error, warning, info, style". Default is "info".

You can also include type of warnings to exclude. For example:

```yaml
exclude: 'SC2006,SC2148'
```

Default value is not set, meaning that there will be no exclusions.

Code is available here: https://github.com/MarounMaroun/shell-checker
Which stack to use for blogging site?
Tags: help, discuss, blog, gridsome
Published: 2020-05-29 18:15:14

Hey everyone,
I have decided to make a blogging site for me. I have decided to use Gridsome for that purpose as I am a vue fan.

Now, I wanted your suggestions on what should I use for managing the content, tags etc.

I have thought of two options
- Use yaml, markdown for the content.
- Use a CMS for that like contentful.

For what should I go for?
Kubernetes starts too expensive?
Tags: devops, kubernetes, discuss, healthydebate
Published: 2020-05-29 17:42:46

Even though I currently have 300 USD for 1 year credit on Google Cloud Platform. I cannot be so sure if I will use Kubernetes... (What if one year has ended)

It starts as expensive as 10 USD / month, and I am not sure if it will end up much more than the fixed priced VM or dedicated server. (AWS LightSail starts as well few as 3.5 USD / mo)

Indeed, the credit comes from

- New account (I have new my-domain email)
- GitLab partnership with GCP
- GitLab's partner -- CodeFresh

GitLab also has Kubernetes integration.

Is Kubernetes a marketing slogan these days to make DevOps more expensive (i.e. cloud providers earn more money)?
Free Course - Complete JavaScript DOM in 2 hours - Udemy - May 2020
Tags: webdev, javascript, html, codenewbie
Published: 2020-05-29 17:29:56

> In this post you will be able to enroll in the Free Udemy course that explains JavaScript DOM completely in 2 hours.

**Course Intro**

{% youtube EeAkeDlTj2g %}

**Course Link:** https://udemy.com/web-dev-dom

Feel free to share it to anyone who would benefit out of this. The project part of this course will be uploaded to my YouTube Channel: https://youtube.com/c/developerTharun

{% user developertharun %}
52: From Beginner to Intermediate 
Tags: javascript
Published: 2020-05-29 16:01:34



I would not think that it is possible to be the same one who originally studies mathematical background, it is such a different setting that I am just starting to approach. I chose the way of expressing the new communication through data structures and algorithms, for becoming myself. The only reason I continue to study software engineering comes from the need of understanding the world and face the problems, finally solve my own way.

---
I chose the project ‘Data Structures and Algorithms’. This comes again from my deductive logic, thus there should be references. The only thing I am sure about is that focusing on the invisible worth to figure out the whole logic of software engineering, in the beginning, it’s like a vanilla JS, think this is the most important to create my language system, most of all.

--- 
It is easy to find out the reasons for googling, but then, can we not know the actual reason to understand fundamental computer science? if we can, we might have the power of navigate the computer efficiently. Everyone is different, I just know to take care of my invisible worth to be who I am.
📚 A Larder.io Command Line Interface!
Tags: go, showdev, productivity, cli
Published: 2020-05-29 17:22:17

# Preface

[Larder](https://larder.io/) is a bookmarking tool for developers. It supports categorizing and tagging bookmarks. Categorizing is done by folders. You can make a folder that has child. It will make you easier to organize bookmarks. Beside that, you can search your bookmarked links by tag, title, and URL.

This tool also supports synchronizing your GitHub stars too. So, you can track updates from projects that you starred on GitHub. If you want to bookmark something automatically, Larder extension is available for browsers, Android, and there's also an API.

I decided to make a robust, easy to use command line interface for Larder. I did this mainly because I have a 2012 Macbook Pro with 4GB of RAM that *really* cannot handle any more browser extensions. I also did this because I know there's a lot of folk who live in their terminals and detest browser extensions.

---

# The Larder CLI

Okay so first off, I am aware a few CLI's for Larder exist, but most of these are Ruby or Node.js based. Go is much more performant and because of this, the Larder CLI, which you can find [here](https://github.com/theycallmemac/larder) is written in Go.

The tool leverages the [Cobra](https://github.com/spf13/cobra/) library. Cobra has been used to build some of the best CLI's around, being utilized in projects such Kubernetes, Hugo, etcd, Docker and rkt, to name but a few.

The Larder CLI allows for the viewing, adding, removing of a user's folders and/or bookmarks. 

Along with this, the tool offers a robust search functionality. The user provides a string of search terms delimited by commas. For example: "texas,bbq". This will search through all folders, for names or tags containing those terms.

___

# The Unique Selling Point 

What really makes this new Larder CLI stand out is the ability to refresh your access token. Tokens expire in a month and can be refreshed for a new access token at any time, invalidating the original access and refresh tokens. 

This built in functionality does not exist in alternatives to this Larder CLI. This process is automated so the user can continuously use the Larder CLI without having to manually remove and add new access tokens.


---

You can check out Larder [on Github](https://github.com/theycallmemac/larder).
Monorepo App with Lerna

Tags: webdev, lerna, javascript, sideprojects
Published: 2020-05-29 16:59:16

Monorepo is a way to organize an application. In this case, the application is divided into several parts, each of which is a separate package. For example, look at the React repository. You will see that the main parts of this library are separate packages: "react-reconciler",  "react-dom"… In other word, monorepo is a multi-package repository.

What are the advantages of this way? In a nutshell, separation into logical parts facilitates versioned, testing and understanding of the overall project. But better than any words is practical experience.

Many years ago I made a personal website for the russian artist Gregory Maiofis. It was a monolithic Ruby On Rails application. Recently I decided to rewrite this as a single-page and monorepo application. You can see the result on [github](https://github.com/victor-magarlamov/maiofis-app).

In this work I used [Lerna](https://github.com/lerna/lerna) and below I want to tell you (in short) how to use this multi-package application management tool.

The first command is `lerna init`. It creates a new lerna repo. Open the `lerna.json` file after executing this and add the following lines:

```javascript
"useWorkspaces": true, 
"command": {
  "run": {
    "npmClient": "yarn"
  }
}
```

And add to the `package.json` file:

```javascript
"workspaces": {
  "packages": [
    "packages/*"
  ]
}
```

These changes allow us to use yarn workspaces.

I organized my project in the following manner:

```
packages
  |---app   // main application with CRA
  |---admin // Admin Panel
  |---ui    // a library of common React components
  |---api   // a library for working with API
```

The main commands:

```javascript
// bootstrap the packages in the current Lerna repo
lerna bootstrap

// Symlink together all packages
lerna link

// execute the "start" command in all packages 
// that contains this command
// in my case it will be "app" and "admin"
lerna run start

// execute the build command in the "ui" package only
lerna run --scope @project/ui build
```

+ More about working with Lerna - https://dev.to/shnydercom/monorepos-lerna-typescript-cra-and-storybook-combined-4hli
+ More about workspaces - https://www.smashingmagazine.com/2019/07/yarn-workspaces-organize-project-codebase-pro/
+ More about Lerna - https://github.com/lerna/lerna
Things to know
Tags: swift, beginners
Published: 2020-05-29 16:46:29

1. What is the difference between a function and a method?

      A- A function returns a value, but a procedure does not. A method is similar to a function, but is internal to part of a class. The term method is used almost exclusively in object-oriented programming. A function is something that takes a bunch of inputs and returns one or more values.


2. Why are structures a better way to define data than just declaring a series of variables?

     A- A structure definition is like a blueprint for the structure. It takes up no storage space itself instead just specifies what variables of this structure type will look like. An actual structure variable is like a box with multiple data fields inside of it. Consider the idea of a student database. One student record contains multiple items of information (name, address, SSN, GPA, etc)
Builder pattern
Tags: java, tutorial, designpattern, beginners
Published: 2020-05-29 16:35:10

This is another creational design pattern. Just think about the StringBuilder. If you create a StringBuilder object, you can append strings one by one to the same StringBuilder object.

        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append("Java").append("Foundation");

This is the functionality of the builder pattern. There are a few ways to implement the builder pattern.

##Using constructor

{% gist https://gist.github.com/raviyasas/66ecbee2cd1bb0de0bd8b21d196e2479 %}


##Using inner classes

This is the best approach to implement the builder pattern.

{% gist https://gist.github.com/raviyasas/08b248b5e2cfae302d62a22e5401e822 %}

*[--> Find advantages, disadvantages, usages and more details about the builder pattern](https://www.javafoundation.xyz/2020/05/builder-design-pattern.html)*
Big chunk vs smaller chunks on transferring data
Tags: go, chunk, network
Published: 2020-05-29 15:58:53

While working on [online blake3 hasher](https://toolkitbay.com/tkb/tool/BLAKE3), we want to support subjectively quite large file. Since default limit of grpc is around 4MB (on go lib at least), we got this idea : to chunk or not to chunk?

Then we are doing simple test to know what the impact of one very big sized data when transferred.

first thing first, we need to increase the limit of message size
```go
const (
	maxMsgSize     = 900000000
)
...
conn, err := grpc.Dial(
		"127.0.0.1:7777",
    grpc.WithInsecure(),
    grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize),grpc.MaxCallSendMsgSize(maxMsgSize)),
)

...
GRPCArgs := &pb.Request{
		Input:      []byte(strings.Repeat("A", 200000000)),
	}

r, err := pb.NewCallClient(conn).Handler(ctx, GRPCArgs)
```

Basically, the code send 200*1 million bytes and receive the base64 result with size of 266666668 bytes.

![result](https://dev-to-uploads.s3.amazonaws.com/i/3icb197qnpglgx6k76pq.png)

You can see that the first increase (around 320MB) and decrease on memory because of the transfer process, and the last decrease on the graph is when I close all rpc server and client (GC maybe?).

So, to chunk or not to chunk? Subjectively, If you have the time and short on resources, go for chunking.

Check out also the [csv linter with big size file support](https://toolkitbay.com/tkb/tool/csv-validator)
OpenSource Internships/Fellowships
Tags: opensource, github, help, internships
Published: 2020-05-29 15:55:51

Hello everyone, I have curated a list of opensource internships and programs which will definitely help you or your peers to get an open-source internship/fellowship/job.

Please star this repository which will surely help you in future

{% github deepanshu1422/List-Of-Open-Source-Internships-Programs
 %}



*Don'.t forget to like and share this post, also open a PR on the repository if you find any errors or mistakes
Minute JavaScript - Array's map method
Tags: javascript, video
Published: 2020-05-29 15:55:29

---
title: Minute JavaScript - Array's map method
published: true
description: Minute JavaScript is a Fast format JavaScript Tutorial that gets straight to the point. Today's Topic: Array's map
tags: javascript, video
---

Minute JavaScript is a Fast format JavaScript Tutorial that gets straight to the point.

Topic: Array's map

If you'd like to see more of my videos, [head over to YouTube](https://www.youtube.com/channel/UCDYDhCEPlrYfRyj2ApxeVMA/).

More Minute JavaScript Videos: https://www.youtube.com/playlist?list=PL59tadyXaIqVBUhq1PlZQvUSSzQzM62AF

Quokka.js VSCode Extension (live coding):
https://marketplace.visualstudio.com/items?itemName=WallabyJs.quokka-vscode
⚛️ The 7 best features of React over the last 7 years
Tags: react, javascript
Published: 2020-05-29 15:50:15

As React turns 7 these are the features that have improved my developer experience the most over that period of time.

## 2013 - Initial Release

For new features there needs to be tool. React was officially launched on May 29th, 2013

---

## 2014 - Developer Tools

The React Developer tools are a browser extension that enables you to easily debug your react app.

[React Dev Tools](https://github.com/facebook/react/tree/master/packages/react-devtools)

---

## 2015 - Stateless components

React 0.14 introduced the ability to create components using a simple arrow function

```JavaScript
// A function component using an ES2015 (ES6) arrow function:
var Aquarium = (props) => {
  var fish = getFish(props.species);
  return <Tank>{fish}</Tank>;
};
```

[React 0.14 release docs](https://reactjs.org/blog/2015/10/07/react-v0.14.html#stateless-function-components)
 
---

## 2016 - Create React App

Introduced by Dan Abramov in July 2016 Create React App has become a game-changer when it comes to quickly scaffolding a new React App. 

[Create React App](https://create-react-app.dev/) 

---

## 2017 - React Fiber

React Fiber was the name given to the complete reworking of the React rendering algorithm that greatly improved the performance of app over the previous version

[React Fiber](https://en.wikipedia.org/wiki/React_Fiber)

---

## 2018 - Lazy Loading & Suspense

Suspense lets you specify the loading indicator in case some components in the tree below it are not yet ready to render. Today, lazy loading components is the only use case supported by Suspense.

[React Lazy](https://reactjs.org/docs/react-api.html#reactlazy)
[React Suspense](https://reactjs.org/docs/react-api.html#reactsuspense)

## 2019 - Hooks

Hooks let you use state and other React features in functional components without writing a class.

[Intro to Hooks](https://reactjs.org/docs/hooks-intro.html)

---

## 2020 - Concurrent mode

Concurrent Mode is the newest feature and is something the community has been excited about for a long time. It is a set of new features that help React apps stay responsive and gracefully adjust to the user’s device capabilities and network speed.

[Into to concurrent mode](https://reactjs.org/docs/concurrent-mode-intro.html)

---

What have been your best features over the years?
ThinkPad + (cheap) MacBook vs. (expensive) MacBook
Published: 2020-05-29 15:46:51

I have never been a huge fan of MacBooks as I feel like they cost way too much compared to the hardware. One thing though is that I need one to use Xcode and maybe some other things. I have tried all kind of options like macincloud, virtual box, and hackintosh but nothing feels right. I just need to buy a MacBook.

I because ThinkPad user after getting one from university for my studies. I need to return that at some point so I would planed to buy a new at that point. But then I faced this MacBook problem so I'm not sure if I should buy cheapest MacBook for Xcode and ThinkPad for more powerful development or just one more expensive MacBook for everything. Here I compare which option is better.

Price is the same for both options. The baseline is that I need the cheapest MacBook. Mac mini is actually the cheapest option but I'm going to cancel it as I'm looking for something portable. From Apple's website the cheapest MacBook Air is 1,155.68€ for students (some discount). But this is the latest model. From local electronic stores I can see that two years old model is 989€. The price difference is such a small that I will go with the latest model.

Then additional to this I need decent ThinkPad for real work. I have ThinkPad T490 and it's just perfect so I choose that model but it's possible to customize it on Lenovo's official website. With 8th gen i7, 16 GB of RAM, and 512 GB ssd the final price is 1,757.36€. The thing is that Lenovo is always giving huge discounts and there was some midseason (what is that?) coupon in use making the price 1,493.76€. Then they actually have even better discount for students that's 20% off. That way the final price is 1,406€. With a little bit worse screen or different model I'm probably available to drop the price 200€.

This way this combo would cost around 2,500€. With that money it's possible to get MacBook Pro with 10th gen i5 and even 1T sdd. So the conclusion is that it doesn't makes sense to buy both laptops but just put more money to MacBook Pro and go with the design. It maybe looks great but I'm just afraid that I will break it as it doesn't seem to be as resistant as ThinkPads.