StoryTime Alpha logo

StoryTime Alpha

Subscribe
Archives
June 4, 2025

May Update

Hey you! Nat here, from the StoryTime team. You’re reading this because you signed up for updates about StoryTime, a project management tool for teams doing a mix of Extreme Programming and Balanced Teams. (You might also know it as “that thing Jesse, Nat, and Coby are working on.”)

We are still deep in working on drafts. Not too much of an update this week because early this month Jesse and I had a conversation that went something like this.


INT. KITCHEN DAY

NAT

Ugh, I keep running into dumb bugs trying to update positions correctly when moving stories from drafts into the backlog. Fixing them is frustrating since I’m pretty sure I’m going to want to switch to a linked list implementation and it’ll be totally different.

JESSE

Well… why not switch to the linked list implementation now?

NAT

I don’t know how long it’s going to take and this feature has already taken so long.

JESSE

You said we’re going to have to switch to a linked list eventually though?

NAT

Yeah, it’s how Tracker did it and now that I’ve been working the problem for a while I see why… it makes fetching lots of stories harder but it makes repositioning them much easier, and that’s kind of one of the core things the app does. Moving things between different lists would be way easier too — just remove the story from one list and insert it into the other, no need to update a bunch of positions correctly like we do now.

JESSE

If we’re going to have to do it eventually, we might as well do it now. No sense spending the time to do it in a way you already know you’re going to have to replace.


So, that’s how I spent about three weeks shipping no visible changes, and then yesterday banged out about half the remaining feature in two hours. (Now drafts can open and close! And when they open, they open in the drafts section and not the backlog section!)


On Linked Lists

Now that I’ve implemented a (doubly!) linked list I kinda get why this was a standard interview question for so long. It’s a problem that’s either hard or easy depending on pretty much exactly how much conceptual clarity you have on the problem. I started the way that I usually do — sketch out the test cases, then naively implement them one at a time. I will admit that I spent an embarrassingly long time confusedly scratching at code that made each individual link change. Lots and lots of code like this:

if story.previous_story_id do
  story_before = get(%Storytime.Story.BacklogStory{id: story.previous_story_id})
  story_before |> update_story(%{next_story_id: story.next_story_id})
end

And this:

story |> update_story(%{previous_story_id: story_before.id, next_story_id: story_after_id})


Until finally I realized that was I was really trying to do was this:

remove_story_from_list(story_to_move)
add_story_to_list_after(story_to_move, target_story)

I wrote those two private methods and my life got tremendously easier.


That’s about all I’ve got for you this time folks — hopefully next month I’ll be showing off drafts properly.

More soon,

Nat & the StoryTime Team

Don't miss what's next. Subscribe to StoryTime Alpha:
Homepage
Powered by Buttondown, the easiest way to start and grow your newsletter.