Ask for a Clock Dec 11, 2020

When writing code that needs the current time, don’t hardcode a reference to the current time.

Timezones and Calendars on the Command Line Dec 10, 2020

When programming, you may have to work with dates and times in different time-zones, or look at events in calendars in the past or future. You can do all of these using GUI tools, but your Unix command-line is there for you (and easier to script).

Kotlin Calling Java: Mind Your nulls Dec 09, 2020

If you’re introducing Kotlin to an existing Java codebase, you’ll probably have places in your code where new Kotlin code has to call existing Java code, or vice-versa. Kotlin’s default behavior for Java interop poses a subtle, but significant safety problem with nullability.

Program for Yourself First Dec 09, 2020 First program to empower yourself, then program to solve the problem
Command Line Clipboard Manipulation Dec 08, 2020

When working on the command-line, it’s often useful to paste from the system clipboard to a command-line tool, or to copy output from the command-line into your system clipboard.

On macOS, pbcopy and pbpaste do this. On Linux, you can use xclip or xsel.

Bash Curly Brace Expansion Dec 08, 2020

Bash/Zsh curly-brace expansion is simple but powerful: each permutation enclosed in braces is expanded, recursively, before glob expansion: