teleren/devto huggingface dataset:
Hyper - A modern terminal emulator for Linux
Tags: linux, tutorial, bash, beginners
Published: 2020-09-19 02:32:27

In this quick guide, I will review a modern-looking terminal emulator for Linux. Hyper is minimal and it supports a bunch of features that you will end up loving it.

‣ Get it from here!
‣ [Hyper.is](https://hyper.is)


{% youtube u8_HwJjbKHA %}


**Update:** 
Fortunately, the Hyper config file as an option to set a custom shell. Unfortunately, when I set the bash shell path it doesn't recognize it.  I have to execute **`bash`**  in the terminal to load it up.

Let me know if anyone has any solution.
Python Typing, between 3.6 and 3.7
Tags: python, help
Published: 2020-09-19 02:21:52

I recently discovered that Python has Typing for classes and functions, so yeeeiii  

but I have a little problem with backwards compatibility
```python
from .utils import StdReturn

def simpleFunc(data: str) -> StdReturn:
  """ My Awesome Function """
  ret = StdReturn()
  return ret
```
This example works fine in Python 3.7 and 3.8 (with an extra import)   

And the Python 3.6 way is like this (with no extra imports)
```python
from .utils import StdReturn

def simpleFunc(data: str) -> "StdReturn":
  """ My Awesome Function """
  ret = StdReturn()
  return ret
```
  
I'm OK with using one way or the other, but if I want to have Support from 3.6 and up, how should i do it? All my searches take me to configure virtualenv and install different versions of python in the system and not fragmentation within my python package.  

I'm leaning to use files for 3.6 and another source for 3.7, but it's very hard to maintain different versions within the code. Do you know if there is a python way to do this?  
  
  
PS: The example code is not copy paste, they are just as an example
Repeated String Explain - Solution | Javascript
Published: 2020-09-19 02:18:02


```javascript
function repeatedString(s, n) {
  const regex = new RegExp(/a/gi);
  const match = s.match(regex) || [];
  const length = match.length;
  if (length) {
    const ratio = Math.floor(n / s.length);
    const remain = n - (ratio * s.length);
    let x = 0;
    for(let i = 0; i < remain; i++) {
      if (s[i] === 'a') x++;
    }
    return (ratio * length) + x;
  }
  return 0;
}


repeatedString('aba', 10);
```

[Problem](https://www.hackerrank.com/challenges/repeated-string/problem)
Financial Data API for 2021
Tags: python, datascience
Published: 2020-09-19 01:56:00

I may work for IEX Cloud, but I gotta say, [IEX Cloud](www.iexcloud.io) offers some pretty great features.

**Curated financial data**

Institutional grade data, including real-time and historical stock prices, fundamentals, forex, crypto and more - all in one API. Full U.S. market coverage, 95,000+ securities.

**Flexible, scalable pricing**

Get open access to a range of datasets with one subscription. No need to lock into long-term contracts with a high upfront payment.

**Get started quickly**

Access datasets in minutes with one easy-to-use API, so you can focus on building!

**Designed for developers**

Use your preferred implementation method to integrate seamlessly with other tools in your workflow.

Hit me up on [Twitter](www.twitter.com/adamdeanwozney) if you'd like to learn more!
First Day on DEV!
Tags: beginners, webdev, javascript, react
Published: 2020-09-19 00:56:02

Hey everyone! Today is my first day on DEV! Any tips on how to engage with the community would be awesome!

As for my personal development trajectory, I am a web developer for the Canadian Government Coast Guard and a 4th year university student in Ottawa Ontario! ReactJS, MongoDB and front-end technologies/libraries such as Bootstrap, D3 and ChartJS reside in my daily toolkit. 

I'm looking forward to learning and developing my skills with all of you!
Backlogs don't make sense anymore
Tags: productivity, agile
Published: 2020-09-19 00:13:17

Backlogs are the ordered list of items the team may take on in future sprints.

Modern customers expect short delivery cycles, and aren’t willing to wait for deliverables. In that environment, something that’s not getting done in the next sprint is the first candidate to drop when interruptions “blow up the sprint”.

Unfortunately this means that backlogs are where things go to die.

Maintaining the backlog requires the team to meet every sprint for at least an hour for “refinement”. This only pays off if the backlog items are worked on, which as stated above, is increasingly less likely. This is one of the reasons engineers tend to hate refinement meetings. They are tedious, and the return on time invested is horrible.

There is a better way.

Instead of a backlog of things that won’t get done, only keep track of stories that you’re going to do right now.  When a story is created, assign it to a developer, and have the entire team weigh in on whether it should be done. Developers in turn, only start stories that their team considers worthy, and discard ones that don’t make the cut. In other words, continuously refine and plan, instead of waiting for the story to lose relevance.
Beginner Devs Should Use Linux... Maybe
Tags: codenewbie, linux
Published: 2020-09-19 00:01:50

**CAVEAT #1:** If you rely on software that is only on MacOS or Windows 10, do not switch to Linux. 

**CAVEAT #2:** This is just my opinion on how beginners could best develop problem solving mindsets by using Linux day-to-day. No developer is any less of a developer based on their choice of OS. You are not a bad developer for not being a terminal junkie. 

I switched to Linux when I was still a complete newb in 2013. I didn’t even know how to make a live USB. Somehow I was able to track down an actual CD-Rom of Ubuntu 12 from a Linux magazine at a Micro Center and use it to install my first Linux distro.

![the magazine looked something like this](https://dev-to-uploads.s3.amazonaws.com/i/qkpza1nx18v1orxlrh4c.jpg)
<figcaption>the magazine looked something like this</figcaption>
Why did I switch entirely to Linux when I was this new to tech? Well, I originally installed Ubuntu alongside Windows 10 to better learn Linux and the terminal. However, when I ran into trouble with Ubuntu, I’d reboot my computer and do it in Windows because it was comfortable.

![No More Half Measures (Breaking Bad reference)](https://dev-to-uploads.s3.amazonaws.com/i/9traky4uscuhnhx5tffs.jpeg)
<figcaption>No More Half Measures, Walter... I mean Charles</figcaption>
I decided to completely remove that option and uninstall Windows and I’m a better programmer because of it.

Why? Because programming is about problem solving, googling the error message, etc. And when you have to problem solve just to watch Netflix (which was the case in 2013), you pick these skills up quickly.

It’s a sink or swim approach which might not be good for everyone, but if you’re like me, I recommend it. You’ll have every opportunity to lose your fear and anxiety about the BASH terminal which will help you in your journey. Without fail, you’ll have to at some point pop the hood and use the CLI (command-line interface), and it's nice to not be intimidated by it.

The second reason I'd recommend this to newbies is financial. Most of the dev tutorials I've come across in the last six years are assuming you're using a Mac which can cost quite a lot. Windows machines are cheaper but the dev env is 1:1 to MacOS. You can install Linux for free on your Windows machine and since Linux and MacOS are both Unix, the dev env is very nearly 1:1.

![An Apple Slogan that Aged like Milk](https://dev-to-uploads.s3.amazonaws.com/i/vbh35wtpoba14r27xc5c.jpeg)
<figcaption>This Apple slogan has aged like milk</figcaption>

**But what do you think?** If you have any suggested operating systems for a new developer or any tips and tricks to tackle tutorials written for MacOS users with a Windows dev environment, share them in the comments.
Understanding event loop in JavaScript
Tags: javascript, eventloop, callstack, eventqueue
Published: 2020-09-19 12:07:53

---
title: Understanding event loop in JavaScript
published: true
date: 2020-09-19 00:00:00 UTC
tags: JavaScript,eventloop,callstack,eventqueue
canonical_url: https://www.loginradius.com/engineering/blog/understanding-event-loop/
---

Learn the basic concepts about the JavaScript Event Loop.

   
[Read On](https://www.loginradius.com/engineering/blog/understanding-event-loop/)
How to convert a String to Buffer and vice versa in Node.js
Tags: node
Published: 2020-09-19 00:00:00

---
  title: How to convert a String to Buffer and vice versa in Node.js
  published: true
  tags: Nodejs
  date: Sat Sep 19 2020 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/convert-string-buffer-nodejs
  cover_image: https://melvingeorge.me/_next/static/images/main-3d358a12b0382212bd0f64fb6e2addfd.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/convert-string-buffer-nodejs)
  
## Convert String to Buffer

To convert a string to a Buffer, you can use the `from()` method from the global `Buffer` class in Node.js.

```javascript
// a string
const str = "Hey. this is a string!";

// convert string to Buffer
const buff = Buffer.from(str, "utf-8");

console.log(buff); // <Buffer 48 65 79 2e ... 72 69 6e 67 21>
```

- The method accepts a valid string as the first argument.
- and an optional encoding as the second argument.

## Convert Buffer to String

To convert a Buffer to a String, you can use the `toString()` in the Buffer object.

```javascript
// buffer
const str = "Hey. this is a string!";
const buff = Buffer.from(str, "utf-8");

// convert buffer to string
const resultStr = buff.toString();

console.log(resultStr); //Hey. this is a string!
```

### Feel free to share if you found this useful 😃.

---
Flask vs Django in 2020
Tags: python, flask, django
Published: 2020-09-18 23:22:47

Hi there! I'm a python programmer and recently (a few months) I've been learning and working with Flask, because I heard that it was simpler than Django and I wanted a quick go into the reign of frontend. 

Now that I'm more capable, I was wondering, is Django better vs Flask? Or what are the major differences that you like it better above the other? 

The intention of the post is for **you** to give your opinion rather than a literal response to my question. I want to know what you like to do with one, while in the other it's more tedious or weird or whatever adjective!
Why you should learn Git
Tags: git, github, codenewbie, opensource
Published: 2020-09-18 23:04:36

Normally when you *google* for things like: 

> 
Tips on how to be a better programmer

You're gonna see **Teamwork**. This is where **Git** comes in. 


> 
What is Git?

- Imagine you are coloring on a flower coloring book. You colored in green for all leaves and now it’s time for the best part, coloring the petal. You know you enjoy red the best but it looked horrible after you finished it. With **Git**, you can revert your choice of red in a heartbeat and you are free to reapply the red if you change your mind. **A work doesn’t have to be permanent; every action is recorded and reversible**. [*Source*](https://dev.to/maestromac/comment/him)

- **Git** is a **Version Control System** (VCS). On a **very basic level**, there are two awesome things a VCS allows you to do: You can **track changes** in your files, and it simplifies working on files and projects with multiple people. 

Now lets' focus on the main question.

> Why should I learn Git?

### 1. Git is simple and easy to learn
I think it takes about fifteen to thirty minutes to learn Git. You could look for tutorials on [YouTube](youtube.com). You could watch this fifteen minutes [video](https://www.youtube.com/watch?v=USjZcfj8yxE&t=162s) and also download this [cheatsheet](https://www.atlassian.com/dam/jcr:e7e22f25-bba2-4ef1-a197-53f46b6df4a5/SWTM-2088_Atlassian-Git-Cheatsheet.pdf). Those are two very useful resources.

### 2. Version control 
With git whenever you get issues or bugs or you just don't know what you're doing anymore 😅 (happens to a lot of us), you could revert back to like *three-months-ago* and reassess your strategy. **Git** will remember every change. 

### 3. Teamwork
Git simplifies the process of working with teams. Team members can work on files and merge them with the master branch. It allows multiple people to work on the same file at the same time.

### 4. You would not forget what you wrote
With Git you could abandon a project for like *four months* (which you shouldn't) and later come back to it and you wouldn't be asking questions like: 

> *Who wrote this ?!* 

because you read through **commits** to help you remember what each change in the file was for.

Also, I realized that a lot of Code Newbies say thing's like they'll look into Git later in their coding career. That's the wrong way of thinking. If you've already learned to code just know that it's never too late to learn Git but I actually feel like you should learn Git before you start coding. Just know that Git is not only for programmers.

If this article has convinced you to learn **Git**, click [here](https://gitimmersion.com/index.html) to learn it. *Your Welcome* 

**Check out my** [Twitter](https://twitter.com/mr_codeslinger) or [Instagram](https://www.instagram.com/mr_codeslinger/).

**GOOD LUCK**  👍
Writing a queue in JS (using an Array)
Tags: javascript, computerscience, beginners
Published: 2020-09-18 22:51:11

I recently started to listen to the [Base CS podcast](https://www.codenewbie.org/basecs) and it brings me fond memories from my 2 months of Computer Science at Lambda School - I loved learning about and building data structures. While trying to solve a Kata today, I saw an opportunity to use Queue. I had to refresh the JS Class syntax since I had forgotten - I don't use it every day. I thought I would write about Queues here because, well, to remember about it since this is what this series is about! 

A Queue is FIFO (First In First Out) - the one that got first in the queue is the one getting out first. In my implementation, the left hand side of the queue will be the first.

At first it was going to be a simple queue but the folks at [GeeksforGeeks](https://www.geeksforgeeks.org/implementation-queue-javascript/) got me inspired to add some extra methods.

As usual, if something doesn't make sense or can be improved let me know in the comments.

```
class Queue {
	constructor() {
		// initialise array as data structure for the queue
		this.queue = [];
	}

	add(item) {
		// we add an item at the end of the array
		this.queue.push(item);
		console.log(
			`${item} has been added to the queue. The queue is now ${this.queue}`
		);
		return this.queue;
	}

	isEmpty() {
		// if queue length is 0, return true otherwise return false
		return this.queue.length === 0;
	}

	remove() {
		// if queue is empty, we print error message
		if (this.isEmpty()) {
			console.log("Can't remove anything, the queue is empty");
			return this.queue;
		}
		// we remove first item of the array
		// from my teacher at Lambda I learnt that the method is called
		// "shift" because when you remove first item of array in memory
		// we need to "shift" the whole array one space to the left in memory
		// it would then be O(n), am I horrinly wrong??
		const removed = this.queue.shift();
		console.log(
			`${removed} has been removed from the q. q is now ${this.queue}`
		);
		return this.queue;
	}

	print() {
		// print error if queue is empty
		if (this.isEmpty()) {
			console.log("Can't print anything, the queue is empty");
			return this.queue;
		}
		// initialise string
		let queue = '';
		// according to mdn I am not supposed to use for..in for arrays, but it works
		// well to get the index. Is it that bad??
		for (let i in this.queue) {
			// we add the item of the queuea and ", ". if last item, we don't add nothing behind
			queue +=
				this.queue[i] + `${parseInt(i) === this.queue.length - 1 ? '' : ', '}`;
		}
		return queue;
	}

	size() {
		// returns length of the array this.queue
		console.log(`The queue has ${this.queue.length} items.`);
		return this.queue.length;
	}

	returnFirst() {
		if (this.isEmpty()) {
			console.log('Queue is empty');
			return this.queue;
		}
		// return first item in the queue
		return this.queue[0];
	}
}
```
This is what you should do this weekend (dev productivity)
Tags: productivity, javascript, career, discuss
Published: 2020-09-18 22:40:57



🍿 It's weekend 🍿

Your energy is insane - to party... 

But, stop! 🛑

Ask yourself

Did you complete your 
top 3 tasks today?

Did you plan what you are going 
to do for the weekend?




😍 Me - I got a lot of stuff done today

Migrated our brand

Solved some on-call issues

Helped my friend set up his web project



😈 What did you do today?

Did you write any code?

Did you build anything?

Learn stuff. Build stuff.


--- 

I love jotting down my thoughts on my blog [Sleepless Yogi](https://www.sleeplessyogi.com/posts)
Getting started in Open Source development
Tags: opensource
Published: 2020-09-18 22:01:38

I'm Anthony - a computer programming student living in Toronto, Canada. During my first semester, I remember circling the Open Source Development courses as ones I knew I wanted to take. Each semester I would take all the requisite classes in C++, SQL, Java & Javascript as stepping stones towards the goal of Open Source Development. Now - here I am in my final semester and I feel wholly unprepared and out of my depth. 

It's my understanding that the imposter syndrome is pretty normal for beginner programmers and it's my hope that over the next few months I'm able to shake it.

I've been taking a look at RxDB {% github pubkey/rxdb no-readme %} It looks really interesting, as I've had some aspirations to build some mobile apps that could leverage a feature like state change subscriptions. I don't know if I'll be able to contribute anything meaningful to this repo, but it looks to be something I could use in future project of mine.
Bashing inspiring quotes
Tags: showdev, bash, linux
Published: 2020-09-18 21:51:33

I like history and I like quotes. I think it's an easy way to widen my perspectives and get more humble to the world. But I also like Linux. So I decided to combine those two in a golang session.

It resulted in [bash-quotes](https://github.com/kontrollanten/bash-quotes), a CLI for printing quotes from [http://quotes.cat-v.org/](http://quotes.cat-v.org/).

It's a pretty simple app that's divided into two parts:

**download-quotes**
As the name says this part downloads the webpage, scrapes it and uses the `<hr />` to identify when a quote ends. When that's done all the quotes are saved into a filepath that's given as an argument.

**read-quote**
When calling this binary a randomly chosen quote is printed to the screen with some nice colors. This is the binary that I'm calling at shell login to keep me inspired with thoughtful quotes.

## What's next?
The web page has a lot of sections with quotes, I've only scraped the first page so I guess I'll scrape further next time I dig into this.

You're welcome to download and use it by visiting [https://github.com/kontrollanten/bash-quotes](https://github.com/kontrollanten/bash-quotes) and follow the install instructions. What do you think? Would you've done it another way?
Day 220: The Movement II
Tags: hiphop, code, coding, lifelongdev
Published: 2020-09-18 21:50:09

_liner notes_:
- Professional : Had our team meeting today. Got to demo a new feature of the Web Component I've been working on and using as an example in my blog posts. A user can now pass in an array to customize the buttons in the keypad. I'm turning it into a game pad to control a spaceship to dodge and blast meteors. Got the movement to be pretty smooth.

- Personal : Got the details and map sections of the event page worked out for my side project. Looks pretty good. Now I need to work out the live event mode. Since the real time functionality isn't needed till the stream is live, I want to hold off on loading those extra libraries till it's needed to keep things as small and fast for as long as possible. I have an idea of how I want to make it work.

![A Killer Whale just below the surface in Desolation Sound, BC, Canada](https://dev-to-uploads.s3.amazonaws.com/i/xcwsdyi1c4atesqcajj8.png)

I think I'm going to set up a group on Meetup (I mean I am paying for the Pro account) so that I can further test my side project's dashboard with going live. I don't want to mess with the actual groups. Probably set something way off in the future. Going to finish up putting together tomorrow's radio show before I start coding.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube xBV_9rYO3rc %}
#Why I Decided to Learn Software Development
Published: 2020-09-18 21:44:20

When the Covid-19 lockdowns happened I, like so many others, was left with only a percentage of my usual income. I had been working as a yoga teacher in Los Angeles and was suddenly left without a studio in which to teach, private clients to instruct, or retreats to lead. After recovering from the blow of losing so much, I started to consider my options. Realizing I had options was in itself extremely liberating. I put together a mental list of what a completely different career path might offer me. Then I began to wonder what path that might be. 

I've always been interested in design; both of the built environment as well as our virtual environment. I had had the opportunity to build three different websites (for myself as well as companies I worked for) in the past year using platforms like Squarespace and Weebly and really enjoyed creating those online worlds. I was interested in UX/UI design, but after taking a day-long "bootcamp" course in visual design realized that I wanted to know more about what was going on behind the scenes of design. How did these worlds function? More than just building out what something looks like, or how a user interacts with that something, I was interested in the systems that lay beneath all that. 

I had no idea what a career as a software developer looked like, so I did what all resourceful humans who have ever watched "Who Wants to be a Millionaire" do; I phoned a friend. Kristina had completed the Flatiron School Software Engineering program two years ago and was loving her life. She had the most positive things to say about what the program had offered her and how coding had become a great passion of hers. She described her work as building and solving puzzles all day long. "I like puzzles," I thought while speaking with her. 

After talking with Kristina, I started to dig a little deeper. What kinds of “jobs” do software engineers do? I listened to the story of a woman who works for The Guardian and designed an application for their website to help prevent their customers from feeling burnt out by depressing news stories. That story really opened my eyes to the idea that software engineers and web developers aren’t only building websites but also have the tools to build systems of great advancement. 

I don’t know exactly what I want to do or where I want to work once I graduate from Flatiron School but I know that ultimately I’d love to be able to create systems that help environmental conservation and preservation efforts. I find the cross-section of tech and the environment incredibly fascinating and the development of that cross-section as integral to the protection of our planet.