I LOVE me some small functions/methods. For work I am implementing a class that replaces occurrences of the German “SZ” ß/ẞ. Here are some of the methods:

  • replaceSz
  • includesSz
  • includesSmallSz
  • includesBigSz

Am I going too far? 😅 I feel that “mini methods” like these make code more understandable, because you only have to grok either the implementations or the composed logical blocks, but not both at the same time. Also stack traces become better and debugging is easier.

I am almost reluctant to write this down (because some people might not be able to use this tip), but: Do not underestimate the power of screenshots in your own private notes! Instead of writing things down twice - or even copy & pasting, consider a screenshot for some of your things - especially those that profit from a little visual context.

Back to posting from my blog first and crossposting - transparently - to Mastodon. It seems worth it to me to do it like that and have my posts originate from my blog. Will anybody else but me care? Probably not. But I do.