teleren/devto huggingface dataset:
How Do You Deal With Burnouts?
Tags: discuss
Published: 2019-06-11 13:58:44

Burnout is real and almost everyone has gone through it regardless of their career.

This happened to me, made me lost my side gigs and almost made me lost my job.

I was able to deal with mine by getting away from work for close to 3weeks since my work is remote, and that made it easy for me to get away with it.

I watched movies, outing with colleagues, barely do standups, makeup standups, barely communicate, made up excuses and so on.

I feel depressed and tired like I should just quit and just face my studies and live a normal life.

The third week, I was supposed to have a meeting with my manager and a client. Then boom I forgot and didn't show up. Well, the thing is, I missed most of the meetings during those two weeks, I didn't bother checking my calendar since I already muted everything about work.

To cut the story short, I got a call on the last day of the third week, I have one life chance to fix myself or bye bye to work.

Well, I brought my sense back together, meet my mentor, explained to him and he gave me some advice. 

Then I shoved down whatever is holding me down and focus back to work.

Tell us how you dealt with yours.
Lesson 2 : Getting Started With Java
Published: 2019-06-11 13:55:24

If we have liken the process of Java as a tree , we will have the following image :

 ![Alt text of image](https://1.bp.blogspot.com/-CirxFJop3P8/XP63BM5eExI/AAAAAAAAIFo/6QjarXoZEaIFrMLovyihjjuYcleOikmKwCLcBGAs/s1600/tree.jpeg)


__So , let's start programming :__

![Alt text of image](https://1.bp.blogspot.com/-KJFZ7I88tEw/XP69uZhJA1I/AAAAAAAAIF0/3zOZjpumOwUCy4bbs9uU26qiy13XvZnTgCLcBGAs/s1600/Untitled.jpg)

First of all , it's better to learn about JVM , JRE , JDK , and IDE :


__1. JVM :__ 

A Java virtual machine is the core of Java . It's a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode.


__2. JRE :__

 It is the most common Java environment installed on personal computers in the laptop and desktop from factors . Mobile phones including features and  smartphones that ship with a JVM are most likely to include a JVM meant to run applications . 


__3. JDK :__ 

simply , JDK is an implementation for Java programs .
The JDK includes a private JVM and a few other resources to finish the development of a Java application .


__4. IDE :__

An integrated development environment (IDE) is a software application  that provides comprehensive facilities to computer programmers for software developments . like IntelliJ , Netbeans , Eclipse , ... .
What's your favorite addition to ES2015+
Tags: discuss, javascript, webdev
Published: 2019-06-11 13:53:14

---
title: What's your favorite addition to ES2015+
published: true
description: Share your favorite syntax
tags: discuss, javascript, webdev
---

If you're unfamiliar with ECMAScript I have an explanation here {% link https://dev.to/laurieontech/the-layers-of-javascript-15op %}


I'd love to hear about everyone's favorite piece of ES2015+ syntax and how it makes your JavaScript development experience better!

I'll start with mine, destructuring assignment! I love that I can do this 

```javascript
({data}) => {
    data.item
}
```

Instead of this
```javascript
(data) => {
    data.data.item
}
```
Pass a state from one class to another class in REACT JS.
Tags: react, javascript, props
Published: 2019-06-11 13:34:20

Hello, I need to pass a state from one class to another class.

Can I do it with a callback?

You help me?

Example:
class SearchNav extends Component {
  constructor(props) {
    super(props);
    this.state = {
      q: '',
      param: {},
      getData: []
    };
  }

  getDataSearch = () => {
    fetch(url + `${this.state.q}`)
      .then(res => res.json())
      .then(data => {
        this.setState({ getData: data.hits });
        console.log(this.state.getData);
      })
      .catch(Error => {
        console.log(Error);
      });
  };
...
I need pass state =>'getData' to other class.
#PureCSS - Responsive Keanu Reeves (John Wick)
Tags: codepen, css, purecss
Published: 2019-06-11 13:25:08

---
title: #PureCSS - Responsive Keanu Reeves (John Wick)
published: true
tags: codepen,css,purecss
---

<p>Responsive Keanu Reeves (John Wick) using CSS</p>

{% codepen https://codepen.io/AsyrafHussin/pen/qzBLVj %}
"As long as it works, it's fine". How much do you agree with this?
Tags: discuss, programming, ethics
Published: 2019-06-11 13:07:38

I tend to think that this is actually right. But, I guess that we must also mind about a tidy code, a small code, a clean code. Things that, obviously, the user doesn't really care about.

Are there better ways to solve a problem if the reach the same result? How can we consider them better if they get to the same point?
What have you crashed?
Tags: discuss
Published: 2019-06-11 13:00:11

---
title: What have you crashed?
published: true
description: 
tags: discuss
---

Over the years, when someone crashes something at work I (semi-jokingly) say:

> If you don't crash something every so often, you aren't working hard enough.

And while that might not be 💯 percent correct, I feel it helps put the person at ease, especially if the person is new to the company.  The truth is, it has and will happen to everyone.

So, have you 💥 crashed 💥 something important? Or brought the network to its knees?  I'd ❤️ to hear about it.
Are CSS and HTML programming languages?
Tags: discuss, programming, html, css
Published: 2019-06-11 12:31:28

---
title: Are CSS and HTML programming languages?
published: true
description: Are HTML and CSS programming languages?
tags: #discuss, #programming, #html, #css
cover_image: https://thepracticaldev.s3.amazonaws.com/i/pjswj7tlh08xvfcsi2t3.jpeg
---

Inspired by a recent Twitter thread (and long-running debate anyway): are HTML and CSS programming languages?

Is it gatekeep-y to say no?

{% tweet 1137834130119331840 %}
_The answer is yes, it is gate-keepy, but go off_


Discuss!
Does anyone work with MeteorJS anymore ?
Tags: discuss, javascript
Published: 2019-06-11 12:12:13

---
title: Does anyone work with MeteorJS anymore ?
published: true
description: Asking if anyone working with the JavaScript framework Meteor
tags: #discuss #JavaScript
---

I'm fullStack JavaScript developer for three years now, and I have been working with a lot of JavaScript tools and frameworks but mainly I'm using meteorJS, So does anyone use meteor nowadays ? and what you think of it ? Let's discuss!
Running Angular project unit-tests on Stackblitz
Tags: javascript, angular, webdev
Published: 2019-06-21 20:27:18

---
title: Running Angular project unit-tests on Stackblitz
published: true
tags: javascript,angular,web-development
canonical_url: https://hackernoon.com/running-angular-project-unit-tests-on-stackblitz-bc091abbfcc9
---

_I am not a part of Stackblitz team so it is not a promotion article:-) I just think_ **_Stackblitz_** _is a great way to present your code for articles readers. But longtime one small feature was escaping me: how I can run an Angular project on_ [_stackblitz_](https://stackblitz.com/) _and then switch the same project to run unit tests. Interested? Keep reading!_

![](https://cdn-images-1.medium.com/max/1024/1*q2UANtrbDUlg6DGnSunhag.jpeg)<figcaption>Switch Stachblitz Angular project to unit test run. (Pic by <a href="https://unsplash.com/@bechbox">Mikkel Bech</a>)</figcaption>

> This post was originally published on [Hackernoon](https://hackernoon.com/running-angular-project-unit-tests-on-stackblitz-bc091abbfcc9)

#### Why at all should I run Angular project unit tests in stackblits?

Well, a few times I need unit test running for learning purposes or to create some playground links to refer in the tech articles. So…

#### Start your GitHub project on stackblitz

Everybody knows how to start your Angular CLI project from GitHub on a _stackblitz_. Here is a quote from an [official doc](https://stackblitz.com/docs#import-from-github):

> Import from Github

> You can run any public repo on Github by providing the username + repo name like so:

> stackblitz.com/github/{GH\_USERNAME}/{REPO\_NAME}

For example, here is my repo link:

```
https://github.com/kievsash/NoSniffOptionTest
```

And respective _stackblitz_ link will be:

```
https://stackblitz.com/github/kievsash/NoSniffOptionTest
```

Here you can see that project with usual run:

{% stackblitz github-bzfbxl %}

#### Making it run our unit tests

OK, good, I started it. But how to run tests on it? It was not so obvious for me till I found out that

> stackblitz just run **main.ts**  file

(one of the things that seem so easy when you know it:-).

So, to start Jasmin tests for your project in a _stackblits_ we need to put all unit tests bootstrapping code into **main.ts** file. So let's rename our current main.ts to main.bck and create a new main.ts file.

To run our unit tests with Jasmin from main.ts we should do next:

1. Import and initialize jasmine and jasmine for browser modules
2. Import zone.js module for testing
3. Import out  **_.spec.ts_**  files
4. Bootstrap Angular test environment

OK, let's do this:

{% gist https://gist.github.com/kievsash/b87eedc6143ea3b0180a04fadd0cfa29 file=main.ts %}


And here is _stackblitz_ example:

{% stackblitz github-test-run-draft %}

#### Conclusion

Now if you need to provide playground with running unit tests for some Angular CLI project from Github repo — you know how to do this!

Plz, leave your _stackblitz_ Angular gotchas in comments!

If you liked this article — follow me on [twitter](https://twitter.com/El_Extremal) for more Angular and RxJS articles!

* * *
How to build a todo app with React and Firebase Database
Tags: challenge, react, es6
Published: 2019-06-11 10:44:43

---
title: How to build a todo app with React and Firebase Database
published: true
description: 
tags: challenge, react, es6
series: How to build a todo app with React and Firebase Database
---

## Day 0

:date: 10-06-2019
:clock1: 1h
:checkered_flag: Planning and initial design

# Planning
## What I'm going to develop
The goal of this challenge is to create a working to-do app to keep track of tasks I have to do.
## What technologies I'm going to use
* React (ES6)
* Google Firebase Database

# Designing
Before starting writing I always try to understand the structure of my application. This draw should be enough to see components I'm going to build and the way I'm going to manage the state of the application.
![](https://thepracticaldev.s3.amazonaws.com/i/aotkkcx21tvvm07icojw.png)
## The application state
The state will be managed in the `App` component. Using the `state lifting` technique it will be passed over son components.
At the moment I can only imagine how the state will looks like: a collection of todos where each todo has some properties.
```
...
{
  id: 1,
  description: "Lorem Ipsum",
  done: false
},
{
  id: 2,
  description: "Another Lorem Ipsum",
  done: true
},
...
```
Why you should keep a coding journal 
Tags: webdev, beginners, advice, discuss
Published: 2019-06-11 10:31:09

---
title: Why you should keep a coding journal 
published: true
description: Is a daily coding journal going to help you succeed with your goals? Here's why I believe so. 
tags: #webdev #beginners #advice #discuss
cover_image: https://ik.imagekit.io/fishj123/blogs/journal_ZmLh-g0iW.jpg
canonical_url: https://www.blog.jackfisher.tech/blogs/why-you-should-keep-a-coding-journal/
---

I strongly believe that a daily journal is one of the best habits you can pick up if you are trying to improve your coding skills, especially as a beginner. In this short blog I would like to discuss my reasons for this and hopefully, encourage some of you to start keeping a journal yourself.  

The great thing about this habit is that it’s a really easy one to pick up and maintain. I probably dedicate 5 minutes (max) per day to writing in my journal what I did that day with regards to coding. I like to do this right before I go to bed when everything else has been done. I find this night-time ritual useful for many reasons. The first of these reasons is that it acts as a record of my accomplishments. Learning to code can be a very slow process, and sometimes it feels like no progress is being made at all (especially in the early stages when you know how much lies ahead of you). The daily journal acts as a reminder of where I used to be on my journey, and where I am today. If I’m ever feeling demotivated or overwhelmed by the amount of information I feel like I need to learn, I can just go back a couple of weeks in my journal and see how far I have come in just a short amount of time. This gives me much needed encouragement to keep going.  

The second reason I swear by my daily journal is that it motivates me to code every single day. There are some days where I really don’t feel like doing any coding, maybe I’m tired or just not in the mood. My coding journal motivates me to at least do something that day so that I don’t have to leave a blank page. I will admit that even with this motivation there are still some days when I don’t write any code or study any new concepts (everybody needs some time off), but I truly believe that I have my journal to thank for many days where I got a lot done when I otherwise wouldn’t have sat down to study at all.
The final reason I love my daily journal is that it allows me to record my daily time spent coding and compare each week with the last. I think it’s important to be consistent with learning in order to make any real progress. I have a target of 15 hours per week of study time. Some weeks I do more, some weeks I do less. Each day in my journal I write the number of hours spent coding and then total the hours at the end of each week. This gives me a really easy way to see if I am putting in enough time or if I need to up my game.  

If you’ve been thinking about starting a daily journal then my advice would be to go for it, I couldn’t recommend it enough.
How did you learn to create Algorithms to solve problems?
Tags: discuss
Published: 2019-06-11 10:16:26

---
title: How did you learn to create Algorithms to solve problems?
published: true
description: discussion
tags: discussion
---

This is my first post on this amazing platform, I am not yet an expert coder and I am seeking some inspiration from the experts in the house.

 Kindly share your experience of becoming proficient enough to tackle challenges or problems using code of your preferred language.

I would love to hear all your wonderful experiences, I am pretty sure this would help others also.
So I had this dumb idea....
Tags: advice, collaboration, discuss
Published: 2019-06-11 10:10:34

---
title: So I had this dumb idea....
published: true
description: collaboration
tags: #advice #collaboration #discuss
---

So. I had this dumb idea. It was initially supposed to be for broadcast creatives and techs that are inbetween jobs, and it goes a little like this...
The creatives, techs get in a room together, and pitch ideas for a show. If all departments agree, they make the show. Everyone gets a share of the earnings in perpetuity. 

The only problem with this is: nobody pays for content, and, well, x% of $0.
 
So... I was thinking. Again. (I know, right? I really need to not do so much of that) Why don't devs do this? If you've got nothing on, why not all get in a room, throw around a few ideas... If everyone likes it, then just make it. Sort out the rules for ownership upfront, and get to it. Doesn't have to be the biggest thing in the world, and let's face it  $x/month/user is better than $0.

Just an idea.
Get a video review
Tags: showdev, discuss, javascript, webdev
Published: 2019-06-11 09:50:18

Hi!

I'm bootstrapping a little service where you can request video reviews or video critiques for your website. You can also use it to test features like the login experience.

What do you find more useful, a critical review or a video where someone quickly explains your product?

Have a nice day

https://feedbacktoaster.com/?ref=dev
The Simplest Way To CONFIGURE NEXT.JS With SASS
Tags: configure, sass, nextjs
Published: 2019-06-11 09:48:32

Styling is a core part of designing application pages. Whenever I start working on Next.js, I usually find myself wasting some time googling how to configure SCSS in my project. So, in order to save your precious time, I have decided to pen down this issue as a reference.

Although Next.js offers a really sophisticated plugin [next-sass](https://github.com/zeit/next-plugins/tree/master/packages/next-sass) for compiling sass files but this plugin fails to parse **.eot** and **.woff** files. So for parsing all our sass and font files, we have to add custom Webpack configuration inside next-sass.

Next-sass compiled stylesheet to **.next/static/css.** Next.js will automatically add the CSS to your HTML files.

# Step 1: Install Dependencies

Let’s start by installing dependencies. 

First, we need to install next-sass.
``` 
`npm install --save @zeit/next-sass`
```
Next-sass plugin used node sass so we have to install node-sass as well.
```	
 `npm install --save @zeit/node-sass`
```
# Step 2: Create the Next Config File

Now, create the **next.config.js** file in the root of your project directory. Next.js automatically reads all configurations from this file. So you just need to add the configurations here and export them.

#Step 3: Add Customize the Configuration

Now, We have to add customized configuration inside next-sass to make it work fully and functional for compiling **SASS** and font files.

This configuration is capable of parsing following file types:
Sass and css files
Font files (.eot, .woff, .woff2)
Image files (.png, jpg, .gif, .svg)
```
const withSass = require('@zeit/next-sass');
const withCSS = require("@zeit/next-css");
module.exports = withCSS(withSass({
   webpack (config, options) {
       config.module.rules.push({
           test: /\.(png|jpg|gif|svg|eot|ttf|woff|woff2)$/,
           use: {
               loader: 'url-loader',
               options: {
                   limit: 100000
               }
           }
       });

       return config;
   }
}));
```
    
**Great! You now have sass configured and I now have my permanent reference. Cheers!**
HTML to PDF converter made with Golang
Tags: go, html, webdev
Published: 2019-06-11 09:48:00

Follow below steps to generate HTML to PDF using Golang:

1.Create a sample HTML file inside of your project.

2.Make sure to download the below library in your system using the following command.

  sudo apt install wkhtmltopdf - for Ubuntu

  brew install Caskroom/cask/wkhtmltopdf - For Mac

3.Download go package using the below command for parsing the HTMl template.

  go get github.com/SebastiaanKlippert/go-wkhtmltopdf

4.We need to download another package for converting this html parse data to pdf using the below command.

  go get html/template

5.Run

  go run main.go

After finish above steps, You can generate pdf file from html.

More check here: [Golang - HTML to PDF Converter](https://github.com/Mindinventory/Golang-HTMLTOPDF-Converter)
Do Not Use Your Employer's Email Account to Negotiate Anything Legal 
Tags: work, email, employer, contract
Published: 2019-06-11 09:36:32

---
title: Do Not Use Your Employer's Email Account to Negotiate Anything Legal 
published: true
description: As in you@youremployersdomain.com
tags: work, email, employer, contract
---
![Image](https://thepracticaldev.s3.amazonaws.com/i/fdpiucxdqt9hqmq03cxk.jpg)
<em>Photo by Samuel Zeller on Unsplash</em>

TL;DR: because they can delete everything. 

By employer's email account I mean something like `you@youremployersdomain.com`. 

I recently parted ways with my previous employer. It all went super smoothly and my previous employer was nothing but super nice and compassionate. However, after a while, they naturally shut down my email account. And I was so close to losing some important documents like contracts, hardware receipts, promotion agreements, and such. Luckily I had a copy of everything on my email client and I could save a backup. But it made me realize that my employer had absolute power over my account all along. I trust my previous employer with this power, they're great people, but why trust when you can know?

Obviously, it is normal to use the company's email for work-related communication, but when it comes to negotiating your very contract, the counterparty shouldn't have access to deleting your side of the argument. Use your personal email when negotiating your salary, contract, or whatever unshared interest with your employer. 

This is especially relevant for remote workers where contracts and negotiations are mostly digital.
What are your non-tech interests/hobbies? 🏝
Tags: discuss
Published: 2019-06-11 08:50:59

I've found that as developers/engineers we mostly spend our time working within tech be it a full-time job or side projects. But for optimal work-life balance, it is great to have hobbies and interest outside of your work.

My hobby outside tech is Photography. 📸

I love taking pictures and I sometimes use this as my escape from the tech world. I'll like to know what your hobbies/interests are too.

Feel free to share yours and I'm hoping to see diverse interests from everyone in this community. ❤️
How to install vit on linux mint
Tags: terminal, taskwarrior, installation, vit
Published: 2019-06-11 08:34:36

A bloody great command line mate created a [TaskWarrior](https://github.com/GothenburgBitFactory/taskwarrior) wrapper, VIT(https://github.com/scottkosty/vit).

I think this wrapper is tmux friendly.
Also I like this approach to improve TaskWarrior because if you are already using TaskWarrior, there is no transfer cost.


# How to install

```
$ git clone https://github.com/scottkosty/vit.git
$ cd vit
$ ./configure
$ make
$ make install
```

VIT was created with perl. I had to install perl modules because my linux system is not familiar with perl.

# Trouble shooting
## 1. the curse of perl

If you receive this error message from `./configure`
```
configure: error: can not continue: perl "Curses" module not found
```

Install `libcurses-perl` by https://community.linuxmint.com/software/view/libcurses-perl

## 2. when running vit

```
Can't locate Try/Tiny.pm in @INC (you may need to install the Try::Tiny module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /usr/local/bin/vit line 13.
BEGIN failed--compilation aborted at /usr/local/bin/vit line 13.
```

Install `Try::Tiny` by https://ubuntu.pkgs.org/18.10/ubuntu-universe-amd64/libtry-tiny-smartcatch-perl_0.5-1_all.deb.html

If after installing it same error message occurs...

I attempted to find `Tiny.pm` in this directory
```
usr/share/perl5/vendor_perl/Try/Tiny.pm
```
According to this error message there is no perl path for `usr/share/perl5/vendor_perl/`

So,

```
export PERL5LIB=/usr/share/perl5/vendor_perl/
```
Then

it works!!