Hacker News new | ask | show | jobs
by whoisthemachine 311 days ago
This is an unavoidable result of lazy layouts. With the LazyList in Jetpack compose, it's comically difficult to produce a scrollbar, because the "LazyList" only ever lays out the visible items, so Compose can't really know (unless you actually already know) the full size of the list.

I find the iron triangle of project management reins supreme in a lot of domains: quality is sacrificed in the name of performance.

[0] https://en.wikipedia.org/wiki/Project_management_triangle

2 comments

While difficult, there are surely ways to make the scroll bar move more smoothly. For instance, you could demand that it can only change direction when the scroll direction changes. You can also use past scroll bar positions as stronger estimates of document height than text content and whatever else is being used, which would lead to more consistent (if inaccurate) scrolling as well. But as long as we're estimating things we might as well make them enjoyable to use; it's not like the user will be able to discern that the scroll bar is off by 5% anyway.
> "Good, fast, cheap. Choose two."

I think many software companies would happily choose good and fast if that were an option. In reality it rarely is (see: The Mythical Man Month).

In fact a lot of companies don't end up achieving any one of the three.