teleren/devto huggingface dataset:
Git terms for dummies!
Tags: git, beginners, github
Published: 2020-08-05 02:55:51

Mid journey toward learning to code you came across the term GIT whether it is mentioned in a tutorial, or you've seen it on every job posting out there. This is the article for you, I'll try to explain the most common terms used and give you a glimpse of what this tool has to offer. 
**_GIT :_**
------
Git is a version control system, it’s simply a tool for programmers to coordinate their work, providing a better workflow for teams. 

**_Repository :_**
------
Repository is a treasury for your code. 
A repository consists of a folder containing files of code / images / text …

**_Remote :_**
------
Remote repository is a version of your project on the internet that is hosted on a web-based version control like GitHub.

**_Branching :_**
------
Branching out or creating a new branch is having another copy of your code on the same repository and is used to give developers the freedom of experimenting and working on new features without the fear of altering the main project.

**_Merging :_**
------
Merging is combining multiple branches of the project on the main branch that is commonly referred to as master.

**_Merge conflicts :_**
------
Merge conflicts happens after trying to merge two branches caused by having concurrent changes in the same file that git doesn't know how to deal with.

**_The 3 git states :_**
------
* __Modified:__ A tracked file has been altered.
* __Staging:__ Files that are ready to be committed.
* __Committed:__ A file the has been added to the last commit, committing is creating an image of the repository. Every commit has a hash to identify it, the author’s name, date, and a commit message.
Day 188: Never Really Get There
Tags: hiphop, code, coding, lifelongdev
Published: 2020-08-05 02:29:38

_liner notes_:
- Professional : So today is the first day of the team "retreat" thing. Normally we would be at an off-site location, but since you know...the world...we are doing everything online. Had a couple of meetings and the kick-off for the internal hackathon. I'm working on a project where I get to do some OCR on a video, read some information and make an API Call. Got a super basic proof of concept working. Going to try and fine tune it to work faster tomorrow. There's a bunch of different settings in the library I'm using for OCR.

- Personal : Didn't get a chance to watch any episodes of "The Umbrella Academy". Hoping to change that tonight. Worked on the side project and I think I may have found a way around the blocker I was having, it works kind of, but throwing a weird error. Going to keep moving forward to get this project deployed. If not I will never really get there when I want.

![A bunch of ferns](https://dev-to-uploads.s3.amazonaws.com/i/5lzlj4qf05nbey06p0hp.png)

Got another early day. Going to do some kind of online team building exercises in the morning. Probably go through some tracks cause my brain is kind of fried on coding haha Maybe get in an episode of "The Umbrella Academy".

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube 4CcDMyiTMlo %}
React Hooks
Tags: javascript, react, hooks
Published: 2020-08-05 02:21:53

#React Hooks

React was created by Jordan Walke, a software engineer at Facebook, who released an early prototype of React called "FaxJS". He was influenced by XHP, an HTML component library for PHP. It was first deployed on Facebook's News Feed in 2011 and later on Instagram in 2012.It was open-sourced at JSConf US in May 2013.
However, only after 8 years, On February 16, 2019, React 16.8 was released to the public,the release introduced React Hooks.

Hooks are functions that let developers "hook into" React state and lifecycle features from function components. They make codes readable and easily understandable. Average developer spend one tenth of time writing code and the rest  reading and digging through his or someone else's composure. React hooks make this process way easier, hooks don’t work inside classes ,instead they let you use React without classes.

React provides a few built-in Hooks like `useState`, `useContext`, `useReducer` and `useEffect` to name a few. They are all stated in the Hooks API Reference, `useState` and `useEffect`, which are the most used, are for controlling states and side effects respectively in React Components and `useEffect`

There are rules of hooks which must be followed before they can be used. Hooks should only be called at the top level (not inside loops or if statements)and they should only be called from React function components, not normal functions or class components

Essentially the biggest benefit of the React hooks is that when you use classes you end up with complex components with stateful logic. It is hard to deal with those components because they relies on the React Lifecycle methods. Instead hooks allow you  to break those components into smaller functions and incapsulate them into smaller units, which you can use depending on the functionality.

The two most used React Hooks are `useState` and `useEffect`, the first basically is a substitute to `class component` and the second is a substitute for `componentDidMount()` and `componentDidUpdate`, however there a bunch of other useful React Hooks and ,what's even more fascinating, you can write and invent your own hooks which you can store and use in accordance to your functionality.

In conclusion we can definitely say that React Hooks is a relatively new feature, however very powerful and with a immense potential that is still growing and expanding.
Day 65 : #100DaysofCode - Second Rails Project - I Want to Try Self-Referencing Tables
Published: 2020-08-05 02:03:54

When I began my coding path, I made the decision to create 2-3 apps in every language that I learn. Today, I began my second rails app! It is going to be a simple app that allows users to follow each other, search for photos, and add inspirational quotes. 

This is what I have so far! 

{% github SincerelyBrittany/photo-app no-readme %}

This will be a bit different from my first project because it involves self-referencing tables. 

I am still working on my schema but I am excited. 


Sincerely, 
Brittany
If repetitive, then script it.
Tags: git, bash, todayilearned
Published: 2020-08-05 01:55:45

# Abstract
Let's assume that on **Windows**, you put your development projects under a main or common directory, e.g., '*development*', and all of these projects are local Git repositories. 

# The repetitive problem: *めんどくさい mendokusai* - a hassle
It gets tedious, if you have to navigate into every directory and execute 'git remote update'.

```bash
you@your-pc MINGW64 /d/developments
$ ls -1
foo-bar-backend/
foo-bar-db/
foo-bar-frontend/
```

# Solution: a helper script
Using Git Bash on Windows, I recommend an executable bash-like helper script to navigate through all these projects and be done with it.

## Write a helper script
Say, this script is named *git_remote_update.bash*:

```bash
#!/bin/bash.exe

echo
echo "Going into every directory here."
echo

for x in *;
do
    if [ -d "${x}" ]
    then
        if [ -e "${x}"/.git ]
        then
            cd "${x}"
            echo "${x}"
            echo "======================"
            echo "Calling git remote update ..."
            git remote update
            echo
            echo "Calling git status ..."
            git status
            echo
            cd ../
        fi
    fi
done
```

## Set the file permission
Place this helper script in a dedicated directory, e.g., *helperScriptsWindows*, and change its permission so:

```bash
you@your-pc MINGW64 /d/helperScriptsWindows
$ chmod 755 git_remote_update.bash
$ ls -la
-rwxr-xr-x 1 you 197609 434 Mar 17  2018 git_remote_v.bash*
```

## Include the directory into Path
1. Open the Windows *Control Panel*.
2. Navigate to *System and Security* => *System* => *Advanced system settings* => *Environment Variables* => *System variables*.
3. Click *Path* => *New*. Add the **absolute** path to the directory *helperScriptsWindows*. Done.

## Check the PATH
You should be able to see the absolute path to the directory of your helper scripts is included:

```bash
you@your-pc MINGW64 ~
$ echo $PATH
```

## Helper script usage
The script *git_remote_update.bash* should be already 'registered', and with few typing efforts, it's callable in the terminal:

```bash
you@your-pc MINGW64 /d/developments
$ git_remote_update.bash

Going into every directory here.

foo-bar-backend
======================
Calling git remote update ...
Fetching origin

Calling git status ...
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean

foo-bar-db
======================
Calling git remote update ...
Fetching origin

Calling git status ...
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean

foo-bar-frontend
======================
Calling git remote update ...
Fetching origin

Calling git status ...
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
```

Have fun.
Promises and Axios
Tags: node, javascript
Published: 2020-08-05 01:50:09

I stumbled upon a JavaScript library called Axios while looking up alternatives to the fetch API which I used in previous projects. It is promise based like fetch, however, it has some features which fetch doesn't. It is used to make http requests from node.js or XMLHttpRequests from the browser.

Here are some of these features:
- has a way to abort a request
- has a way to set a response timeout
- has built-in CSRF protection
- supports upload progress
- performs automatic JSON data transformation 
- has built-in support for download progress.
- has the ability to cancel requests.

Axios also provides more functions to make other network requests as well, matching the HTTP verbs that you wish to execute:

- axios.request(config)
- axios.get(url[, config])
- axios.delete(url[, config])
- axios.head(url[, config])
- axios.options(url[, config])
- axios.post(url[, data[, config]])
- axios.put(url[, data[, config]])
- axios.patch(url[, data[, config]])

Another cool feature is that Axios is able to intercept HTTP requests. Interceptors can be really helpful when we want to examine or change HTTP requests from our application to the server, such as retrieving a token from local storage and including it in all requests.

**Axios API**
An HTTP request from an axios object looks like:
```
axios({
  url: 'https://store.ceo/api/products/list/all',
  method: 'get'
})
```
The promise it returns can contain await to resolve it to the response object.
```
axios({
;(async () => {
  const response = await axios({
    url: 'https://store.ceo/api/products/list/all',
    method: 'get'
  })
```
A more elegant way to code this syntax-wise would look like this (Axios methods are very similar to fetch)

```
;(async () => {
  const response = await axios.get('https://store.ceo/api/products/list/all')
  console.log(response)
})()
```
Axios has methods for all of for all the HTTP commands such as

It is also important to note that Axios depends on a native ES6 Promise implementation.

**References**
- https://www.pluralsight.com/guides/axios-vs-fetch
- https://flaviocopes.com/axios/
- https://github.com/axios/axios
Implement Dark / Light Mode Themes with Ionic React
Tags: webdev, react, ios, android
Published: 2020-08-05 01:35:40

![Light Mode vs Dark Mode](https://dev-to-uploads.s3.amazonaws.com/i/y2mx9cb1duxe0o040r0f.PNG)

{% codesandbox g14n0 %}


It has become a standard nowadays to have both light mode and dark mode themes in almost any of the web or mobile applications.

Assuming you already have the initial setup for React app using Ionic CLI. 

Believe me or not! This implementation won't take more than **5 minutes** and can be completed if you follow these _two_ steps.
 1. CSS Changes
 2. Component Changes

This post will be useful to you if you are implementing an **Ionic 5** app using **React**. Even if you are using Angular or any other framework, the syntax might differ but underlying logic and implementation should be the same.

## CSS Changes
Go straight to the `theme/variables.css` file and remove the css media query `@media (prefers-color-scheme: dark)` query which sets the app to the system's theme settings. Meaning, it will set the app theme based on your _Apple_ or _Android_ mobile device theme settings.

Initially, your `variable.css` file should look something like this.
```
:root {}

@media (prefers-color-scheme: dark) {
  body{}

  .ios .body{}

  .md .body{}
}

```
Like I mentioned, you will have to remove the css media query. Now, your `theme/variables.css` file format should look like this.
```
:root {}

body.dark {}

.ios .body.dark {}

.md .body.dark {}
```
## Component Changes
Coming to the implementation of the toggle button on UI,
let's set up a switch ( a simple function 😉 ) which will handle the toggling between _light_ and _dark_ modes. 
```
const toggleDarkModeHandler = () => document.body.classList.toggle('dark');
```
In your functional component, let's create the switch, a toggle button and pass in the _handler_ that we wrote to `onIonChange` property. 

```
<IonList>
  <IonItem lines="none">
    <IonIcon slot="start" icon={moon} />
    <IonLabel>Dark Mode</IonLabel>
    <IonToggle slot="end" name="darkMode" onIonChange={toggleDarkModeHandler} />
  </IonItem>
</IonList>
```
That's it! You are all set to lift off! 🚀 
Now that your handler and the toggle button are in place, clicking on the toggle button should switch between light and dark mode themes on the fly!

I also created a working example using CodeSandbox. Feel free to explore the source code and do comment if you have any question or thoughts. Thank you for your time reading my post.

Happy Coding! 😎
Two tags and two box-shadows will re-create most of the macOS calendar app icon
Tags: html, css, tutorial, beginners
Published: 2020-08-05 00:40:07

#The HTML can be as simple as this without sacrificing on accessibility
```
<time datetime="08-04-2020">
  <span>Aug</span>
  <span>4</span>
</time>
```

#The first box-shadow gets us the illusion of a stack of paper
```
span:last-of-type {
  box-shadow: 0 10px #bbb;
}
```

#The other three box-shadows stack within a single declaration
```
time {
  box-shadow: 0 15px 15px 0 black, 
              0 20px 0 5px gray, 
              0 22px 0 5px black;
}
```

##[Now I challenge you to re-create the rest and submit your solution here](https://rmion.com/bootcamp)
Resume Double Duty - Getting a Raise
Tags: career, resume, raise
Published: 2020-10-01 14:06:40

---
title: Resume Double Duty - Getting a Raise
published: true
description: For most of us, our resumes go back in the drawer as soon as we take a job offer. However, there are some interesting benefits to keeping your resume fresh and dust-free.
date: 2020-08-05 00:00:00 UTC
tags: career,resume,raise
cover_image: https://source.unsplash.com/lZ_4nPFKcV8/900x500
canonical_url: https://ryanlatta.com/2020/08/resume-double-duty.html
---

For most of us, our resumes go back in the drawer as soon as we take a job offer. However, there are some interesting benefits to keeping your resume fresh and dust-free.

## Regular Updates

The main thing is to create a habit every month or three to look at your resume and add new bullets to your current job experience. These bullets should highlight the incredible things you’ve done so far.

By having these already in your resume, you significantly reduce the effort to apply, and you have more options to strengthen to choose from when you apply.

## Performance Reviews

At some point, you’ll do a performance review at your company. More often than not, these are not enjoyable, yet it leads to promotions, raises, and sometimes termination.

When you have that habit of updating your resume, you have two crucial things available. First, you have a list of great things you’ve accomplished since the last review that you can talk through. Second, if the worst case happens, you’re that much better prepared to rebound.

You might think that having a list of things you’ve accomplished isn’t needed, but many managers don’t have a great way of seeing those things or remembering them. So give them a hand and tell them why you deserve a raise.

## Negotiation

When you apply for that next job and interview, you can use all those other accomplishments that you may not have shared so far as evidence that you deserve better compensation.

They already said yes to you with what you’ve shown so far, nows the time to show how you actually can bring even more benefit for them, so you are worth even more than they thought.

Without having something ready for negotiation ahead of time, it can be extremely intimidating to ask for more money. A written down list of why you’re worth even more is crucial to have that confidence.

So what’s something you can add to your resume right now to show your accomplishments?
The Legend of Data - Ep.10 - Categorical Data
Tags: datascience, beginners, tutorial, talk
Published: 2020-08-04 23:36:36

---
title: The Legend of Data - Ep.10 - Categorical Data
published: true
description: Categorical data are everywhere, but machines are not good at dealing with them. So we need to have different ways of handling categorical data. In this episode, we will briefly introduce come ways of categorical data feature engineering and some machine learning algorithms that are designed to deal with categorical data.
tags: datascience, beginner, tutorial, talk
---

Categorical data are everywhere, but machines are not good at dealing with them. So we need to have different ways of handling categorical data. In this episode, we will briefly introduce come ways of categorical data feature engineering and some machine learning algorithms that are designed to deal with categorical data.

If you have any questions or any suggestions about which Python or Data Science topics to cover, please leave your comment at my [Twitch channel](https://www.twitch.tv/cheukting_ho)

You can get the slide deck [here](https://slides.com/cheukting_ho/legend-data-pandas1/). The notebook that I used can be found [here](https://github.com/Cheukting/legend_data).
#045 Kubernetes - Services 5
Tags: kubernetes, devops, tutorial
Published: 2020-08-04 22:18:15

# Introduction
![intro](https://media1.tenor.com/images/f15057a41413c960db1f328ca5a732e3/tenor.gif?itemid=6203225)

this is part 45 from the journey it's a long journey(360 day) so go please check previous parts , and if you need to walk in the journey with me please make sure to follow because I may post more than once in 1 Day but surely I will post daily at least one 😍.

And I will cover lot of tools as we move on.
***

# Load balancer
![nodeport](https://dev-to-uploads.s3.amazonaws.com/i/zpp9tj2lcjm5thczs8uu.jpg)
In NodePort every Node get an ip (minikube is a single local Node) .
I can access every node by it's IP even if it's an duplicate (replica) of another one , if we assume we have an big software , it's illogical to use many ips for our software.
The solution is to use a LoadBalancer.
![LoadBalancer](https://dev-to-uploads.s3.amazonaws.com/i/ycpnlogp8canx6aiqi49.png)
LoadBalancer create an external ip can drive us to any pod what ever the node it's inside of it.
LoadBalancer is good for big softwares , but not very very big software with many services every external IP address we pay for it so we can use Ingress , the Ingress do LoadBalaning for all the services.
![loadblncYml](https://dev-to-uploads.s3.amazonaws.com/i/h9fb6c71geuijrv2hpgf.png)
This is an look at LoadBalancer , we just put the type to LoadBalancer.
Server Speed Check!
Tags: javascript, webdev, beginners, devops
Published: 2020-08-04 22:09:35

Recently I came across Bluehost hosting and their plans seem reasonable as well.
I thought of running a server speed test to check the reality

I used bitcacha.com and the following was the result.
![Bluehost Review](https://dev-to-uploads.s3.amazonaws.com/i/2mc10tkm62ntbrwgtjz0.png)

The response times were pretty much good and the loading time of the website was good too.


![Bluehost Reviews](https://dev-to-uploads.s3.amazonaws.com/i/ea32d9lpmypmugmmmbfn.png)

**Report from GTMetrix**

If you are interested in buying Bluehost Hosting, you can see all the plans on their [website](https://bit.ly/2XsXmYc)

*Disclaimer: It's an affiliate link and I'll receive a small amount if you make a purchase.*

Thanks for reading
What Helps You Get Unstuck When Coding?
Tags: discuss, codenewbie, watercooler
Published: 2020-08-04 21:36:26

Getting stuck on a problem is inevitable as developers. Whether it's an algorithm or trying to re-produce a difficult error it can feel like you are never making progress.

What tools or tips do you use to get "un-stuck" in moments like these?

---

_Cover photo by [Aubrey Rose Odom](https://unsplash.com/@octoberroses?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/mud-stuck?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText)_
Introduction to TDD: What it is and why it is important
Tags: testing, tdd, javascript, beginners
Published: 2020-08-04 21:32:56

Many companies today are using test driven development or TDD to create their web software. 

##Why is test driven development so important?##

TDD has become very popular because it prevents issues and bugs in the future, it can increase the efficiency of your work flow, and help teams communicate the intentions of their code's functionality. A downside of TDD is that it takes longer to get a project started, so it requires a little bit of up-front patience. 

**The basic flow of TDD**

1. Create a test (make sure it fails so you don't get a false positive)
2. Write code to try to pass the test
3. Once passing, refactor where possible in both test and implementation code
4. Create the next test and repeat

##Concepts to keep in mind while creating tests##
 
**Readable** -> Make it clear what the test's actual and expected behavior is, and why.

**Isolated** -> Make sure tests only cover a particular segment of code, because you don't want certain tests interfering with other tests. If interference occurs, you may not know if the test failed due to your target code or from a previous test. 

**Thorough** -> Prepare for edge cases, like if someone enters in something totally unrelated to the expected input. For example, what if someone tries to submit an empty form? 

**Explicit** -> This ties in with code readability. If someone looks at the test, they should be able to require little setup. 

##The 3 main types of tests##

**Unit test** -> small pieces of functionality 

**Integration test** -> checking if all the smaller tests/code work together such as seeing if the app communicates with an API (Application programming interface) correctly

**End-to-End** -> tests entire application from user viewpoint (examples: Selenium or Cypress.io)

##Getting Started##
**(usually in the form of libraries)** 
1. Testing environment/test runner (the place to run tests)
2. Testing framework (Ex. Mocha or Jasmine, organizes/holds your test code)
3. An assertion library (this allows you to not have to write tons of if-statements, this does the actual verifications of test results)

**Sources:** 
https://www.linkedin.com/learning/javascript-test-driven-development-es6

https://stackoverflow.com/questions/25678063/whats-the-difference-between-assertion-library-testing-framework-and-testing-e