New year. New sprint.
This commit is contained in:
parent
5ac74fadce
commit
c38243eb0a
2 changed files with 62 additions and 29 deletions
|
@ -8,7 +8,7 @@ A literate program for configuring org files for work-related notes.
|
|||
#+begin_src emacs-lisp :exports none
|
||||
;;; org-sprint --- Configuring org files for work-related notes. -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; © 2020-2024 Howard X. Abrams
|
||||
;; © 2020-2025 Howard X. Abrams
|
||||
;; Licensed under a Creative Commons Attribution 4.0 International License.
|
||||
;; See http://creativecommons.org/licenses/by/4.0/
|
||||
;;
|
||||
|
@ -43,10 +43,40 @@ I give each sprint a nickname, based on a /theme/ of some sorts, alphabetized. S
|
|||
|
||||
At the beginning of the year, I choose a theme, and make a list for the upcoming sprints. In the org file, this is a list, that gets /tangled/ into an actual Emacs LIsp list. This is pretty cool.
|
||||
|
||||
#+begin_src emacs-lisp :var sprint-names=sprint-names-2024
|
||||
#+begin_src emacs-lisp :var sprint-names=sprint-names-2025
|
||||
(defvar sprint-nicknames sprint-names
|
||||
"List of 26 Sprint Nicknames from A to Z.")
|
||||
#+end_src
|
||||
** 2025
|
||||
This year is the animals representing corporate slogans:
|
||||
|
||||
#+name: sprint-names-2025
|
||||
- Accelerated and Adaptive Ant
|
||||
- Buy-in Bee and Blue-sky Bull
|
||||
- Circle-Back Contingency Cat
|
||||
- Dirty Deploying Dog
|
||||
- End Game Echidna (E-tail)
|
||||
- Future Forward Fox
|
||||
- Growth Hack Hippo
|
||||
- Honest Abe Conversation
|
||||
- Interactive Ibex
|
||||
- Catalyst for Change Jaguar
|
||||
- Knowledge-based Kid
|
||||
- Lettuce Align on Logistical Innovating Leopard
|
||||
- Market Moving Moose
|
||||
- Software as a Service Snipe
|
||||
- Outside-the-Box Ostrich
|
||||
- Pivot Point Penguin and Paradigm Shift Porpoise
|
||||
- Quality Controlling Quakka
|
||||
- Revenue Ride Rhino
|
||||
- Synergy Snake
|
||||
- Transformational Tiger
|
||||
- Uber-Efficient Urchin
|
||||
- Vertical Value Add Vole
|
||||
- Web-based Initiative Whale (Win-Win)
|
||||
- Challenging Left-Field Assumptions
|
||||
– Bitcoin, Bitcoin, Bitcoin
|
||||
- Low-Hanging Fruitbat
|
||||
** 2024
|
||||
How about Tabaxi names this year … especially since my next character has to be a cat man.
|
||||
#+name: sprint-names-2024
|
||||
|
@ -250,6 +280,14 @@ Emacs have an internal rep of a time.
|
|||
|
||||
** Sprint Numbering
|
||||
|
||||
Each year, specify the first day of the first sprint of the year:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defvar sprint-start-date (get-date-time "2025-01-14")
|
||||
"The date of the first day of the first sprint of the year.
|
||||
See `sprint-range'.")
|
||||
#+END_SRC
|
||||
|
||||
My Sprint starts on Tuesday, but this sometimes changed, so let's make this a variable:
|
||||
#+begin_src emacs-lisp
|
||||
(defvar sprint-starting-day 2 "The day of the week the sprint begins, where 0 is Sunday.")
|
||||
|
@ -258,7 +296,7 @@ My Sprint starts on Tuesday, but this sometimes changed, so let's make this a va
|
|||
We seem to never start our Sprints correctly, and we seem to like offsets:
|
||||
#+begin_src emacs-lisp
|
||||
;; CHANGEME Each year as this never matches:
|
||||
(defvar sprint-offset-value 11 "The number of the first sprint.")
|
||||
(defvar sprint-offset-value 0 "The number of the first sprint.")
|
||||
#+end_src
|
||||
|
||||
We label our sprint based on the week number that it starts. Note that on a Monday, I want to consider that we are still numbering from last week.
|
||||
|
@ -279,6 +317,9 @@ We label our sprint based on the week number that it starts. Note that on a Mond
|
|||
Let's have these tests to make of this /weekly/ perspective:
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(ert-deftest sprint-week-num-test ()
|
||||
(should (= (sprint-week-num "2025-01-13") 2)) ; Monday previous week
|
||||
(should (= (sprint-week-num "2025-01-14") 3)) ; Monday previous week
|
||||
|
||||
(should (= (sprint-week-num "2024-01-01") 0)) ; Monday previous week
|
||||
(should (= (sprint-week-num "2024-01-02") 1)) ; Tuesday ... this week
|
||||
(should (= (sprint-week-num "2024-01-09") 2)) ; Monday, next week, part of last
|
||||
|
@ -294,27 +335,23 @@ This year, my PM decided to start the sprints sequentially starting with 11, so
|
|||
"Return the current sprint number, with some assumptions that
|
||||
each sprint is two weeks long, starting on Tuesday."
|
||||
(let* ((num (sprint-week-num date))
|
||||
;; Depending on how late we wait to start the sprint, the
|
||||
;; new sprint may be on an oddp or evenp week:
|
||||
(bucket (if (cl-oddp num) num (1- num))))
|
||||
(thread-first bucket
|
||||
;; Make 2 week sprints sequential:
|
||||
(/ 2)
|
||||
;; Sprint offset number:
|
||||
;; (+ sprint-offset-value)
|
||||
1+
|
||||
)))
|
||||
(- sprint-offset-value))))
|
||||
#+end_src
|
||||
|
||||
And some tests to verify that:
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(ert-deftest sprint-number-test ()
|
||||
(should (= (sprint-number "2024-01-02") 1))
|
||||
(should (= (sprint-number "2024-01-10") 1))
|
||||
(should (= (sprint-number "2024-01-15") 1))
|
||||
(should (= (sprint-number "2024-01-16") 2))
|
||||
(should (= (sprint-number "2024-01-23") 2))
|
||||
(should (= (sprint-number "2024-01-29") 2))
|
||||
(should (= (sprint-number "2024-01-30") 3))
|
||||
(should (= (sprint-number "2024-02-13") 4)))
|
||||
(should (= (sprint-number "2025-01-13") 0))
|
||||
(should (= (sprint-number "2025-01-14") 1))
|
||||
(should (= (sprint-number "2025-01-21") 1))
|
||||
(should (= (sprint-number "2025-01-28") 2)))
|
||||
#+end_src
|
||||
** Sprint File Name
|
||||
I create my org-file notes based on the Sprint number.
|
||||
|
@ -377,7 +414,6 @@ These test won't pass any more, as the nickname of the sprint changes from year
|
|||
I want to print the beginning and ending of the sprint, where we have a sprint number or a data, and we can give the dates that bound the sprint. This odd function calculates this based on knowing the date of the /first Tuesday/ of the year, so I need to begin the year changing this value. I should fix this.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
;; (setq number-or-date "2024-01-16")
|
||||
(defun sprint-range (&optional number-or-date)
|
||||
"Return a list of three entries, start of the current sprint,
|
||||
end of the current sprint, and the start of the next sprint.
|
||||
|
@ -386,10 +422,7 @@ I want to print the beginning and ending of the sprint, where we have a sprint n
|
|||
(let* ((num (if (or (null number-or-date) (stringp number-or-date))
|
||||
(* 2 (1- (sprint-number number-or-date)))
|
||||
(1- number-or-date)))
|
||||
;; CHANGEME each year to mark the first day of the first sprint:
|
||||
(time-start (-> "2024-01-02" ; Converted to time
|
||||
get-date-time
|
||||
float-time))
|
||||
(time-start (float-time sprint-start-date))
|
||||
(day-length (* 3600 24)) ; Length of day in seconds
|
||||
(week-length (* day-length 7))
|
||||
(sprint-start (time-add time-start (* week-length num)))
|
||||
|
@ -433,7 +466,7 @@ Due to the regularity of the sprint cadence, I can pre-schedule meetings and oth
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(defun sprint-date-from-start (days &optional formatter)
|
||||
"Given a number of DAYS from the start of the sprint, return a formatted date string."
|
||||
"Return formatted date string from number of DAYS from the start of the sprint."
|
||||
(let* ((day-length (* 3600 24))
|
||||
(start (car (sprint-range)))
|
||||
(adate (time-add start (* day-length days))))
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#+title: `(sprint-current-name)`
|
||||
#+author: `user-full-name`
|
||||
#+email: `user-mail-address`
|
||||
#+date: `(sprint-date-range)`
|
||||
#+category: sprint
|
||||
#+filetags: :work:
|
||||
#+TITLE: `(sprint-current-name)`
|
||||
#+AUTHOR: `user-full-name`
|
||||
#+EMAIL: `user-mail-address`
|
||||
#+DATE: `(sprint-date-range)`
|
||||
#+CATEGORY: sprint
|
||||
#+FILETAGS: :work:
|
||||
|
||||
* Work Issues
|
||||
$0
|
||||
|
@ -20,9 +20,9 @@ Anything that doesn't fit the above goes here.
|
|||
* Notes for Next Sprint
|
||||
|
||||
|
||||
#+description: Notes taken during Sprint #`(sprint-number)`
|
||||
#+property: header-args: :results drawer :tangle no :eval no-export :comments org
|
||||
#+options: num:nil toc:t todo:nil tasks:nil tags:nil skip:nil author:nil email:nil creator:nil timestamp:nil ^:nil
|
||||
#+DESCRIPTION: Notes taken during Sprint #`(sprint-number)`
|
||||
#+PROPERTY: header-args: :results drawer :tangle no :eval no-export :comments org
|
||||
#+OPTIONS: num:nil toc:t todo:nil tasks:nil tags:nil skip:nil author:nil email:nil creator:nil timestamp:nil ^:nil
|
||||
|
||||
# Local Variables:
|
||||
# eval: (org-content 2)
|
||||
|
|
Loading…
Reference in a new issue