A Byte of Coding Issue 412

A Byte of Coding Issue 412

A Byte of Coding

Hi hi hi,

Whenever I see a while loop in a PR, I instantly leave a comment telling the author to change it to a for loop. I’ve had too many cases of seemingly harmless while loops turning into infinite loops. Of course there are exceptions, but I have yet to run into one. What do you think? Are there any coding constructs you always avoid?

Anyway, here’s the issue.

Made possible through generous sponsorship by:

Published: 30 May 2024

Tags: architecture, serverless

Oren Eini details the design and implementation of a serverless secured dead drop system for anonymous and secure communication. The system uses serverless functions, encryption, and Tor to protect both the contents and the identities of the communicating parties.

Some highlights:

  • Utilizes a serverless architecture to minimize data aggregation and enhance security.

  • Employs Tor for anonymous communication and SealedBox for encryption.

  • Splits the upload process into multiple stages to obscure sender and receiver identities.

Published: 3 June 2024

Tags: zest, language design

Jamie Brandon explores mutable value semantics in programming languages, aiming to balance efficient imperative language features with data value treatment. He discusses methods for managing mutable references without compromising serialization and code integrity.

Some highlights:

  • Implicit copies, dynamic alias tracking, and static alias tracking are key methods for handling mutable value semantics.

  • Enforcing aliasing rules prevents observable mutations and improves code reliability.

  • Static alias tracking, used in languages like Hylo, avoids refcounting overhead but requires more annotations from developers.

Published: 1 June 2024

Tags: sponsored, auth

WorkOS explains all the auth-related protocols and provides additional resources (for further reading) for OAuth, OIDC, and SAML.

Some highlights:

  • “OAuth is not an authentication protocol”

  • OIDC is built on top of OAuth

  • SAML is used for federated authentication

Published: 26 June 2023

Tags: javascript

James Sinclair demonstrates how to use JavaScript async generators to handle paginated APIs efficiently. He provides a detailed guide on refactoring code for clearer, more maintainable solutions.

Some highlights:

  • Async generators can simplify handling paginated API data by yielding results as soon as they arrive.

  • Filtering and mapping functions can be used to process data without excessive memory consumption.

  • The approach makes code easier to read, test, and maintain by separating concerns and hiding implementation details.

Thanks for your Support!

Big thanks to all of the Patreon supports and company sponsors. If you want to support the newsletter you can checkout the Patreon page. It's not necessary, but it lets me know that I'm doing a good job and that you're finding value in the content.A Byte of Coding Issue 411