Dealing With (Not Dealing With) the Open Source Assholes
Posted: June 30, 2011 Filed under: Uncategorized 30 Comments »Jumping into the open source and js world has been a surprising psychological crash course/nightmare for me. There’s something about open source and open forums that encourages socially-inept jerks to deride people and software. It’s especially prevalent in certain communities. It can make you doubt yourself, or even worse, force you to adopt a behavior you don’t want to.
This can be off-putting to say the least. Your world can turn into a crazy, competitive, self-questioning altworld if you’re not careful and there are some things I’ve learned about turning that around.
Go to the right meetups. Meeting some of the people in your community in person can actually be a relief of sorts. People that sound stern on the internet are usually way nicer than expected in real life. But don’t stick around meetups or conferences that aren’t welcoming or have an “Glitterati” feel, being physically in such a high stress environment does nothing good for you, and it’s unlikely your single presence will change anything.
Follow the right people. Twitter and Github are the best things to happen to open source since IRC. But as soon as someone says a software project is “retarded”, unfollow them. Seriously, you don’t need to hear that crap. Follow people that are saying positive things, giving constructive criticism, encouraging people, giving propers where propers are due.
Don’t let anyone cramp your style. Feedback is important and of course you should listen to it. If someone says something negative about your project in an unreasonable way, don’t take it to heart. There’s something good in every project (it’s open source, it already has one thing going for it), no single project is complete crap, keep the good things and learn from the criticism.
All this boils down to basically “surround yourself with good people”, it’s advice that applies to everything, but it’s good to remember that it’s just as important to apply it to your work and hobbies. Tina Fey (<3) sums it up in Bossypants (<3):
When faced with sexism or ageism or lookism or even really aggressive Buddhism, ask yourself the following question: “Is this person in between me and what I want to do?” If the answer is no, ignore it and move on. Your energy is better used doing your work and outpacing people that way. Then, when you’re in charge, don’t hire the people who were jerky to you.
If the answer is yes, you have a more difficult road ahead of you. I suggest you model your strategy after the old Sesame Street film piece “Over! Under! Through!”
…
Again don’t waste your energy trying to educate or change opinions. Go “Over! Under! Through!” and opinions will change organically when you’re the boss. Or they won’t. Who cares?
Do your thing and don’t care if they like it.
This brings an important point, sometimes you can’t avoid collaborating on a project with some hotshot asshole who also happens to be a good programmer. Take the high road and don’t ever respond to snarkiness with snarkiness. If you get anything from this blog post it’s…don’t let it change you.
replace
Posted: June 6, 2011 Filed under: mozilla 5 Comments »I just published replace, a find-and-replace command line utility that others might find useful. I’m always wanting to replace strings spread throughout my code, and never found an easy way to do it. `find` + `sed` can do it, but the syntax is hard to remember and you don’t get easy-to-read feedback on what replacements are made. It’d be cooler if there were a tool devoted to this.
Replace takes a regular expression string (in JavaScript syntax), a replacement string, and files to search (or directories to search recursively when `-r` is specified). It will print out the lines that have been replaced:

There are quite a few other options and output choices, check out the GitHub for more information. It requires installing node.js and its package manager npm if you don’t already have them. Then you can install with:
npm install replace -g
Side note: It’s true that JavaScript is still quite a bit slower than bash/C, so it’s good to question why you’d write something like this in Javascript. I blame how nice it is to write programs in node, how nice it is to handle dependencies and distribute programs with npm, and all the really well-done node libraries out there (like colors for coloring console output). This is something I wouldn’t have taken my free time to write in any other environment.