About the Author
Lou Mauget

Lou Mauget

Known as Ed Mauget in civilian life. Lou is a name imposed by IBM in 1966. Newly infatuated with Microservices Architecture. In 2015 I coded MockOla, a wire-framing tool for Keyhole Software. Have coded in Java since it was conceived. Also worked with C/C++. Current interests include microservices, Docker, Node JS, NoSQL databases, functional programming, single-page web applications ... any new software languages/frameworks.

better sort in JavaScript

Better Sort Ordering in JavaScript

Lou Mauget Development Technologies, JavaScript, Programming, Tutorial Leave a Comment

In this post, I show how to cajole Array.sort() into producing the following order. This: [Item 1, Item 2, Item 100] instead of this…[Item 1, Item 100, Item 2].

The answer is to pass the sort function a comparator argument from the International Collator built into every major browser and Node.js. This approach is simple and declarative for lists of flat strings. The comparison function arguments default to each string being compared. For sorting objects such as a list of dropdown choices, just pass a pair of the sort field drill-downs to the comparison function.

Cancel a React Modal with Escape Key or External Click

Lou Mauget Development Technologies, React, Tutorial Leave a Comment

Web application users are accustomed to canceling a popup (aka dialog or modal) by pressing the escape key, and many modals can even cancel if the user clicks outside it. How does a React developer code that without a plumbing mess between the modal and every visible component beneath it? How do you cancel a React modal with an escape key or external click?

I’m glad you asked because I have an answer. In this blog, I’ll show a pair of easy-to-use custom React hooks that simplify the task.

Kubernetes on Raspberry Pi

Kubernetes on Raspberry Pi

Lou Mauget Cloud, Development Technologies, Kubernetes, Tutorial 2 Comments

Kubernetes, or k8s, is an important container orchestration platform. In this blog, I’ll describe creating a workable Kubernetes cluster implemented on a stack of four Raspberry Pi boards. In the end, I’ll have provided an outline of how I created it and I’ll show how to replicate a stateless app across Kubernetes pods running on the nodes — the Pi boards.

Apple Silicon for Dev

Apple Silicon for Development

Lou Mauget Development Technologies, Programming Leave a Comment

In June, Apple announced a two-year transition from Intel to Apple Silicon for the iMac and MacBook line. I knew Apple had lost their mind. But, before Christmas, I owned my very own chunk of Apple Silicon living in an attractive milled-aluminum case.

In this article, I’ll discuss the Apple M1 silicon-on-a-chip (SoC) used as a software development computer. I’ll cover installation, and I’ll also talk through running apps that support development on my M1.

Create a modal with styled components

Cook Your Own Modal with Styled Components

Lou Mauget Development Technologies, JavaScript, React, Tutorial Leave a Comment

I created several JavaScript modal dialogs – I always extend a framework modal instead of scratch-coding my own. I thought I knew the things a framework needs to implement in order to present a modal but did I? There was only one way to find out: cook my own JS browser modal, and that is exactly what we’ll do in this post.

In this blog, I’ll cover a short approach to hand-coding your own modal with Styled Components. You can find the entire project on GitHub.