teleren/devto huggingface dataset:
What are the last 3 books you read? 📚🤓
Tags: watercooler, discuss, productivity, motivation
Published: 2020-09-05 13:03:37

---
title: What are the last 3 books you read? 📚🤓
published: true
description: 
tags: watercooler, discuss, productivity, motivation 
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/nytx8fnx2zhnjove61r6.png
---
I'll go first. Here are my 3 recent-most reads:

1. **Indistractable -** Well-researched insights complemented by some great anecdata from Nir Eyal. If you've read Hooked and enjoyed it, you'll definitely love this one. Huuuuge amount of actionable advice, and it also comes with a supplementary workbook to help you actually execute the advice.
2. **The Effective Executive -** Peter F. Drucker is one of the most important names in management, and this book is clear proof of why. The advice in this book is still relevant as ever. The book teaches you how to effectively manage yourself first; that's where the heart of management lies.
3. **Principles: Life and Work -** Timeless classic that I had heard a lot about and finally got around to reading it. It was worth every minute. I now know what the hype was all about.

All three were great, high-value books for me. So what were your last 3 reads?

And if you're stuck and wondering how to pick your next book, check out [this article](https://medium.com/skynox/why-self-help-books-wont-help-you-d3ede593c24) by my friend [Utkarsh](https://twitter.com/YouuTeee).

Find all the books I read [here](https://www.goodreads.com/review/list/29704266-sarthak-sharma?shelf=read).
What's the output?
Tags: javascript, webdev, beginners, quiz
Published: 2020-09-05 12:51:58

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

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack  
**[codedrops.tech](https://www.codedrops.tech/)**
Should form validation be handled in client or server side?
Published: 2020-09-05 12:22:29

Front-end validation (javascript) can easily be bypassed. It should only be used to improve the "user experience" - by providing instant feedback. It also reduces the load on the server.

Back-end validation is a MUST. It has to ensure that the data coming in is indeed valid. Additionally, depending on your architecture, you generally re-use your middle-tier business logic amongst multiple components so you need to ensure the rules that are applied are always consistent - regardless of what the front-end logic enforces.

https://stackoverflow.com/questions/37492271/should-i-handle-html-form-validation-on-front-or-backend#:~:text=2%20Answers&text=Front%2Dend%20validation%20(javascript),the%20load%20on%20the%20server.
Daily Developer Jokes - Saturday, Sep 5, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-09-05 12:00:22

---
title: "Daily Developer Jokes - Saturday, Sep 5, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Saturday%2C%20Sep%205%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1259b02befe.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q___: Why did the functional programmer finally move out of their house?

___A___: For(e) closure
 -->
A better Image component for React Native
Tags: showdev, reactnative, expo, react
Published: 2020-09-05 11:54:08

Introducing a [better image component](https://github.com/react-native-toolkit/react-native-better-image) for React Native!

![Alt Text](https://github.com/react-native-toolkit/react-native-better-image/raw/master/assets/cover.gif)

React Native only includes a basic image component. However, I always needed two very important functionalities on the Image component:
- A **fallback image** if the original source fails to load
- **Progressive image loading** (especially for banners & cover images)

So I customized the existing `<Image/>` component and have been using this `<BetterImage/>` component in my projects. Today, I'm open-sourcing my component to receive feedbacks & ideas from the community.

Do try it out at [react-native-toolkit/react-native-better-image](https://github.com/react-native-toolkit/react-native-better-image)

{% github react-native-toolkit/react-native-better-image %}

I have also created a storybook with detailed docs at [betterimage.netlify.app](https://betterimage.netlify.app/)

What other features do you think are essential for the Image component? Share your ideas & I'll be happy to help 👍
Storing phone number
Tags: softwaredesign, phonenumber, libphonenumber
Published: 2020-09-05 11:29:49

When we need to store phone numbers in database, we may have different concerns to think about. I just want to talk about it casually.

# Do we need to display the country flag beside the phone number?

Perhaps you store the country code in the database and use it to determine which country it belongs. However, there are some countries having the same country code.

For example, do you know which country this phone number `+1 (800) 642 7676` belongs to? It is the phone number of Microsoft US support.

There are many countries with country code `1`.

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

Therefore, you should also store the country to the database too. Personally I prefer [ISO 3166 format](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) (e.g. JP for Japan).

# Should it be unique in the database?

Usually, you may avoid having multiple users using the same phone number, so you add `UNIQUE` constraint to the database column. Before you store it to database, you should normalize it first to ensure each input is using the same format. Otherwise, `6427676`, `642-7676` and `642 7676` will be treated as different numbers.

[E.164](https://en.wikipedia.org/wiki/E.164) format ensures each device having a globally unique number.

# How to make life easier?

[libphonenumber](https://github.com/google/libphonenumber) is a library created by Google. There are implementations for different languages. It can validate, format, parse phone number.

It also includes a [page about the fun facts](https://github.com/google/libphonenumber/blob/master/FALSEHOODS.md) of phone number. Enjoy!
Think like a programmer 💭 💻
Tags: javascript
Published: 2020-09-05 11:23:52

## 1 - Develop a never give up Attitude.

During this journey, you face many bugs, challenges and errors but never ever give up because :

> Success is closer than you think.

## 2- Become a problem solver.

![Like a Ninja](https://cdn.hashnode.com/res/hashnode/image/upload/v1599300886027/kWOYAmIJw.jpeg)

Programming is all about problem solving : 

> Think logically and break down the problem into steps to find the optimal solution.


## 3- Be Independent.

Before you ask someone for help, push yourself as much as you can.

![Googling](https://cdn.hashnode.com/res/hashnode/image/upload/v1599301734796/qm9zAo4Ar.gif)

> Master the art of Googling.

## 4- Consistency is the key 🔑 

Be consistent, practice daily, help others.
Set Challenging goals and smash them by pushing your limits.

![Goals](https://cdn.hashnode.com/res/hashnode/image/upload/v1599302192595/8lyToAoTW.jpeg)

#### Thank you for reading this story.
##### Share this post with your friends 🙏
Difference between devDependencies and Dependencies.
Published: 2020-09-05 11:18:22

The difference between these two, is that devDependencies are modules which are only required during development, while dependencies are modules which are also required at runtime.
To save a dependency as a devDependency on installation we need to do an npm install --save-dev, instead of just an npm install --save.
https://medium.com/@dylanavery720/npmmmm-1-dev-dependencies-dependencies-8931c2583b0c#:~:text=The%20difference%20between%20these%20two,an%20npm%20install%20%2D%2Dsave.
Dart x Flutter MokuMoku Live Stream 05/09/2020 
Tags: dark, flutter, mokumoku
Published: 2020-09-05 05:00:34

Make something.. at Dart and Flutter ...

https://youtu.be/cXdW5bpe9TA 
https://youtu.be/PSR6EfcR0KI

It is a screen capture during work at Mokumokukai
Details will be summarized later

# Code
https://github.com/kyorohiro/mokumoku01

# What is mokumoku

For the time being, people who are interested in a certain theme gather and work individually. Just say


# Result
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/9sun6ngiet69j28u3xm1.png)



# Know-How
This Live 's know how

- File Input at Flutter for web
- Use isolate at Flutter for web


# TODO

- Interruption of isolate(html worker)'s processing entrusted 
- And Also, although the processing was divided into different Threated using workers, when the number of colors increases
It may not be finished in a few minutes, so take measures
- make it work on Android and iOS
- Drag and drop support at input file in flutter for web 

etc...
Difference between devDependencies and Dependencies.

Published: 2020-09-05 11:05:30

The difference between these two, is that devDependencies are modules which are only required during development, while dependencies are modules which are also required at runtime.
To save a dependency as a devDependency on installation we need to do an npm install --save-dev, instead of just an npm install --save.
https://medium.com/@dylanavery720/npmmmm-1-dev-dependencies-dependencies-8931c2583b0c#:~:text=The%20difference%20between%20these%20two,an%20npm%20install%20%2D%2Dsave.
What even is GitHub Codespaces?
Tags: codespaces, github, opensource, vscode
Published: 2020-09-05 11:01:39

So GitHub has recently announced a new way for users to edit their code online, through something called the Codespaces, which is currently in beta. Here is an overview of what it's all about.

### <b>What is Codespaces?</b>
According to GitHub, "Codespaces is an online dev environment which gives a complete Visual Studio Code like experience without leaving GitHub". This means that all the users who have signed up for Codespaces, can edit their code and get access to all the features of VS Code along with it's marketplace on GitHub itself.

Well currently Codespaces is in beta and you can sign up for early access [here](https://github.com/features/codespaces/signup).

### <b>Is Codespaces available to everyone, and for all repositories?</b>
Currently Codespaces is only available for a limited number of users and over time more users will start gaining access to it based on availability and sign up date.

While in beta, Codespaces will be available for the repositories that you own and public repositories. Additional support will be available as the beta progresses, but for now, Codespaces will not be available for private repositories that belong to organizations.

### <b>Pricing</b>
Codespaces will be free for the limited beta, and GitHub is planning to make it a pay-as-you-go service in the future.

### <b>Codespaces vs Visual Studio Code</b>
Codespaces sets up a cloud-hosted, containerized, and customizable VS Code environment. After set up, you can connect to a codespace through the browser or through VS Code.

For more information about Codespaces, and to know about the FAQ's related to Codespaces, you can go to [this](https://github.com/features/codespaces) link.

Source - [GitHub Codespaces](https://github.com/features/codespaces)
CloudSkew crosses 20K user signups
Tags: milestones
Published: 2020-09-05 10:58:14

[cloudskew.com](https://www.cloudskew.com) is acquiring users at a steady clip and just crossed 20K user signups this week.

![20K user signups](https://assets.cloudskew.com/assets/blog/images/38-milestone-20k-user-signups.png)
balalaika IT newsletter #9
Tags: react, node, java, webdev
Published: 2020-09-05 10:58:01

---
title: balalaika IT newsletter #9
published: true
description: Curated IT newsletter. From Russia with love. Issue #9.
tags: #react #node #java #webdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/7dwkz927sf2ausnqygq3.jpg
canonical_url: https://blog.balalaikait.com/balalaika-it-newsletter-9
---
*If you like this newsletter subscribe to our new issues at http://balalaikait.com/*

# General

- CPU caching 101 from Nick Evanson. A [concise read](https://www.techspot.com/article/2066-cpu-l1-l2-l3-cache/) about the fundamentals to get you started on how it works and why we need it. 
- Over the last two years, Uber has attempted to reduce microservice complexity while still maintaining the benefits of a microservice architecture. With [this blog post]( https://eng.uber.com/microservice-architecture/) we hope to introduce our generalized approach to microservice architectures, which we refer to as “Domain-Oriented Microservice Architecture” (DOMA).
- Distributed locks are infamous for being hard to use right. Some time ago Hazelcast team introduced locks as a part of CP Subsystem based on Raft, a well-known consensus algorithm. This [blog post](https://hazelcast.com/blog/long-live-distributed-locks/) describes potential pitfalls of distributed lock and how FencedLock solves them.
- Great engineers of the past have a lot to learn from. In [this talk](https://youtu.be/bo5WL5IQAd0) explains how Erlang was designed to scale well on multicore machines.

#JavaScript
- ES6 introduced many nice built-in collections, such as Map, Set, WeakMap, and WeakSet. Unfortunately, the spec does not put many requirements for concrete implementations. If you want to learn practical details of Maps and Sets implementation in V8, read this [blog post](https://itnext.io/v8-deep-dives-understanding-map-internals-45eb94a183df) by Andrey P.
- JIT compiler is what makes V8 and other JS engines blazing fast. But exactly does it do? Watch this [talk](https://youtu.be/p-iiEDtpy6I) by Franziska Hinkelmann to learn the answer.

# React
- Is it possible to build SPAs purely in Rust and without writing a single line of JavaScript? The short answer is YES! Read about the experiment [here](http://www.sheshbabu.com/posts/rust-wasm-yew-single-page-application/).

# Node.js
- A [concise guide](https://httptoolkit.tech/blog/how-to-debug-node-segfaults) on how to debug segmentation faults in Node.js.

# Java
- Did you know that `java.security.SecureRandom` may be more or less secure depending on the configuration? This [blog post](https://tersesystems.com/blog/2015/12/17/the-right-way-to-use-securerandom/) explains how to use it in the right way.
Global HTTP Request using Interceptors and Axios
Published: 2020-09-05 10:46:35

####What are Interceptors?And how to intercept axios request and response.
If for some reason you want to inject a piece of code in a method that needs to be executed before or after the execution of that method, then interceptors are there to help you. In the following example, we created an interceptor method on Array.prototype.reverse, this method consoles the value of the array before the reverse and after the reverse.

```
// store original implementation in cache
var _reverse = Array.prototype.reverse;

// define your own reverse method
Array.prototype.reverse = function() {

   // before reversing array
   console.log("before reverse \n"+this.toString());

   // call original Array reverse method
   _reverse.apply(this, arguments );

   // do whatever you like after
   // the reverse has been called
       console.log("after reverse\n"+this.toString());
}

const array1 = ['one', 'two', 'three'];

array1.reverse();
   }
}
```
####Intercept axios request
For those who do not  know what is axios? “ Axios is a promise based HTTP client for the browser and node.js.” With the help of interceptors we can modify the request and response before respective methods calls from the library. Interceptors can help us apply common functionality across all requests at one place.


```
const HTTP = axios.create({
 baseURL: env.API_URL,
 timeout: 60000,
});

HTTP.interceptors.request.use(
 (config) => {
  config.headers.authorization = `Bearer ${localStore.getToken()}`;
   return config;
 },
 (error) => {
   return Promise.reject(error);
 }
);

// Add a response interceptor
HTTP.interceptors.response.use(
 (response) => {
   return response;
 },
 (err) => {
        console.log(err)
 }
);
```
As from the above example we can see that we created an axios instance and use two interceptors one for request and one for response. In the request interceptor we get the token from local storage and put in a header of request and in case if an error occurred during getting token it will reject the request immediately. Another one for the response, it also has two callbacks one for the response(any status code lies between 2xx) and another one for error handling.
Don't mess with default Python scoping
Tags: python, discuss
Published: 2020-09-05 10:29:02

Using the `global` and `nonlocal` keywords shouldn't happen too often imho. I think it's hard to debug and read. Newcomers may not see the big picture as the original writer of a piece of code. So, when those are used - keep very tight set of tests to make sure it won't be broken in the future and also - more understandable. I tend to read tests to understand how to use. 
Why not use them? - I think it makes code less modular. So Use it only in the very same Unit of code.

For example,

https://github.com/aws-samples/aws-concurrent-data-orchestration-pipeline-emr-livy/blob/master/dags/airflowlib/emr_lib.py

```

def client(region_name):
    global emr  # <-- (1)
    emr = boto3.client ('emr', region_name=region_name)

... other functions...

def get_cluster_dns(cluster_id):
    response = emr.describe_cluster(ClusterId=cluster_id)
    return response['Cluster']['MasterPublicDnsName']

... other functions...
```
I won't call this a "good" example (I would rather gather those functions to a Class with an `emr` property) - but at least it's "understandable". The writer intended for the "client" method to be called first for initialization before any other function in this file. 

If you can think of other examples to when it's right to use `global` and `nonlocal`, please comment in the discussion.
Flutter tip (#4): run a Flutter app to a specific route
Tags: dart, flutter
Published: 2020-09-05 10:17:33

Few days ago I found an hidden gem in the main Flutter repository and shared it on my [Twitter account](https://twitter.com/pedromassangom/status/1298634719966494725) and today I tought its better to share on my blogpost.

Have you ever wanted to run your Flutter app straight to a specific named route? yes it is possible.

This is helpful when you:

- Want to test a specific page in your app and you don't want to run the whole app and navigate to that page by yourself.
- Want to test [deep link](http://sellsbrothers.com/understanding-flutter-deep-links-on-the-web) in your Flutter app.
- (other) you may need it for many other use-cases :)

## Show me the code

All you need to do is to run the flutter command with the `--route` parameter:

`pedromassago$ flutter run --route /routeName`

The `--route` parameter expect a string that is the route name that will be used to start your application with. In the case above the app will start with the `/routeName` page in your screen.

## Notes

This feature is only available for Android devices at the time this post was written. There is a open issue to bring support for other platform like iOS at [flutter/flutter/issues/4703](https://github.com/flutter/flutter/issues/4703). If you wan this feature on iOS you can thumbs up the issue to get it fixed sooner.

Thanks for you time! 😉
es-check-action - check JavaScript files against a specified version of ECMAScript
Tags: actionshackathon, javascript, github, ci
Published: 2020-09-05 10:14:40

[Instructions]: # (To submit to the GitHub Actions x DEV Hackathon, please fill out all sections.)


### My Workflow
`es-check-action` checks JavaScript files against a specified version of ECMAScript (ES). If a specified file's ES version doesn't match the ES version argument, this action will throw an error and log the files that didn't match the check.

In modern JavaScript builds, files are bundled up so they can be served in an optimized manner in the browsers. It is assumed by developers that future JavaScript—like ES8 will be transpiled (changed from future JavaScript to current JavaScript) appropriately by a tool like Babel or TypeScript. Sometimes there is an issue where files are not transpiled which would cause issues in browsers who don't support all the latest features (e.g. IE11).

[Check out my blog post about this topic (Medium.com)](https://medium.com/better-programming/check-your-javascript-bundles-for-browser-support-d769c1fca4c)

Main motivation: avoid unexpected issues with unsupported features in web browsers without having to always do manual checking in those browsers.


### Submission Category: 

[Note]: # (Maintainer Must-Haves, DIY Deployments, Interesting IoT, Phone Friendly, or Wacky Wildcards)

I'd say it's **Maintainer Must-Haves** but it also belongs somewhat to **DIY Deployments**.

### Yaml File or Link to Code

The source code including a example is available on GitHub.

{% github ali-kamalizade/es-check-action %}


### Additional Resources / Info

This action uses itself as part of a [GitHub Workflow](https://github.com/ali-kamalizade/es-check-action/blob/master/.github/workflows/continuous-integration.yml) #recursion