Home / Companies / Earthly / Blog / September 2023

September 2023 Summaries

6 posts from Earthly

Filter
Month: Year:
Post Summaries Back to Blog
The article delves into the use of gRPC with Golang, focusing on building an activity tracker by transitioning from a JSON-based REST service to gRPC. It highlights the benefits of gRPC, such as faster serialization and better type support through protocol buffers (protobufs), and demonstrates the process of setting up a gRPC server and client, including testing and generating code using the protoc tool. The author addresses the challenges of handling gRPC errors, emphasizing the importance of using proper status codes to avoid coupling client and server error messages. The article also explores testing gRPC servers using tools like grpcurl and recommends using Earthly to ensure consistent builds and version control of protoc, especially in larger teams. Overall, the author finds the transition to gRPC worthwhile for its efficiency and scalability benefits, despite the initial setup complexities.
Sep 19, 2023 3,895 words in the original blog post.
The article provides a detailed guide on integrating SQLite with Golang to build an activity tracker that persists data using the database/sql package, ensuring workouts are not lost even if the service goes down. It covers setting up the development environment, installing necessary tools like SQLite3 and sqlite-utils, and creating a database schema either manually or using utilities for ease. The tutorial further explains the nuances of handling data types in SQLite, using the Golang SQL repository for database operations, and the importance of prepared statements for optimizing SQL queries. Testing methods and integration with Earthly for containerized builds are discussed, alongside challenges like the need for a GCC compiler for building the SQLite driver. The author reflects on the learning process, highlighting key insights into database handling and encouraging the use of tools like Earthly for efficient Golang builds, while also teasing future explorations into gRPC and protocol buffers.
Sep 19, 2023 3,206 words in the original blog post.
The article explores the integration of MongoDB, a NoSQL database, with Docker, a platform for containerizing software applications. It highlights the benefits of using Docker to run MongoDB, such as resource efficiency and ease of starting new instances, which are essential for development and production environments. The text details how to implement MongoDB in Docker, emphasizing the importance of data persistence through Docker volumes and secure configurations using authentication. It also demonstrates the creation of a simple Flask application for student database management, showcasing how to manage data persistence and connectivity between Docker containers. Additionally, the article introduces Earthly, a tool for managing Docker components, ensuring uniformity and reproducibility across development and production environments. Through practical examples, the article emphasizes the advantages of containerization, such as consistency across operating systems and the ease of deploying applications in a consistent environment.
Sep 19, 2023 2,510 words in the original blog post.
The text provides a critical analysis of how marketers and consultants exploit the DevOps Research and Assessment (DORA) metrics, which are designed to improve IT performance through cultural and systemic changes in organizations. Originally developed in collaboration with Puppet and later acquired by Google, DORA metrics have become integral to DevOps practices but are often misused by marketers and consultants who promise quick-fix solutions that don't address the necessary organizational changes. The author, drawing from personal experiences across various roles in tech, argues that these professionals frequently mislead businesses by framing their products or services as essential to improving DORA metrics, without truly facilitating the deep cultural shifts required. The piece calls for technical professionals to critically evaluate the claims made by marketers and consultants, emphasizing that real organizational change must originate internally rather than being outsourced or externally imposed.
Sep 13, 2023 2,980 words in the original blog post.
Python Abstract Syntax Trees (ASTs) are crucial tools for understanding and manipulating the syntactic structure of Python code, enabling developers to analyze, transform, and optimize their programs efficiently. AST represents code as a hierarchical tree, with nodes reflecting various syntax elements, such as functions and expressions, which can be traversed to gain insights into code structure and dependencies. By leveraging ASTs, developers can perform static code analysis to identify potential issues, optimize code performance, and automate transformations for improved readability and maintainability. The article illustrates practical applications of ASTs, including visualizing code structures using tools like graphviz and performing static code analysis to detect inefficient patterns or security vulnerabilities. Additionally, it explores how ASTs facilitate precise and controlled code transformations, such as adding logging mechanisms across a codebase, thereby enhancing code quality and developer productivity.
Sep 11, 2023 4,216 words in the original blog post.
The article provides a comprehensive guide on integrating Golang with Cloudinary for efficient image uploading, highlighting the advantages of using cloud services over traditional methods of storing files in application databases. It explains the process of setting up a simple REST API in Golang, utilizing the Gin framework, to manage HTTP requests and handle user data. The tutorial emphasizes the use of Cloudinary's media management platform for secure and optimized storage, detailing the steps to set up access credentials, install necessary SDKs, and implement an image upload feature. The article also covers the creation of middleware for file processing, the implementation of HTTP request handlers, and testing the system using Postman. Throughout the guide, the author stresses the importance of using CDNs and cloud storage for scalability, cost-effectiveness, and enhanced performance in modern web applications.
Sep 08, 2023 2,714 words in the original blog post.