/Best Practices

Improve Readability With Positive Booleans

- Max Kanat-Alexander tl;dr: (1) Name your flags and variables in such a way that they represent the positive check you wish to make - the presence of something, something being enabled, something being true - rather than the negative check you wish to make - the absence of something, something being disabled, something being false. (2) If your conditional looks like “if not … else …” then reverse it to put the positive case first.

featured in #458


Authorization’s Spookiest Problem: Data

tl;dr: Between the dynamic nature of your application’s data model and the amount of application data needed to make authorization decisions, it’s no wonder data management is authorization’s spookiest problem. Join Oso's virtual event on October 31 where we'll share our best practices for building scalable and effective authorization systems, with a focus on storing, accessing and modeling the data.

featured in #458


Git Commit And Commit Message Best Practices

- Justin Joyce tl;dr: Justin shares best practices for git commits and commit messages. Commit best practices include: (1) Commit often: Save work at incremental steps. (2) Keep commits self-contained: Ensure each commit represents a distinct piece of work. (3) Keep commits small: Commit frequently to maintain smaller changes. For commit messages: (1) Keep messages short: Aim for a one-liner, ideally under 70 characters. (2) Be descriptive yet concise: Summarize the commit's essence succinctly. (3) Be specific: Clearly indicate the nature and location of the change.The author emphasizes clarity and specificity over strict adherence to tense or voice in messages.

featured in #456


Common Authentication Implementation Risks And How To Mitigate Them

- James Hickey tl;dr: Data breaches are more common than ever. Ensuring a secure authentication system is critical to your trust with customers. Whether you build or buy your auth solution, this article offers insights into secure practices that can help keep you and your customers safe.

featured in #450


Best Practices For Collecting And Querying Data From Multiple Sources

- Zoe Steinkamp tl;dr: In a data-centric era, efficiently collecting and querying data from diverse sources is paramount. Zoe Steinkamp emphasizes the importance of best practices in data collection, such as optimizing ingestion pipelines and advanced querying. With varied data streams like IoT and cloud computing, single-database storage is outdated. Instead, strategies like effective data modeling and understanding data sources are vital. Tools like InfluxDB, a time series database, and Pandas, a Python library, facilitate data management and analysis. Leveraging multiple data sources optimizes cost, efficiency, and user experience.

featured in #449


Moving From IC To Engineering Manager

tl;dr: Best practices for transitioning from an IC to an engineering manager. Good reasons for the transition include a love for solving people problems and managing projects, while bad reasons include seeking more authority or escaping boredom. Necessary skills include communication, durability, technical competence, patience, and urgency. The article warns against the "Team Lead" role as a transitional step, as it often leads to failure, and advises starting new managers with "training wheels" to guide them through difficult situations. The emphasis is on ensuring the right motivations, skills, and support for a successful transition.

featured in #441


How We Roll – Avatars

- Colin Sidoti tl;dr: This post emphasizes the importance of avatars in authentication, often overlooked in app development. It details how Clerk uses social sign-ins like Google and Facebook to ease avatar selection, offers beautiful default avatars, and integrates avatars into the sign-in flow to enhance user experience.

featured in #438


Throw Away Your First Draft Of Your Code

- Nicole Tietz-Sokolskaya tl;dr: Software teams should prototype or create a "first draft" of code for new features and then discard it. Prototyping allows teams to anticipate issues and understand the full complexity of a new feature. Despite seeming wasteful, this approach actually saves time by preventing unforeseen problems during the development process. However, it's essential to discard the prototype code to keep the process efficient and the codebase clean.

featured in #436


Best Practices To Build IoT Analytics 

- Zoe Steinkamp tl;dr: Best practices for building IoT analytics include storing data in a time series database, using efficient ingestion methods, cleaning data before storage, downsampling for easier analysis, monitoring data in real time, and storing historical data in cold storage or a data lake for analysis. Choosing the right tools from the start will save time and improve efficiency.

featured in #433


Six Ways To Shoot Yourself In The Foot With Healthchecks

- Phil Booth tl;dr: (1) Aggregate other services into your app’s healthcheck. (2) Set a short timeout on healthcheck requests. (3) Set a long timeout on healthcheck requests. (4) Leave a long delay before starting healthchecks on new instances. (5) Set a low threshold on consecutive failures before turning unhealthy. (6) Set a high threshold on consecutive successes before turning health.

featured in #419