• Stars
    star
    625
  • Rank 71,862 (Top 2 %)
  • Language
  • Created about 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Don't let the trolls get you down! Use this as a reference to avoid open-source burnout and keep doing what you love: writing code! Contributions and any kind of improvements are very welcome!

Maintainer's Guide to Staying Positive

Don't let the trolls get you down! Use this reference to avoid open-source burnout and keep doing what you love: writing code!

(You might also be interested in the Guide to Idiomatic Contributing)




separator




Preamble

This guide was written by me, Jon Schlinkert, programmer, public speaker and author of more than 1,100 code projects. I have published code projects in several different languages, but most are JavaScript. 90+ of my projects receive more than 10 million downloads/month, with the total exceeding 3.9 billion downloads/month. This brief guide is a distillation of my experiences as a maintainer.

If you find this useful (and I hope you do!), please consider following me on github or twitter to receive updates about this and other projects I maintain.

You might also be interested in other guides I've written.

What is this about?

As it relates to open source programming, this is my own personal reference to help me stay positive when I'm having a bad day, or for whatever reason it's more difficult than usual to stay objective.

Whether it's due to a bad decision I've made myself, or I'm reacting to unnecessarily harsh or negative comments made by a user, I thought it would be nice to have a guide to help me re-center when I'm not at my best. Maybe others will find this useful too.

Why did I write this?

I want to spend more time doing what I love, and less time doing things that I don't love.

I really, honestly love programming. So much so that I look forward to getting out of bed every morning so that I can start writing code. I'm a coffee-drinker, and sometimes I even start coding before I make my coffee or get breakfast. If you drink coffee too, you'll know that this says a lot.

I also love collaborating, exchanging ideas, learning better and faster ways to accomplish things that I'm already familiar with or, even better, learning completely new things that broaden my horizons as a developer or person.

I enjoy getting feedback from friends - or programmers I'm building friendships with on GitHub, hearing their thoughts about my code and what I could have improved. Mistakes I made, or how something could be optimized. I believe this is one of the fastest ways to improve. Not to mention, it's a great way to build lasting relationships.




separator




Nothing Fails Like Success

I learned this concept from reading books by Stephen R. Covey, probably The Seven Habits of Highly Effective People.

In a nutshell, this means that sometimes success comes at a price. For example, it's not unusual for a project to get harder to maintain as it grows in popularity:

  • More bugs and edge cases crop up
  • More issues are created
  • Users want more features
  • More detailed documentation is needed
  • Protocols and conventions that were "nice-to-have" before, are now 100% necessary
  • Your "breathing room" for mistakes gets smaller (no one wants to make mistakes, but it's even worse when you get berated for it by a disgruntled user)

Of course, this is not always the case, but when it does happen it can be difficult to keep up with.

IMHO, these things are all fine and should be expected. They come with the territory of programming and maintaining open source projects. From that standpoint my typical reaction to most problems is: "get over it".

But what shouldn't come with the territory - and no maintainer should have to lose sleep over - is dealing with trolls and negative comments from users who only seem to want to beat the maintainers into submission, while showing no intent of helping to improve the project itself. This isn't programming, or maintaining, it's conflict resolution and PR, and it can be exhausting.

I know a few popular maintainers of highly popular projects who have either completely given up on collaborating publicly on any kind of open source development, or they switched to other languages to allow themselves to "start over" with a new community (specifically because of having to deal with negative people on GitHub). I don't want to get to this point. I'm a positive person in general, and I'd rather find a way to insulate myself from these people so I can continue to find a way to continue doing what I love.

Note on what "negative comment" means

There is a world of difference between a disgruntled user who expresses their frustration in a reasonable way, and a user who seems to only have their own self-interests in mind and wants to make sure that you pay attention to them by insulting you or making disparaging comments.

If you require clarification on this, or find that you need help understanding the difference between a constructive comment and an antagonistic comment, or you feel inclined to debate what "negative comment" means, then please consider reading this section.




separator




Do's and don'ts

If you find yourself in need of a morale boost, here are some tips for staying positive:

Do

  1. Focus on what you want: Be positive. When you focus on what you don't want, you tend to attract what you don't want. Focus on what you want, and you will get what you want.
  2. Make lemons into lemonade: look for the best, most optimistic viewpoint possible, no matter how negative the situation.
  3. Pace yourself: If something happens that makes you want to scream from the top of your lungs, just take a step back, breathe, and give yourself time to think about it.
  4. Do research: A good way to boost your own morale is to get a grip on the situation. Do some research to learn about what's causing the problems you're dealing with to regain control and find ways to resolve it.
  5. Add levity: Be careful not to come across as flippant or insincere. But sometimes it helps to just lighten the mood with a smile or nice comment.

Don't

  1. Don't blow things out of proportion: The sky isn't falling. Things are rarely, if ever, really as bad as they seem. Take a step back and get some perspective.
  2. Don't let others determine how you feel: You are in control of your own emotions and your own reactions. No one makes you feel a certain way. If you are feeling heated in response to something someone has said, take some time to reflect on the situation.
  3. Don't comment until you're rational: Sometimes it feels like you need to "put a fire out" before it spreads. Whether you need to respond to a troll, or to a flood of bug-related comments, don't say anything unless you can do it rationally. How does this tip help you stay positive? Even if you need to act quickly, saying something insensitive or inappropriate can only make things worse. Doing this will definitely not help you keep a positive attitude, and it won't help your teammates or contributors either.



separator




Action items

Sometimes attitude isn't enough and we need to take action. Here are some things that, while extreme, are sometimes necessary in order to keep a positive outlook:

  1. Block negative users: When you find yourself repeatedly dealing with a troll, there is no shame in permanently shedding the negativity by blocking the user completely. Moreover, you are under no obligation to explain yourself to the user.
  2. Delete inappropriate comments: If a comment is antagonistic, disparaging to maintainers, distracts from the actual issue at hand, or otherwise does nothing to further progress on an issue, it goes without saying that the comment should be deleted. There is no contract, written or otherwise, that obligates you to retain comments like this. Whatever sense of integrity you feel you might lose from deleting the comment should be regained by thinking about the impact the comment has on your community - and the spirit of collaboration - as a whole.
  3. Move on: Don't linger on negative things. Stay productive and get refocused on things that are positive at best, or at least neutral if necessary.



separator




Help, or do no harm

This section is for those who just can't find a way to stay positive, and are having trouble keeping their negativity to themselves.

A mentor once said to me, "If I cannot help, I will at least do no harm". I now try to live by this rule, and I suggest you do too. It's only practical. You don't have to be half-Betazoid to understand that other people are more likely to go out of their way to help you when you're nice to them. After all, just because you experienced a bug doesn't mean that it's a crucial bug, or that it's urgent. Only the maintainers have the perspective to make this call. Good collaborators recognize this and do what they can to help - or stay out of the way if they can't.

But if you find that you are so frustrated about a bug you're dealing with that you can barely see straight, and you want to make sure the project's maintainers understand what you're going through, consider the following:

  1. The (extreme) vast majority of open source projects are maintained by a single individual (I don't have stats on this, but I have a lot of experience in open source and I'd wager it's in the high 99th percentile. Big teams with lots of development resources are very, very rare).
  2. Based on the first point, it's easy to reason that the vast majority of decisions made on the vast majority of open source projects are at the discretion of a single individual.
  3. Based on the previous points it easy to reason that innovation, bug fixes and other improvements on these projects will only happen when a single individual wants them to.

Now, we can take this information and do what we want with it. If you absolutely need something to be fixed, and it isn't getting fixed, you have options. The most obvious of which are:

  • fork the project and maintain it yourself
  • create your own library (but be sure to give proper attribution if your code is based on another library)

If you don't have the time, knowledge, or inclination to do either of those things, unfortunately, that's just too bad. It's your problem, not the maintainers. The sooner you get over this, the happier and more productive everyone will be. Under no circumstances is it acceptable to berate a project's maintainers because you aren't getting what you want.

  • It's not okay to "call them out" for taking too long
  • It's not okay to point to other issues that aren't being resolved, "just to make your point". This just adds insult to injury.
  • It's not okay to sling personal insults when you feel like you're being ignored

Exceptions to the rule

Here are the times when the above things are okay:

  • You are paying the maintainer and have a service level agreement that gives you the right to do these things
  • Never



separator




Use Negativity as a Test of Character

To quote Mr. Kipling:

If you can bear to hear the truth you’ve spoken
Twisted by knaves to make a trap for fools,
Or watch the things you gave your life to, broken,
And stoop and build ’em up with worn-out tools:
If you can fill the unforgiving minute
With sixty seconds’ worth of distance run,
Yours is the Earth and everything that’s in it,

If you can deal with the trolls, the negativity, the setbacks, the failures, and have the courage to start again, to fail again, then you'll embody the power of perseverance, and you'll carry that character with you in all other aspects of your life.




separator




Focus on what is truly important

There'll always be fakes, trolls and (real) imposters. Karma's a bitch, let her deal with them. What's most important are your family and close friends. Work hard for them - they are the only ones who will always appreciate you.




separator




When all else fails

Consider getting yourself one of these.




separator




About

Contributors

Thanks to the following devs who have helped make this guide better in some way.

Commits Contributor
17 jonschlinkert
2 rnicholus
1 Kissaki
1 doowb
1 martinvd
1 philmiller-charmworks

Note: If you'd like to see the most up-to-date and complete contributor information, please visit the contributors graph.

Other guides

You might also find these guides useful:

Related

Author

Jon Schlinkert

If you'd like to get in touch regarding a speaking engagement or consulting opportunity, please use the email address on my GitHub profile. Thanks!

License

Copyright Β© 2016, Jon Schlinkert. Released under the CC by 4.0 License.

More Repositories

1

remarkable

Markdown parser, done right. Commonmark support, extensions, syntax plugins, high speed - all in one. Gulp and metalsmith plugins available. Used by Facebook, Docusaurus and many others! Use https://github.com/breakdance/breakdance for HTML-to-markdown conversion. Use https://github.com/jonschlinkert/markdown-toc to generate a table of contents.
JavaScript
5,745
star
2

gray-matter

Smarter YAML front matter parser, used by metalsmith, Gatsby, Netlify, Assemble, mapbox-gl, phenomic, vuejs vitepress, TinaCMS, Shopify Polaris, Ant Design, Astro, hashicorp, garden, slidev, saber, sourcegraph, and many others. Simple to use, and battle tested. Parses YAML by default but can also parse JSON Front Matter, Coffee Front Matter, TOML Front Matter, and has support for custom parsers. Please follow gray-matter's author: https://github.com/jonschlinkert
JavaScript
3,863
star
3

markdown-toc

API and CLI for generating a markdown TOC (table of contents) for a README or any markdown files. Uses Remarkable to parse markdown. Used by NASA/openmct, Prisma, Joi, Mocha, Sass, Prettier, Orbit DB, FormatJS, Raneto, hapijs/code, webpack-flow, docusaurus, release-it, ts-loader, json-server, reactfire, bunyan, husky, react-easy-state, react-snap, chakra-ui, carbon, alfresco, repolinter, Assemble, Verb, and thousands of other projects.
JavaScript
1,508
star
4

gulp-htmlmin

Minify HTML
HTML
730
star
5

sublime-markdown-extended

Top 100 Sublime Text plugin! Markdown syntax highlighter for Sublime Text, with extended support for GFM fenced code blocks, with language-specific syntax highlighting. YAML Front Matter. Works with ST2/ST3. Goes great with Assemble.
658
star
6

sublime-monokai-extended

Extends Monokai from Soda with additional syntax highlighting for Markdown, LESS, HTML, Handlebars and more.
511
star
7

kind-of

Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
JavaScript
334
star
8

clone-deep

Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. Used by superstruct, merge-deep, and many others!
JavaScript
305
star
9

set-value

Set nested properties on an object using dot-notation.
JavaScript
261
star
10

is-number

JavaScript/Node.js utility. Returns `true` if the value is a number or string number. Useful for checking regex match results, user input, parsed strings, etc.
JavaScript
256
star
11

get-value

Use property paths (`a.b.c`) get a nested value from an object.
JavaScript
229
star
12

word-wrap

Wrap words to a specified length.
JavaScript
194
star
13

randomatic

Easily generate random strings like passwords, with simple options for specifying a length and for using patterns of numeric, alpha-numeric, alphabetical, special or custom characters. (the original "generate-password")
JavaScript
178
star
14

data-store

Easily get, set and persist config data. Fast. Supports dot-notation in keys. No dependencies.
JavaScript
158
star
15

is-plain-object

Returns true if the given value is an object created by the Object constructor.
HTML
147
star
16

guide-to-staying-productive

If you're looking for ways to stay motivated and focused, while still having fun, this guide is for you! Contributions and any kind of improvements are very welcome!
136
star
17

pretty

Sensible presets and some tweaks for beautifying HTML with js-beautify according to my preferences.
JavaScript
135
star
18

parse-github-url

Parse a Github URL into an object. Supports a wide variety of GitHub URL formats.
JavaScript
117
star
19

time-stamp

Get a formatted timestamp. Used in gulp, assemble, generate, and many others.
JavaScript
112
star
20

idiomatic-contributing

A brief guide to being an effective open source contributor.
111
star
21

merge-deep

Recursively merge values in a JavaScript object.
JavaScript
111
star
22

strip-comments

Strip block comments or line comments from JavaScript code.
JavaScript
105
star
23

isobject

Is the value an object, and not an array or null?
JavaScript
101
star
24

normalize-path

Normalize file path slashes to be unix-like forward slashes. Used by chokidar, anymatch, and many others!
JavaScript
99
star
25

gists

Methods for working with the GitHub Gist API. Node.js/JavaScript
JavaScript
97
star
26

copy

Copy files using glob patterns. Sync, async, promise or streams. (node.js utility)
JavaScript
93
star
27

git-branch

Get the current branch for a local git repository
JavaScript
91
star
28

dashify

Convert a string to a dash-separated string (kebab case). Works with camelcase, pascalcase, space-separated, etc.
JavaScript
86
star
29

vertical-rhythm

Put some typographical vertical rhythm in your CSS. LESS, Stylus and SCSS/SASS versions included.
CSS
85
star
30

write

Write data to the file system, creating any intermediate directories if they don't already exist. Used by flat-cache and many others!
JavaScript
82
star
31

window-size

Reliable way to to get the height and width of the terminal/console in a node.js environment.
JavaScript
80
star
32

object.omit

Return a copy of an object without the given keys.
JavaScript
79
star
33

mixin-deep

Deeply mix the properties of objects into the first object, while also mixing-in child objects.
JavaScript
79
star
34

assign-deep

Deeply assign the enumerable properties of source objects to a destination object.
JavaScript
78
star
35

grunt-prettify

Grunt plugin for beautifying HTML. Lots of options so that you can format/beautify the generated HTML the way you want it.
JavaScript
77
star
36

template-helpers

Generic JavaScript helpers that can be used with any template engine. Handlebars, Lo-Dash, Underscore, or any engine that supports helper functions.
JavaScript
75
star
37

omit-deep

Recursively omit specified keys from an object.
JavaScript
73
star
38

omit-empty

Recursively omit empty properties from an object. Omits empty objects, arrays, strings, and optionally zero. Similar results to what you would expect with `compact` for arrays.
JavaScript
73
star
39

array-sort

Fast and powerful array sorting. Sort an array of objects by one or more properties. Any number of nested properties or custom comparison functions may be used.
JavaScript
72
star
40

dry

Dry is a new template engine and language, and is a superset of Shopify's Liquid, with first-class support for advanced inheritance features, and more. From the creators of Enquirer, Assemble, Remarkable, and Micromatch.
JavaScript
69
star
41

grunt-refactor

Grunt tasks for re-factoring code.
JavaScript
65
star
42

parse-comments

Parse JavaScript code comments. Works with block and line comments, and should work with CSS, LESS, SASS, or any language with the same comment formats.
JavaScript
64
star
43

utils

Fast, generic JavaScript/node.js utility functions.
JavaScript
61
star
44

github-base

Simple, opinionated node.js interface for creating basic apps with the GitHub API.
JavaScript
60
star
45

arr-flatten

Recursively flatten an array or arrays. This is the fastest implementation of array flatten.
JavaScript
60
star
46

templates

System for creating and managing view collections, rendering, engines, routes and more. See the "dev" branch for most recent updates.
JavaScript
60
star
47

parse-gitignore

Parse a gitignore file into an array of patterns. Comments and empty lines are stripped.
JavaScript
59
star
48

parse-git-config

Parse `.git/config` into a JavaScript object. sync or async.
JavaScript
58
star
49

array-unique

Return an array free of duplicate values. Very fast implementation.
JavaScript
58
star
50

sublime-swig

Swig template syntax highlighting for Sublime Text.
58
star
51

to-regex

Generate a regex from a string or array of strings.
JavaScript
56
star
52

split-string

Split a string on a given character or characters, with support for escaping.
JavaScript
55
star
53

fill-range

Fill in a range of numbers or letters, positive or negative, optionally passing an increment or multiplier to use.
JavaScript
54
star
54

cache-base

Basic object store with methods like get/set/extend/omit
JavaScript
54
star
55

template

Render templates from any engine. Make custom template types, use layouts on pages, partials or any custom template type, custom delimiters, helpers, middleware, routes, loaders, and lots more. Powers Assemble v0.6.0, Verb v0.3.0 and your application.
JavaScript
54
star
56

align-text

Align the text in a string.
JavaScript
51
star
57

grunt-fixmyjs

Automatically fix js-hint errors.
JavaScript
51
star
58

lazy-cache

Cache requires to be lazy-loaded when needed. Uses node's own require system with tried and true, plain-vanilla JavaScript getters.
JavaScript
51
star
59

gulp-prettify

Prettify HTML.
HTML
50
star
60

exponential-moving-average

Calculate an exponential moving average from an array of numbers.
JavaScript
50
star
61

pretty-time

Easily format the time from node.js `process.hrtime`. Works with timescales ranging from weeks to nanoseconds.
JavaScript
50
star
62

is-windows

Returns true if the platform is Windows (and Cygwin or MSYS/MinGW for unit tests)
JavaScript
48
star
63

extract-comments

Extract JavaScript code comments from a string or glob of files.
JavaScript
46
star
64

repeat-string

Repeat the given string n times. Fastest implementation for repeating a string (2x faster than the native method)
JavaScript
45
star
65

arr-diff

Returns an array with only the unique values from all given arrays using strict equality for comparisons.
JavaScript
44
star
66

pad-left

Left pad a string with zeros or a specified string. Fastest implementation.
JavaScript
44
star
67

unixify

Convert a windows file path to a unix-style file path.
JavaScript
42
star
68

object.pick

(object pick) returns a filtered copy of an object with only the specified keys, exactly like `pick` from lo-dash / underscore.
JavaScript
42
star
69

delete-empty

Recursively delete all empty folders in a directory and child directories.
JavaScript
41
star
70

handlebars-delimiters

Custom delimiters, for Handlebars templates.
JavaScript
41
star
71

write-yaml

Basic node.js utility for converting JSON to YAML and writing formatting YAML files to disk.
JavaScript
40
star
72

regex-cache

Memoize the results of a call to the RegExp constructor, avoiding repetitious runtime compilation of the same string and options, resulting in dramatic speed improvements.
JavaScript
39
star
73

unescape

Convert HTML entities to HTML characters, e.g. `>` => `>`.
JavaScript
38
star
74

pascalcase

Convert a string to pascal case (upper camel case). Used by more than 8.7 million projects on GitHub! Please follow this library's author: https://github.com/jonschlinkert
JavaScript
36
star
75

is-primitive

Is the typeof value a javascript primitive?
JavaScript
36
star
76

is-git-url

Regex to validate that a URL is a git URL.
JavaScript
35
star
77

deep-rename-keys

Recursively rename the keys in an object.
JavaScript
35
star
78

unset-value

Delete nested properties from an object using dot notation.
JavaScript
34
star
79

fs-utils

Generalized file and path utils for Node.js projects.
JavaScript
34
star
80

array-last

Return the last element in an array. Faster than `.slice`
JavaScript
34
star
81

relative

Easily calculate the relative path from file A to file B in Node.js project. Will calculate correctly from a file to a directory, file to file, directory to file, and directory to directory.
JavaScript
34
star
82

for-in

Iterate over the enumerable properties of an object, and return an object with properties that evaluate to true from the callback. Exit early by returning `false`.
JavaScript
33
star
83

global-modules

Returns the directory used by NPM for globally installed NPM packages.
JavaScript
33
star
84

extend-shallow

Extend object A with the properties of object B. node.js/javascript util.
JavaScript
32
star
85

eval-estree-expression

Safely evaluate JavaScript (estree) expressions, sync and async.
JavaScript
32
star
86

regex-not

Create a javascript regular expression for matching everything except for the given string.
JavaScript
31
star
87

longest

Get the length of the longest item in an array.
JavaScript
31
star
88

whence

Add context awareness to your apps and frameworks by safely evaluating user-defined conditional expressions. Useful for evaluating expressions in config files, prompts, key bindings, completions, templates, and many other user cases.
JavaScript
31
star
89

markdown-utils

Convert plain text into snippets of markdown.
JavaScript
30
star
90

grunt-readme

DEPRECATED. Use Verb instead
JavaScript
30
star
91

js-comments

Parse JavaScript code comments and generate API documentation.
JavaScript
30
star
92

justified

Wrap, align and justify the words in a string.
JavaScript
29
star
93

is-equal-shallow

Does a shallow comparison of two objects, returning false if the keys or values differ.
JavaScript
29
star
94

shallow-clone

Make a shallow clone of an object, array or primitive.
JavaScript
29
star
95

parse-filepath

Parse a filepath and return an object of path parts. Falls back on native node.js `path.parse` if it exists
JavaScript
29
star
96

yarn-api

Basic API for yarn.
JavaScript
28
star
97

is-directory

Extends `stats.isDirectory()`, returns `true` if a filepath is a directory.
JavaScript
28
star
98

global-prefix

Get the npm global path prefix. Same code used internally by npm.
JavaScript
28
star
99

rename-keys

Modify/rename the keys of the own enumerable properties of an object.
JavaScript
27
star
100

has-value

Returns true if a value exists, false if empty. Works with deeply nested values using object paths.
JavaScript
27
star