Dragons Versus Minstrels

This is a repost of an article I wrote for my company blog ages back thinking about how people deal with knowledge based jobs.

When it comes to how people handle knowledge in their professional lives, you find two ends of the spectrum: Dragons and Minstrels.

Dragons love to hoard what they know.

They tend to amass a wealth of useful information, and if you get the chance to look at some of the things that they're sitting on, you find rare gems that haven't seen the light of day in generations.

Unfortunately, dragons aren't all that good at sharing. The knowledge they've store away is, in their minds, a form of job security, and woe betide the poor mortal who tries to ask for something. Dragons will roast you alive, or bite your head off.

It's a shame, really. Knowledge is the life blood of a company in the modern age, and so allowing a dragon to keep that to themselves is a disservice to the company as a whole. In every story, dragons are eventually slain, because the hoard they obtained made them a target.

On the other side of the spectrum, you've got the Minstrel. Like all good things, information sharing can be taken to extremes.

Minstrels are the ones that never seem to complete projects, never seem to contribute, but always seem to be standing around talking about something or other.

They seem to appear out of nowhere, singing about something they've learned while others are trying their best to get something done. Minstrels have great intentions, however what they fail to understand is that in singing about their knowledge lends nothing to the company's ultimate success or failure, because that information is not replicable.

If this person had spent their time instead by producing written content, teaching through Q & A, submitted to existing, searchable bodies of knowledge, or in using that knowledge to further a goal to completion, then this person wouldn't be a minstrel. This person actually falls closer to the center of the spectrum, and is a welcome contributer.

In any profession, we start by absorbing information, and during this time, we are an investment made by those who teach us. However, as anyone who studies martial arts will tell you, there will come a point where you literally cannot be taught anything more. The only way to further your skills is to teach others. When you teach, you must review the basics and in doing so, learn them in greater depth with your more experienced eyes.

I'll leave you with this question; where on this spectrum do you fall?

VisiData

I deal with columnar data regularly. and I recently found a tool called VisiData. This is one of the most useful things I've ever used, and so I wanted to make sure to mention it.

It's a bit difficult to describe. I found it to be something of a swiss army knife of a tool for csv, tsv, sqlite databases, json exports, pretty much any data set.

Hyprland and Ollama

This weekend, I spent some time moving from using i3 under X11 to Hyprland under Wayland. While I was doing that, I was exploring using Code on my dotfiles to help me speed through learning the formatting and syntax I needed to get some parity with my old setup.

I'm just going to be brutally honest; I do not for the life of me, from a user standpoint, understand why I should prefer Wayland.

Llama 3.1 is not too bad at the work I'm doing. I got reasonable answers from it with only a few hallucinations.

Today I Learned: How to handle Jetbrains Toolbox URLs in Windows

I use Obsidian, and being able to jump from a Task there right into a chunk o' code would be nice.

In IntelliJ, you can right click a file and choose: Copy Path/Reference, and then Toolbox URL. However, Windows doesn't know how to open those. You can teach it, though.

To set Windows 11 to open a URL with the "jetbrains://idea/navigate" scheme in IntelliJ IDEA Ultimate, you'll need to register the custom URL scheme in the Windows registry. Here are the steps:

  1. Open the Registry Editor:

    • Press Win + R, type regedit, and press Enter.
  2. Navigate to the URL Protocols:

    • Go to HKEY_CLASSES_ROOT.
  3. Create a New Key:

    • Right-click on HKEY_CLASSES_ROOT, select New > Key, and name it jetbrains.
  4. Set the Default Value:

    • Select the jetbrains key, and in the right pane, double-click on the (Default) value. Set it to URL:JetBrains Protocol.
  5. Create a URL Protocol String:

    • Right-click on the jetbrains key, select New > String Value, and name it URL Protocol. Leave its value empty.
  6. Create a Shell Key:

    • Right-click on the jetbrains key, select New > Key, and name it shell.
  7. Create an Open Key:

    • Right-click on the shell key, select New > Key, and name it open.
  8. Create a Command Key:

    • Right-click on the open key, select New > Key, and name it command.
  9. Set the Command Value:

    • Select the command key, and in the right pane, double-click on the (Default) value. Set it to the path of your IntelliJ IDEA executable, followed by the URL parameter. For example: "C:\Program Files\JetBrains\IntelliJ IDEA 2023.1\bin\idea64.exe" "%1"

After completing these steps, Windows should recognize the jetbrains://idea/navigate URL scheme and open it with IntelliJ IDEA Ultimate.

Thanks again Copilot.

Postgres Lag and Lead

The examples provided in "Learning Postgres" for Window Lag/Lead functions in Chapter 6 really don't do a good job of selling you on expending the effort into learning them. Here are some better ones.

Let's say you want to align today's sales totals and yesterday on the same row.

SELECT 
    sale_date,
    sales_amount,
    LAG(sales_amount, 1) OVER (ORDER BY sale_date) AS previous_day_sales
FROM 
    daily_sales;

.. or, you want to know how much more or less today's tally ended at.

SELECT 
    sale_date,
    sales_amount,
    LEAD(sales_amount, 1) OVER (ORDER BY sale_date) - sales_amount AS next_day_difference
FROM 
    daily_sales;

This one is a lot of fun. I have a list of dates. I want to know if there are days missing in that sequence.

SELECT 
    sale_date,
    LEAD(sale_date, 1) OVER (ORDER BY sale_date) AS next_sale_date,
    LEAD(sale_date, 1) OVER (ORDER BY sale_date) - sale_date AS gap
FROM 
    daily_sales;