Menu

Building a music mini-site with data from Last.fm, Discogs, and YouTube

It’s been a little quiet on the blog recently, and the reason for that is either perfectly valid or profoundly unnecessary, depending on your viewpoint. Even I am not entirely sure which one it is.

Over the past couple of weekends (and too many late weeknights) I have used all my spare time to build a mini-site for my obsession with music. It started as a small idea to just show the current track I’m listening to, and a list of recent physical albums I added to my collection. But then it snowballed into something much more. You can view the site at music.elezea.com, or by clicking on the link in the top navigation. If you want to know a bit more about how it works, read on!

It all started when I came across Andy Bell’s mini-site for his music collection. He uses a Notion database and Last.fm to show all the music he has in his collection, and what he’s listening to. Since I also still use Last.fm (yes, it’s still around!), and all my physical music is documented on Discogs, I wanted to build a small site that uses the Last.fm and Discogs APIs to show some of that information.

But once I got started and got stuck into all the information available via those APIs, I just couldn’t stop. I still have so much more I want to do, but I know it’s time to take a break. All in all this has been such a fun and rewarding thing to spend my time on. I know the site has pretty much zero value to the world at large. But I love checking it to get more information about something I’m listening to—and it helped me take quite a few steps forward in my technical skills. So I’m choosing to call it a win.

Below are some notes about what the site does, how it works, and also what the experience was like for me (as a non-developer trying to learn).

Now playing

  • Get the most recently played track from the Last.fm API, and check if the song is currently playing or not.
  • If it’s currently playing, show the current time and a message that what you’re seeing is what I’m listening to in real-time.
  • If it’s not currently playing, mention that and show the time it was played.
  • Pull in the cover art and other data about the song from Last.fm.
  • Do a lookup for the artist and if Last.fm has data about them, show the first two tags (genres), first 3 related artists, and their bio.
  • Do another lookup to a different API endpoint for the artist’s top albums, and display data about their two most popular albums.
  • Use the YouTube API to do a lookup for the song, and embed the most relevant result in the page so that you can listen to it right there.

Top albums and artists

  • Show the top albums I listened to in the last 7 days, including play counts.
  • Show the top artists I listened to in the last 7 days, including play counts.
  • Make a separate API call for each artist to get their genres and similar artists, if that data exists on Last.fm.
  • Make another API call to get each artist’s most popular albums.

Recent purchases

  • Pull the last 6 releases I added to my Discogs collection.
  • Also pull in data about the genre, label, and release date.
  • ⏳ The Discogs API is really great, so I want to add a bunch more stuff here, but that’s also for the mythical v2 of this thing.

Random thoughts, complaints, and what’s next

  • The site is deployed with Netlify via a Github repo, and it just works. Netlify is so great.
  • I don’t care what you “real developers” say, the two biggest problems in programming are environmental variables and formatting dates. I am thankful for ChatGPT for helping me with the date formatting piece, and my colleague and friend Derek for helping to get the environmental variables to work.
  • Last.fm’s API clearly hasn’t been touched in years and the documentation isn’t great, so it’s been a bit of a mission to figure all that out. Postman has been a life-saver here to test the API calls and see what data comes back.
  • YouTube’s API has a limit of 100 search lookups per day, which feels ridiculously low. I hit that within an hour while I was building and testing it. Oops! On the upside: I am now much better at error handling. If the site hits that limit it will now show a message to that effect, and link to a direct search on YouTube for the song.
  • ⏳ I’m using YouTube only because the Spotify API makes it incredibly difficult to get an auth token. Auth tokens expire after 1 hour, and refreshing that token every hour is currently beyond my limited skills. I might come back to this as well because the Spotify API has sooo much interesting data.
  • ⏳ Another huge data source is the MusicBrainz API. I plan to spend some time wading through those docs as well to see what else I could add.
  • If you can think of any other cool things I might want to add to this, please reach out on Mastodon!

4 effective product team structures

Ravi Mehta’s 4 Effective Product Team Structures is a helpful framework for leaders to figure out how to organize product teams:

Because of the nature of product work, there are two vectors that product teams need to be organized around: area of focus and level of accountability.

  1. For area of focus, product teams can align their work with either business outcomes or feature development.
  2. When considering the level of accountability part of the structure, product managers either act as fully responsible owners of the work or as facilitators of the work, where they share metrics responsibilities with cross-functional partners.

In the article he goes through the pros and cons of each of the 4 structures.

Leadership tip: be a thermostat, not a thermometer

In Be a thermostat, not a thermometer Lara Hogan provides a helpful analogy for leaders on what to do when meetings go off the rails…

Once you’re able to start noticing when someone’s amygdala-hijacked, or simply that the vibes are off, you can reframe and use “be the thermostat, not the thermometer” for good. Since humans tend to mirror each other, you can intentionally change the energy in the room, setting the thermostat to a more comfortable temperature.

12 metrics to track for B2B SaaS companies

Elena Verna has a great summary of leading metrics for B2B SaaS companies, including some really useful benchmarks. Also a good reminder that revenue is a lagging metric:

Many leaders obsess over revenue. And rightfully so, because revenue is the outcome of any business. But revenue is a lousy metric to goal the team against because it assesses past performance instead of predicting the future.

If you want to dig a little deeper on the best metrics to choose for SaaS companies, here are a few more resources:

Link roundup for April 2, 2023

No image posts today, but it’s a blockbuster edition of the link roundup this week! I hope you find something interesting in here…

1 → LinkedIn power users are turning to ghostwriters (Vox)

LinkedIn remains a complete mystery to me.

“It’s cliché, but it’s true that people want to work with people, people buy from people, people want to see the human side of who you are before they decide to work with you,” says Tara Horstmeyer, an Atlanta-based ghostwriter who offers packages for 12 LinkedIn posts for anywhere between $2,000 and $3,000.

2 → How the Great Recession paved the way for the influencer industry (Vox)

It’s worth reading this fascinating interview with a curious mind. Especially if you, like me, are “of a certain age” and feel like you just don’t get it…

Influencers are neither ‘a flash in the pan’ nor ‘a bubble about to burst,’ but indicators of a paradigm shift in the way we think about each other and ourselves.

3 → On Place (Alica Kennedy)

This is a lovely, rich essay on the difference between “destination” and “place” when we travel, how digital nomadism displaces locals, the pursuit of a “decent meal” abroad, and more.

Continued economic dependence upon tourism leads inevitably to brain drain, when a labor force no longer wishes to work only service jobs. What does ‘local’ as an experience mean when it’s not in service to those who are literally local?

4 → The Life I Refused to Surrender (The Free Press)

This short essay from Amanda Knox packs a huge punch and really got to me. All we have is now…

No matter how small, cruel, sad, and unfair this life was, it was my life. Mine to make meaning out of, mine to live to the best of my ability. There was no more waiting. There was only now.

5 → The Streaming Market Is Fundamentally Broken. It’s Time To Fix It. (Public Knowledge)

There is just so much wrong with the music streaming industry.

Artists aren’t allowed to see the deals that set their streaming payment rates; indie labels aren’t allowed to see the deals distributors cut with labels on their behalf . And in many cases, artists aren’t even allowed to compare notes and talk about their own contracts.

6 → People Started Buying Crocs During the Pandemic. They Can’t Stop. (NYT Gift Article)

I have no pithy comment for this one.

“I roll into the gym with my Crocs on and everything, and people ask, ‘Aren’t you going to change shoes?'” Mr. Ndugga said. “No, this is how I’m going to live life for now.”

7 → Free Bird (Substack)

A top-to-bottom excellent post about Twitter from Ed Zitron. Read the whole thing!

Twitter can create an incredible sense of both intellectual invincibility and vulnerability that can drive someone quite mad.

8 → The Counterintuitive Thing About Trust That Explains Why So Many Teams Have Issues With It (LinkedIn)

This is an insightful post on the leader qualities that really build trust. In short, it’s about showing that you really, truly care.

Studies indicate that conveying benevolence is much more likely to earn you trust than conveying how competent you are. […] That’s why all things being equal, a person who is charismatic and kind will gain more trust than a person who is seen has having good ability.

9 → The Dangers Of Highly Centralized AI (Medium)

I agree with this take from Clive. It’s like we’ve learned nothing from social media.

The field of large language models is becoming dangerously centralized. A huge amount of power resides in the hands of a tiny number of firms.

10 → The Stories That Bind Us (NYT Gift Link)

This is a wonderful essay about the things that ensure happy and enduring families.

The bottom line: if you want a happier family, create, refine and retell the story of your family’s positive moments and your ability to bounce back from the difficult ones. That act alone may increase the odds that your family will thrive for many generations to come.

There’s more to life than OKRs: using EOS and W Planning for effective goal-setting in empowered teams

At Postmark we’ve long been fans of the “Entrepreneurial Operating System” (EOS) as presented in the book Traction: Get a Grip on Your Business by Gino Wickman. We also love the “W Framework” as outlined in the article The Secret to a Great Planning Process—Lessons from Airbnb and Eventbrite by Lenny Rachitsky and Nels Gilbreth. Both resources are excellent and highly recommended for the thesis and theory behind each of these frameworks.

In this post I’d like to describe how we combined these methods to set goals and run our business and product delivery process. I’ll start with a short summary of each method, and then go into specifics on how we used them together to ensure our teams are aligned on the same goals and have all the context they need to work autonomously on projects.

I promise I’m not here to start an argument about what is the best way to set goals. Instead, I hope this could be useful to folks who have tried a bunch of different frameworks—including OKRs—and found that nothing quite worked for them. Maybe this is a good alternative to try…

(more…)

AI won’t free up our time to do more valuable and fun things at work and home

I enjoyed Bill Gates’s post The Age of AI has begun, right until he got to this bit:

When productivity goes up, society benefits because people are freed up to do other things, at work and at home.

The idea that increased productivity gives people more time to do other things that are more useful and fulfilling is a thoroughly-debunked theory. First, there’s the question of what we even mean by “productivity”, especially in the context of the Productivity Paradox:

The productivity paradox (also the Solow computer paradox) is the peculiar observation made in business process analysis that, as more investment is made in information technology, worker productivity may go down instead of up.

But even if we can get to a point where we agree on how to define the word, we have known for a long time that the only thing that increased productivity does is create more work:

The usual first response to encountering the Productivity Paradox is disbelief: “If I have to write a few emails so that I don’t have to use a carrier pigeon, sign me up!”

But in a bureaucracy, the story of those few emails usually doesn’t end there. So, you send your few emails, and then you soon get email replies and comments. Now, you have to write more emails in reply to those emails, which are then sent up the hierarchy and to a chain of full-time reviewers, who each make a comment to show that they are useful.

So when we get more productive the time we “save” on one type of task just gets filled with a different, not necessarily more valuable task. But what about “at home”, you ask? Nope. We have also known for a very long time that instead of giving us more time for hobbies and hanging out, technology is killing leisure time:

The very tools that were supposed to liberate us have bound us to our work (and schools) in ways that were inconceivable just a few years ago. Almost all of us have less leisure time than ever. We work harder, take fewer vacations for shorter periods of time, report more stress than almost any other demographic group and find the boundaries between work and play increasingly blurred. Computing and communications technologies are destroying the idea of privacy and leisure.

So anyway, Bill Gates wrote a pretty insightful take on AI, in my opinion. But the idea that generative AI will free up our time to do more valuable and fun things is not backed up by history at all. Or to put it slightly differently:

How to onboard executives into a new role

This is such a great post by Will Larson about onboarding executives into a new role. His recommendations for topics to cover in the first two weeks are especially good. Like this:

Where can the new executive find real data to inform themselves, rather than relying on existing narratives? The best executives will listen to you, but won’t fully believe anything until they’re able to find data to substantiate your perspective. That’s not because they don’t trust you, but because any seasoned executive has been burned by trusting someone who fervently believed something that ultimately wasn’t true.”

And this:

Who do they need to spend time with to understand the current state and the company’s implicit power structure? Especially the longest tenured employees who uniquely hold parts of the business in their heads, and individuals who have significant influence over the executive team that wouldn’t be obvious from the reporting hierarchy.

Turns out there’s a Donella Meadows quote for everything:

Before you charge in to make things better, pay attention to the value of what’s already there.

More

  1. 1
  2. ...
  3. 22
  4. 23
  5. 24
  6. 25
  7. 26
  8. ...
  9. 201