Full-stack web application developer specializing in web accessibility
Open Source Projects
Dockerizing an Erlang app
Posted on | Updated on
OTP application, Emakefile, EUnit
This project began as a simple 'hello world' exploration of the Erlang language which was later organized into an OTP application directory structure using an Emakefile to compile multiple source files and enable separation of source, test, and .beam files. EUnit was also added for unit testing.
Docker, Docker Compose, Dev containers
Adding Docker changed the build from running in the Erlang shell, to using the Docker container's interactive shell. The Dockerfile (1.) compiled a small Erlang program to produce a BEAM file that could then be executed on the Erlang VM, and (2.) ran the sequential Erlang program as a common script and then exited.
In the next version (v0.2.0), Rebar3 — a build tool and package manager for Erlang — was used to auto-generate the application structure (in a subdirectory, subsequently moved into the root). Note: Rebar3 does not replace the OTP file structure, instead it enables building OTP-compliant applications. The 'hello.erl' example was also updated.
Component architecture
Posted on
The elections-carousel-component project consists of a collection of components that receive election results data from an external API and display it as a carousel.
Screenshot of elections-carousel-component
The component hierarchy is shown in Figure 1, which illustrates the nesting of the seven component types (eight types, if the ErrorBoundary component is counted).
All of the components are written in pure React (ie. not using Flux or Redux since this is a simple demo), and pass data to one another as shown below:
Figure 2: React components' data loop
Full source code for the project is available on GitHub.
git-add-msg is a command-line tool that I developed to save time (and typing) when using Git alone, or with Trac. Instead of typing the following (in your project's root directory):
Figure 1. Shell commands required before installing git-add-msg
$ git add .
$ git commit -am "this is my commit message"
# or for Trac users:
$ git commit -am "#123: this is my commit message"
Figure 2. Only one (shell) command is required after installing git-add-msg
$ git add-msg
There is no follow-up cutting-and-pasting of commit hashes to Trac required either, since a comment with a link to the changeset and repository (as well as the commit message itself) is automatically added to the specified Trac ticket. The $ git log information for each commit is added to a plain text changelog file as well — which could be copied or attached to another issue-tracking or ticketing system, if desired.
Features
Features of git-add-msg (version 0.1.1) include:
Supports multi-line commit messages (note: supported yes, but display is a known issue...);
Enforces non-blank commit messages;
Automatically generates link to changeset including repository name in the Trac ticket comment (useful when more than one repo is being used per same Trac environment);
Enables changing the name of the repository associated with Trac ticket using the -r option;
Displays an error message if the Trac ticket is not/cannot be updated.