In short
Episode Summary: What Good Programmers Worry About (News)
Podcast Information
- Podcast Title: The Changelog: Software Development, Open Source
- Episode Title: What Good Programmers Worry About (News)
- Description: Discussion on various topics including self-driving cars, programming paradigms, user experience, and more.
---
Key Topics Discussed
- Waymo Car Concerns
- Issue: Waymo's self-driving cars have been honking at each other in a parking lot, leading to social media backlash.
- Response: The company acknowledged the issue and is working towards a fix.
- Data Structure vs. Code Complexity
- Insight from Leonardo Creed:
- Quotations from Experts:
- Linus Torvalds: "Bad programmers worry about code. Good programmers worry about data structures and their relationships."
- The Art of Unix Programming: "Data is more tractable than program logic."
- Advice:
- Focus on data structure complexity rather than code complexity.
- Example: Improved a project by restructuring data, reducing a 500-line function to 50 lines due to better data organization.
- User Experience and Toast Notifications
- Argument by Max Schmidt:
- Definition of Toasts: Non-modal, brief notifications that expire automatically.
- Critique: Toasts distract users as they appear away from the user’s focus.
- Suggestions: Redesign interactions to avoid toasts for more user-friendly experiences.
- ChartDB - Database Diagramming Tool
- Overview:
- Functionality: Web-based tool for visualizing database schemas using instant schema imports.
- Usage: Users can run a query to get their schema in JSON format, which can then be visualized in ChartDB.
- Supabase Launch Week Highlights
- Top Features:
- New log drains for exporting logs.
- Authorization for real-time broadcasts in public beta.
- Support for third-party authentication providers.
- Introduction of in-browser Postgres with AI assistance.
- Code Review Anti-Patterns by Simon Tatham
- Overview:
- Discussion on various ways code reviewers can hinder progress.
- Key Terms:
- The Ransom Note, The Double Team, The Catch-22, The Flip-Flop, Priority Inversion.
- Example of Priority Inversion:
- Focusing on minor issues first, only to later reveal major problems, leading to wasted developer effort.
- Flow State in Programming
- Definition: A state of total absorption in an activity.
- Study Insights:
- The concept coined by psychologist Mihaly Csikszentmihalyi relates high levels of mental focus to happiness.
- Programming can often lead to flow state due to immersion and mastery.
---
Conclusion The episode concludes with a reminder to subscribe to the Changelog newsletter for additional insights and stories in software development. The hosts encourage listeners to review the podcast and stay tuned for upcoming episodes.
---
Action Items
- Listen to the full episode for detailed discussions.
- Subscribe to the newsletter at changelog.com/news for weekly updates.
- Consider the advice on data structures and user experience when developing software.
Written by AI. May contain mistakes. Listen to the episode to check what was said.
Transcript
Automatic transcript. May contain errors.0:28What up nerds? of the morning. Seriously. Neighbors shared videos of driverless Waymo cars filing into the lot and backing into spots, which appears to trigger honking from the other Waymos. After much negative social media and eventually press coverage, the company stated they know about the issue and are working on a fix. Much love to the dev who pulls that Jira ticket. Okay, let's get into the news.
0:57Leonardo Creed pulls together some wisdom from Linus Torvalds, who said, Bad programmers worry about the code. Good programmers worry about data structures and their relationships. Then he adds in the art of Unix programming, which said, Data is more tractable than program logic. It follows that where you see a choice between complexity in data structures and complexity in code, choose the former. More, in evolving a design, you should actively seek ways to shift complexity from code to data. Leonardo suggests the following, quote, Start with the data. Try to reduce code complexity through stricter types on your interfaces or databases.
1:36Spend extra time thinking through the data structures ahead of time, end quote. This advice also comes from Leonardo's own experience. He says this, quote, I once worked on a project where we spent quite a while optimizing complex algorithms, only to realize that by restructuring our data, we could eliminate entire classes of problems. We replaced a 500-line function with a 50-line function and a well-designed data structure. Not only was the new code faster, but it was also much easier to understand and maintain. End quote. In politics, James Carville famously hung a sign on Bill Clinton's wall that said, The economy, stupid, because that's what really mattered the most to get Clinton elected.
2:18In software systems, we may need to hang a sign that says, The data, stupid. Toasts are bad UX. Max Schmidt makes the argument that toast notifications create a bad user experience. What are toasts? One good definition I found says, A toast is a non-modal, unobtrusive window element used to display brief, auto-expiring windows of information to a user. That sounds right to me, but why doesn't Max like them? He says, quote, The core problem is that toasts always show up far away from the user's attention. That also sounds right to me. Max goes on to give a couple of examples and how he'd redesign the interaction so it doesn't need a toast notification.
3:04Lots of good thoughts in short form here. Check it out in your chapter data and the newsletter. ChartDB is a web-based, database diagramming editor. What's cool about this open source self-hostable web app is its instant schema import. Quote, run a single query to instantly retrieve your database schema as JSON. This makes it incredibly fast to visualize your database schema, whether for documentation, team discussions, or simply understanding your data better. End quote. They give you what they call a magic query that you take and run in your database, Postgres, MySQL, SQLite, etc. And then paste the resulting JSON into ChartDB for it to visualize.
3:52From there, you can use the interactive editor to fine-tune the schema. It also looks really nice. Image in your chapter data and newsletter. It's now time for sponsored news. The top five launches of Subabase Launch Week 12. Number five, they released log drains. So you can export logs generated by Supabase products to external destinations like Datadog or custom HTTP endpoints. Number four, authorization for real-time broadcast and presence is now public beta. You can now convert a real-time channel into an authorized channel using RLS policies in two steps. Number three, bring your own Auth0, Cognito, or Firebase.
4:37This was actually a few different announcements, support for third-party auth providers, phone-based multi-factor auth, and new auth hooks for SMS and email. Number two, build Postgres wrappers with Wasm. They released support for WebAssembly foreign data wrappers. With this feature, anyone can create an FDW and share it with the Supabase community. You can build Postgres interfaces to anything on the internet. And number one, postgres.new. an in-browser Postgres sandbox with AI assistance. With Postgres.new, you can instantly spin up an unlimited number of Postgres databases that run directly in your browser and soon deploy them to S3.
5:20That's the top five. According to us, head to supabase.com slash launch week for details on everything else. And for new users to Supabase, head to supabase.com slash changelog pod for one month of Supabase Pro for absolutely free. Code Review Anti-Patterns Simon Tatham says When a code reviewer turns to the dark side they have a huge choice of ways to obstruct or delay improvements to the code to annoy patch authors or discourage them completely or to pursue other goals of their own. If you've only recently turned to the dark side you might not have thought of all the possibilities yet so here's a list of code review anti-patterns for the dark side code reviewer who's running out of ideas.
6:07End quote. I love how Simon named each anti-pattern so it'll be easy to identify and discuss with others. These names are great. The Ransom Note, the Double Team, the Catch-22, the Flip-Flop. You can almost imagine what each of these means in the context of code review without even reading his explanations. But you should still read the explanations. They are so good slash bad. For example, the Priority Inversion. In your first code review passes, pick small and simple nits. Variable names are a bit unclear. Comments have typos in them. Wait for the developer to fix those and then drop your bombshell.
6:45There's a much more fundamental problem with the patch that needs a chunk of it to be completely rewritten, which means throwing away a lot of the nitpick fixes you've already made the developer do in that part of the patch. Nothing says your work is not wanted and your time is not valued. Better than making someone do a lot of work and then making them throw it away. This might be enough to make the developer give up all by itself. Flow state confirmed by scientists. We all know that feeling when total absorption in an activity makes the rest of the world disappear and all its troubles with it.
7:20But did you know scientists have been studying it for years? Quote, the late Hungarian psychologist Mihaly, long last name that I won't even try to pronounce, who first coined the term flow, went as far to call it the secret to happiness. Contrary to the assumption that we are happiest while resting, he found that the peaks often involved very high levels of mental focus. The specific activity did not seem to matter. It could be swimming, playing the violin, or performing brain surgery. What counted was the feeling of immersion and mastery. I would argue that the reason many of us enjoy programming computers is because it's an activity that easily evokes a flow state.
8:02The world-melting result of immersion, coupled with the eventual feeling of mastery, is a hell of a drug. Cocaine is a hell of a drug. The linked article dives into some of the psychology and attempted scientific study of flow state. While scientists have confirmed that it's a very real phenomenon, what causes it and how to achieve it have been harder for them to nail down. Maybe they should put down the Petri dish and pick up a code editor. that's the news for now but also scan the companion newsletter for even more stories worth your attention such as a tool that lets you execute commands on a server by sending udp packets a blog post titled you are not dumb you just lack the prerequisites and a network called nomad for building private and resilient communications platforms if you don't get our changelog newsletter in your inbox each monday fix that bug at changelog.com slash news we have some awesome episodes coming up this week on wednesday ryan whirl from warp stream and on friday pound to find the legend continues have a great week leave us a five-star review if you dig our work and i'll talk to you again real soon
From the publisher
Waymo cars make bad neighbors, Leonardo Creed pulls together wisdom from Linus Torvalds & the Art of Unix Programming to conclude what good programmers worry about, Max Schmitt makes the argument that toast notifications create a bad user experience, ChartDB is a web-based database diagramming editor, Simon Tatham makes a list of code review anti-patterns & scientists confirm that 'flow state' is very much a thing.

