"I contribute to Ember" with Miguel Camba

Hello folks and welcome to the seventh edition of the interview series “I contribute to Ember” , presented by the folks at The Ember Times :slight_smile:

This week we’d like to highlight the work of contributor @cibernox and talk about his work on powerful addons (1, 2, 3, 4, 5), contributing by necessity and why the silly pull request is only a myth.

How did you get started with using Ember?

That’s a funny story. At the end of 2012, I moved to Barcelona to work on a startup that didn’t take off and in a few months, I was looking for a change.

I had good experience in Ruby on Rails, but on the frontend I was, like most people, just adding sprinkles of jQuery on top of our backend frameworks. Talking with some people on a local meetup I found out that a Gerard Piqué, a player of the Barcelona football team had just started a company and they were creating a football fantasy manager game and looking for Rails devs.

It sounded great, and I joined. Immediately it was evident that the app was too complex for any server-rendered approach, we had to develop a separated API and some frontend framework.

Back in the day, we would give a go to some of three main options: Backbone, AngularJS and Ember. Guess what did I choose for my spike … Angular! We compared notes, I lost a discussion as Ember looked the cleanest, and immediately we started building our game with it.

Those were some fun times with a great team. One week into the project, which started in 1.0.0-beta.5 if memory serves, the next beta included the brand new router that we know and love today, but that was entirely different from the previous one. Having to re-write your app one week into the process was…interesting. Welcome to Javascript!

Time went by, and I matured as a frontend developer thanks to Ember’s conventions. By the time I left the company and moved to London the game had around 5 million registered players of which over a million were actively playing, and as far as I know, it remains as the only commercial video game ever built with Ember.

What have you been working on recently in regards to contributions to Ember and the Ember community?

There was a time when I was doing a lot of stuff: Meetups, talks, loads of open source, bug fixing in Ember itself, writing RFCs…But lately, I’ve lifted my foot from the throttle a little bit and focused a bit more on my personal life and my soon-to-grow family, which is what matters in the end.

I still maintain and work on keeping all my projects up to date, and in fact, I am working on a complete re-write of all the addons of the Ember Power family to “Ember octane” style. That is Angle Bracket Invocation, ES6 classes, decorators and perhaps even TypeScript.

It’s looking good, the API is much cleaner, and performs better, too.

I am lucky enough to work in a company, Dockyard, that sponsors our open source time one day a week. Thanks to that I hope to release the first versions in early March, and I want it to be a reference for other addon authors who want to update their components to octane to check for prior-art in patterns and ideas.

Were you surprised by anything when you created and published your first ember-power-* addon? If so, what was that?

Many things. Starting with the answer to the question: “How complicated can a select component be?”. It turns out the answer is: “ A lot” **! :smiley: I had some very weird use cases for a few select-like components, and I found that none of the jQuery plugins that were available could solve all of them. I decided to try to recreate an existing jQuery plugin in native Ember, and to my surprise, it was not only much easier to understand, but it was also possible to break it into more simple components that made sense on their own, and that's how I extracted ember-basic-dropdown.

However, those addons wouldn’t have been successful without the most important thing in a library: Documentation. Publishing good docs is what really makes addons thrive. As an author with a finite amount of time, if you are presented with the choice of implementing a new feature or improving the docs, 9 out of 10 times the correct answer is improving the docs.

What’ your biggest motivation to contribute to Ember and the community?

There are several dimensions to it:

Speaking about code contributions, I’m a necessity-driven programmer. Whenever I create a library, write an RFC or PR a bug fix, it is to scratch my own itches, whatever those may be at the time. That is the selfish survival instinct at work. I need a goal to keep me focused.

The second dimension is the social aspect. I found the Ember community very welcoming, and once you feel comfortable, you start to develop bonds. You get help from people, and in turn, you answer other people and try to make them feel welcome. It’s the boy scout in me that wants to leave the place a tiny bit nicer than how it was before. A few times people even approached me and just thanked me for some of my addons that saved them a week of work, and that makes my day. As well as seeing people you once helped in turn contributing back.

Is there any piece of advice you can lend to first-time contributors?

Don’t feel intimidated. It happened to me that I thought that if many great minds put so much thought on Ember or any other library, whatever idea you have has already been considered and discarded, so it’s probably silly to even bring it up. Or that I thought perhaps the code would be too hard to understand and you won’t be able to pull it though.

That is never the case. There aren't silly questions or PRs. The people writing the software you use are just as human as you are and they introduce bugs or leave messy code on a daily basis. The code that you don’t understand at first glance will start to make sense to you when you read it a third time.

Try, and you’ll be surprised about how often things have defects just because no one noticed or maybe they did but nobody found time to fix it yet. You can totally contribute and your work can make a difference.

Miguel Camba, also known as @cibernox, is a Senior Software Engineer at Dockyard and a contributor to Ember. You can also find him on Twitter.