JavaScript Getter/Setter Danger
I recently made a mistake I’ve made before. This time decided to never again use get or set in JavaScript. I simplified a class to show the problem. Here’s some code without any issues Everything works great. I can put checks in the setter to ensure the value it is set to is a positive […]
JavaScript Enum
Details of a JavaScript Enum class I wrote and how I use it for typed enums, integers, and bit flags.
Multi-window JavaScript App
I describe everything I know about JavaScript window.open() and how it can be used in multi-window applications.
Get JavaScript Instance Methods
It’s been a while since I needed to list a JavaScript object’s methods at runtime, but I needed to do it recently. I tried what I thought I used to do: no luck. So I looked on google; checked with chatGPT; and looked on StackOverflow. Most of what I found was along the lines of […]
Computing History – Ada Lovelace
Ada Lovelace is generally considered to be the first computer programmer in history. Some people argue that Charles Babbage wrote algorithms before her and she was aware of them from correspondence with him. Even if true, she Modern programming takes less from Babbage’s work on a computing engine that can manipulate numbers better than humans; […]
Software Coupling (Part 2 – OO)
I provided a brief introduction to coupling in part 1. This article is specifically aimed at coupling in object-oriented systems. There are academic ways of Measuring Cohesion and Coupling of Object-Oriented Systems. And there are formal explanations of types of coupling and cohesion and complexity metrics. I’m ignoring academia and formality and measures. I’ll explain […]
Software Coupling (Part 1)
When I first started programming, a lot of thought was put into minimizing coupling. We wanted everything to be as loosely coupled as possible. Object hierarchies tend to be tightly coupled so we put effort into designing modules or packages that were loosely coupled with each other even though the objects inside were tightly coupled. […]
ETag in .NET Minimal API
I implemented ETag in my .NET Minimal API server today. If you don’t know what an Entity Tag is, google has plenty of suggestions. The simple explanation is that There are many good articles showing how to implement them in .NET Core or middleware. But I wanted Minimal API and didn’t want to do it […]
DOM Element.replaceChildren()
My Problem I’m working on an application to view at least 40,000 media files. I was surprised when I first put 40k files in the view container. Scrolling was as smooth as if I had 400 files. Or 40. Chrome was great when an element had 40k children. Then I tried to do things other […]
Javascript IndexedDB Intro
There are a lot of great tutorials that go into a lot of depth on database theory and terminology and allow the power of IndexedDB. If you want that, this is not the right article for you. I’ve literally written a relational database engine (not SQL, but the services that manage data and indices and […]