teleren/devto huggingface dataset:
Easy way to setting Ruby Version Manager (RVM) on projects
Tags: ruby, rails, rvm
Published: 2020-03-10 09:09:16

###**Ruby on Rails with RVM**

RVM is **Ruby Version Manager**. It's a command-line tool that allows you to easily install, manage and work with different Ruby environments. With RVM, you can easily install different versions of Ruby and easily switch between them.

Let’s get started with the first step. I can’t stress enough how valuable RVM is to the development of Ruby and Rails. 
RVM allows you to create as many Ruby sandboxes as you need for development or projects or whatever. You can separate versions of Ruby as well as sets of gems called “**GEMSETS**”

**Gemset gives you the privilege of creating a set of gems specific to your particular rails application.**


####**1. Steps for Creating a new Gemset:**

Assuming that you are already on your project directory with on your machine in installed ruby versions that you want.

Step 1: rvm gemset create [name of gemset]
Step 2: rvm --rvmrc [ruby version here]@[name of gemset]
   Note: You can check your current ruby version by running "ruby -v" from your console.
Step 3: Refresh your directory. 
  You can simply do this by checking out of your directory and going back to that directory again.
Step 4: RVM will ask you a simple Yes, No, View, Cancel question. Press Y for yes.
Step 5: You're done! Run bundle install.

####**2. Particular gemset Use:**

As you may have more that one gemsets installed on your machine, you might need to use an explicit version of the gemset for your particular application. You can use specific gemset using the subsequent command:

```ruby 
rvm use <ruby version>@<gemset name> 
```
if you may want to set one of the gemset as the default gemset. You can do this by using the subsequent command

```ruby
rvm --default use <ruby version>@<gemset name> 
```

####**In-Built Gemsets list:**
When you install particular Ruby using RVM then it comes with 2 gemsets. default and global. You can list the gemsets that are available for current ruby version selected using the command:

```ruby
rvm gemset list
```

####**3. Delete a Gemset:**
you may want to delete particular gemset using the subsequent command:
```ruby
rvm gemset delete <gemset name> 
```

Thank you for reading!🤗
Front-End Challenge from Colt Steele: Stepper Form
Tags: javascript, tutorial, html
Published: 2020-03-10 10:33:53

In the past weeks I reviewed a bit my front-end (html-css-javascript) lessons, and also found an interesting challenge lately. It is a vanilla js challenge by Colt Steele, published on Youtube: https://youtu.be/qGwR_DSSnuQ

*My solution to it:*
https://github.com/zoltanhalasz/StepperForm

*Working link(live project):*
https://codepen.io/zoltanhalasz/project/editor/ApPwKj

**Explanation:**
- I am using a structure with div's with classes and id's that can be targeted by Javascript DOM manipulation.
- the script uses lots of functions, and the getElementById used to target the classes/ids
- use hide/show for the stepper form via Javascript (manipulating DOM styles)

*Recommended reading:*
- Javascript DOM: https://www.w3schools.com/js/js_htmldom.asp
- CSS/Html: https://www.w3schools.com/html/default.asp
I'm loosing my enthusiasm to code.
Tags: discuss, help, career
Published: 2020-03-10 10:09:41

---
title: I'm loosing my enthusiasm to code.
published: true
description: 
tags: #discuss #help #career
---

Hi dev community! This is my first post here, and I'm excited to be part of this.
I was hoping to start with a better post, but I really need to talk about this topic, I need your advices :)


I just got a new position at work, but I'm less and less enthusiasm to code and I feel bad about it.
It's been some months that I have this feeling, and today I'm kind of scared because I'm young! And by the way, I'm loosing my productivity, and that's really bad.

## About me
A little bit of background.


I'm Maxime, a 21 years old, I live in France, and I am some kind of full stack developer. I'm saying "kind of" full stack, because I do a lot of stuff, doing some data analysis, build dashboards, web applications... And that's soooo cool.


I started coding when I was 14 years old. I've started with HTML/CSS and quicky got introduced to PHP and I fall in love. By the time I was in trouble with my personal life, and yeah programming saved me. **I found the best therapy: programming, yes I find coding therapeutic.**


I've never stoped to work hard by this time, when I was back to school, I was coding. When I was on vacation, the same. I loved that, and thanks to this hard work I've quickly developed my career.


At 18 years old, I got one year apprenticeship contract in a young startup as a front end developer. I was working two weeks and then studying 2 weeks. By the end of the year, I was configuring servers with Ansible, produced NodeJS services and so one, I've got a lof of responsability in little time. Such a great year but it was **such a pain**. My manager was such an asshole, and I refused to continue there. I was only 19 years old and I refused a permanent position, people thought I was crasy but I wasn't, hard decision to make and support.


After that year, I got a 3 years contract at Airbus as an apprentice software engineer and today I'm still there.
So I'm a computer science student in France working at Airbus, everything is fine isn't it? What could be bad? Nothing on the paper.

## The confusing part
I've used to work on side projects after work/school, always. But now, for 6 months I'm not working after work anymore because I don't feel it.
Sometimes I do, but much less than I've used to!
I'm playing video games, watching Netflix series, reach friends and so one, but almost never coding/learning.


I don't know why, **I feel guilty for not working that hard anymore**, but at the same time **I know this is normal because I worked too much I have to take time for myself**.


I'm really confused, do anybody already dealt with this feeling, do you have any advice? Such a strange situation...


Thank you so much!
Have a nice day, happy coding.
Looking for a CMS that integrates with a custom DB
Tags: help
Published: 2020-03-10 09:31:12

Hey all, I'm having an issue with a project I'm working on.
I have an app with its own db that contains the users and their credentials.
I want to have a headless CMS that manages some blogs to avoid writing one of my own, but I can't seem to find a CMS that doesn't have its own separate users system.
So my question is whether there is a CMS that I can integrate with to make it see my users in my database? or should I make my own and forget about integrating with a third-party?

Thank you
Your favorite underrated CSS properties
Tags: discuss, webdev, css, html
Published: 2020-03-10 09:08:29

We all know that CSS has many underrated properties that tend to be forgotten over time, despite being useful. For example, `clip`, `font-stretch`, or `text-shadow` are a few of my favorite properties that are used less.

Also, I would like to mention *scroll appearance properties*. Even though being only a small detail, a nice scrollbar can positively enhance the overall look of your web application!

What are some of *your* favorite **not so popular** CSS properties?
Do I make myself clear
Tags: task, grooming, scrum
Published: 2020-03-10 08:57:09

![Do I make myself clear!](https://media.giphy.com/media/l2JedPGiZueLYAryo/giphy.gif)

We had some late night work and testers found what they considered a bug. A developer was set to solve it according to the task set forth, and he made a PR. At 7pm I get a request to approve this PR for this new task.

The problem: An input that was defaulted to 1, when decreased to 0 was then unable to be increased again.

Testers solution: Disallow 0 values, preset to 1 as minimum.


The testers that wrote the task, did not **just** describe the issue but also attributed a solution path for the developer rather than letting the developer do the analyze to find the true solution. Also the task had UX opinions without involving the designer that is responsible for the UX guidelines.

And in all of this, they lost track of the future and what is to come. All involving parties knew of the upcoming sprint(s) where we will be developing further upon this and would need to be able to 0 out a value without side-effects.

After some discussions with the tester and reminding them of the change to come, I steered them on the path to solving the true cause and letting the developer do the analyzing of the issue. Once that was done, we resolved the side-effect of not being able to increase from 0.

So my take away from this;
- Remember what is to come and the bigger picture so you don't paint yourself into a wall and then have to re-paint everything because you've created something that is non-transferable and will not behave the same way in the next turnover.
- Don't impose UX guidelines if there are no clear ones. Instead defer to the Designer that is responsible for them.
- Let the developer do the analyzing and find a path that conforms to both of the above points.

Also, don't do PRs at 7pm. Take some time off.
Work fatigue in Lagos
Tags: work, fatigue, lagos
Published: 2020-03-10 08:33:27

Every young person is expected to have something doing, no matter how small. In Nigeria its like a cycle; you are trained through school and are expected to start working after school to support your parents and younger siblings and if you lose the family's breadwinner you are expected to fend for yourself.

A lot of us are thrust in to the harsh reality of life without being prepared for it. As a student you cannot wait to finish your schooling and start life on your own, have your own place, your own car and enjoy life. A few are lucky to live out their dreams, many more are faced with the opposite. Many get jobs after plenty aptitude tests and interviews and have to commute to work daily. 

The Lagos metropolitan is divided into the Mainland and Island axis. As simple as this may sound it is quite complex. Anyplace located after the three bridges (Eko bridge, Carter bridge and Third mainland bridge) is seen as Island and anyplace that you do not have to cross any of these bridges to get to, is seen as Mainland. Most businesses are either located or headquartered In Ikoyi, Victoria Island or Lekki, a few are located in the Yaba or Ikeja Area of the metropolis. 

The Irony of this is that most of the workers of these businesses cannot afford to live close to their work place and have to travel to the aforementioned locations daily. The cost of living around your work place is most of the times higher than your gross pay before tax and other deductions except for a few from well to do families who come from the family house or whose rent is paid by their rich parents. 

People have to leave their home as early as 4am and get home as late as 11pm as the teeming population of the city ensures that the road is clogged with cars and buses. The fact that most buses and cars are in bad shapes ensures that the commute is joy sapping. From the occasional quarreling over the cost of commuting with the conductors, to the heat experienced in the over saturated buses, to the uncomfortable seating arrangement added to the unrealistic pressure from work is a perfect recipe for being stressed out. Some days you wake up early and feel like not going to work but when you remember the bills you have to pay at the end of the month, you have no choice but to drag yourself to work. 

What about the weekend you may ask? well the weekend is taken by your engagements in church and your side hustles. Being that We are an overtly religious people and that most persons who are struggling grow close to God, the exchange of your spare time for God's blessings is an arrangement most of the working class go into. Being that the salary is very minute there is every need to "double your hustle". Many young persons go to the market, buy goods at a cheap rate or import from China and sell it on social media. Lots of these activities are done at the weekend and before you say "jack", Its Monday. At a point you grow tired of your job but cannot leave, as your bills are like piled up rocks before you, watching you continue the endless cycle.
[Solved] DEV API Can't able to update an article !
Tags: help, devapi, api, curl
Published: 2020-03-10 07:44:15

I am using postman to create new Articles , but failing to update the article


#Creating an article

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

#Updating an article
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/iyuh3tfqel442brc2hle.png)

Please give me any working examples of creating and updating an article

getting when i try to update article

```
	<!DOCTYPE html>
<html>

<head>
	<title>The page you were looking for doesn't exist (404)</title>
	<meta name="viewport" content="width=device-width,initial-scale=1">
	<style>
		.not-found-page {
			height: 100vh;
			min-height: 500px;
		}

		.tv__outer {
			display: table;
			position: absolute;
			height: 98%;
			width: 98%;
		}

		.tv__middle {
			display: table-cell;
			vertical-align: middle;
			position: relative;
		}

		.tv__inner {
			margin-left: auto;
			margin-right: auto;
			display: table;
		}

		.tv__inner--special {
			position: absolute;
			left: 0;
			right: 0;
			margin: auto;
			-webkit-animation-name: fade;
			-webkit-animation-iteration-count: infinite;
			-webkit-animation-duration: 2s;
			animation-name: fade;
			animation-iteration-count: infinite;
			animation-duration: 2s;
		}

		.tv__inner--text {
			margin-left: auto;
			margin-right: auto;
			display: table;
			font-size: 22px;
			font-weight: 500;
		}

		.tv__inner--special,
		.tv__inner {
			max-width: 85%;
			width: 300px;
			border: 25px solid rgb(54, 55, 124);
			border-radius: 36px;
		}

		.tv__inner--text {
			text-align: center;
			max-width: 90%;
		}

		@-webkit-keyframes fade {
			0% {
				opacity: 1;
			}

			10% {
				opacity: 1;
			}

			20% {
				opacity: 0;
			}

			25% {
				opacity: 0;
			}

			28% {
				opacity: 0;
			}

			30% {
				opacity: 0;
			}

			33% {
				opacity: 1;
			}

			45% {
				opacity: 1;
			}

			53% {
				opacity: 0;
			}

			100% {
				opacity: 0;
			}
		}

		@keyframes fade {
			0% {
				opacity: 1;
			}

			10% {
				opacity: 1;
			}

			20% {
				opacity: 0;
			}

			25% {
				opacity: 0;
			}

			28% {
				opacity: 0;
			}

			30% {
				opacity: 0;
			}

			33% {
				opacity: 1;
			}

			45% {
				opacity: 1;
			}

			53% {
				opacity: 0;
			}

			100% {
				opacity: 0;
			}
		}
	</style>
</head>

<body>
	<div class="not-found-page base-background-color">
		<div class="tv__outer">
			<div class="tv__middle">
				<img class="tv__inner--special" src="https://i.imgur.com/Vyyjycv.gif" alt="404 not found image as TV static">
				<img class="tv__inner" src="https://i.imgur.com/3v0LCiP.jpg" alt="404 not found DEV logo">
				<br>
				<p class="tv__inner--text">This page does not exist <br><br> <a href="https://dev.to/">Return to Home
						Page</a></p>
			</div>
		</div>
	</div>
</body>

</html>
```
Handle 'componentWillReceiveProps' deprecation warning
Tags: javascript, react, frontend
Published: 2020-03-10 07:38:50

As part of the implementation of async rendering in React, there are a few lifecycle methods which will be deprecated in React 17 (see [React Blog](https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#new-deprecations)). A common used one is `componentWillReceiveProps`. In most cases it is used to handle the 
props change of a component.

##So what to do?

One solution is to use the `static getDerivedStateFromProps` method. There is a great 'HowTo' [dev.to Post](https://dev.to/larryprice/how-to-use-getderivedstatefromprops-in-react-163-oba) from [Larry Price](https://dev.to/larryprice).

Another solution is to use React Hooks, especially the `useEffect()` Hook. This might be a nice solution if you have a small component and want to switch to a functional component within this change.

Here is a simple example. Imagine we are rendering a table component with a list of items. All items must initially run through the `doSomething()` method.

*previous code*

```javascript
doSomething (items) {
  // some code to sort items ...
  return items
}

state = {
  items: this.props.items
}

componentWillReceiveProps (nextProps) {
  this.setState({
    items: doSomething(nextProps.items)
  })
}
```

*with Hooks*

```javascript
const doSomething = (items) => {
  // some code to sort items ...
  return items
}

const [items, setItems] = useState(doSomething(props.items))

useEffect(() => {
  setItems(defaultSorting(items))
}, [items])
```

We can use the `useEffect()` Hook which by default runs on every render. To avoid unnecessary calls, we use `[items]` as the second parameter. So `useEffect()` only runs when the property `items` has changed.

## Important notice

Before switching to `getDerivedStateFromProps()` or `useEffect()` you should check if you really need this property handling. Have a look at this official [React Blogpost](https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html) for common bugs and anti-pattern. 

Sometimes we write some properties to the state even if we don't need to. If you for example need to sort a list which comes from a property, do it during the render and avoid writing it in the component state.


—


If you got any kind of feedback, suggestions or ideas - feel free to comment this blogpost!
Yes, sometimes you'll feel like an imposter, that feeling will never leave.
Tags: beginners, career, mentalhealth, a
Published: 2020-03-10 07:35:58

Cover photo by [Robert Zunikoff](https://unsplash.com/@rzunikoff?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/clown?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)

> I'm an imposter, I don't deserve my job and the opportunities I have in my life.

We all feel like this from time to time, but it does get easier.

It will never leave you completely.

When we compare ourselves to others we can feel crushed under this immense pressure that we are not meeting impossible standards, which we make up in our own head, that doesn't exist.

This is a lie from your [amygdala](https://lifelabs.psychologies.co.uk/users/179169-amanda-cookson/posts/55325-your-brain-on-imposter-syndrome).

It's easy to drift into this negative state, it can be paralyzing and can develop into a deeper pattern of negative cyclic thinking.

Unfortunately, as we'll never be rid of it, all we can do is maintain and remember that we are here, doing the work that we do because we deserve it.

At the end of the day, you have your job and opportunity because you have worked hard. Your family, friends, and teammates trust you, they believe in you.

If you feel like this is overwhelming, open up to a friend or a colleague, you'll likely discover the feelings are reciprocated, this video by [Simon Sinek describes his feelings with his rival](https://www.youtube.com/watch?v=5dtbhd11SYw).

Be kind to one another, we all feel the same things, our own anxieties, we are not alone with this.

If you are a leader, in business or otherwise, consider reading [the infinite game](https://www.amazon.co.uk/Infinite-Game-Businesses-Achieve-Long-Lasting/dp/0241295599/), it's a refreshing take on leadership and how to build teams based on trust and ownership.

Follow along with my posts and my project [world class remote](https://worldclassremote.com).

Matt.
When you start working remotely, if you are learning the ropes you will work hard.
Tags: career, motivation, mentalhealth, beginners
Published: 2020-03-10 07:28:39

Cover photo by [Icons8 Team](https://unsplash.com/@icons8?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/books?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)

Back in 2013 when I started trying my journey to become a full-time professional software developer I fell into a trap.

There were some weeks I pushed myself hard, probably working in the region of 80-100 hours to get the projects done.

I'd won the work on Elance (now upwork), started to build the relationships with my clients and all that I'd have to do is build and deliver.

I am extremely thankful for the opportunities I had, and retrospectively it makes me wonder why I was selected, perhaps I was the most qualified I did go to university after all.

> I knew I wasn't the most technically talented but I was driven and consistent.

The truth is early on in a career writing proposals, building these sales skills, trying to match a customer's need to the value you provide is the easier part of the process.

This process will be a long boring slog, you will be rejected but the time investment and risk to comprehend problem then write a proposal is low.

> Initially expect the process for prospecting and lead generation to take 40-50% of your time.

When you start a job you'll be committed for weeks if not months, you need to be able to motivate yourself and keep going.

That is where the real work starts.

![Penguin walks on rock](https://images.unsplash.com/photo-1464617800674-cc374c97dde9?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=2000&fit=max&ixid=eyJhcHBfaWQiOjExNzczfQ)

Photo by [joel herzog](https://unsplash.com/@joel_herzog?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit) / [Unsplash](https://unsplash.com/?utm_source=ghost&utm_medium=referral&utm_campaign=api-credit)

### Some advice:

-   If you are starting your remote journey be prepared to work hard, consider that if you are new to the field there is a lot for you to learn.
-   Keep Stackoverflow and YouTube tabs open to ask and reframe questions you may have.
-   If you are using a site to bid and send proposals for work, speed is of the essence. If a project gets 50-100 proposals it'll be harder for you to be visible.
-   Check-in with your client as frequently and consistently as possible, focus on the relationships and be upfront about the project's status.
-   As you become more competent in your field don't be afraid to question the problems and assertions your clients may have, offer unique solutions.
-   Remember that the knowledge you are gaining is not common knowledge, you will learn new skills sooner rather than later that most people don't know.
-   You'll be rejected many more times then you are successful, and that is ok, trust that you are on the right path.

Follow along with my posts and my project [world class remote](https://worldclassremote.com).

Matt.
Laravel 6 REST API with JWT Authentication
Tags: jwt, laravel, auth, api
Published: 2020-03-10 07:21:36

Hello Artisan 

In this tutorial i am going to discuss about a brand new topic which is jwt auth laravel 6. This tutorial we will see how to create a restful api with json web token (jwt).

https://www.codechief.org/article/laravel-6-rest-api-with-jwt-authentication