When to use UTC and when not to

Photo by Sonja Langford on Unsplash

I’ve noticed that good developers can get confused about datetime logic. Their code relies on datetime libraries to do the heavy cognitive lifting and in return the code becomes buggy.

It’s understandable too because time is deceivingly complex. We stand on the shoulders of giants who have simplified time for our daily lives. Our current calendar and the 24-hour clock are examples. We take them for granted.

When applications rely on datetimes, developers should have a basic understanding of how the world models time. …

A guide to set up a programming project with Node, TypeScript, Mocha, and ESLint.

Photo by Stanley Dai on Unsplash

Programming projects should be set up to make development easy. To do this, projects should have the following abilities.

  1. Watch source files during development.
  2. Watch test files during development.
  3. Lint files on commit.
  4. Build files to a dist folder (and serve them).

Setting up a project is subjective but I hope this gives you a good starting point.

If you want to jump to the code, use the git template I created called node-typescript-mocha-eslint. Not a very original name but it gets the job done.


Can I build a fully automated aquaponics system? More questions than answers…

Photo by Lettuce Grow on Unsplash

There was a time when I was obsessing over aquaponics. This was back when I lived in an apartment with a close friend of mine.

My goal was to develop an aquaponic system that essentially paid for itself.

I read a book, listened to a podcast, and spent hours researching online. I got over the knowledge hump of, “this is going to be cake!” and got to, “Wow! there’s so much to think about…”.

Water is wonderful but finicky. It weighs about 8.3 pounds per gallon and can…

Don’t let third-party packages hold you hostage

Photo by Erda Estremera on Unsplash

This is the third part of a three-part series.

  1. Ways Third-Party Packages are Time Consuming
  2. Researching Third-Party Packages
  3. Properly Incorporating Third-Party Packages

This is the most important piece because we will write practical code to help manage third-party packages.

Third-party packages ultimately save time on development, but they can hold us hostage if we don’t properly import them into our codebase. It can introduce problems and take more of our time than we expected.

When we import a package, we should treat the package as an implementation detail of code that we own…

What to consider while researching third-party packages

Photo by Leone Venter on Unsplash

This is the second part of a three-part series.

  1. Ways Third-Party Packages are Time Consuming
  2. Researching Third-Party Packages
  3. Properly Incorporating Third-Party Packages

If you’re like me, skim the headers for the questions because ain’t nobody got time to read a 5 minute article.

But seriously, we should ask questions before bringing third-party packages into a codebase because we don’t have control over that code.

What are the application’s priorities?

Applications have particular needs and priorities. Take the time to consider these needs before choosing a third-party package.

Professional vs. Other

Professional applications should use more robust third-party packages. …

Third-party packages are meant to save time. Here are some ways they instead use it

Photo by CHUTTERSNAP on Unsplash

This is the first part of a three-part series.

  1. Ways Third-Party Packages are Time Consuming
  2. Researching Third-Party Packages
  3. Properly Incorporating Third-Party Packages

All software uses third-party code. It saves us from “reinventing the wheel” and allows us to innovate faster.

This is undoubtedly true, yet sometimes we complain about third-party packages holding us back.

Regardless, third-party packages should save us time. So here is a list of ways third-party code uses our time.

Learning How To Use the Package

It takes time to understand how packages work.

When we don’t understand…

All developers writing JavaScript should understand automatic semicolon insertion as it relates to return statements.

Photo by Joshua Aragon on Unsplash

JS uses automatic semicolon insertion. This means JS engines will execute code and insert any semicolons where it sees fit.

One of those spots is after a return statement.

function createPerson(firstName, lastName) {
return // ; <-- semicolon inserted by the JS engine
{ firstName, lastName };
createPerson("Chris", "Jeffery") // returns undefined

To fix this, we must extend the return statement on the same line the statement starts on. This can be done in several different ways but most notably with different brackets. Of…

There are many different implementations of JavaScript. How does ECMAScript fit in?

Photo by James Jeffery on Instagram

ECMAScript is JavaScript, but the name ECMAScript points to the fact that the European Computer Manufacturers Association (ECMA) is the governing body controlling the specification. It’s more complicated than that and ultimately the specification is influenced by the community at large but that is where the name comes from.

However, the confusion around what name to use is a result of branding and trademark (non) issues. The recommendation is to use JS, not JavaScript, or ES20##. …

“A goal is not always meant to be reached. It often serves simply as something to be aimed at.” — Bruce Lee

Photo by Joshua Earle on Unsplash

The new year is here and the opportunity to make the most of it is slowly declining.

When I look back, I find that my success is directly correlated to my ability to plan and stick to it.

Life happens. Parties happen. Significant others happen. Late nights at work, school, clubs, etc. happen. These events are exciting but they tend to have a spontaneous and unbalanced grasp on our schedules.

This new year we should know our priorities…

The stress-free programming paradigm for filtering arrays and more

Photo by Rima Kruciene on Unsplash

Frankly, I’m shocked by how many programmers are oblivious to functional programming. It’s one of the most pragmatic ways to write safe, well-defined code without understanding its underlining programming principles.

Understanding the underlining principles is important, but this article is a basic introduction. It shows how functional programming can improve code readability, and then it concludes with links to additional resources.

Let’s start by filtering an array of homes with a for-loop.

class Home {
public type: "Condo" | "House",
public price: number,
) { }
const homes =…

Christopher Jeffery

Software Engineer

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