{37} North Star, Arrays & Tailwind
Featuring Karan Peri, Alamin, jhey, James Mishra, and Melanie Balke
Subscribe to The Daily Subset and gain the skills needed to become a multiclass developer.
Analytics: North Star Metric
Karan Peri
I’m in agreement. It’s tempting to make revenue the north star metric, but it is lagging.
When I led the product team at HackerNoon, our north star was ‘words published’. We also closely tracked ‘minutes of reading time’. By focusing on producing content and using reading time as a quality check, we created a space increasingly desirable for sponsors.
Creating value should be your primary focus. When the amount of value generated is disproportionate to the amount of captured value, invest some effort equalizing.
In our case, we experimented with pricing and various types of ads. The sophistication of our ads increased, and we captured more of the value we created.
If we had started focusing on maximizing revenue, we would have captured a higher percentage of a much less valuable pie.
Javascript: Array Methods
Alamin
I always mix up unshift() and shift(). I just don’t find the method names intuitive. It seems to me that “shifting” should be “making space” for a new item to be added, not removing an item and the remaining items filling the void.
But what are you going to do? Creating a library to rename methods adds to the confusion. Until something better comes along, shifting removes the first element. Seeing this animated guide helps.
One thing to note about these methods is the return values. Whenever you remove an element, the return value is the element removed. Whenever you add elements, the return value is the new length of the array.
CSS: Anchor Positioning
jhey
I love that CSS is evolving to find ways to make javascript hacks obsolete. This is a particularly thorny JS hack. You have to account for several factors, including the position of the tooltip relative to the viewport. Small things like the triggering element being near the right edge vs the top/right edge can trip you up.
The CSS might not look pretty, but it’s much cleaner than JS solutions.
CSS: Tailwind
James Mishra
I’ve held off using Tailwind for various reasons. The biggest was the assumption that it is Bootstrap v2. I hate that Bootstrap tends to make apps look and feel the same. A lot of Tailwind apps also share a similar look and feel. But that is not due to the framework. Tailwind is extremely flexible. The common vibe is due to people not doing the work to customize their implementation.
James’ comment about elitists hating on the framework is fair. The anti-semantic nature of Tailwind tends to turn off a lot of developers. While I certainly don’t count myself in the elitist bucket, the ugly code was probably my #2 deterrent.
Over the last few weeks, I’ve dipped my toes in the Tailwind pool. I’m liking how fast it is to rapidly put together a good-looking interface with a minimal amount of effort required to do things like write CSS and think about properly naming things.
Users don’t care how ugly your code is. They’re happy as long as your ugly code outputs something useful.
I do believe Tailwind introduces some interesting tech debt questions. A rapid implementation of Tailwind is great for launching a v1. It’s not necessarily great for building a maintainable codebase that is easy to improve. A component library and a design system can help. I’ll talk about that more in the future.
Product: Launch
Melanie Balke
I like this approach to scheduling communication leading up to a product launch. Updating too frequently before the 2 week mark risks your pings turning into noise. The 2 weeks, 1 week, and 1 day message strategy feels right to me.
I’ll test this out on my next launch. 🚀