Skip to content

Instantly share code, notes, and snippets.

View acastro2's full-sized avatar
🦖

Alexandre Amado de Castro acastro2

🦖
View GitHub Profile
@acastro2
acastro2 / architecture_styles.md
Last active April 12, 2023 15:25
Learning: Software Architecture

What is this?

Summary in cards format o the architecture styles extrated from the book Software Architecture by Mark Richards, Neal Ford

Architectures

Layered Architecture Style

Overview

Layered architecture organizes components into horizontal layers responsible for specific functionalities, like presentation, business logic, and data access. Each layer interacts only with the one below it, promoting separation of concerns and maintainability.

@acastro2
acastro2 / example.go
Last active July 13, 2024 03:27
Kafka retries with Go
package main
import (
"context"
"crypto/tls"
"encoding/json"
"fmt"
"math/rand"
"time"
@acastro2
acastro2 / pry.md
Created May 11, 2020 16:16
Pry Tutorial

Pry

Nothing Works the Way You Think It Does. It's a familiar scene: the code doesn't work. Not only does it not work, but it makes no sense whatsoever that it doesn't work. You've checked the code several times, and it's just not possible that it's broken. But it is.

In Ruby, you can debug and test your code using IRB, short for Interactive Ruby, a quick way to explore the Ruby programming language and try out code without creating a file. IRB is a Read-Eval-Print Loop, or REPL (7 Minutes), a tool offered by many modern programming languages. To use it, you launch the irb executable and type your Ruby code at the prompt. IRB evaluates the code you type and displays the results.

However, IRB is not without its limitations, and this is where Pry comes in. Pry present's itself as a powerful IRB alternative and runtime developer console for Ruby. However, it is much, much more than that.

Required Re