teleren/devto huggingface dataset:
Daily Developer Jokes - Monday, Jan 13, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-01-13 13:00:02

---
title: "Daily Developer Jokes - Monday, Jan 13, 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=Monday%2C%20Jan%2013%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/5e125947cfb29.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:___ An Agent died unexpectedly. How was the crime solved?

___A:___ By looking at the Stack Trace.
 -->
Base Java Part 3 (Datatypes In Java)
Tags: beginners, java, tutorial
Published: 2020-01-13 12:55:05

Here is the video tutorial. Please show some love and subscribe to my channel [Subscribe](https://www.youtube.com/channel/UCBRX8VfhAp7FJ_13uzpI_pQ?sub_confirmation=1).


{% youtube dsMPRdgSAko %}

***What is a Datatype?***

A data type is an attribute of data that tells the compiler or interpreter how the programmer intends to use the data.

***Data types in Java programming language***

There are two different sets of data types in Java 

1. Primitive Datatypes
2. Non Primitive Datatypes

The below image depicts different data types in java

![Java Datatypes](https://thepracticaldev.s3.amazonaws.com/i/q7j0puttecv31anaa64n.png)

The Java programming language is statically-typed, which means that all variables must first be declared before they can be used. This involves stating the variable's type and name.

***boolean:*** is used to store true or false value.

***byte, short, int, long:*** is used to store whole numbers.

***float, double:*** is used to store fractional numbers.

The below table depicts different datatypes and the size of those datatypes.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/beba61b0jn4x718q7b1a.png)

The below class has all these datatypes defined and declared.

```
package com.test.java;

public class BasicDataTypes {
	
	static byte i = 127;
	static short j = 3456;
	static int k = 24233534;
	static long l = 34564;
	static float fl = 35325432;
	static double db = 34523763;
	static boolean b = true;
	static char c = 'c';
	
	static String testString = "Hello World";
	
	
	public static void main(String [] args) {
		char[] testCharString = new char[11];
		testCharString[0] = 'h';
		testCharString[1] = 'e';
		testCharString[2] = 'l';
		testCharString[3] = 'l';
		testCharString[4] = 'o';
		testCharString[5] = ' ';
		testCharString[6] = 'w';
		testCharString[7] = 'o';
		testCharString[8] = 'r';
		testCharString[9] = 'l';
		testCharString[10] = 'd';
		
		System.out.println("Default value of byte is ---> "+i);
		System.out.println("Default value of short is ---> "+j);
		System.out.println("Default value of int is ---> "+k);
		System.out.println("Default value of long is ---> "+l);
		System.out.println("Default value of float is ---> "+fl);
		System.out.println("Default value of double is ---> "+db);
		System.out.println("Default value of boolean is ---> "+b);
		System.out.println("Default value of char is ---> "+c);
		System.out.println("Default value of String is ---> "+testString);
		System.out.println("Default value of char is ---> "+String.valueOf(testCharString));

		
	}

}

```

Here is the video tutorial. Please show some love and subscribe to my channel [Subscribe](https://www.youtube.com/channel/UCBRX8VfhAp7FJ_13uzpI_pQ?sub_confirmation=1).


{% youtube dsMPRdgSAko %}
6 Months to Change my Life 
Tags: career, writing
Published: 2020-01-13 12:55:04

So this is my first post here, long time admirer first time caller so to speak. 

First note is I am doing this to sort of publicly commit to this and hopefully inspire a few more people to take such a gamble.  So having been programming now for a year and a half trying virtually all languages at some point or another so i decided last summer it was time to focus on one. 

This language you ask ? JavaScript. Yes a lot I had heard was negative but for job demand it was up there and best part was I could take all I had learned from python, java, and the fact I tried web development using the FreeCodeCamp meant I wasn’t starting at square one. 

Well this was great news, this  gave me motivation that I started at a point where it wasn’t starting again. It seemed like while I have  been studying part time CS degree that I was constantly changing languages which left me knowing how to print the famous "Hello World" in 5 languages.

So back to the topic of changing my life in six months, I was told just before Christmas that next April my contract at my current job wont be renewed due to finances, and this made me panic. I have developed a comfort zone of some sorts I work, study and play PlayStation. This left me in a somewhat "Damn what am I going to do" moment. 

The main Question did I carry on teaching adults (my job) or did I pursue my dream of becoming a developer. I knew I would have to start at the bottom again, which made me think, do I ? Don’t I ? 
So this leads me to the moment something in my mindset changed from I cant be a developer till I finish university to I could get a Junior position now! 

So I start looking at what I would need for a junior position around Europe, I'm having a go big or go home mentality at this point. I've always loved the Netherlands , I speak average Dutch, visited 8 times in two years. I was thinking why not? 

Well the problem is up to this point in my life I have been practical, methodical and cautious and everyone I knew was thinking I was having a meltdown waffling on about being a developer and moving countries but in the world today rewards the brave ? Right... 

So my plan is simple 
	> Keep building my skills in HTML, CSS and JavaScript 
	> Build a portfolio website, and keep changing it include new skills 
	> Finish university for the year and then start applying for jobs 
	> Never Stop Learning and let the hunger, desire and ambition come through. 

With these things I cant fail and I know that joining a team of like minded individuals, learning from people and continuing my adventure is what keeps me going. The fire inside us is what defines our boundaries and fire is limitless
	
 
"There is no passion to be found playing small--in settling for a life that is less than the one you are capable of living."
-Nelson Mandela

Ill keep you updated on how its going as I found this quite therapeutic.
How does Zalgo text work?
Tags: zalgo, zalgotext, helloweentext, zalgotextgenerator
Published: 2020-01-13 12:38:40

I've seen weirdly formatted text called Zalgo like below written on various forums. It's kind of annoying to look at, but it really bothers me because it undermines my notion of what a character is supposed to be. My understanding is that a character is supposed to move horizontally across a line and stay within a certain "container". Obviously the Zalgo text is moving vertically and doesn't seem to be restricted to any space.

https://zalgo.org/

The text uses combining characters, also known as combining marks.
n Unicode, character rendering does not use a simple character cell model where each glyph fits into a box with given height. Combining marks may be rendered above, below, or inside a base character


T̸̝̄͊̀͋͋̋̋̒̐̍̌̈́h̶̡̺̤̪͕̤̻̤͙̹̒͆͆̍͂̾̋́̐̆̿͠í̸̡̧̛̙̦̬̻̜̪̦̩̬̺̬̊̆͗̀̈̽̚̚ͅs̸̛̙͖͉̤̰̲̓̉̇̓̈̑̌̃̆̑͗̀ͅ ̵̡̯̯̪̒̍͐͋͘i̶̡̩̱͈̫̿̾̏s̸͚͑̒͑̑̄̿̉̅̄̈̌̈́̈́̃ ̷̧̭̼͙̹͍̗͔͂̎̒̈́͜Z̵̢̧̨̦̦̙̱͈̻̗̺̩̝̼̳͓̠̈́̅͆̾̊a̴͇͈̪̭̻̠̟̳͋̍̑̊̇̏̀̽̑̉͘̕͘͝͝͝l̴̙̖̱͔̜̅̀̂̐̒̕͘͝͝ͅḡ̷̡̢̢̧̛͎͖͙̫̻̠̪͍̜̟̣̝̟̓́́́̃͑͊̕ọ̵̺̟͎͇̎͋̎̾͌͌̊͜ ̵̡̢͓̖͎͓̜̣̩͉̬̩̘͌͛̍́͋͒̀̆ͅt̴̨̨̛̛͎̹̪͔̗͈̩̜̲̓͐͌̌̄́͆͐͋̓͠ͅę̵̢̧̡̩͍̦̭̺̖̤̜͆̈́̈͑̽͑̀̈̂͜ͅẍ̷̞͎̜̮̭̤͔̠͓̝͉̰́̎̀͑͑̏̿̋̈͌̎͗̕͜ţ̴̠̱̮̭̘͚̞͎͓̙̬̞̉͊̒́̕͝ͅ.̶̼̯̱̟̥̪͓̔̆͌̽̂͝


So you can easily construct a character sequence, consisting of a base character and “combining above” marks, of any length, to reach any desired visual height, assuming that the rendering software conforms to the Unicode rendering model. Such a sequence has no meaning of course, and even a monkey could produce it (e.g., given a keyboard with suitable driver).
Apache Spark Accumulators, Simplified !
Tags: distributedsystems, beginners, tutorial, todayilearned
Published: 2020-01-13 12:36:20

 
This is part of the series [Apache Spark bitesize](https://dev.to/adipolak/apache-spark-bitesize-series-1jd2).
Every post will take you less than 2 minutes to read, so you can learn something new while waiting for your coffee to brew.

## Apache Spark Accumulators: 
We can think about accumulators like counters, distributed counters. 
**Any** simple value can be accumulated.
Basically, there are types that can be merged. 
The result type being accumulated is the same as the types of elements being merged.

These are variables that are "added" to through an _associative operation_ and can, therefore, be efficiently supported in parallel and distributed.
 For the supported accumulator of numeric value types, Spark creates an optimized MapReduce. 
However, programmers can add support for new types as well by implementing the `abstract class AccumulatorV2`.

## Let's look at a simple example: 

![](https://tenor.com/view/fully-raw-kristina-quick-simple-gif-9315638.gif)



```java
val accum = sc.accumulator(0) // create accumulator
val dataFrame = sc.parallelize(Array(1, 2, 3, 4)) //create DataFrame
dataFrame.foreach(x => accum += x) // distributed operation
accum.value // can be called only from driver
```
What happened here? We created a new accumulator variable named `accum`, and a DataFrame named `dataFrame`.
We call `foreach` on the DataFrame and create the logic of - foreach x in DataFrame add its value to `accum`. 
The `foreach` function acts in a distributed manner.
Later we can extract the value from the accumulator by calling `.value` Which can be called ( and return final answer ) **only** from the driver.


![](https://media1.tenor.com/images/662a3b67a436258107c84a056ae9bb74/tenor.gif)

### 💡 We want your Ideas and Comments 💡 
If some of the terms seem off, or you are not sure what they mean, checkout [Apache Spark Basics](https://dev.to/adipolak/apache-spark-basics-4a0n). 

Didn't find what you were looking for? [write me](https://twitter.com/AdiPolak). 

❤️ Thank's for reading ❤️
node express pug react pug SSR 'squared'
Tags: node, pug, react, ssr
Published: 2020-01-13 12:25:40

up until now ive only being using node express pug directly but i have just discovered pugjs/babel-plugin-transform-react-pug which effectively pre transpiles your pug into jsx then react 

# node pug ssr
### node -> express -> pug => browser

https://pugjs.org/api/reference.html

# node react pug ssr squared 
### node -> babel -> pug -> jsx -> react -> bundle => browser

{% github pugjs/babel-plugin-transform-react-pug %}
PrimeVue UI Suite 1.0.0 released with 50+ Components featuring Material, Bootstrap and Custom Themes
Tags: vue
Published: 2020-01-13 12:02:01

[PrimeTek](http://www.primetek.com.tr/) is proud to announce that, after months of hard work and dedication, [PrimeVue](https://www.primefaces.org/primevue) has reached **1.0.0-final.** PrimeVue is the most complete UI Component suite for Vue featuring over 50 components, theme designer, various VueCLI templates and professional support. 

![](https://www.primefaces.org/wp-content/uploads/2020/01/primevue-release-100.jpg)

**The Most Complete UI Component Suite** 
PrimeVue offers 50+ components as a solution for your UI requirements, whether they are simple or complex. From form components to charts, let PrimeVue do its magic while you focus on the business logic. **Theme Designer** [Theme Designer](https://www.primefaces.org/designer/primevue) is a Vue application to easily skin PrimeVue components to make sure they work within harmony within your own application. Nova, Luna and Rhea themes are included as free themes to get started in no time. 

**Premium Templates** 
Premium VueCLI templates are offered as a complete solution for your UI featuring an application layout, template pages on top of special themes such as **Material**, **Bootstrap** or **Custom** themes. Initially, following templates are available;

*   [Serenity](https://www.primefaces.org/serenity-vue/#/)
*   [Sapphire](https://www.primefaces.org/sapphire-vue/#/)
*   [Avalon](https://www.primefaces.org/avalon-vue/#/)
*   [Apollo](https://www.primefaces.org/apollo-vue/#/)
*   [Babylon](https://www.primefaces.org/babylon-vue/#/)
*   [Roma](https://www.primefaces.org/roma-vue/#/)

[![](https://www.primefaces.org/wp-content/uploads/2018/12/serenity-biggest-o.jpg)](https://www.primefaces.org/serenity-vue) 

**PRO Support** 
With PrimeVue PRO, it is easy to support, tune and add features to PrimeVue as if it were an in-house framework. PrimeVue PRO is a term based commercial support service. With the exclusive services of Pro account, you no longer need to post your questions in the community forum and your issues to community issue tracker. 

**Download** 
PrimeVue is free library to use under MIT License and available at [NPM](https://www.npmjs.com/package/primevue). 

**Roadmap** 
Our goal is to make PrimeVue a well-known and valuable member of the Vue Ecosystem in 2020 and improve it every day based on the community feedback. Always bet on Prime!
How do you name your GIT branch?
Tags: discuss
Published: 2020-01-13 11:44:48

Hi developers,

I will like to ask you a simple question.

How do you name your GIT branch?

A. b/your_new_branch_name
B. your_new_branch_name

I am using the first way at my organization. Why I am doing this? 🤔 Because I have observed all are doing the same. 😐

My colleague told me that we are using 'b/' to identify it as a branch easily.

What do you think about it?

Please write down your opinion on the branch names in the comment section below.

Thanks!
Google Sheets with .Net Core Razor Pages CRUD Tutorial
Tags: dotnet, tutorial, productivity, beginners
Published: 2020-01-13 11:40:34

In my research related to Asp.Net core, I came across a simple example using Google Sheets (spreadsheet) integrated into a .net core app. Actually, in the past days I  met a programmer friend who explained another app of his, that uses a google spreadsheet for back-end. That's why I decided to give it a try, check the below tutorial and adapt it to a full CRUD.

https://dottutorials.net/google-sheets-read-write-operations-dotnet-core-tutorial/

Please note that the above is a console app, and mine is a Razor pages CRUD, with added functionality, using the basic points from the above, but also extending the logic of it.

The initial settings are very well explained in the above tutorial, so you can check and follow how to create a google API and credentials etc, add nuget package for your app, which are the starting point for my app.

For our example, create a second sheet called Sheet2, which will contain a list of invoices, as presented in my sheet (see link, only read-only access granted).

*My CRUD application is running under:*

https://googlesheets.azurewebsites.net/InvoiceList

**a. The base class for the invoice list looks as below:**
```csharp
public class InvoiceModel
    {

        public int Id { get; set; }

        public int InvoiceNumber { get; set; }

        public string CostCategory { get; set; }

        public string Period { get; set; }

        public double Amount { get; set; }

    }
```

**b. The additional work in my case is a service class that supplies the CRUD operations, just as seen below.**

This service uses the google api for spreadsheets. My resource was the above mentioned tutorial, with some modifications, using stack overflow etc.

I will attach only the service class.
https://drive.google.com/open?id=1mjxgBa5n6C3zcZTsnNx8jgF8OOkbqgoq

Let me know if any of you need the full code of the app.
Module Wrapper Function in Node.js
Tags: node, javascript, webdev
Published: 2020-01-13 11:38:39

### Introduction

Have you ever wondered, why do we have to export functions, objects or variables if we want to use it in other files in Node.js? Variables, functions we define in a module are scoped to that module, in other words they are private. So, we can not access them from other module.

How does Node do it? That's what we are trying to find out today. Let's dive right in.

### Code Example
Write a function in `area.js` which returns the area of a rectangle.

```
const areaOfRectangle = (length, width) => length * width;

module.exports = areaOfRectangle;
```
Then, let's require `area.js` into `calculateArea.js`.

```
const areaOfRectangle = require('./area');

console.log(areaOfRectangle(4, 5));
```
After running this file in terminal `node calculateArea.js` we get 20. By exporting the function `areaOfRectangle` we are making it publicly available. If we do not explicitly export it we can not use it. OK, that's good but where does `module, exports and require` come from.

### IIFE to the Rescue
Node does not execute code directly, it wraps code inside of a function, more specifically **Immediately Invoked Function Expression** aka **IIFE**. And `exports, require, module` and two other `__filename, __dirname` are passed as arguments of IIFE. And as we all know IIFE helps us write more secure code without conflicting the naming of other functions, variables and classes of third party code.

If we want to see how Node wraps our code with **IIFE**, the code looks like bellow.

```
(function (exports, require, module, __filename, __dirname){
     // Our code
})
```

We don't have to explicitly call it because Node.js does that for us. Now, we all know whre does `exports, require, module` come from and what they do. But what does `__filename, __dirname` do.

If we `console.log(__filename)` and `console.log(__dirname)` the output for the first `console.log` will be `path/to/your/directory/youfilename.js` and for the second `console.log` will be `path/to/your/directory`.
Matrix Public Task Runner
Tags: bash, matrix, taskrunner, registry
Published: 2020-01-13 11:37:38

Every project has proper scripts but sometimes project shares scripts, and there are a lot of valid reasons to put online this scripts in a registry, for examples: git macros, building process, installing tools, and so on. Than take this

-   https://github.com/zionrc

This is an environment to manage a public registry with a collection of tasks

A basic idea behind The Matrix movie
-   Install the task runner: https://github.com/zionrc/neo

Register your task in the registry via pull request
-   The registry: https://github.com/zionrc/registry

Now you are ready to type this
```bash
neo run peacemaker
```

Please support the project, adding an issue here
-    https://github.com/zionrc/neo/issues/new

Thanks
6 Programming Trend Predictions for 2020
Tags: javascript, rust, graphql, webassembly
Published: 2020-01-13 10:42:30

Software development is one of the few businesses where one needs to be continually involved in learning new languages and programming tactics, as the trends keep on changing at an exponential rate. A programming language or technology stack does not have a long life in the field of software development unless it is reinvented and packed with a newer set of features from time to time.

#Programming trend predictions for 2020:

**PWAs Will Become Mainstream**

There are way more web developers in the wild than native platform-specific developers. Companies and developers would love to save their money and time and reuse their resources.

**Web Assembly Will See More Light**

Wasm is designed as a portable target for compilation of languages like C, C++, & Rust. As the amount of data grows, it will be harder to keep a good performance & that’s where WA comes in handy.

**Always Bet on JavaScript**

The 2010s was the decade of JavaScript. We’ve seen a massive spike of JavaScript growth, and it doesn’t seem to be slowing down.

**Rust Will Be More Important**

We’ve seen four years of strong growth of the Rust language. 2020 can be the year Rust will officially become significant in the industry.

**GraphQL Adoption Will Continue**

As our applications grow in in complexity, so do our data consumptions needs. GraphQL is a superior solution to fetching data compared with a traditional REST API. It’s used by teams of all sizes.

**Functional Programming Is Here to Stay**

Modern popular programming languages like Kotlin, Dart, & Julia all support FP and its features. Functional programming is on the rise and it is becoming more widespread. [Read More](https://aslisach.in/)

What Are Your Predictions? Share Your Thoughts in the Comment Section below.
Firebase Hosting with Namecheap Domains
Tags: firebase, webdev, domains
Published: 2020-01-13 10:05:55

Firebase Hosting, in my opinion, the easiest and beginner friendly way to host your website seamlessly. I haven't tried other hosting services (except Heroku). If you have one, comment down below! 

However, when you deploy your web project the firebase hosting, you will the get a default url:

`XXXXX.firebaseapp.com`

That's when domains come in. In short, domains are the addresses of your projects. They convert the human readable address to an ip address that your web project is being stored.

You can buy domains from GoDaddy, Google. However, I chose NameCheap because I am a cheapskate. I find that registering your NameCheap domain with firebase hosting is not exactly great. Thus, this a brief tutorial on it. Full video below.

First, you need to get a domain name in NameCheap.

Second, go to the Firebase Hosting of your project. Click on add custom domain and key in your custom domain. _Leave the checkbox that says redirect to an existing website, unchecked._ Click continue.

Copy the statement below the value header: `google-site-verification=somethingsom4eth6in7g`

Let's go to NameCheap dasboard. you need to go to Domain List > Manage _Click on the domain you want to register_ > Advanced DNS > Add New Record.

![Namecheap Dashboard example](https://miro.medium.com/max/2048/0*hd3HFeTjNlydbMzK.)
<figcaption>
[Source: Macario Jame](https://medium.com/@macariojames/firebase-custom-domain-verification-with-namecheap-dns-4baabaf3fb25)

Create an TXT Record, with a @ as host, instead of the url as the host.

Moreover, create a CNAME record with `www` as the host and the value with your domain.

This will be verified after a couple of minutes. You are one step away from using your custom domain.

![Success Dialog for Firebase Hosting Domain](https://i.ibb.co/943Cs3n/Screenshot-2020-01-13-at-6-13-34-PM.png)

Once done, you will be brought to the last page, **GO LIVE**. You have to add 2 `A Record` with the host @ instead of your custom domain into the Advanced DNS settings.

You have to wait for a while for the domain to be secured by Firebase. Refresh the page after a few minutes, and you will see the Pending status.

You can visit your web app, which is not secured, yet.

It may take up to 24 hours, but it will probably take less.

{% youtube x5XlzSIWsvI %}

Hope this is helpful 😁. Comment down below if you face with any issues.
I made a CLI to import GitHub issue labels from another repo
Tags: typescript, javascript, webdev, cli
Published: 2020-01-13 10:04:40

---
title: I made a CLI to import GitHub issue labels from another repo
published: true
description: CLI to import labels from another repository on GitHub
tags: typescript, javascript, webdev, cli
---

import-github-labels-cli 

It will fetch labels from a repo and copies it to our repo.

It can create/delete/update the issue labels as well. Fully written in TypeScript.


The source is at

https://github.com/abhijithvijayan/import-github-labels-cli

Published to npm

https://www.npmjs.com/package/import-github-labels