David Walsh

Mozilla Sr. Web Developer, Front-End Engineer, MooTools Core Developer, Javascript Fanatic, CSS Tinkerer and Node Hacker

6th June 2016, 6:00 pm

This AMA is over!

Thank the host
  1. How do you handle the NodeJS async nature of things compared to other server side languages?
  2. Do you have any specific ways of structuring NodeJS applications from the start or do you just code and refactor later?
  3. When you start a project, how do you go about structuring your HTML, CSS and JavaScript? Do you start thinking in terms of components? Do you use the BEM methodology to help you with the structure of the project?
  1. As someone that codes 95% on the client side and with async structures, converting that ideology to the server side hasn't been too difficult. I guess I'd say the best philosophy to have is to never assume successful routine execution.

  2. Not really; I usually try to "code to make it work", then "refactor to make it pretty". This philosophy allows me to keep my line of thought without thinking too much about minutia.

  3. It really depends on the project and, to be honest, I usually just defer to others on the team. I do like BEM methodology though!

You tweet a lot about the benefits of working remotely from home. It sounds like you have an awesome gig. How do you stay productive at work while doing working from home? What do your days typically look like? Any advice for someone wanting a similar lifestyle?

The truth about working from home is you can either handle it or you can't. I've heard dozens of people tell their stories of being fired within a month or two because they weren't getting anything done because home felt like leisure.

I've never had any problems working from home because it fits my goals for a work environment: quiet, very few interruptions (imagine how many people stop by your desk at a traditional job), no one looking over your shoulder, comfortable, etc.

My typical day is 9-5 because I want to hang out with my family before my young kid goes to bed. Most communication is over email and IRC but big decisions are made via video meetings. Every once in a while I jump into a video meeting with colleagues just to "hang out".

Sometimes I work outside, sometimes I'm in my office, sometimes I'm in my living room with soccer on. All depends!

I know are you are an developer first and then blogger, but I actually know you from your blog and this logo. So, any tips you would like to offer to tech bloggers?

Absolutely! Here are a few tips I always share:

  1. Write in your own voice and in your own conversational style.
  2. Make yourself publish on a regular interval
  3. Write about whatever comes to your mind; forcing yourself to write about a given topic all the time will drive you crazy!

Hope this helps!

What are a few things you are excited about in current Web Development scene? Are there any particular trends that you see?

I know it's been popular for a few years but I'm still incredibly excited by Node.js . I'm also excited about Electron and some of the stuff Mozilla is doing, like Tofino. React is being used in Mozilla's Dev Tools and Tofino, so I'm exciting about that as well. I had a blast working on Firefox OS for TV -- I'm super into alternative use cases for JavaScript. In short, there's too much out there to keep up!

Assuming Mozilla has its own style guide of coding, does it affect your creativity in terms of how you would write and structure your code?

Not really; I'm a "make it work" first, "make it pretty" second type of guy. So I'll make sometime work then conform the code to the specific project!

I am a big fan of your blog! Thanks for inspiring us through your articles. What are your other hobbies apart from coding and writing about code?

I have a beautiful wife and two rambunctious little boys I spend most of my time with. I sometimes sneak away to pwn n00bs at whatever the latest Call of Duty game is. I'm obsessed with soccer so I watch Arsenal, Real Madrid, Dortmund, and any other game that's available. I also love a glass of wine or a beer with my wife when the kids go to bed!

Thanks for the reply.

  • What are some of your favourite technical books?
  • Who are the developers you admire?
  1. I trust O'Reilly books the most; they tend to get the best authors and those authors oftentimes speak at O'Reilly conferences. Any of the advanced JavaScript books (client side and Node.js) usually catch my eye!

  2. Chris Coyier, Eric Meyer, Alex Russell, Lea Verou, and many, many others!

Hey David,

In the first place, I'd like to thank you for all your works. I've learnt a ton from your blog posts. I've a couple of questions for you

  1. In JS apps, the display logic can either be coupled to the JS code (as in case of React's JSX) or it can reside in a separate file with some templating language (like handlebars.js). Which one do you prefer ? And Why ?

  2. If you were to explore the server-side languages & frameworks, how would you proceed ?

  1. I love JSX -- I hate jumping back and forth between files to see what I'm templating into.

  2. My strategy has always been to take a use case that I'd need and learn the new language using that case. For example, when I first taught myself PHP waaaay back in the day, I created a PHP app to catalog all of my DVDs. I could do basic CRUD, sort by actor or run time, etc. So within a few weeks I learned PHP and MySQL, and I was driven to keep going because I wanted a DVD app! :)

Do you have any advice for people beginning to learn code and are looking to break into the field? Thank you!

Nothing more than keep experimenting and keep plugging away! I spent thousands of hours teaching myself coding techniques and tools. 40 hours a week doesn't cut it!

Hi David,

Your blog is awesome! A great resource indeed.

What are the other side projects you are currently working on?

My blog takes up the majority of my free time so I don't have many side projects. Luckily Mozilla encourages us to contribute to other projects so I've been experimenting with the Mozilla Tofino experimental browser, as well as Dev Tools and a few other Mozilla projects!

Hi David,

Thanks for doing this AMA. :)

What according to you is the best way to learn JavaScript?

Open the JavaScript console and start experimenting! I also recommend downloading the source code of popular open source projects, like jQuery or MooTools or React, and try to understand what they're doing. There's nothing better than looking at a working product and seeing how they're doing it! And read blogs! (hopefully mine!)

How did you get involved with Mozilla?

Through my blog! Mozilla's head of Web Development at the time saw my blog, followed me for a while, and thought I would be a good fit at Mozilla. And I hopefully have been! :) Mozilla has changed my life! I get to travel and be around the best developers in the world. What more can I ask for?! :)

Are you a fan of any particular JavaScript framework like Angular, React, Vue, etc?

I was on the MooTools team so I'm obviously partial to that. I worked at SitePen for 2 years so I was very well acquainted with the Dojo Toolkit, which is amazing. Facebook hired much of the MooTools team who have worked on React so I recommend that. three.js is amazing for visualizations. There are too many awesome tools out there right now!

Hi David,

Have you used CSS Flexbox? Do you think it is the right time to design websites using Flexboxes only?

CanIUse says that flexbox is in all modern browsers so if you want to use it you can. I'm more reserved in my CSS structuring and have seen plenty of odd flexbox bugs so I'm not ready to use it yet, at least not for an entire complex site.

How often do you use Stack Overflow? And do you have a habbit of bookmarking/saving useful snippets or you try to remember them?

I never look on S/O purposely but they have a hell of a SEO strategy because they often show up top of my Google searches. If I do find a gem on S/O I'll reference it in a new blog post, detailing my case for needing it and hopefully explaining it all better than S/O's limited context seems to allow.

Another quick question from me - What's the best way to avoid burn out?

Get away from the computer! Burn out happens a lot when you work from home because work is a moment away. I'll take the dog for a walk, break to` watch a TV show with my wife, or go for a quick drive.

For those of you who work in an office: make yourself leave on your lunch break, don't eat at the computer. At the very least go for a drive. When you walk outside and you see trees and grass and people doing things other than punching keys, you'll remember that life is more than work!

Hi David! I'm big admirer of your work, especially your blog is great for beginners like me. I'm a recent college graduate with non CS background. I wish to work at Mozilla. What would be your advice to become competent enough for this job. Also, do I need to be proficient in DSA/DBMS?

Some of my work:

The best way to join any community is by contributing! Contribute to enough Mozilla projects and with a great level of quality and you'll be a Mozillian in no time!

Funny fact: when I joined the MDN team, there were 5 other people and none of them had a CS degree!

What's hardware and software you use?

  • MacBook Pro
  • Atom text editor
  • Docker
  • IRCCloud
  • TweetDeck
  • Every browser you can think of
  • 60" Ultra HD Panasonic TV
  • Various other command line apps!

What is your ideal/go-to stack these days for web app projects (CI, hosting, source control, backend, frontend, etc.)?

Travis CI, AWS for a big project, git, Node.js, and whatever front-end JS components the specific project needs. I try not to be too rigid though -- if a project is best using a different stack component, I'll go for that!

Good to see you here David. How did you get started with Blogging?

I was at a job I wasn't satisfied with and I wanted bigger things. I was also tired of finding solutions to my edge case problems on the third page of an ugly forum. So I started writing and cataloging my solutions and I quickly noticed that I was getting attention, learning from the comments, etc. I'll never stop!

Are you playing a role in MZN's VR initiatives?

Unfortunately not; I spent 3.5 years on MDN, 6 months on services workers, and now I'm working on version control tools. I try to dabble in other projects on my free time!

How should companies pick software? For example, there are too many large file transfer solutions (e.g. Aspera, Innorix, Catalyst, etc.). What would you consider the safest way to approach these decisions that have a long term technical impact on a company that implements them?

Never go for the cheapest option, always opt for tools that offer support from your native country, always ask for input from the users, and don't sign long term contracts!

What will be the future of web applications? Transcompiled languages (Elm, Go, Coffeescript, TypeScript, Kotling), unidirected frameworks (Flux, Redux, Rx.js), WebAssembly, Asm.js? (I know that these are not in the same league and you have to compare different things)

WebAssembly will definitely be the path forward for games and very heavy JavaScript apps. Flux and redux are super popular so I look forward to working more with those. Of course no one solution will take over but what I do hope is that the base technology stays easy enough that kids (like I was) could teach themselves how to publish on the web!

  1. I am a Windows user and I want to start learning backend development using node . Should I move to Linux for it as I have heard that node has some issues with Windows?
  2. Also ,I have been using for all my front-end projects .So ,what will be your advice to me for approaching towards backend development as I haven't really done any deployment as of now ?
  3. Any recommended resources for learning backend development ?
  1. Unfortunately I don't have much Windows + Node experience but I haven't heard of any issues so I think you're probably safe

  2. Grab a Heroku account and deploy away!

  3. O'Reilly has a book for everything. And always code something you have a real use case for -- it's the best way to learn!

Hi David, what advice would you give to a new blogger?

Here are a few tips I always share:

  • Write in your own voice and in your own conversational style.
  • Make yourself publish on a regular interval
  • Write about whatever comes to your mind; forcing yourself to write about a given topic all the time will drive you crazy!

Hope this helps!

Yeah, great advice. Thanks

What languages apart from Node fascinate you?

Command line stuff is fun, I really enjoy experimenting with that. Using JavaScript in different use cases, like browser internals and TVs and alternative devices is fun. Sometimes I play around with PHP if I'm bored. These days it's more about application/use case than languages.