teleren/devto huggingface dataset:
Which qualities were exhibited by good managers you've had?
Tags: discuss, career, management, beginners
Published: 2018-11-11 06:19:29

---
title: Which qualities were exhibited by good managers you've had?
published: true
description: Have you ever had a manager that you considered good? What did this manager do that you found good?
tags: discuss,career,management,beginners
cover_image: https://thepracticaldev.s3.amazonaws.com/i/hmrvrght3pej7ogx96vm.jpeg
---

It should not be surprising that most people have had more bad managers than good ones. Have you ever had a manager that you considered good? What did this manager do that you found good?

**Looking back, here are some of the qualities exhibited by good managers I've had:**

1. They were Subject Matter Experts

2. Showed compassion & empathy and were down to earth

3. Treated me like a friend

4. Mentored and encouraged me to push myself

5. Stood up for me

6. Provided honest feedback

7. Allowed me to be autonomous and did not micro-manage

8. Helped me when I was stuck & amplified my strengths

9. Treated every individual's failure as a failure of the team as a whole

10. Publicly praised and privately criticized
[How-to] Disable Registration in Laravel 5.7
Tags: laravel
Published: 2019-01-02 06:40:05

---
title: [How-to] Disable Registration in Laravel 5.7
published: true
tags: Laravel
canonical_url: https://milanchheda.com/how-to-disable-registration-in-laravel-57
---

 ![[How-to] Disable Registration in Laravel 5.7](https://milanchheda.com/uploads/cards/17.png) 

In one of my previous [posts](https://dev.to/chhedamilan/how-to-disable-registration-in-laravel-1pk3-temp-slug-8145473), I have shown how to disable registration in Laravel.

In Laravel 5.7, a new way has been introduced to disable registration and that's all thanks to [Dennis Smink](https://twitter.com/dennis_smink), for his excellent [pull request](https://github.com/laravel/framework/pull/25556)

```
Auth::routes(['register' => false]);
```

That's the only code you need to add and that would disable the registration in your Laravel application.
Speed up your NodeJS app with N-API and Linux epoll
Tags: javascript, node, linux, github
Published: 2018-11-10 21:16:37

---
title: Speed up your NodeJS app with N-API and Linux epoll
published: true
description: A link to my article on Medium
tags: JavaScript, NodeJS, Linux, Github
---
https://medium.com/@alecmissine/speed-up-your-nodejs-app-with-n-api-and-linux-epoll-25ec0c1d2342
MySQL : InnoDB : RAM
Tags: mysql, innodb, memory
Published: 2018-11-10 20:18:14

---
title: MySQL : InnoDB : RAM
published: true
description: Does every InnoDB table get held in memory?
tags: MySQL, InnoDB, memory
---

Are InnoDB tables held in RAM even if they are not frequently queried or at all?

How does MySQL work out which table to hold in memory etc?

For example, if I had 5 tables and all 5 were InnoDB, I query only two of the five tables, will the other three tables still be held in memory?
Live Coding React fundamentals and projects
Tags: learning, twitch, react, javascript
Published: 2018-11-10 19:39:30

---
title: Live Coding React fundamentals and projects 
published: true
description: 
tags: learning, twitch, React, JavaScript,
---

Recently I’ve been helping people through Twitter to strengthen their JS skills (specifically using the React ecosystem). 

It’s been such a great way to empower myself and others, while getting my own core fundamentals nailed down. 

I tweeted about possibly live streaming building a project, showing examples of different ways to write cleaner code, and all around building a community of vulnerability and learning. It received enough of a response for me to start taking it seriously.  

I’d love to hear thoughts from my Dev peeps, you all are so awesome I’d love to finally give back. 

I’m looking for topics and ideas. I have some good stuff I’ve planned up, but am always open to ideas!
Explain git config Like I'm Five
Tags: explainlikeimfive
Published: 2018-11-10 19:19:02

---
title: Explain git config Like I'm Five
published: true
tags: explainlikeimfive
---

I felt like I *totally understood* when I set up my git config for an app running on heroku to finally have a staging and production environment separately. However, it has been a few months since I did it, and now things are not working as I thought they would. **Clearly, I did not understand at all.**

Essentially, I wanted to have a heroku staging app (generic heroku url) and my heroku production app (at my url) where I can get logs for both and manage both through the heroku CLI on my terminal. This seems like a fairly typical need, and I expect I'm not alone in getting confused.

Here's where I'm at: 
* I followed [Heroku dev guidance](https://devcenter.heroku.com/articles/multiple-environments) to setup my environment... _I think_
* Everything was working smashingly. My master pushes went to my github repo and were automatically deployed on my production heroku app. My staging pushes went directly to my heroku staging app. 
* I was concerned about an issue and ran `heroku logs` and then a series of heroku commands on my master branch only to continuously get information about my staging environment. No amount of `heroku logs -r production` would change this situation.
* In an attempt to get logs from my production app, I ran `heroku git:remote -a appname -r production`. Sadly, that changed my production pointer from my github repo back to heroku (which expected to get code from github).
* I manually changed the `url` for my production remote back to github in my git.config. Now, changes push properly to github again, but I cannot see production heroku logs using the CLI. 

How is this so confusing? I tried a ton of googling for guidance git-config but encountered explainer after explainer just going step by step through typing shell commands to set things up and not really discussing *WHAT IN THE WORLD* is going on inside the .git/config file.

I appeal to my amazing **DEV.TO** friends for help here. Explain this whole .git/config to me like I'm 5.

FWIW - mine looks something like:
```
[core]
	repositoryformatversion = 0
	filemode = true
	bare = false
	logallrefupdates = true
	ignorecase = true
	precomposeunicode = true
[branch "master"]
	remote = production
	merge = refs/heads/master
[remote "heroku"]
	url = git@heroku.com:myapp.git
	fetch = +refs/heads/*:refs/remotes/heroku/*
[remote "production"]
        url = https://github.com/me/myapprepo.git
	merge = refs/heads/master
[remote "staging"]
	url = https://git.heroku.com/adjective-noun-number.git
	fetch = +refs/heads/*:refs/remotes/staging/*
[heroku]
	remote = staging
[push]
	default = tracking
```
How do you use an SVG as background image without affecting security?
Tags: discuss, security
Published: 2018-11-10 15:24:02

---
title: How do you use an SVG as background image without affecting security?
published: true
description: 
tags: discuss, security
---
I want to use an SVG as a backround image for one of my pages. For this, I have to make my CSP img-src rule as `img-src 'self' data:`
However, this will be an unsafe choice as explained [here](https://security.stackexchange.com/a/95011).

Has anyone faced this issue? If yes, how did you overcome it?
A Good Pic for Learning Ruby
Tags: ruby, pic, rails, ror
Published: 2018-11-10 10:39:39

---
title: A Good Pic for Learning Ruby
published: true
description: 
tags: ruby, pic, rails, ror
---

A pic for Ruby books for all levels.

The origin site has links to books. From: [-->](https://www.learneroo.com/modules/61/nodes/337)

![](https://s3.amazonaws.com/learneroo-images/main/Learn-Ruby-Chart.svg)

Some good new books:

* Eloquent Ruby

      understand Ruby

* Confident Ruby

      write better

* Practical Object-Oriented Design in Ruby， POODR

      learn design

* Metaprogramming Ruby

      in depth

* Ruby under a Microscope

      more in depth

If you have other good books for Ruby or Ruby on Rails, leave a comment to share, welcome! :)
100 followers in 10 days
Tags: followers, thankyou
Published: 2018-11-10 08:21:10

---
title: 100 followers in 10 days
published: true
description: I got 100 followers in 10 days  
tags: followers, ThankYou
---

![20180911185704-76](https://user-images.githubusercontent.com/20112458/48299119-76b93a00-e4ee-11e8-815b-02efbb7122a9.gif)

It took me almost 400 days to get 100 followers on [Quora](https://www.quora.com/profile/Sahil-Rajput-28) but at DEV.to it just took me 10 days.

Thank you everyone who are following me for some reason.


Check out my blog: [SourceAI](https://sourceai.github.io/blog/).
Introduction to Property Based Testing applied to JavaScript 
Tags: javascript, testing, typescript, quickcheck
Published: 2018-11-10 08:15:01

---
title: Introduction to Property Based Testing applied to JavaScript 
published: true
description: Property based testing has become quite famous in the functional world. Mainly introduced by QuickCheck framework in Haskell, it suggests another way to test software.
canonical_url: https://medium.com/@nicolasdubien/introduction-to-property-based-testing-f5236229d237
cover_image: https://dubzzz.github.io/fast-check.github.com/images/banner.jpg
tags: javascript,testing,typescript,quickcheck
---
Property based testing has become quite famous in the functional world. Mainly introduced by QuickCheck framework in Haskell, it suggests another way to test software. [Learn more...](https://medium.com/@nicolasdubien/introduction-to-property-based-testing-f5236229d237)

![cover](https://dubzzz.github.io/fast-check.github.com/images/banner.jpg)
Object detection Part 4 - Training in the cloud [Tensorflow]
Tags: tensorflow, online, python, training
Published: 2018-11-10 07:27:42

---
title: Object detection Part 4 - Training in the cloud [Tensorflow]
published: true
description: We look at configuring and running training in the cloud.
tags: tensorflow, online, python, training
---

{% youtube 3U6kzYfrpe8 %}
Improving Podcasts on dev.to
Tags: meta, discuss, community, podcast
Published: 2018-11-10 07:10:07

---
title: Improving Podcasts on dev.to
published: true
description: 
tags: meta,discuss,community,podcast
---

I recently found out that dev.to has a nice [podcasts page](https://dev.to/pod)!

I have some suggestions for better podcast page UX:
1. Ability to **save** the podcast for later. Podcasts are generally at least 20 minutes long and it may not always be possible to listen right away.
2. Upvoting of podcasts using the **heart** which allows users to discover popular podcasts outside their usual subscriptions.
3. Ability to tag podcasts based on content. If users/moderators can add tags to podcasts, it will improve quality of search content.
4. A way to suggest podcasts to include on the [page](https://dev.to/pod)

In general, I think it will be better experience if we can interact with podcast pages in a way similar to articles.

Finally, this podcast of SEDaily with Leslie Lamport is a great watch for all developers.
{% podcast https://dev.to/sedaily/tla-with-leslie-lamport %}
My favorite stock photo source, WOCinTech Chat
Tags: inclusion, design, blogging
Published: 2018-11-10 00:19:58

---
title: My favorite stock photo source, WOCinTech Chat
published: true
description: 
tags: inclusion, design, blogging
cover_image: https://farm2.staticflickr.com/1573/25388901994_33e80fe12e_k.jpg
---

A quick search for "programmer" or "coder" on some of the most common stock photo websites turns up, unsurprisingly, mostly photos of white men (and the occasional white woman.) Often in American society, men the default person, and white women are the default "woman."

WOCinTech chat [has written about this problem](https://www.wocintechchat.com/blog/wocshoot), including how women of color are underrepresented both in the tech industry and also in stock photos of people working in our industry. As a result, they've done a series of three photo shoots of women of color who work in tech to be freely used as stock photos! These photos shouldn't just be used when writing about diversity and inclusion in our industry, but also when you need a stock photo of a programmer, or a pair of hands at a keyboard.

The full album of photos are available on [their Flickr](https://www.flickr.com/photos/wocintechchat/), and are licensed under a Creative Commons (Attribution) license, which means you simply need to give credit whenever you use the images for any purpose.

I've made a point to use their stock photos when I need photos of programmers or other people doing tech work, and here's just a sampling of the awesome variety of images they have available:

![woman with child and laptop](https://farm2.staticflickr.com/1685/25900776992_a49895ad15_k.jpg)
![woman using computer](https://farm2.staticflickr.com/1632/25720834170_4d1e328ff6_k.jpg)
![hacker](https://farm2.staticflickr.com/1694/25392619753_413cca2910_k.jpg)
![laptop in lap](https://farm2.staticflickr.com/1594/25772154926_e4459bcea6_k.jpg)


So, if you need a stock photo of someone doing tech work (a header image on dev.to, for example!) consider checking out #WOCinTech chat's stock photo gallery!
React Tutorial - Add Typescript
Tags: react, typescript, javascript, webdev
Published: 2020-02-09 19:38:39

---
title: React Tutorial - Add Typescript
published: true
date: 2018-11-10 00:00:00 UTC
tags: react, typescript, javascript, webdev
canonical_url: https://chrisotto.dev/react-tutorial-adding-typescript/
---

This week I was going through the React [tutorial](https://reactjs.org/tutorial/tutorial.html). While going through each phase of the tutorial; going over state, JSX and React Components I wanted to be writing it in Typescript. I’ll go through the tutorial code of what I had to change in order to get it working.

- Use node to install the typescript dependencies we need:

`npm install --save typescript @types/node @types/react @types/react-dom @types/jest`

- Change the function definition of Square, pass (props: any) instead of just (props):

```javascript
function Square(props: any) {}
```

- Modify the Board and Game Component to accept any in the Component definition:

```javascript
class Board extends React.Component<any, any> {}

class Game extends React.Component<any, any> {}
```

- Change the file type to be .tsx instead of .js

Just like that, with a few package installs and a few code changes you’re able to compile the project using typescript instead of normal JS. You will probably want to make other modifications to take advantage of other useful parts of typescript.
I Made My First Thing With React!
Tags: react, learndev, showdev
Published: 2018-11-09 23:19:14

---
title: I Made My First Thing With React!
published: true
description: 
tags: React, learndev, showdev
---
I know it's not much, but I made a clock in React. Check it out: [React Clock on CodePen](https://codepen.io/jackharner/project/full/ZemJRj/). React has been one of those things on my list of "Should probably figure out, but haven't yet" for a while now. I figured I'd just dive in and see what I could make.

![React Clock](https://thepracticaldev.s3.amazonaws.com/i/bnph8db0942u2lvg7uwg.gif)

The biggest thing that I keep messing up with is using `className` instead of `class`

### Things Learned
* Components
* Using/Updating State
* Props to pass info to components.

### Questions

* `getTime = () => {}` I beleive this is called an arrow function, right? What is the point of it and how is it supposed to be used?
* For this clock example, within React, what would be the best way to store a users preference for 12 vs 24 hour time? I assume just storing the preference in a cookie? Is there an easy "React-ful" way to do this?
Today I fixed a bug using the best method name ever
Tags: todayilearned, ruby, rails
Published: 2018-11-09 23:09:42

---
title: Today I fixed a bug using the best method name ever
published: true
description: 
tags: #til, #ruby, # rails
---

![Squish](https://thepracticaldev.s3.amazonaws.com/i/55daqtvaj4qalihp1xwb.png)

Yes, that's right, Rails has a method named `squish`. I'll never use `gsub` again

![Squishy](https://thepracticaldev.s3.amazonaws.com/i/m0pj2n9zm400zy8cxjqh.gif)
On handling outages: a case study
Tags: outage, communication
Published: 2018-11-09 22:50:06

---
title: On handling outages: a case study
published: true
description: Ramblings about ways to communicate outages using latest Basecamp's outage as an example
tags: outage, communication
canonical_url: https://dev.to/david_ojeda/on-handling-outages-a-case-study-59cb
---

If you happen to use Basecamp 3 to manage your projects, you may have noticed a huge outage on November 8th, 2018; **it lasted almost 5 hours**.

The issue was that they failed to use bigint for the primary keys of their tables so they ran out of IDs. The *TLDR* solution, taken from David Heinemeier- DHH, creator of Ruby on Rails and Founder and CTO at Basecamp: 

> We took half of our replicas offline, did the 3h migration, put them back online, will now be converting the other half of the fleet.

And I'm not writing this to expose and/or throw **** at them. 

I'm writing this to **applaud their communication and openness** about the whole outage.

I'm writing this to expose how **over-communication, honesty, humbleness and clarity DO make a difference**, specially on difficult situations.

***

To give you some context, the first notice on their Twitter account about something going wrong was at 5:40 AM on November, 8th:

{% tweet 1060527469361537024 %}

From that tweet and until everything was working again, there were 15 more tweets with constant updates! With the last one being at 10:47 AM, November 8th, signed by DHH himself:

{% tweet 1060604787819827201 %}

All that information is a **huge deal**. You know they are working really hard to get everything up and going, and you may also know that outages can get really messy. 

Despite all the chaos that was probably happening, they kept posting updates with specific details of the cause and solution being taken- on their Twitter account, status page and on their blog. And not only that, DHH was also posting some more technical details about the outage to the point where **he links to the pull request that could have saved everything**:

{% tweet 1060565296048562177 %}

***

I find all this **incredibly valuable and relieving**. Even though it was a really long outage, they handled each and every customer interaction gracefully. I could not get upset with them with so much information about the problem/solution being provided. 

Hell, that morning **I was even more productive because Basecamp remained read-only**; I could check on what was pending on my side and just get to it with no distractions.

I've been part, and cause, of outages at my company and it's really stressful. And we don't even handle the amount of traffic Basecamp 3 does.

So, as DHH states it, **this is a reminder to stay humble**. We could be the next ones involved in a situation like this. **We all make mistakes, that's inevitable**, but knowing how to properly communicate them is what matters in the long run.

*** 

Hope you have enjoyed this short rambling ❤️
Meet Reaves
Tags: javascript, node, opensource, database
Published: 2018-11-09 22:21:08

---
title: Meet Reaves
published: true
description: Entity-Attribute-Value model + event sourcing pattern, the Redis way
tags: javascript, node, opensource, databases
cover_image: https://thepracticaldev.s3.amazonaws.com/i/gyukqm031tqw1qd82f5s.jpg
---

Reaves is a package that I've just [released on npm](https://www.npmjs.com/package/reaves). It is a Javascript implementation of the [Entity-Attribute-Value model](https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model) and the [event sourcing pattern](https://martinfowler.com/eaaDev/EventSourcing.html). It runs on Node.js. It is backed by Redis.

Simply put, Reaves lets you save and retrieve present and past string values for attributes that belong to entities identified by string IDs.

This very first release is pretty minimalistic. Nonetheless, Reaves already supports _case-sensitivity_, _nullable_ and _unique_ constraints for values and it implements a bunch of useful methods to [query the data](https://adriano-di-giovanni.github.io/reaves/EntityAttribute.html).

```javascript
const { createEntityAttribute, CASE_SENSITIVE, NULLABLE, UNIQUE } = require('reaves')
const { generate } = require('randomstring')
const redis = require('redis')
const uuidv4 = require('uuid/v4')

const client = redis.createClient()
const entityName = 'player'
const attributeName = 'nickname'
const flags = CASE_SENSITIVE | NULLABLE | UNIQUE

createEntityAttribute(client, entityName, attributeName, flags, (err, playerNickname) => {
    if (err) {
        throw err
    }

    const entityId = uuidv4()
    const newValue = generate()
    const createdAt = Date.now()

    playerNickname.insert(entityId, newValue, createdAt, console.log.bind(console))
})
```

I'm very proud of Reaves because it is a not-so-small piece of software that solves a real problem. It solves it well, I think, and it doesn't require us - you and me - to add another technology to our stack.

The core functions are written in Lua for performance and atomicity. They are loaded into the script cache of Redis at runtime using another npm package of mine, [luaload](https://www.npmjs.com/package/luaload), that also concatenates multiple script files into one on-the-fly.

I'm going to use Reaves to implement some features that rely on past and present values of entity attributes for production or administration purposes.

And by the way, Reaves is the acronym of _Redis entity attribute value event sourcing_.

**What do you think of Reaves and the idea behind it? Do you spot any drawbacks?**

Please, let me know. It is the reason I wanted to share Reaves with you.

Thanks.