Modular Monoliths, Astro and More


Summary of my bookmarked links from Nov 30th, 2022

Links

  • Will Modular Monolith Replace Microservices Architecture?

    The article explores three architectural patterns: modular monolith, miniservices, and microservices. It discusses the advantages and disadvantages of each approach. Modular monolith, also known as macroservices, breaks the system into modules, providing easier management, increased reusability, and better security. Microservices, on the other hand, offer advantages like scalability, resilience, and the ability to use multiple technologies. Miniservices strike a balance between the two, offering loosely-coupled components within a specific business domain. The author recommends modular monolith for modernization projects and a combination of microservices and miniservices for building new systems from scratch, as the disadvantages of a modular monolith are considerable.

  • Build Faster Websites With Astro

    Astro is an all-in-one web framework for creating fast and content-focused websites. With a focus on content, Astro offers tradeoffs and performance features that are unmatched by application-focused frameworks. It prioritizes server-side rendering over client-side rendering, resulting in excellent web performance. Astro aims to be user-friendly and accessible to all developers, regardless of their skill level. It provides a comprehensive set of features including component syntax, routing, asset handling, build process, bundling, data-fetching, and more. Additionally, Astro offers flexibility through numerous integrations, allowing developers to extend its capabilities.

  • How To Update Your Status During Stand-Up Like a Senior Engineer

    Status updates are often overlooked or seen as daunting, but they are actually valuable opportunities to build trust and showcase your leadership skills. During a status update, it's important to discuss what you did yesterday, what you plan to do today, and if there are any blockers. Even if you haven't made significant progress, be transparent about your efforts, such as spending time understanding new architectures or product definitions. If you encounter blockers, ask for help in a direct manner and provide specific details. To make your status updates engaging, create a short summary list beforehand, speak in layman's terms, include other commitments, and explain the significance of your work. Remember, the goal is to demonstrate the value of your update and engage others with your narrative.

  • Elon Musk Eliminated Remote Work Because Working From Home "Doesn't Work"

    Elon Musk's approach to remote work is causing controversy as he implements a "24/7" work culture. While many tech companies are laying off employees and embracing remote work, Musk has laid off half of Twitter's workforce and requires the remaining employees to report to the office for a minimum of 40 hours per week. Musk believes that productivity is higher in the office and cites his own extreme work hours as evidence. Other CEOs, such as Tim Cook of Apple and James Dimon of JP Morgan Chase, share similar sentiments, emphasizing the importance of in-person collaboration for innovation and maintaining a healthy company culture.

  • Typescript best practices for a robust React component library

    TypeScript is a powerful tool for building robust JavaScript applications and libraries. To optimize its usage, there are several recommended practices. Firstly, instead of redefining interfaces or types, it's better to extend or use the correct ones to avoid brittle code. Secondly, the "typeof" and "keyof" operators can be employed to extract keys from objects and limit property values. Similarly, arrays can be utilized to extract and define types. Additionally, it's crucial to catch TypeScript errors early in development and ensure type checking in test files. Lastly, implementing pre-commit hooks with tools like Husky and lint-staged helps maintain code standards and catch errors before they are committed. By following these practices, TypeScript can be leveraged effectively to enhance the development process.

  • One Year as The Chief Technology Officer at InClub

    The blog post discusses the author's one-year anniversary at InClub, a platform that facilitates local and travel experiences. The author highlights their motivation for joining InClub, emphasizing its focus on bringing people together in person. They also mention a positive experience with a similar app called Party with a Local. The post further outlines the accomplishments of the author in the past year, including the development of a chat system, automated payment system, filtering/suggestion system, search system, experience template function, and various maintenance tasks. The author concludes by sharing insights and tips for tech leads, engineers, and developers at startups, emphasizing the importance of test-driven development, thoughtful test design, UI/UX testing challenges, code coverage considerations, pragmatism, addressing technical debt, and planning for future growth.

  • Produce more declarative TypeScript code with pattern matching

    Pattern matching is a powerful code-branching technique borrowed from functional programming languages, which offers a declarative way to scrutinize the structure of values. In TypeScript, the ts-pattern library enables pattern matching, allowing for more concise and readable code. By using ts-pattern, you can handle complex data structures and achieve exhaustive type checking. The library supports various features, including type narrowing, branching on primitive types, and value-based branching.

  • Interviewer: Can You Implement a JavaScript Template Engine? Me: Crap…

    The article discusses three different ways to implement a JavaScript template engine. The first solution involves using regular expressions to extract specific characters from a string and replace them with corresponding properties of an object. The second solution utilizes the eval function and template strings in ES6 to embed expressions in strings. The third solution explores the use of the "with" keyword to achieve a similar outcome. The article provides examples and explanations for each solution, offering developers different approaches to tackle template engine implementation challenges.

  • Understanding react-singleton-hook

    The blog discusses a problem faced while developing a React Native application using hooks. The issue was that when the hook was used by multiple screens simultaneously, the useEffects inside the hook were fired twice due to global state dependencies. To solve this, the concept of a singleton hook, similar to a singleton class in OOP, was introduced. The blog introduces a library called react-singleton-hook, which converts any hook into a singleton hook. It explains the main components of the library, including SingletonHooksContainer, SingleItemContainer, and singletonHook function. The code examples are provided in the blog for better understanding.

  • How to Blue-Green Release with DNS

    The article discusses the concept of blue-green deployment using the Domain Name System (DNS) for releasing software without downtime. Blue-green deployment involves setting up multiple production environments, allowing the switch to a new version while minimizing downtime and enabling easy rollback if needed. The process involves deploying a version of the software with an A record, creating a CNAME DNS record for application routing, deploying a new version with a different A record, updating the CNAME record to point to the new version, and cleaning up the previous environment. Blue-green deployments help reduce risks and ensure smoother software releases.