In science, we make abstractions that are simplified models of reality, then we try to describe them with equations that let us make accurate predictions given the conditions assumed by the model. In this post I attempt to do that for software projects. Contents The Ideal Gas Law The Ideal Software Law The Parameters Functionality Quality Resources Time The Software Constant The form of the…
My bathroom is pretty far from the water heater. It took over a minute of running the hot water for it to actually get hot. That's a lot of water wasted every time I waited for hot water. I wanted hot water faster. Contents Recirculating Hot Water Home Automation Hardware Initial Setup Adding Devices Programming Recirculating Hot Water Last year, as part of a bathroom remodel, I had a hot water…
Imagine that you live alone. I don't mean living by yourself in an apartment or house, I mean imagine you are the only person in the world. Furthermore, imagine that no other people have ever touched the world, so that you are living in a wilderness without any of the artifacts of humanity. Kind of like Brian in Hatchet , but without the hatchet. And without any clothes or any other manufactured…
Long ago, while I was living for one year in Heidelberg, Germany, I frequented a bakery on the Hauptstrasse that sold a baked good called Butter Streusel. It was half way between a cookie and a coffee cake: not quite an inch tall, about half of that being the streusel topping, with a base that was denser and crisper than cake. I never found it at any other bakery, and when I returned to Heidelberg…
Downloading miniDV tapes from my Sony DCR-TRV22 camcorder to my Fedora 32 Linux system with a Thunderbolt 3 port was easy, using dvgrab and a couple of Apple converters to go from FireWire to Thunderbolt 3. Many years ago I transferred all my VHS home videos to disk through the somewhat painful process of first recording them onto DVDs using a DVD recorder, then ripping the DVDs on my computer. My…
Go does not support inheritance, but sometimes using embedded structs can look a little like inheritance. I explore that feature to see how it differs. Contents Introduction Base class Subclass Main and test Overriding Downcall Method promotion Solution Conclusion Introduction In lieu of inheritance, the Go language encourages composition by allowing one struct to be embedded in another struct in…
This post describes an idea for a telescope that can see where heavenly objects will be in the future. This may sound crazy, like something out of a science-fiction story, but I believe it is based on solid theory. Unless, or course, I have misinterpreted something. Read on if you enjoy considering surprising extrapolations of theory. Contents Collective Electrodynamics Interpreting the Theory The…
I have questions about how wormhole portals in science fiction stories work. Recently I started reading another science fiction novel where wormholes allow instantaneous travel between distant points. In books that use this mechanism, the author typically explores how the ability to travel easily and quickly between the stars shapes the course of history. But I always get hung up thinking about…
An example of authentication and authorization in a simple web server written in go. Contents Background Before Auth Adding Authentication Adding Authorization Summary Background As described in my previous blog post , I recently rewrote my image viewer desktop app as a web app, for which I wrote the web server in go. Since I was adding a new potential attack vector, I wanted to add security; but…
Finally, a web development environment I enjoy using. Contents Background Mimsrv What I Like Offline Development Simple Mental Model Simple Dependency Management Simple Compilation Type Safety Separation of Concerns Go http support Room for Improvement Polymer/Typescript mismatch Debugging Typescript TL;DR I have found Go to be a nice tool for developing a small web server, and Polymer +…
I delayed signing up for Frontier FiOS because I was concerned they might screw things up. I should have been more concerned. This is a long post. Consider it entertainment. Or just skip to the Answers . Contents The Need for Speed My Unusual Situation Questions Research Ordering Trouble Mistakes Good Stuff Answers Frontier's Problems Timeline Selected Quotes The Need for Speed I have had internet…
A layman's view of The Rule of Law. IANAL. Contents This I Believe The Importance of Law Prescriptive and Proscriptive Law Law versus Convention Multiple Systems of Law Meta Law Law and Software Law and Object-Oriented Programming Law and Mind This I Believe Some years ago NPR started running a series called This I Believe as a tribute to Edward R. Murrow and his original 1951 radio program of the…
What do you do when obvious isn't? Installing new fence posts Many years ago I had a fence that needed to be repaired. I got a recommendation for a fence repair man from a friend and had him come out to take a look. He said the panels between the posts were fine and did not need to be replaced, I just needed new posts. He quoted me a price for installing new fence posts that seemed quite…
A list of basic goals for creating code. In our team project at work, we wanted to have a set of style guidelines to allow everyone to more easily and quickly read the codebase and to avoid spurious code reformatting changes. As you might expect, there were different opinions on many points. To avoid fruitless "my way is just better" discussions, I wanted to step back and make sure we could all…
A simple, uniform, powerful and extensible authorization model. Introduction Separation of Concerns Users Actions Objects Roles Role Activation Role Hierarchies Alternate Hierarchy Implementations Interlude Tasks Domains Intermediate Summary Times, Periods and Schedules Locations, Areas and Regions Denials Exceptions Prioritization Summary Introduction The "three As" of security are:…
Not all git merge conflicts are real. Contents The Scenario The Problem The Solution The Scenario In both my personal and my work projects I prefer to use git rebase to keep my commit histories simple and readable. To make this work in a team setting, we never work on the master branch, instead always working on a feature branch in our local repositories. Our process flow looks something like…
An attempt to improve the objectivity of skill self-ratings. Contents Discussion Scale References Discussion We are often asked to rate things on a scale, typically 1 to 5 or 1 to 10. Rarely is there an attempt to define what those different numbers mean. From a statistician's point of view, this makes the values useful for the sole purpose of comparing a single individual's ratings against other…
Two simple mechanisms for debugging parsers written using Scala's parser combinators. Contents Introduction Example Parser Calling Individual Parsers Tracing Updated Example Introduction In a recent comment on my 2008 blog post about Scala's parser combinators, a reader asked how one might go about debugging such a parser. As one post says, "Debugging a parser implemented with the help of a…
Multithread Coroutine Scheduler A scheduler that uses multiple worker threads for continuations-based Scala coroutines. In my recent series of posts that ended with a complete Scala server that uses continuations-based coroutines to store per-client state, I asserted that the single-threaded scheduler implementation in that example could relatively easily be replaced by a scheduler that uses…
Words are tools that we use to clarify our concepts, express our emotions and persuade others to our positions. We use those tools to craft mental models which we deliver to our listener. The better the job we do with those tools, the more effectively we can communicate our message. The words we use every day are our basic tools. Like screwdrivers and pliers, these words are simple but versatile,…
The capstone to this series of posts: a complete multi-client stateful application server in Scala using Java NIO non-blocking IO for both reading and writing, and delimited continuations as coroutines for both IO and application processing. Contents Background NioApplication NioServer NioListener NioConnection EchoServer ThreeQuestionsServer Limitations Background In the initial post of this…
Using Java NIO non-blocking IO for writing as well as reading is almost - but not quite - straightforward. Contents Background Implementation Two Selectors Close Summary Background One of the limitations pointed out in the Limitations section of the original post in this series was that we were still directly writing our output data to the socket rather than using non-blocking IO and continuations…
I present a multi-client server in Scala that uses coroutines to allow modularization of stateful client processing in a way that is independent of threads. Contents Background Coroutines Architecture NioSelector CoScheduler CoQueue NioConnection LineDecoder NioListener NioServer Summary Caveats Background In my previous two posts I presented a server in Scala that uses Java NIO non-blocking IO…
The Java NIO package includes some handy character encoding and decoding methods that can be used from Scala. Contents Background Java NIO Character Coders LineDecoder NioConnection Limitations Background In my previous post I described a simple Scala server using NIO and continuations, and mentioned in the Limitations section that the example did not convert the data bytes to characters. In this…