HNHacker News
TopNewBestAskShowJobs

patrck

83 karma · joined April 25, 2022

submissionscomments
patrck··on Ask HN: How do you keep track of your to-dos? longer-term projects?
TeX, Calendar file, scratch wiki

TeX for everything; it's basically `duck-talking` with snippets of code. One TeX doc per project.

Calendar file with reminders to do stuff in the future, ie. delegate to your future self.

Todos in a scratch wiki page, so notes can be scribbled from any device.

patrck··on Tools for a Culture of Writing (2021)
This needs a prefatory "Tools for a Culture of Reading".

How many colleagues will do a literature review before starting something? How many will take notes and try to understand the history of how everything got to be the way things are?

RFCs and docs are great; it just seems like they're usually secondary to the functional docs of throwing code over the progressively higher walls of git-hooks, build tests, and ops monitoring.

patrck··on Tools for a Culture of Writing (2021)
Do you keep an engineering log for yourself?

If not, then start one as that's the easiest way to review what the concerns of the day were back then, and to begin to see where having history starts paying dividends.

Otherwise, something like the principle of https://en.m.wikipedia.org/wiki/Prudent_man_rule -- ie. were you parachuted into this project, which decisions would need rationales?

patrck··on Hush, a modern shell scripting language
Every shell is a REPL

Using your editor to drive a shell is a huge win because it: (a) flips the development bit in your brain, and (b) creates a shared history across all your machines.

Combine that with literate programming and you have a `duck-talking` history of every development or outage response tied to what you actually did.

patrck··on Domain Driven Design Reference (2015) [pdf]
All-nerds, Responsibility, and Systems

Many tales of woe (see https://rachelbythebay.com/w/2022/02/09/nice/ for a good sysadm one, or the syndicated loan problem in the original DDD book) could have been avoided by people striving to learn all they can. I guess though that this is tech's Eternal September: we have too many problems, so people want to minimize the amount of work required to understand a system.

Maybe things will be better in the future?

patrck··on The temptation of writing shell scripts, illustrated
That said, not sure why `ps` isn't a better choice?

  ps -e -o size,user,comm | sort -n | tail
patrck··on The temptation of writing shell scripts, illustrated
Here's an attempt at the script. Let's golf it!

  N=10
  find /sys/fs/cgroup/ -name memory.current | while read f; do
    test -e $f || continue
    echo `cat $f` $f
  done | sort -n | tail -n $N | awk '
  match($2, /system.slice.([a-z-]*).service/, arr) {
    $2 = "/system/" arr[1];
  }
  match($2, /user.slice.user-([0-9]*).slice/, arr) {
    cmd = "id -un " arr[1];
    cmd | getline uid;
    close(cmd);
    $2 = "/u/" uid;
  }
  match($2, /cgroup.([a-z]*).slice/, arr) {
    $2 = "/system/" arr[1];
  }
  { print }'
← PreviousPage 2 of 2