🗞️ DevTips Weekly - Issue #2
Programmable CI/CD, Text Classification with Spring AI, 7 Programmers Habits and Distributed Transaction Management
🗞️ DevTips Weekly suggests some interesting articles that I have read over the past week, some of which might be posted in DevTips.
Why is Building Pipelines Different from Software Development?
CI/CD pipelines automate software integration and deployment. Still, they often face development and lifecycle management challenges, particularly with YAML-based configurations and the lack of reproducibility in runner environments. The blog introduces Dagger, a programmable CI/CD engine that uses containers to ensure reproducibility and ease of debugging. It demonstrates converting a Python pipeline to use Dagger, highlighting the benefits of local testing and integration with GitHub Actions. It also suggests that Dagger’s approach allows for easier migration between platforms and community collaboration on best practices. The author shares their positive experience with Dagger and encourages others to try it.
Text Classification with Java, Spring AI, and LLMs
This article provides a comprehensive guide on implementing a text classification system using Java and Spring AI, leveraging large language models (LLMs) for natural language processing tasks. It covers the basics of text classification and the traditional machine-learning approach and introduces a new method using LLMs with a prompt-based strategy. The article details the process of integrating LLMs into a Java application, using the open-source model Mistral and the Ollama platform for local model inference. It also discusses various prompting techniques, such as zero-shot and few-shots, to improve classification accuracy and concludes with integration testing using Testcontainers and the importance of structured outputs for AI-infused applications.
7 Habits that Programmers Must Have!
This article discusses the importance of adopting effective habits for programmers, inspired by Stephen R. Covey’s book "7 Habits of Highly Effective People." It emphasizes the need to change daily habits to achieve goals. It outlines seven key habits: being proactive, beginning with the end in mind, putting first things first, thinking win-win, seeking to understand before being understood, synergizing, and sharpening the saw. These habits aim to enhance productivity, collaboration, and continuous learning in a programmer’s career.
Difference Between Two-Phase Commit and Saga Pattern
This article discusses distributed transaction management, comparing the Two-Phase Commit (2PC) protocol and the Saga Pattern. 2PC ensures atomicity and strong consistency across nodes by using a coordinator to manage a two-phase process, suitable for short-lived transactions but less scalable. The Saga Pattern, on the other hand, favors eventual consistency and scalability by breaking transactions into independent sub-transactions with compensating actions for failures, making it ideal for long-lived transactions. The choice between 2PC and Saga depends on the system’s consistency, scalability, and fault tolerance requirements.
API Design 101: From Basics to Best Practices
This article provides a comprehensive overview of API design, covering the basics and advancing to best practices. It discusses CRUD operations, communication protocols, data transport mechanisms, API paradigms like REST, GraphQL, and gRPC, and their pros, cons, and features. Additionally, it touches on designing API endpoints to reflect relationships, the importance of idempotent GET requests, backward compatibility, versioning, rate limitations, and CORS settings. The author, Hayk Simonyan, also invites readers to explore system design concepts further and join the Web Dev Mastery community for more insights.
🗞️ Previous issues of the DevTips Weekly
You can also support me in buying a latte ☕️ !(one time or monthly):