Skip to content

Instantly share code, notes, and snippets.

@dtoma
Last active June 5, 2019 10:21
Show Gist options
  • Save dtoma/7b5c09b18ae0c088738b776600e5ea22 to your computer and use it in GitHub Desktop.
Save dtoma/7b5c09b18ae0c088738b776600e5ea22 to your computer and use it in GitHub Desktop.
Enterprise code

Incremental improvements

Clean repos

  • Clean up unused branches
  • Merge remaining branches incrementally

Checkout/build default to green

Ensure all repos can be cloned & built. Can be as simple as a cron job running a script like:

#!/bin/bash

readonly REPO_URL_ROOT="https://..."
declare -a arr=("repo_1_name" "repo_2_name" "repo_3_name" "...")

for i in "${arr[@]}"
do
   git clone "${REPO_URL_ROOT}/${i}"
   cd "${i}" && make
done

Ensure build is not flaky

Example: recursive make issues, pip version not pinned...

Enable basic warnings/linting

For example, if working on a C++ code base, the compiler should at least use -Wall -Wextra, and warnings should be adressed. A similar idea for python projects: flake8 and a few pylint checks (example config file).

Leverage standard library data structures & algorithms

A few simple black box/integration tests

Reduce fragmentation

Example: 10 different projects built on 3 similar frameworks. Picked one, cleaned it up, and slowly rebuilt the rest on the same platform over time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment