Compare commits

..

No commits in common. "master" and "2" have entirely different histories.
master ... 2

6 changed files with 95 additions and 150 deletions

55
.drone.yml Normal file
View file

@ -0,0 +1,55 @@
name: test
kind: pipeline
steps:
- name: linting
image: docker.atomaka.com/mdformat
commands:
- mdformat --check _posts/
- name: jekyll-build
image: ruby
commands:
- gem install bundler
- bundle install
- bundle exec jekyll build
trigger:
branch:
exclude: master
event: push
---
name: deploy
kind: pipeline
steps:
- name: jekyll-build
image: ruby
commands:
- gem install bundler
- bundle install
- bundle exec jekyll build
- name: docker-build
image: plugins/docker
settings:
pull_image: true
registry: docker.atomaka.com
repo: docker.atomaka.com/atomaka.com
tags:
- latest
- ${DRONE_TAG}
- name: deploy
image: appleboy/drone-ssh
settings:
host:
from_secret: unraid_host
username:
from_secret: unraid_username
key:
from_secret: unraid_ssh_key
script:
- docker pull docker.atomaka.com/atomaka.com:latest
- docker restart atomaka.com
trigger:
event: tag

View file

@ -1,37 +0,0 @@
name: Deploy
on:
push:
tags:
- '*'
jobs:
deploy:
runs-on: cth-ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: https://github.com/ruby/setup-ruby@v1
with:
ruby-version: 3.3.5
- run: |
gem install bundler
bundle install
bundle exec jekyll build
- name: Set up Docker Buildx
uses: https://github.com/docker/setup-buildx-action@v3
- run: |
ls -la .
ls -la _site/
pwd
- name: Push image
uses: https://github.com/docker/build-push-action@v6
with:
context: .
push: true
tags: |
docker.atomaka.com/atomaka.com:latest
docker.atomaka.com/atomaka.com:${{gitea.ref_name}}
- name: Deploy to server
run: |
curl --oauth2-bearer ${{ secrets.WATCHTOWER_TOKEN }} \
${{ secrets.WATCHTOWER_HOST }}/v1/update?images=docker.atomaka.com/atomaka.com

View file

@ -1,28 +0,0 @@
name: Linting
on:
pull_request:
jobs:
lint:
runs-on: cth-ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: https://github.com/addnab/docker-run-action@v3
with:
image: docker.atomaka.com/mdformat:latest
options: --volumes-from=${{ env.JOB_CONTAINER_NAME }}
run: |
cd ${{ github.workspace }}
mdformat --check _posts/
build:
runs-on: cth-ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: https://github.com/ruby/setup-ruby@v1
with:
ruby-version: 3.3.5
- run: |
gem install bundler
bundle install
bundle exec jekyll build

View file

@ -10,48 +10,39 @@ GIT
GIT GIT
remote: https://github.com/jekyll/jekyll-import remote: https://github.com/jekyll/jekyll-import
revision: a8bdf6836c889e99b096375544ee53d417d4f5e5 revision: 6499317a81aeda119b6ceefb37ab81c9f6219659
specs: specs:
jekyll-import (0.24.0) jekyll-import (0.21.0)
jekyll (>= 3.7, < 5.0) jekyll (>= 3.7, < 5.0)
nokogiri (~> 1.0) nokogiri (~> 1.0)
reverse_markdown (>= 2.1, < 4.0) reverse_markdown (~> 2.1)
GEM GEM
remote: https://rubygems.org/ remote: https://rubygems.org/
specs: specs:
addressable (2.8.7) addressable (2.8.1)
public_suffix (>= 2.0.2, < 7.0) public_suffix (>= 2.0.2, < 6.0)
bigdecimal (3.1.8) chef-utils (18.1.0)
chef-utils (18.5.0)
concurrent-ruby concurrent-ruby
colorator (1.1.0) colorator (1.1.0)
concurrent-ruby (1.3.4) concurrent-ruby (1.2.0)
em-websocket (0.5.3) em-websocket (0.5.3)
eventmachine (>= 0.12.9) eventmachine (>= 0.12.9)
http_parser.rb (~> 0) http_parser.rb (~> 0)
eventmachine (1.2.7) eventmachine (1.2.7)
faraday (2.12.0) faraday (2.7.4)
faraday-net_http (>= 2.0, < 3.4) faraday-net_http (>= 2.0, < 3.1)
json ruby2_keywords (>= 0.0.4)
logger faraday-net_http (3.0.2)
faraday-net_http (3.3.0) ffi (1.15.5)
net-http
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
forwardable-extended (2.6.0) forwardable-extended (2.6.0)
google-protobuf (4.28.3-arm64-darwin) google-protobuf (3.21.12-x86_64-linux)
bigdecimal htmlbeautifier (1.4.2)
rake (>= 13)
google-protobuf (4.28.3-x86_64-linux)
bigdecimal
rake (>= 13)
htmlbeautifier (1.4.3)
htmlcompressor (0.4.0) htmlcompressor (0.4.0)
http_parser.rb (0.8.0) http_parser.rb (0.8.0)
i18n (1.14.6) i18n (1.12.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jekyll (4.3.4) jekyll (4.3.2)
addressable (~> 2.4) addressable (~> 2.4)
colorator (~> 1.0) colorator (~> 1.0)
em-websocket (~> 0.5) em-websocket (~> 0.5)
@ -83,72 +74,64 @@ GEM
jekyll jekyll
jekyll-watch (2.2.1) jekyll-watch (2.2.1)
listen (~> 3.0) listen (~> 3.0)
json (2.8.1)
kramdown (2.4.0) kramdown (2.4.0)
rexml rexml
kramdown-parser-gfm (1.1.0) kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0) kramdown (~> 2.0)
liquid (4.0.4) liquid (4.0.4)
listen (3.9.0) listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3) rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10) rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.1) mdl (0.12.0)
mdl (0.13.0)
kramdown (~> 2.3) kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.1) kramdown-parser-gfm (~> 1.1)
mixlib-cli (~> 2.1, >= 2.1.1) mixlib-cli (~> 2.1, >= 2.1.1)
mixlib-config (>= 2.2.1, < 4) mixlib-config (>= 2.2.1, < 4)
mixlib-shellout mixlib-shellout
mercenary (0.4.0) mercenary (0.4.0)
minima (2.5.2) minima (2.5.1)
jekyll (>= 3.5, < 5.0) jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9) jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1) jekyll-seo-tag (~> 2.1)
mixlib-cli (2.1.8) mixlib-cli (2.1.8)
mixlib-config (3.0.27) mixlib-config (3.0.27)
tomlrb tomlrb
mixlib-shellout (3.3.4) mixlib-shellout (3.2.7)
chef-utils chef-utils
net-http (0.5.0) nokogiri (1.14.1-x86_64-linux)
uri
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4) racc (~> 1.4)
octokit (4.25.1) octokit (4.25.1)
faraday (>= 1, < 3) faraday (>= 1, < 3)
sawyer (~> 0.9) sawyer (~> 0.9)
pathutil (0.16.2) pathutil (0.16.2)
forwardable-extended (~> 2.6) forwardable-extended (~> 2.6)
public_suffix (6.0.1) public_suffix (5.0.1)
racc (1.8.1) racc (1.6.2)
rake (13.2.1) rake (13.0.6)
rb-fsevent (0.11.2) rb-fsevent (0.11.2)
rb-inotify (0.11.1) rb-inotify (0.10.1)
ffi (~> 1.0) ffi (~> 1.0)
reverse_markdown (3.0.0) reverse_markdown (2.1.1)
nokogiri nokogiri
rexml (3.3.9) rexml (3.2.5)
rouge (4.4.0) rouge (4.0.1)
rss (0.3.1) rss (0.2.9)
rexml rexml
ruby2_keywords (0.0.5)
safe_yaml (1.0.5) safe_yaml (1.0.5)
sass-embedded (1.80.6-arm64-darwin) sass-embedded (1.58.0)
google-protobuf (~> 4.28) google-protobuf (~> 3.21)
sass-embedded (1.80.6-x86_64-linux-gnu) rake (>= 10.0.0)
google-protobuf (~> 4.28)
sawyer (0.9.2) sawyer (0.9.2)
addressable (>= 2.3.5) addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3) faraday (>= 0.17.3, < 3)
terminal-table (3.0.2) terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3) unicode-display_width (>= 1.1.1, < 3)
tomlrb (2.0.3) tomlrb (2.0.3)
unicode-display_width (2.6.0) unicode-display_width (2.4.2)
uri (0.13.1) webrick (1.8.1)
webrick (1.9.0)
PLATFORMS PLATFORMS
arm64-darwin-23
x86_64-linux x86_64-linux
DEPENDENCIES DEPENDENCIES
@ -169,4 +152,4 @@ DEPENDENCIES
wdm (~> 0.1.1) wdm (~> 0.1.1)
BUNDLED WITH BUNDLED WITH
2.5.18 2.3.26

View file

@ -11,6 +11,10 @@ entries:
url: https://github.com/atomaka url: https://github.com/atomaka
- title: emailing - title: emailing
url: mailto:atomaka@atomaka.com url: mailto:atomaka@atomaka.com
- title: speaking
url: https://slides.com/atomaka
- title: tooting
url: https://pub.atomaka.com/@atomaka
- title: working - title: working
url: https://www.linkedin.com/in/atomaka url: https://www.linkedin.com/in/atomaka

View file

@ -1,32 +0,0 @@
---
layout: post
title: Delete your code
date: 2023-07-07 13:20 -0400
---
One of the most consistent things I have observed over the last two decades
while working with software engineering teams is an unwillingness to delete
code. Functions and files left long after they have been replaced. Hundred
line blocks of commented code held on to for years. Single purpose tasks kept
in place just in case. We developers are always planning for the worst.
Don't get me wrong. I have lived the same life. Leaving around treasure troves
of code I had carefully crafted just incase I needed it in the future. But what
if the worst thing that could happen is that we have given ourselves more code
to maintain. Or that we have left behind an outdated trail to follow that
influences are decisions despite drastically changed requirements. Or that the
dead code becomes a ticking time-bomb of likely untested code waiting to
accidentally be interpretted.
Code is only an asset when it is directly providing the required functionality.
Anything beyond that is a liability. Even if it is never run in production,
it still needs to be maintained. It needs to be reviewed and updated when
deprecations pop up, revisited when its automated tests start failing, or
breakfixed when it somehow halts the application boot cycle. Every line that
is not executed is maintenance cost waiting to be incurred that provides no
value.
These days, I aggressively delete lines of my code bases as much as the teams I
work with allow for. I strive for PRs that have more deletions than additions.
And if I ever really need that deleted piece of code? That is what version
control is for.