Using Map, Reduce, Filter, and Find, you can write better JavaScript code.

Photo by James Pond on Unsplash

Arrays in JavaScript are something special, as they leverage the prototype feature of JS and provide a handy way to run functions directly from a reference to an array instance.

I believe that using these four functions as much as possible within your code will not only make you more efficient, but also make you more popular on your team and generally more amazing at what you do.

All four of these prototype functions accept a “callback” function, which is a pure function that accepts arguments and must return something expected back to the caller, whether it be a boolean

An implementation, memory, and performance comparison between reassignment and mutation in Rust

Image credit: The Product Analyst

Knowing when to use mutations versus reassignments is a common decision in many programming languages and in a memory-safe language like Rust, they are an essential question. As Rust is dominated by knowing how to borrow effectively, we can ease our way into its rules by looking at the Rust language through the lens of reassignment versus direct mutation.

Note: After this, read up on Ownership and how it relates to borrowing, slices, and memory management of your Rust variables. …

With Mozilla shrinking in total employees, what is going to happen with Rust?

Photo by Pascal Mauerhofer on Unsplash

Recently Mozilla announced and enacted a sizeable number of layoffs, citing the COVID-19 pandemic. Many within the Rust community at large began to worry about the future of the beloved Rust programming language.

There are over 5000 open issues on GitHub, the Rust-based Servo team is no more, and some of the internal Mozilla contributors to Rust have lost their jobs!

As with any major news, things that can affect a programmer's happiness are always going to cause a stir online. But guess what?

Rust is going to be okay! 🧡

The three new logical operators: nullish, AND, and OR are now available

Choices, choices: blissful ignorance || unpleasant truth

Want to write less code?

Let’s meet the new assignment operators available in JavaScript, which are readily available and in Firefox 79, and Chrome 85 (not available in Node.js quite yet).

The logical assignment operator proposal specifies new logical operators to help quickly write cleaner assignment JavaScript code.

There’s the QQ equals (logical nullish assignment), the And And Equals (logical AND assignment), and the Or Or Equals (logical OR assignment), each offering a better way to update and assign values using shorthand convenience operators.

The new operators have…

A theoretical salary calculator with Tensorflow.js

Photo by Micheile Henderson on Unsplash

Using The State Of JavaScript survey from 2019, I’ve modeled the different types of questions in relation to a given developer’s salary.

Utilizing this data, we are able to loosely (okay … very loosely) correlate developer opinions, preferred tools, frameworks, favored JavaScript flavors, and total years of professional experience with their expected salary.

In other words:

By modeling over 20,000 rows of survey results from freely available open data, we can get a glimpse into what makes for a highly paid JavaScript professional.

What’s the least surprising revelation from this Machine Learning model? The topmost important feature in this data…

Here is a thorough method to check the readiness of your application in order to determine the cause of your 502 problem

You did it — you’ve built a Docker image, created a Cluster, set up a Deployment, structured a Service, and configured an Ingress alongside an automated TLS certificate issuer!

Photo by Nikhil Mitra on Unsplash

As you load the domain in your browser and prepare to see your completed work, you are instead greeted with an ugly and awful error page reading:

502 Server Error

Error: Server Error

The server encountered a temporary error and could not complete your request. Please try again in 30 seconds.

Here is a picture:

The definitive guide to musically-enhanced-cybernetic-human software engineering.

Photo by Simon Abrams on Unsplash

The best-kept secret amongst apex programmers is to… concentrate. Music provides a stable zone to hone in and attain the deep concentration needed to produce better code.

On top of the benefits of clarity, plugging into some music can reduce the external distractions that sprout up from cubicle neighbors and open floor plan conversations.

I strongly believe that music is a personal choice. It’s impossible to influence or dissuade any type of genre for your ears. There is no universal, all-purpose music solution, just a set of goals and patterns that I’ve refined over the years which in the end…

Error Handling in Rust for JavaScript Developers

Photo by Mukesh Jain on Unsplash

For JavaScript engineers looking into Rust, understanding errors and how to handle them is a difficult concept to understand.

At first glance, JavaScript and Rust are not quite the same when it comes to error handling — as a matter of fact, they seem to be polar opposites.

But if you look a little deeper, there are a lot of similarities between error handling in Rust and JavaScript. Similar to JavaScript, Rust generally has the same types of errors.

And within both of these contexts, you have a slightly different way to handle errors and return or recover from errors.

A while ago, I was given two code samples and a simple exercise: find the differences between the two samples and then determine which engineer made $30,000 more than the other, and why.

When I first searched the source code for the method used to increase one’s salary, I couldn’t find it.

I was flabbergasted — how could such a trivial detail create such a huge gap in a developer’s salary? I knew I had to do some more research into this discrepancy before sharing with the world, in case I had missed something!

Quite literally I spent hours pouring…

How does one understand web architecture? If you are a seasoned web developer, you live and breathe it. For newbies or non-techies, here is an analogy to help plan your next byte.

What Does My Lunch Have to Do With Software?

Let’s think of modern web applications as a restaurant. When using the word app in this article, just assume its either a browser application, website, mobile application, or video game with web components.

Obligatory tasty looking food for those that need to go on their lunch break

The reason I use a restaurant is that most people have been in a restaurant, so this analogy should work on 99.9% of the audience that is in a field related to web software engineering.

Cameron Manavian

Father, Husband, Engineer, CTO at Libretto, 15+ yrs of software engineering —

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store