I am Jay Phelps. Ask me anything.

Loves code, hates condiments. Jay is a Senior Front End Engineer at Netflix with over a decade of engineering experience. Lover of all things open source, his contributions span across numerous ecosystems.

Ask Jay Phelps about:

  • WebAssembly
  • JavaScript
  • Engineering at Netflix
  • RxJS
  • ECMAScript
  • Redux
  • OSS
  • General Advice

Hey everyone! I had fun your questions. Feel free to reach out to me with others or followups. You can find me on twitter: https://twitter.com/_jayphelps 🖖

Comments (73)

Richard Onsman's photo

Hi Jay, Thanks for the AMA!

What's like to work at Netflix's Engineering team? What's the best & worst thing about it? 🤓

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

You're welcome! Thanks for the question.

Netflix has been the best company I've worked for, by far. Above all I enjoy the freedom they give us. Freedom to make positive decisions as well as freedom to make mistakes without fear of retribution or shame. Very little bureaucracy. Want to use the new hot framework? Your call, do what's best for the company. Same thing for vacation and so many other things. It's not for everyone though: some people don't do well in an environment where they don't have guard rails. For a lot of roles here, the onus is on you to set priorities, make tech decisions, etc. There are no distinct engineering leads or architects. All engineers are flat, same level. This is so exciting and refreshing when working on projects. From a technical experience, I love love love this. At the same time it's probably my least favorite thing from a totally selfish perspective, as you won't ever get that title "promotion" to Level VI or whatevs, but you definitely still get paid top of personal market. Title's aren't nearly as important to me though as it might have been early in my career.

I highly recommend our culture doc, which was crafted/edited/debated collectively by everyone here and does a great job of representing: https://jobs.netflix.com/culture

Alexis's photo

How would you explain the current state of Webassembly?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Love this question!! (I'm obsessed with WebAssembly) It's pretty bleeding edge stuff, but it's progressing much faster than most probably think!

Right now WebAssembly (aka wasm) v1 is supported in all modern browsers (Firefox, Safari, Chrome, Edge), which is great, but a lot of people need to support older versions which don't. If you're writing in C++ you could dual compile to wasm as well as asm.js; which is a subset of JavaScript so it works in older browsers. There's also some experimental "polyfills" created by the community. Some of them are interpreters some are basically wasm -> JS VMs. These are currently pretty slow though, and it's likely they'll always be impractical for performance reasons.

The v1 of wasm was designed around the C/C++ use case, so it's pretty low-level stuff. However, there's a very active and quickly moving proposal for exposing a built-in Garbage Collector, which is going to be one of the most important building blocks to have high-level languages target wasm and interop with JS objects and the DOM APIs. This is very exciting. Languages like Reason and Elm will be prime examples.

Webpack is actively working on first-class support for wasm modules, as well as eventual things like a cpp-loader, reason-loader, etc which will transparently abstract away nearly all wasm stuff so we can just focus on writing code in our preferred language.

Such an exciting future!

Lis(elot)'s photo

How do you grow from Front End Developer to Front End Engineer? What’s the key to be noticed in the industry?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

I try not to make distinctions between "developer" and "engineer" as titles, but I'm thinking your question is rooted less about the titles themselves and more about the abilities/mindset.

If that's the case, I think the number one thing you can do is keep yourself challenged. If you feel your abilities are stagnate at your job, try to find another more challenging. Not everyone can switch jobs though, so in those cases try and find more challenging work that fits within your existing role. Having a side project is great too, time permitting. I've grown the most in my skills from the side projects I've done, most of which I never release publicly. It didn't matter though because it was super challenging and I learned so much.

Getting noticed is mostly being more social and having a consistent presence. Being active on Twitter, having an opinion and sharing your passions with others. Giving talks at meetups and conferences helps too, but it takes quite a lot of time, effort, and nerves. In the end, being noticed might get your foot in the door for better jobs but some are surprised to learn companies still make you go through the same interview process and still pass on you for technical reasons. e.g. the guy who made Homebrew interviewing at Google 😆 https://twitter.com/mxcl/status/608682016205344768

Kashish Grover's photo

Why can one not click on the video screen to pause and play a Netflix video? :P

Show all replies
Kashish Grover's photo

Tinkerer 🔧 Member of Technical Staff @ThoughtSpot 👨🏻‍💻 Drummer 🥁

Pretty cool! Thanks a lot for the answer. :D

Matt Hargett's photo

With Netflix moving to Kotlin, what does that mean for their ongoing contributions to the JavaScript, Observables, and React communities?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

We're love the JVM and have a huge amount of Java and Groovy. There's more and more teams using Kotlin, but I actually haven't seen a major shift across the board. We also have a ton of Groovy, which is slowly going to be superseded by Node.js microservices in a lot of cases; but we’ll continue to use Java indefinitely.

I'm thinking the Kotlin/Java stuff won't have an impact on our JavaScript related stuff, aside from our increasing reliance on Node.js. Since Netflix has a culture of freedom to choose technologies, it's often hard for us to make generalized statements. Ruby, Go, Python, Haskell, Scala, Angular1/2/3/4, Ember, Polymer, React, etc we've got the whole spectrum. I love that because I can get exposed to many of them if I want. We sponsored the RxJS v5 rewrite (Matt from Microsoft is the original author) to get it released, and now it's a community effort managed by volunteers outside of Netflix.

Margaret D's photo

Hi Jay, I am trying to learn and understand Rxjs. What is the best way to learn it with Node.js?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Here are some my favorites:

There's not much specific to Node.js, but it will be helpful to learn how to create custom Observables so you can wrap more imperative APIs or make utilities. Ben's article above will definitely be the best resource for that.

While you're learning, keep an eye out for v4 vs v5 documentation and libraries as some things changed between those versions and people often get tripped up trying to use v4 code or APIs with rxjs v5. Hopefully this shakes out as time goes on. There are still some active efforts to mitigate this.

abumalick's photo

What tools (software) do you use to develop javascript?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

I'm a MacOS guy, primary editor for JS is VS Code. Nearly all my projects use webpack, eslint, and Babel/Typescript in some form or another.

Felix Becker's photo

What are the unique advantages of Observables over AsyncIterables?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Mostly comes down to push vs pull.

Observables are push-based, and perfect for modeling data in which you cannot (or don't want to) control the rate in which data is provided. Easiest example is a user's keyboard events, we can't control the user, they type when they want to. Most UI stuff is modelled best as push, but elsewhere backpressure can become an issue: data can flow faster than you can handle it, so you have to either buffer or drop it. Both backpressure strategies have issues that might make it impractical.

AysncIterables are pull-based, so they're great for things in which you can, and want to, control the rate. You ask for the next event and you get a Promise that will resolve when it's ready. It's important that you can actually control the producer, otherwise the producer will have to drop or buffer and then it's the same problem Observables would have. The cost of creating a new Promise every time (and the fact that they have to be async) is a potential thorn, but not usually an issue the average person will run into.

https://github.com/ReactiveX/RxJS (Observables) https://github.com/ReactiveX/IxJS (AsyncIterables)

Shankar Gangadhar's photo

Hey Jay,

  1. Could you tell me a bit about Engineering at Netflix?
  2. Vue Js vs React? Which one would you prefer & why?
Show all replies
Shankar Gangadhar's photo

An Indian Engineer who loves working on Web,Mobile & on Business upfront.

Thanks, jay.

Joy Dasgupta's photo

What are the benefits of Rxjs Observables on promises?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

ooooooOOOoooo yes!

  • Can represent zero to an infinite number of values over time. Promises must represent a single value.
  • Observables are lazy, so they don't do anything until someone subscribes. This lets you declaratively compose streams in a way that actually is very similar to its own language.
  • Built-in cancellation, though the new AbortController kinda sorta makes this one muddy. (e.g. fetch will be cancellable using them)
  • Synchronous by default (unless scheduled differently) so you can choose scheduling. Promises are always async, scheduled on a microtask https://jakearchibald.com/2015/tasks-microtasks-queues-and-schedules/

It's definitely possible for a custom "Promise" libraries to make some of these points moot, which is totes awesome, but then it's not really a Promise 😉

Xavier Lozinguez's photo

Will you ever cut your beard?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

It's a tough call. I think it will happen inevitably 😢. tbh I'll probably just wake up one morning and buzz it off--then immediately regret it.

Sidhant Panda's photo

How extensive is A/B testing at Netflix? How do you usually decide to add or even remove features?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

I'm not directly involved with our A/B testing, so I can't speak too much from experience. We A/B a ton, even stuff you might think would obviously be better. Intuition is often wrong, so it's good to have that data to confirm.

If this stuff is interesting we have a great, in-depth post about our A/B testing stuff here: https://medium.com/netflix-techblog/its-all-a-bout-testing-the-netflix-experimentation-platform-4e1ca458c15

Susan Dinglesen's photo

What is the difference between a programmer, a good programmer and a great programmer? What is the path of becoming a great programmer?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

I'll give it a shot, but keep in mind these are just my opinions lol 🤡

Programmer: a person who can write code, very often relies on others to make decisions; e.g. advice from the lead engineer, or copying and pasting code off StackOverflow. Doesn't knowingly use their own abstractions.

Good Programmer: a person who can make complete solutions. They can go from an idea to a product on their own. They still copy and paste code off StackOverflow sometimes, but less often as usually they understand the solution's code and write their own variant. Uses abstractions, but sometimes prematurely.

Great Programmer: a person who can do all the above, but also enable others to do them too. Much better at not doing premature optimizations/abstractions, but of course still is guilty. Still copy and pastes code off StackOverflow.


I described them as three categories, but really people's paths and abilities vary. So the path to being a Great Programmer is tough to say, but I've found true passion for programming often correlates. Consistently challenging yourself with harder and harder problems that you enjoy is my advice. The saying "if you're the smartest person in the room you're in the wrong room" is very apt as well.

Wuelber Castillo's photo

Is Netflix having plans to integrate React Native on their mobile apps?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

I unfortunately can't accurately speak for those teams. It's entirely possible that they've experimented or even have future plans for RN though. It's pretty sweet, and Netflix has a similar tech called Gibbon we use on our TV UIs https://medium.com/netflix-techblog/crafting-a-high-performance-tv-user-interface-using-react-3350e5a6ad3b

Sohrab Hejazi's photo

In you opinion, how can one go from a mid-level developer to becoming a solid Senior level developer?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Being consistently challenged. I often see people stagnate in their jobs, not really learning much new. I love being in over my head and dig my way out. Remember it's not about how many years, but rather what things you've done and learned in your career. Side projects can be a great outlet to experiment and challenge yourself, if you have time.

Anant Kumar's photo

How do you test code at Netflix? Do you do test-driven development (TDD)?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

We're given a ton of freedom to do what we think is best, so every team can and often does do things differently. Some teams to TDD, others (like mine) don't.

Most teams here use Jenkins for some things, but there's a lot of hardware related testing that goes on that's pretty complicated.

Automation is key 🔑

Paul Lee's photo

Why webassembly is important? I get that it means you'll be able to compile C/C++ to run on the web but I can already do that with javascript transpilers.

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

WebAssembly will be able to perform better in a lot of ways: file size, parse times, runtime performance. But it will also open the door for features JavaScript doesn't (and never will) support. True multithreading, SIMD, etc. asm.js was the attempt to force the square peg in the round hole of JavaScript, but it just reminded everyone that JavaScript is a great dynamic language but a lousy compilation target.

Rishabh Pandey's photo

Can Mobx or Mobx-state-tree take over Redux ?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Absolutely. A lot of the hype around redux is likely driven simply by the fact that Facebook uses it and it's unofficially associated heavily with React from near the beginning.

Mobx is basically Ember for people who want to use React. (in a good way)

Steve Klabnik's photo

What is the biggest missing resource for WebAssembly?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Seamless tooling for sure. Webpack is going to make this much more mainstream I think, at least for consuming existing wasm libraries.

Vishal Isharani's photo

hi Jay, what you think about pwa (Progressive web apps) ? and what about netflix pwa app ?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

PWA's are great when they're available and work. Many devices/browsers don't support them fully yet though (or in a usable form) and they're still a bit tough to get right for the average dev. I got frustrated for an embarrassingly long time learning ServiceWorkers.

As far as Netflix.com becoming a PWA, it might happen at some point, just not yet. e.g. iOS Safari is DOA because no ServiceWorkers and no Encrypted Media Extensions. Their "save to home" UX isn't yet as seamless as Android's. I'm not on the team responsible, so I don't want to speculate too specifically! :o)

Eric Eisaman's photo

Do you believe an evolution to a multithreaded UI browser model is necessary to for continued performance growth in the face of diminishing returns in JS VMs?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Without a doubt, and it's already begun. First it was separate processes per tab, then they started splitting off things like HTML parsing, layout, GC, etc into separate threads. I'm super excited about the innovation that's being made--Mozilla's Quantum and Servo are shining examples of this. If I didn't know better it seems like Mozilla is going to have their cake and eat it too: multithreaded performance while also becoming more memory safe than all the others, thanks in part to Rust. But don't count out the other browsers, this race will continue!

null's photo

Hi Jay, what do you think about MERN stack development(pros and cons)? I appreciate your answer.

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Pros:

  • Additional documentation on top of what's already available for the individual components, and how they work best together
  • You don't have to make as many choices, which can get fatiguing and you're more likely to get them wrong
  • Sometimes these groupings help with employment and hiring, like what LAMP did.
  • I love React.
  • I love React.

Cons

  • Redux being included as part of it contributes to the issue of people bringing in Redux too early and/or in apps that don't need it.
  • MongoDB might not be the best choice for every use case. It also hasn't had the best rep recently with the accidental exposure/deletion/ransom of people's DBs.

All in all, I think MERN is a fair guide for those who just want a more complete paved road. To be honest though, I don't know anyone personally who has used the actual MERN stack CLI or boilerplate stuff. They just use the things that happen to be part of the acronym.

Joy Dasgupta's photo

Hi Jay, How can RxJS and Bacon.js be best leveraged on the web front end?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

I think it's best to sprinkle them where they shine the most, rather than rx-all-the-things. Using them for UI events (clicks, keyboards), HTTP requests, and particularly WebSockets.

Chris Ostrowski's photo

What is your opinion on major OSS contributors like Mozilla protesting the implementation of Encrypted Media Extensions?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Shoot, this is probably a subject in which I am woefully uninformed.

Margaret D's photo

Is it good idea to use Vue.js with RxJS?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Absolutely! You can make the experience even better using this: https://github.com/vuejs/vue-rx

Sander's photo

When are you going to introduce Reason at Netflix?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Oh it's been talked about for sure. I'm not aware of any concrete usage yet, but it's only a matter of time before someone uses it somewhere at Netflix, probably for internal stuff since there are a lot more greenfield projects. I've been playing around and keeping an eye on it, so for me it's still too volatile to commit to. But I have my own language stuff I'm working on so I'm a bit biased :p

Sandro Padin's photo

How do you test redux-observables? Any resources you recommend for learning more about unit testing redux-observables or RxJS Observable objects?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Our docs on testing have definitely been neglected..I had hoped that we'd have time to improve rxjs's testing story in general, since testing in redux-observable should be nearly the same. There's been some movement in that front but not super solid yet.

I most often test my epics these days by calling them directly, without redux/middleware at all. Check out the example here: https://redux-observable.js.org/docs/recipes/InjectingDependenciesIntoEpics.html

Some experiments around marble diagram testing (but still alpha quality):

https://www.npmjs.com/package/rxjs-marbles https://www.npmjs.com/package/rx-sandbox

Patricia W's photo

Why use rxjs/store over a shared service with immutable properties? Don't you think it’s over engineering?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Hmm I'm not 100% sure on the first question, but I can confirm that using redux in general is often bringing in unnecessary complexity and pain. I think I'm too close to it all to know whether it's truly over-engineering in general though..definitely possible.

Patricia W's photo

What are your favourite games converted to web with web assembly?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Funky Karts for sure: https://www.funkykarts.rocks/demo.html

There's a first-person shooter game I saw a couple months back that was ported but I can't find it :( it was pretty sweet, showing 3D with particle effects, etc. But it was early and a bit glitchy still.

Patricia W's photo

Will JavaScript die and webassembly eventually win?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

No.

Well....maybe. Some day. Depends on your definition of "die". I wouldn't be surprised if in 10 years most complex apps are written in another language like Reason/Elm/somethingelseyettobecreated. But while we've been mostly forced to use JavaScript this whole time, it's popularity isn't just because of monopoly. Through its faults it has a lot of traits that are perfect for many websites, particularly for people just getting started. I predict JavaScript will live for at least my lifetime, but the distinction between web and native will blur completely.

Parker Bond's photo

RxJS is interesting, but it seems like most of the examples and tutorials use it with redux. What do you think of just including it in a vanilla react app with regular props/state?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

I usually advise: 100% don't learn React while also learning Redux. Learn React with setState and for the average app (which is most) Redux would have just been significantly overcomplicating things.

That said...if you're the curious type it's very cool to learn Redux in your free time to understand the paradigm and get a better idea of what it's good at and more importantly what it's bad at.

Yazeed Al Oyoun's photo

How would you approach building an intuitive UX for kids within an educational platform?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

This one is tough for me as I don't have any experience building software for kids. But I do have lots of UX experience, so I would probably approach it similarly: start off with a prototype, going with my gut on UX decisions. From there, have some kids use it with as little direction as possible and watch their behavior. What do they click on? Where does their mouse move to? Where do they get confused? What's missing?

It's definitely useful to have them provide feedback as well, but I imagine it's like UX for adults in that often people say one thing but do another. Just keep it in mind and correlate with others too.

There are also data collection laws regarding kids. To be honest, because kids software feels like a whole different realm to me I'd probably bring in someone else to help me, or at the very least do a ton of research into existing studies and observations of others.

Tommy Hodgins's photo

Do you still have enlisted troops in the “Netflix Simian Army” (bots for automated testing)? If so, are there any new 'monkeys' you are using today, or have any of the original 'monkeys' been replaced or retired?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

The monkeys live! I haven't heard of any new monkeys recently, but we've upgraded Chaos Monkey a number of times and continue to increase our failure injection initiatives. Speaking of which, the Chaos team recently released a free e-book through O'Reilly if this stuff tickles your fancy: http://www.oreilly.com/webops-perf/free/chaos-engineering.csp

Andrés Uris's photo

How did you master javascript? What books or resources do you recommend?

Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

I think I really leveled up when I started writing more libraries as well as trying to understand more about how things work. e.g. really understanding prototype inheritance. I'm a armchair compiler nut, so I would also refer to the ECMAScript spec quite often too. One thing that I've found helpful in teaching others is actually reviewing what ES6 -> ES5 compiled code looks like from Babel and understanding the choices it makes, particularly when in spec-compliance mode where the output can be a bit verbose.

I'm not a big book person, so I can't recommend any on JavaScript unfortunately. I have heard lots and lots of praise for the "You Don't Know JavaScript" series, but I have not myself read them: https://github.com/getify/You-Dont-Know-JS

I've found egghead.io to be pretty awesome, and they have lots of free content too. I recommend them so much I sometimes wish they had some sort of referral program lol.

Ahmad Medainy's photo

why do you hate react framework ?

Show all replies
Jay Phelps's photo

JavaScript and stuff at Netflix. RxJS junkie. redux-observable, core-decorators. Compiler enthusiast. Obsessed with WebAssembly.

Hey Ahmad, shoot I'm sorry I made it sound like I hate React! I love love love it! It's my daily driver. If you have a moment to share the tweets you're referring to it would help me prevent this in the future.