Urgent.News

What's breaking now, across thousands of outlets.

More in Tech

collectAsState is quietly leaking your work

Here is a line you have written a hundred times: val state by viewModel . data . collectAsState () It looks harmless. It is the standard way to turn a Flow into Compose state.

  • collectAsState leaks work when app backgrounded
  • collectAsStateWithLifecycle stops collection on lifecycle drop
  • Default to collectAsStateWithLifecycle to save resources

Report Generation: Asynchronous Jobs, Validation, and Load Latency Explained

Short answer: use an explicit PDF job, validate the input before enqueueing it, and keep the output in a separate, short-lived location until the job is complete.

  • Create explicit PDF job queue boundary for handling generation, retries, and load latency.
  • Validate MIME type and file size before job creation, reject non-contract documents.
  • Implement observable queue with retries, idempotency keys, exponential backoff, and status polling.

The most useful exchange I had this week was with someone who has 7 followers

If you saw this account cold, you would scroll past it. FarzamHabibi. Bio: Product Designer. 7 followers. 9 public repos. Account created 2022-08-27.

  • FarzamHabibi, a product designer with 7 followers, shared a GitHub repository on 2022-08-27.
  • The author engaged in constructive feedback exchange, adding six items to the checklist.

More from Friday 4 September →