thereby reducing it to an earlier rant

3 views
Skip to first unread message

Raoul Duke

unread,
Oct 29, 2025, 8:07:50 PM (6 days ago) Oct 29
to pi...@googlegroups.com
fundamentally a major problem is that none of our paradigms as reified actually successfully make the management of time be anything other than voodoo hell with insane rules & exceptions & special cases & footguns both documented and un. 

seriously what is a potential solution?

lordy lou. 

Raoul Duke

unread,
Oct 29, 2025, 8:14:36 PM (6 days ago) Oct 29
to pi...@googlegroups.com
another fundamental thing that is part of why programming can suck (eg particularly in Angular): Indirection. Too much indirection makes things more inscrutable and ends up with me having to just grep for strings globally in the project praying for some kind of thrown bone. 

Mike Austin

unread,
Oct 30, 2025, 9:04:37 PM (5 days ago) Oct 30
to PiLuD
Talking about indirection, I started going down the path of data-driven grouping — which worked but was a little confusing:

groupLookup[itemFilters.groupBy]?.[item[itemFilters.groupBy]] ?? "Items with no Epic";

I changed it to a switch to make it clearer and to be able to do arbitrary logic:

  const groupTitle = (item: TransfomedItem) => {
    switch (itemFilters.groupBy) {
      case "statusId":
        return statuses[item.statusId as keyof typeof ItemStatuses];
      case "parentId":
        return (item.parentId && epics ? epics[item.parentId] : "Items with no Epic");
    }

    return "All Items";
  };

The data driven approach also had to deal with different types (uuid, string, undefined) so had to be unioned. The groupTitle() function simply returns a string.
Reply all
Reply to author
Forward
0 new messages