Skip to content

Instantly share code, notes, and snippets.

@pedro108
Last active May 18, 2022 15:46
Show Gist options
  • Save pedro108/3b7aeff4b78678a87b9ebc26187e5a18 to your computer and use it in GitHub Desktop.
Save pedro108/3b7aeff4b78678a87b9ebc26187e5a18 to your computer and use it in GitHub Desktop.
Ruby Study Plan

Study Plan

  • Read literature on Rack

    • It’s a minimal and modular interface that wraps HTTP requests and responses and is used to support the connection between web server, middlewares and web frameworks. Design pattern, interfaces or architecture
    • A contract between a web server and a web framework, that also allows the creation of middlewares
  • Exercise: Create a fresh Rack application with a middleware

  • Exercise: Create a Sinatra app as Rails middleware

  • Read literature on DDD (Boundaries, Aggregates, Anti corruption layer)

  • Read literature on CQRS - Event Sourcing and Message Brokers (Kafka and RabbitMQ)

  • Clean Architecture: Domain and Application layers

  • What’s the difference between SideKick, RabbitMQ and Kafka?

    • Sidekiq message disappears once a Sidekiq worker gets it and process it.
    • RabbitMQ is a message broker, while Kafka is a distributed streaming platform
    • RabbitMQ keeps track of consumers, and what message queues are attached to them, Kafka doesn’t need to keep track of consumers
    • Kafka read and write complexities are O(1)
    • Kafka allows to replay messages
    • Kafka deals event as entries in a log file. Kafka creates an entry log for each topic partition, it guarantees message orders only on a single partition
  • Problem: slow consumers

    • Create a little Rails app that applies CQRS with event sourcing with message brokers
  • Review literature on SOLID (Single Responsibility / Open - Closed / Liskov Substitution / Interface Segregation / Dependency Inversion)

  • Change challenge code to add I18n

    • use ‘i18n’ gem
  • Review TDD literature

  • ActiveRecord query vs SQL query

    • Performance vs Productivity
    • SQL views
    • Includes vs. Joins in ActiveRecord
  • Like and don’t like on Ruby

    • Like: Its hard to not fall in love with this language when first learning it. It’s simple, concise and gives the power to express complex logic in simple statements. I also like the freedom and not dealing with primitive types (everything is an object). Also the power of DSL creation in ruby is astonishing. The development environment and tooling are also pretty mature and impressive The community is impressive and always helpful
    • Don’t like: lack of type safety and compile time checks. Without enforcing types, we can’t have declaration of interface contracts for abstractions and that’s why its so important to follow conventions and test everything in ruby, the upside is that it enforces shared guidelines and architectures within the community
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment