The CSS scroll-margin property

Last week I remembered the scroll-margin property existed.

I was adding anchors to the headings of a page so visitors can directly link to a section. However, when that link was visited, the heading was glued against the top of the viewport. I prefer some margin between the browser chrome and the text to let it breath.

There's a CSS property for that: scroll-margin. It does nothing in most cases, but when you visit a URL that points to an anchor on the page, it will offset the element from the viewport.

h2 {
scroll-margin-top: 1rem;
}

You can read all about scroll-margin in the MDN docs.

Chris Coyier: '100 people'

An interesting thought exercise on working together, what's the optimal number of people to work as a team without spoiling the broth?

Let’s say you have 100 people. They can break into groups of any size. Each group gets 100 toothpicks. The goal: build the tallest structure with the toothpicks. What is the optimal group size?

How Jim Nielsen takes & publishes notes

I always enjoy reading about other people's processes.

99% of the time, this is how my note-taking process goes:

  • I’m catching up on my RSS feed (on my phone in the Reeder app)
  • I read something that strikes me as interesting, novel, or insightful.
  • I copy/paste it as an blockquote into a new, plain-text note in iA writer.
  • I copy/paste the link of the article into iA writer.
  • I finish reading the article and copy/paste anything else in the article that strikes me.
  • I add my own comments in the note as they pop into my head.
  • I move on to the next article in my RSS feed.
  • Repeat.

And:

I like to let my notes sit for a couple days (or even weeks). I find that if I come back to a note and still find it interesting/insightful that means it’s worth keeping, so I put in the work of cleaning it up and publishing it.

Time is underestimated as a filter for content.

Cleaning up package.json keys

I'm in the process of cleaning up some npm packages that haven't been touched in a while, and part of that is pruning all the cruft that has been accumulated in package.json over the years.

I was looking for a canonical order to sort the keys by, and thought the order the npm docs specify the configuration options made sense.

Of course, after manually sorting one package.json file—which probably took 2 minutes—I decided to spend 30 minutes to find our how I could automate sorting the other two.

Luckily there's an npm package for everything. With the sort-package-json package you can go sort your package.jsons in a logical order.

npx sort-package-json **/*/package.json

That's all I had to do to keep my monorepo clean and tidy.

Git gud at communication

Another blam on the Thunk blog:

Product Managers, Agile, and other product development processes solve communication problems. If everyone had telepathic powers, those problems would shrink or disappear. The next best thing to telepathy is a team who excels at communication. If your team communicates to bridge these knowledge gaps, your need for PMs and Agile will shrink.

Rocks, pebbles, sand

A product management mindset from Jason Cohen.

If you do little things first, there’s no time for big things.
If do big things first, then you can fill in the smaller things.

And:

It’s not important that every sprint is perfectly balanced between all types of work. It is important that we’re balanced over a period several months, otherwise something important is getting starved. Indeed, it’s often wise to build imbalanced sprints intentionally, because that means greater focus, less context-switching, and therefore getting more quality work done.

Gleam has a `todo` keyword

Gleam is a statically typed language that runs on the Erlang virtual machine. From distance, it looks like a love child of Go and Elixir (count me in!)

One neat language feature is a todo keyword. First-class syntax to mark a piece of code as work in progress and to stop the compiler from yelling at your half-implemented code.

fn favourite_number() -> Int {
// The type annotations says this returns an Int,
// but we don't need to implement it yet.
todo
}
 
pub fn main() {
favourite_number() * 2
}

Ask for ranked wishlists

John Drexler shares an easy to implement prioritization scheme when working with a client.

It's a gift when another team gives you a wishlist of product improvements. Ask them to put their lists in order of importance, and then focus the conversation just on the top 5. This saves you loads of time. But it also brings them into the prioritization discussion and gets them to think like Product Managers too.

Robin Rendle: "Cut the intro"

(I suppose it'd defeat to point to add a comment here.)

Writing about the symbiosis between trees and mushrooms? Don’t start talking about how humanity has depended on trees since the blah blah blah. Just jump right in! Talking about new features in your app? Don’t start with the fluffy stuff about how excited you are to announce yada yada ya – just tell me what improved.

Boom! The text is lighter, faster, less wasteful.