Auto-formatting your JavaScript Codebase with Prettier

While creating new JavaScript projects, I’ve found that I need to add Prettier to each one of them. Prettier is an awesome opinionated code formatter, with good enough defaults that I almost never need to configure it. It just works, and it looks good ūüé®

I’m documenting this so that I can have a single place to refer to the next time. I’m also doing it because I honestly need to get back to producing content and I might as well start with something I find useful.

Also it’s 2018 and you want to spend your time actually writing code not thinking about whether to use double or single quotes every single time¬†ūüėÖ

Continue reading “Auto-formatting your JavaScript Codebase with Prettier”

Getting Started Contributing to Nextcloud

This past weekend (August 25 Р26, 2018) I had the pleasure of speaking at the Nextcloud Conference held at the Technical University Berlin. It was my first time giving a talk at a conference and I gave a lightning talk (5 minutes) about getting started contributing to Nextcloud. This is a blog post version of the talk I gave and hopefully it motivates you to get started contributing too!

Continue reading “Getting Started Contributing to Nextcloud”

Posting Source Code on WordPress

Posting Source Code on WordPress

While writing technical content for this blog, I usually find it tough to include source code in the posts in a way that makes it readable and appealing. I want it to be enjoyable to read the code, rather than a struggle.

This led me to explore various solutions and in this post I go over the options I considered and what I eventually found to work best for me.

Continue reading “Posting Source Code on WordPress”

How to Introduce Elm to a React Codebase

How to Introduce Elm to a React Codebase

Elm is a delightful language that helps¬†make¬†web applications¬†more reliable¬†by eliminating runtime exceptions. I find it extremely productive working with Elm, and would like to be able to use it in a JavaScript¬†codebase¬†without breaking the existing application or having to rewrite it altogether. However, it’s not obvious how to try out Elm in a small piece of the application, just enough to¬†evaluate how well it works. This is what we will address¬†in this article by exploring how to add a new feature to a React codebase with Elm.

Continue reading “How to Introduce Elm to a React Codebase”

From JavaScript to Elm: A Blissful Journey

From JavaScript to Elm: A Blissful Journey

When building web applications with JavaScript, there are thousands of tools and frameworks to choose from. Most of these tools aim to make developing with JavaScript easier and more productive, and most of them help web developers¬†achieve that. However, sometimes the language itself is the constraint.¬†If you have built web applications¬†in JavaScript, there’s a good chance you’ve experienced errors like Uncaught TypeError: Cannot read property 'x' of undefined that end up taking lots of time to debug. The language does not help you catch these errors early enough in the development cycle, and they usually end up being discovered too late,¬†mostly¬†by your users reporting that something is not working.

What if you could release your web app with the confidence that you would never get any runtime exceptions again? What if every time you needed to refactor code, you could do it confidently knowing you have a compiler that would let you know of any errors and suggestions on how to fix them? What if you could get all these benefits today, right now?

Welcome to the world of Elm.

Continue reading “From JavaScript to Elm: A Blissful Journey”