I'm an experienced web developer, software engineer, and leader. Welcome to my blog. If you need to reach out you can continue the conversation with a tweet to @geedew. I hope you find what you are looking for here. You can also find me on Github and StackOverflow.

Remove a directory that is not empty in NodeJS

A quick pro-tip for handling this situation.

NodeJS provides an easy to use fs.rmdir command that follows the POSIX standard. This unfortunately means that it will error ENOTEMPTY if there is any file in the directory you are attempting to remove. NodeJS doesn’t have an easy way to force the removal, so you have to get fancy.

By far, the easiest, safest and most cross environment approach is to use rimraf whose source code shows nearly 250 lines of premium quality work.

It’s 2018, use del.

Or if you must, try trash. It’s really neat too.

/ / / Read More

Cross platform symlinks

Why a symlink

Many times when working with hosting apps, there comes a time or a need to have certain code in more than one place at the same time. To accomplish this, a ‘symlink’ can be used. For example, a basic NGinx or Apache server will have a path to host files on like /var/www/my-site/. It would not be recommended to have the code exist within that path directly though, as that would create a lot of complications when attempting to do simple updates or roll back code quickly. It’s much easier in this simple case to have /home/user/code/v1/ also be /var/www/my-site so when v2 is created, it can now be /var/www/my-site instead of v1. Symlinks allow for this, and are the preferred mechanism.

/ / / Read More

Generating Docs from Google Sheets

Google Sheets allows for App Scripts to be ran which can provide robust, custom automatic reporting. The example outlined below may require some customization of code, but that could be made more efficient with some effort. Turning the App Script into an Add-on also allows for sharing report creation with others. An example could be running a report of expenditures from a Sheet filled with expenses. It’s possible to run a report from a Sheet so that Docs are automatically generated.

/ / / Read More

Tips to Growing a Developer Team Effectively

At some point a successful engineering team will be faced with growth. Growth is a critical path that will bring stress and complications to a team. Growth is a factor for risk and making mistakes can corrupt the culture and bring a project to a halt. The following are a few tips to help avoid issues.

Teams will be made or broken by communication. If communication fails, and trust is abandonded, the team would have been better off if they hired no one.

/ / / Read More

Fixing GIT Branch and Tag Name Collisions

A basic understanding in Git is that Tags are aliases to a commit hash (A single entry in the history of commits) whereas a Branch is the name for a diverged chain of commits that share a common history and ancestor. Confusion can be had when assuming a branch is always the HEAD, or most recent, commit in the fork of the code. While this can be true, this is not what a Branch represents and may lead to Tags being used interchangeably with Branches. When Tags and Branches are both used, they give flexibility to teams to share commit history and easily communicate important changes in code, but naming them similarly will lead to collisions if not well thought out.

Take care naming tags and branches to keep from confusing Git

/ / / Read More