teleren/devto huggingface dataset:
My personal reflection after completing a coding boot camp
Tags: javascript, beginners, codenewbie
Published: 2019-11-21 19:58:55

I graduated from [General Assembly](https://generalassemb.ly/) Software Engineer Immersive Program this week. And there is a lot of mixed emotions I have now that it is done. First off I would like to say that attending the boot camp was the best decision I have made for my career. I have worked in multiple different industries before trying to tackle the world of development. And while I was able to learn a lot on my own, attending the boot camp really gave me the direction and discipline to continue being successful on my own.

There is an entire world that has just opened up for me and the skill to pick up a new language and build a simple app in just a few weeks is a skill I will cherish for the rest of my life. I did not expect my culinary skills to be so transferable to software development, but I constantly find myself using the skills I learned in a kitchen to problem solve problems in my apps. I loved figuring out different techniques and which ingredients I could use to improve a dish and now I love figuring out different ways to write an app to improve performance and overall design. The first project I will learn on my own will be a basic blog app in Vue.js and the same app in React.

I am also excited to learn about things like Gatsby and CSS libraries like LESS and SASS. These are all things they did not teach us about in the boot camp, but I do not know if I would have been motivated to learn them without the discipline it gave me. And there is so much more out there I can not wait to find out about!

---

Some great podcasts I have found have been:
1. Syntax FM
2. Ladybug
3. CodeNewbie

Some other great resources I will continue to use are:
1. FreeCodeCamp
2. Pluralsite
3. CodeCademy
4. CodeWars

And general social media and places to talk about code are:
1. Twitter @GabrielSharpton
2. Stack Overflow
3. Medium
4. Dev.to(Obviously ;)

I would love any suggestions you all have found that has helped you on your coding journey! Feel free to reach out to me to talk about all things code. And if you are interested to follow my journey check out my Github at 
> https://github.com/gabesharpton

---
All in all, I am very excited to join the Dev community so look out world! You have a new member joining your ranks.
How to handle secrets in Node.js 🗝️🗝️🗝️ (environment variables)
Tags: javascript, webdev, beginners
Published: 2019-11-21 19:51:41

{% youtube QNIxXq3EcjE %}

What's the best way to handle configurations or secrets like API keys with Node.js? One simple way is to use environment variables. 

You could pass them directly to your node command or add them to the package.json. Let's have an `index.js`, that looks like

```js
const apiKey = process.env.API_KEY
console.log(apiKey)
```

You can, for example, start your application with
```
API_KEY=super-secret-key node index.js
```

You can also put the same into your `package.json`

```json
  ...
  "scripts": {
    "start": "API_KEY=super-secret-key node index.js"
  },
  ...
```

and start your application with `npm start`. That way you at least don't have to type your API key every time you start your application.

The problem with this approach is, that you have to commit your package.json to your repository. But you should not share secret keys like this. So there's a better way to do it: using a `.env` file.

So you can add your API key to this `.env` file and consume it, like before, with the `dotenv` library.

run 
```
npm install dotenv
```
to install the library.

Then import and use it like this in your application:

```js
require('dotenv').config();

const apiKey = process.env.API_KEY
console.log(apiKey)
```

Your '.env` file will now contain your secret.

```
API_KEY=super-secret-key
```

Ideally, you would then also create an entry in your `.gitignore` to exclude your `.env` file from version control.

Put this in the `.gitignore`:

```
.env
```


This way you have all your secrets in one place and you don't accidentally leak any secrets.
YPSKA #10 Runtypes
Tags: rest, javascript
Published: 2019-11-21 19:42:06

Tenth day in a row, phew... Almost missed this one, but here it is. 
If you are like me, scary thought maybe, and have fallen in love with TypeScript you might be feeling that the type checking would be nice to be present even at run time. Well, I got something for you, [Runtypes](https://github.com/pelotom/runtypes). With this library you can define, AND check at run time, types and more (ranges for numbers, null/undefined etc). I've for example been using it to verify the JSON-data received from REST services. 

You should probably use it with a bit of caution, so your project's performance won't be suffering. But giv it a try in some small and maybe critical part.
The Pit Called Burnout
Tags: career, productivity, motivation
Published: 2019-11-21 18:43:50

---
title: The Pit Called Burnout
published: true
description: A quick read on burnout
tags: career, discuss, productivity, motivation
cover_image: https://thepracticaldev.s3.amazonaws.com/i/zszm71j72hcae7exd5ti.jpg
---


Prologue
--

The concept of burnout has always been an interesting one to me.  How do you know when it hits vs just having a bad day/week?  Personally I think its about retrospective.  Looking back and reflecting on the months and years you can identify the trends.  You can view the timeline of your career and life and what got you to this point now.  By reflecting on past choices and mistakes it can offer a small step forward.  I find some semblance of understanding by turning thoughts into words on this blog.


Story
--
For me, burnout is more than just physical and emotional exhaustion.  It is more the depression around spending half your life writing code, first for fun then for living, only to realize is this really what I want to be?  The idea of wasting my 20's and early 30's at simple engineering jobs and starting failed company after failed company is what is the most draining(are they really wasted? thats a reflection point for the future).  Day in and day out not learning anything.  Not spending your daily allowance of creativity and problem solving brain power.  The acceptance of mediocrity cuts deep.  I also think the fear of change is what keeps me locked in place at times, and its not lost on me.

Finale
---

I realized my own struggle with burnout a few years ago.  Its still a struggle to find any passion in being an engineer.  Maybe its the simplicity of the problems being solved, or lack of career evolution; I am still finding that out.  But I have found something that helps.  I now say yes to almost everything, because I never know what I will like or what just clicks.  From writing this blog, to building games, writing tutorials, streaming on twitch, writing fiction, public speaking or building stuff.  I found being open to everything forces you out of your comfort zone.  Comfort kills creativity.
Meet our newest team member, Jia Li!
Published: 2019-11-21 18:31:20

<em>This Dot is excited to welcome its newest Senior Software Engineer, Jia Li!</em>



<center>![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/i1i5j48jhkaivoqn94d1.jpeg)</center>


 
Jia is a front-end developer, based out of Yokohama, Japan.  He works with Angular, React, and Vue, but is particularly passionate about Angular technologies as well as Google’s recently released Bazel build and testing tool.
 
Not only a seasoned software developer, Jia is also a very active speaker, having recently delivered speeches on a variety of Angular focused topics at ng-Malaysia, ng-Japan, Angular Denver, and ng-China, in just 2019 alone!
 
Jia shares This Dot’s passion for diversity and inclusivity, sharing that the welcoming environment of the Angular community motivated him to pursue OSS development, and that without its support, he  may not have been able to accomplish all that he has in his three short years of working with OSS.
 
It’s this type of mentorship that Jia believes will best support prospective developers who are looking to pursue web development as a career, with Li crediting one of his first mentors, a developer named Kaiyang, as the person who taught him many of the fundamentals he still applies today.  
 
Li is, therefore, excited to be able to not only provide amazing development services to This Dot’s many clients, but is eager to be able to lead client teams through thoughtful, constructive mentorship.  
 
When he isn’t working, you can find Jia traveling the world to sample all of its amazing foods, playing badminton, or swimming.  And if you’d like to meet him in person, you can catch him next year at ngMalaysia, ngJapan, or ngChina!
 
<em>Would you or you team like to work with Jia?  You can email us to learn more at hi@thisdot.co!<em>
JsonKeys - recommended package when using JSON based internationalization
Tags: javascript
Published: 2019-11-21 17:55:52

I believe that many of you are using on a daily base some kind of internationalization JSON based frameworks such as i18next. I would like to recommend a package that helps you to avoid the use of 'magic strings' in your development. 
JsonKeys package can watch your localization JSON files and automatically transform them into a javascript object that you can use in your client application.

Please take a look at the package I just wrote and tell me what you think!
I would appreciate any comments, notes and of course stars if you have decided to use it :)

https://github.com/TheDevelopGuy/jsonkeys

Thanks!
Guide to line-height in CSS
Tags: css, beginners, webdev, todayilearned
Published: 2019-11-21 17:30:56

line-height is an interesting CSS property. This is usually used to set the distance between lines of text. 

We are going to use this HTML for this post:
```html
<body>
<h1>hello</h1>
</body>
```

## What does line-height mean?

If I set the following rule:
```css
h1 { line-height: 40px; }
```

When inspecting that h1 element in dev tools, I can see where is that 40px:
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2qem5kuq07a9z6u1ew5k.png)

## Ways to specify line-height
You can specify line-height with or without unit. With that said, writing either:
```css
line-height: 1.2;
```

```css
line-height: 1.2em;
```

is valid.

When your element has line-height rule, it will be calculated based on that element's font size. 

So, these three blocks produce identical results:

```css
h1 {
    font-size: 20px;
    line-height: 2;
}

```
```css
h1 {
    font-size: 20px;
    line-height: 2em;
}

```

```css
h1 {
    font-size: 20px;
    line-height: 200%;
}

```

## The difference between specifying unit and not specifying unit

Take a look at these pieces of code:

Code 1:
```css
body {
    font-size: 10px;
    line-height: 1.5em;
}

h1 {
    font-size: 30px;
}

```

Code 2:
```css
body {
    font-size: 10px;
    line-height: 1.5;
}

h1 {
    font-size: 30px;
}

```

In case you don't see the difference, in the first block, I declared line-height for body with em while in the second, line-height doesn't have an unit.

What's the difference in h1's line height?


Can you guess?


* In the first case, h1's line-height would be 15px
* In the second case, h1's line-height is 45px

Huge difference, but why?

First of all, line-height is inherited. Since h1 doesn't have a rule for line-height so it inherits that property from its parent. In this case, that parent is body. 

In the first case, as I specified the unit, the value is <em>computed</em> to 15px and this value is passed down to h1.

In the second case, I didn't specify an unit, so h1 inherit a value without unit. Thus, it will use this value to multiple with its font size to calculate line-height.

Since h1's font-size is 30px, 30 * 1.5 = 45.

Hope you find this post interesting :)
The Password Struggle
Tags: discuss, rant
Published: 2019-11-21 17:03:49

Today's digital world has accounts everywhere. That means logins and passwords.

But systems get hacked, hackers get our login info and our accounts get compromised. And now, we got a problem.

![Problem](https://media.giphy.com/media/ZajGATIGCQFCE/giphy.gif)

So some solutions then pop up. 

![Yay](https://media.giphy.com/media/31lPv5L3aIvTi/giphy.gif)

Like Multi-Factor Authentication. So then, if someone gets a hold of your password, if you have this setup, you can stay *safe*. Er. Safe-*er*. If someone gets ahold of your "factor" (which is less likely), then you're in trouble again.

Or, the bajillion ways multiple websites require you to have various different letter, symbol, capitalized and lower-case letters to ensure a more secure password.

Or, the bajillion systems who require you to change your password every x days.

Or, the push for you to use different passwords for every single thing.

Which causes yet another issue because then, we have **so many** passwords, and we can't fit it all in our brain, so then we forget and we reset our passwords, and we have yet to **remember another one**. Which we will likely forget **again** anyway.

So now, we got the problem of too many passwords, so we get password management solutions to remember our passwords for us.

![AHHHHHH](https://media.giphy.com/media/KmTnUKop0AfFm/giphy.gif)

I mean, `login with x platform` makes things better and easier, but not all systems support it, and it usually also means my data is shared.

All of these solutions and problems seem to go back to **one thing**: passwords.

![Aha](https://media.giphy.com/media/3ohs7Ps45sznsObPMc/giphy.gif)

So. Is there any password-alternative out there to be able to have access to an account? There *has* to be some other thing? I tried a quick google and couldn't find *anything*.

Do **you** know of any alternative solutions? Please save us from this password struggle that has overrun our digital experience today! :sob:
Checking the licenses used by your NPM dependencies
Tags: node, npm, meta, todayilearned
Published: 2019-11-21 16:32:59

---
title: Checking the licenses used by your NPM dependencies
published: true
description: Make sure you're not infringing copyright by installing NPM packages.
tags: node, npm, meta, todayilearned
---

Hey everyone, just a quick tip on how you can audit your NPM dependencies to make sure you're not infringing copyright.

## Why do I care about licensing?

Open-source software is great, but it doesn't necessarily mean it's free to use.  Software projects are released under difference licenses.  Typically in a project repo, this will be in the `LICENSE` file in the top level of the repo.

The way you license your software defines many things including:

- Whether you grant use of the software
- Whether you grant commercial use of the software

__These two points are extremely important.__

You might think the software you are using is free until you get slapped with an invoice or a lawsuit!  

As an example that's not related to NPM but is related to software licensing, check out [VirtualBox's licences](https://www.virtualbox.org/wiki/Licensing_FAQ).  tldr; VirtualBox is licensed under GPL2, while VirtualBox Extensions are under a custom license which requires a fee for commercial use.  Supplementary reading: [Oracle demands $12,200 for use of VirtualBox Extension Pack](https://www.theregister.co.uk/2019/10/04/oracle_virtualbox_merula/).



## How can we verify the licenses of the packages we're using?

This ends up being pretty easy due to [`license-checker`](https://www.npmjs.com/package/license-checker).

Here's the procedure:

1. `npm install license-checker`
2. `npx license-checker`

This will give you a printout of all the licensing details of packages used in your project.  

Other cool features of the project:

- Print a summary of licenses used by `npx license-checker --summary`
- Include it in your CI/CD pipeline by providing it with a whitelist or a blacklist of licenses

Hope this helps you to audit the packages you're using!

--- 

I write about development stuff in all sorts of areas (Node, Python, Linux, Android, iOS, etc.).  If you're interested, follow me here on dev.to or on [Twitter @connorbode](https://twitter.com/connorbode).  I'll keep writing as I learn & discover.
Make git friendlier with aliases
Tags: git
Published: 2019-11-21 16:32:46

---
title: Make git friendlier with aliases
published: true
description: Use aliases to make git easier to use.
tags: git
---

Git drives me crazy with its obtuse command-line interface. Over time, I’ve added many aliases to my `~/.gitconfig` in order to make its interface more clear.

Here are some of my favorites:

```
aliases = config --get-regexp ^alias\\.
discard = checkout --
generate-ignore = "!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi"
list-tracked = ls-tree -r HEAD --name-only
list-ignored = ls-files --others -i --exclude-standard
new-branch = checkout -b
push-branch = "!git push -u origin `git rev-parse --abbrev-ref HEAD`"
uncommit = reset --mixed HEAD~
unstage = reset -q HEAD --
```

`aliases` lists all my aliases. It could be formatted a bit better, but works well for me.

`discard` lets me discard changes to a file I'm working on. I never remember how to do this, especially as it uses the same command you use to switch branches.

`generate-ignore` can generate a `.gitignore` file for me. I use this at the start of each project.

`new-branch` and `push-branch` are huge for me. `new-branch` makes it explicit that I’m trying to create a new one, and `push-branch` pushes my local branch to a (generally new) branch of the same name on my origin repo.

`uncommit` and `unstage` are quick ways to reverse a mistake I’ve made without having to search for those arcane commands.
What are your favourite Alfred workflows?
Tags: productivity, discuss
Published: 2019-11-21 16:27:53

Alfred is such a great tool if you use a Mac.

{%twitter 1197545022121500675 %}

{%twitter 1197546600035422208 %}

I mention some that I use here

{%link https://dev.to/nickytonline/my-mac-setup-2m05 %}

I also have a few I wrote a while back for those interested.

{%github https://github.com/nickytonline/alfred-workflows %}

For those of you that use Alfred, what are some of your favourite Alfred workflows?

![Productivity](https://media.giphy.com/media/B2NKPKFTHtB7rTYNhN/giphy-downsized-large.gif)
A Rest API Solution for Data Validation in Excel
Tags: datavalidation, excel, curl, restapi
Published: 2019-11-21 16:19:44

While working with Microsoft Excel, cell validation is one of the important features that you can use for data validation to restrict the type of data or the values that users enter into a cell, to make sure all data entries are accurate and consistent.

I this article I will explain how to do Data Validation in Excel using [Aspose.Cells Cloud](https://products.aspose.cloud/cells). We will add data validation, update data validation rule and remove all data validations from a worksheet. I am using cURL in the sample code, but you can use the SDK of your favorite programming language in your specific project. Aspose.Cells Cloud is a REST API that can be used with any language: .NET, Java, PHP, Ruby, Python, Node.js and many more. You can use it with any language or platform that supports REST.

Here we go, first thing first signup with aspose.cloud to get App SID and App key and get [Json Web Token](https://docs.aspose.cloud/display/totalcloud/JSON+Web+Token+Authentication) for api call authentication.

# Add a data validation to a cell
Add a validation at index(A1) in a worksheet Sheet1.

```
//Add validation by Index in the worksheet
curl -X PUT "https://api.aspose.cloud/v3.0/cells/aspose_Test.xlsx/worksheets/Sheet1/validations?range=A1:A1&folder=Temp" 
-H "accept: application/json" 
-H "authorization: Bearer [Access_Token]"
```
# Add/Update data validation rule
Add a custom data validation rule, YES or NO. Aspose.Cells Cloud API supports all types of data validation rules.

```
//Add custom validation rule by Index in the worksheet
curl -X POST "https://api.aspose.cloud/v3.0/cells/aspose_Test.xlsx/worksheets/Sheet1/validations/0?folder=Temp" 
-H "accept: application/json" 
-H "authorization: Bearer [Access_Token]" 
-H "Content-Type: application/json" -d "{ \"AreaList\": [ { \"EndColumn\": 0, \"EndRow\": 0, \"StartColumn\": 0, \"StartRow\": 0 } ], \"Formula1\": \"=(OR(A1=\\\"Yes\\\",A1=\\\"No\\\"))\", \"Type\": \"Custom\", \"IgnoreBlank\": true}"
```
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/1n6ae3lk17okzhfjwtzb.PNG)

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/eyopybnmpneerz28f1wc.PNG)
# Delete all data validations
Delete all data validations from the worksheet.

```
//Delete all validation from the worksheet
curl -X DELETE "https://api.aspose.cloud/v3.0/cells/aspose_Test.xlsx/worksheets/Sheet1/validations?folder=Temp"
-H "accept: application/json" 
-H "authorization: Bearer [Access_Token]"
```

Happy Coding! [Read more](https://blog.aspose.cloud/2019/11/19/data-validation-in-microsoft-excel-with-aspose.cells-cloud-19.10/).
Cola de tareas en Python (I)
Published: 2019-11-04 20:12:35

---
title: Cola de tareas en Python (I)
published: true
date: 2019-11-04 18:01:46 UTC
tags: 
canonical_url: https://yorodm.github.io/blog/python-work-queue/
---

Después de unos meses trabajando en **Go** se llegan a extrañar las abstracciones del lenguaje para concurrencia. Hoy por ejemplo necesitaba hacer una cola de tareas en **Python** utilizando **AsyncIO**. En **Go** esto sigue una estructura sencilla:

```
// Este es la gorutina que procesa los trabajos
func worker(jobChan <-chan Job) {
    for job := range jobChan {
        process(job)
    }
}
// Creamos un canal a donde enviar los datos
jobChan := make(chan Job, 10)
// Arrancamos la gorutina
go worker(jobChan)
// Enviamos datos para un trabajo, esto puede ser desde cualquier
// gorutina
jobChan <- job
//Indicamos que ya no vamos a procesar más datos
close(jobChan)
```

Veamos si podemos lograr un equivalente en Python:

```
# Primer intento
import asyncio
async def worker(queue):
    while True:
        process(await queue.get())
        # indicamos que se procesó el trabajo
        queue.task_done()

# Creamos la cola de mensajes
queue = asyncio.Queue(10)
# arrancamos el worker
worker_task = asyncio.create_task(worker(queue))
# Enviamos mensajes a la cola
await queue.put(x)
```

Hasta acá todo parece bien, pero: ¿Cómo indicamos que no se van a procesar más datos?

En **Go** la operación `close` sobre un canal hace que el ciclo termine **después de procesar cualquier elemento pendiente**. En **Python** a primera vista podemos cancelar la tarea creada en`worker_task` pero eso nos deja con la posibilidad de que varias tareas se queden en la cola. Por otro lado, la corutina `join()` de `asyncio.Queue` nos permite esperar a que ya no existan elementos en la cola, aunque no garantiza que `worker` se detenga.

La solución es utilizar una mezcla de los dos:

```
await queue.join() # Esperar a que se procesen los pendientes
worker_task.cancel() # Cancelar la tarea
```
OpenStack can create a massive impact in the HPC users life with Sardina Systems
Tags: openstak, opensource, hpc, kubernetes
Published: 2019-11-21 15:51:40

OpenStack private cloud enables HPC facilities to rapidly and flexibly meet varying users demand. However, the boundary-stretching and stringent requirements of HPC present challenges in operating a private cloud, from complex system deployment to performing applications on existing hardware.
https://medium.com/sardina-systems/openstack-can-create-a-massive-impact-in-the-hpc-users-life-f1a174cf433c