1. Build something useful, with Amjad Masad 48:53

Amjad is the CEO and founder of repl.it, a simple and reliable cloud coding interface supporting more than 30 languages; built to assist teachers in the classroom, and make prototyping painless for software engineers. Amjad was also tech lead on the Javacript infrastructure team at Facebook, worked at Codecademy at its founding stages, and even spent some time at Yahoo! before that. On top of that, Amjad is also a core contributor to BabelJS and ReactNative.

Time Stamped Show Notes

2:20 – Amjad talks about the steps that got him to be the CEO of repl.it. He advises that developers should always think about what to build next, whether it’s related to work or side projects.

2:40 – Amjad suggests that developers should predict an upcoming technology to advance their careers. To be an authority in a language community, you need to be there at ground level. Currently there are multiple new languages or frameworks. So pick one! It’s much like investing – figure out which one has the most legs.

3:48 – Build cool stuff to get ahead! Find the technologies that you’d like to learn and think of useful things to build. Combine them and it’ll be a winning recipe.

4:06 – Amjad explains that repl.it was built to make it easier to start programming. At school Amjad found it frustrating to have to install his IDE and compiler every time he went to class. Repl.it makes coding in the browser easy and possible.

5:03 – He finds that most developers who end up at great positions in big companies usually come from the open source community. For example, Facebook currently hires from the React community.

7:55 – Amjad loves emacs. It allows him to do most of things he needs on a single screen.

8:16 – He also loves Chrome DevTools. It helped him figure out Facebook’s code. Facebook is a big project and it’s difficult to understand most of the code. The majority of code hasn’t been written by you and has been written over years.

8:57 – Amjad wrote the Chrome extension flo. It does hot reloading, and did so before tools like LiveReload became popular.

10:06 – He wanted something to show updates as he changed the code.

11:27 – Flo didn’t become popular as setting it up requires a bit of investment.

11:54HMR, Live Reload and those sorts of tools are in some sense better than flo. This is because they integrate with web packages or Webpack. There is no need to write the custom code to find or replace files. They integrate well with the rest of the tool chain. They also work with any browser, while flo just worked with Chrome.

12:28 – Flo was better in that it actually hooked into the engine API.

13:49 – Amjad thinks one of Dan Abramov’s inspirations for building redux was to get hot reloading and time travel to work on a fundamental level in React.

15:08 – Webpack is a great product but it’s slow. He feels it’s taking us back to to compiled code. He’s seen apps that spend 45 seconds per file save.

15:47 – At Facebook he worked on the React Native Packager. Their team’s goal was to have files save in less than 100 milliseconds, which they managed to do with over 100mb of Javascript.

17:33 – He knows the React Native Packager team at Facebook are looking at V8s JIT. They are looking at the assembly code from the JIT to figure out how they can make things faster. The team have made source map generation even faster. Amjad would like to see webpack focus more on performance. Otherwise he’d like to see the React Native Packager become a general purpose packager. He finds it to be a good technology.

18:25 – Amjad finds ReactJs to still be pretty exciting. A lot is still happening with React, and React Fibre – the rewrite of React internals.

19:08 – Amjad finds that the React team are always trying to outdo themselves. They have a new language called Reason. Programmers can write React in Reason. It’s based on oCaml and it compiles to native. It can be written in React Native, a native mobile app or Javascript. He thinks Facebook has 10% of messenger written in Reason and React Reason.

20:03 – Amjad also loves Go.

20:24 – Go and Rust are exciting because language design was stagnating for so long. It was all the same set of features put together in different ways.

21:00 – The distributed web, also known as Web 3.0, is also very exciting.

20:50 – Amjad names a few Web 3.0 projects: IPFS, Ethereum, and Orbit. These projects are trying to solve centralisation of the internet.

23:27 – Amjad doesn’t learn new technologies until he has a relevant project to use them in.

25:23 – Concurrency in Javascript dramatically changed the way Amjad thought about code after working with the blocking and synchronous approaches in PHP, Java, and C++ he worked with in school.

27:00 – The concurrency patterns in javascript create a lot of problems with memory leaks and callbacks not being called. 90% of the bugs at Facebook were as a result of concurrency.

27:50 – Go is attractive as it brings refreshing ideas to concurrency through channels. Channels are objects that communicate with each other via message passing.

28:40 – Go doesn’t suffer from the things that javascript suffers from. It doesn’t suffer from the things that Python and Ruby suffer from either, which is the global interpretive lock. They all have threads but they don’t do anything concurrently.

29:28 – Promises solve the problems callbacks can introduce, like the number of times a callback is called, by removing the inversion of control. A Promise’s handler is now responsible, preventing a callback form being used in unexpected ways.

30:37 – Javascript is getting somewhere with async and await. It now introduces co-routines. Co-routines conceptually block a function, but in reality the function is not really being blocked.

32:16 – A co-routine is when a language has a feature where you can pause functions and return to them later.

32:56 – There should be full support for async and await by the end of the year (2017).

Quickfire Questions

33:38Best advice about programming
Always start with an MVP and expand later.

34:03Habits for writing better code
Writing better prose and essays contributes to writing better code.

35:08 – “Programs must be written for people to read, and only incidentally for machines to execute.” – Harold Abelson

35:30 – Writing is how we think and communicate. When Amjad writes code he tries to make it seem like a story.

36:28Book
The Pragmatic Programmer. He finds it has a lot of philosophical approaches to writing better code, as well as how to collaborate with your team.

38:30The Mythical Man-Month. Much of the book is dated, but a number of sections are timeless. It’s about someone who wrote a large OS in the 60s.

40:28Inspiring devs
Sebastian McKenzie. Sebastian is the creator of Babel and Yarn. Sebastian continues to innovate. Babel and Yarn have changed how people use javascript.

41:45 – His friend at Facebook, Felix Kling, also inspires him. Felix builds interesting tools that a lot of people use, however no one knows he’s built them. He built a tool called the AST explorer. Felix’s work has a lot of impact.

42:57How to learn code from scratch
Amjad would learn how to program from scratch by going to a local code school. Or he’d enrol in Codecademy and pick up some books, such as Eloquent Javascript, with a lot of exercises.

46:25How to work smart
Locking out hours in order to get into a state of flow. Find an editor that optimises flow and minimises having to switch between different screens.

Books, Tools, and Tech Mentioned

Contact Amjad