Skip to main content

Classic Season 5

3h 32m 54s
English
Paid

Welcome to Classic Season 5! Dive into a series of lessons where you will learn advanced programming concepts, practical applications, and refactoring techniques. Let’s explore how to optimize your code and enhance your understanding of various programming languages and frameworks.

Lesson 1: What Goes in Active Records

In the "What Goes in Active Records" series, we explore design constraints for ActiveRecord models. This lesson addresses the challenge of long test files for small classes. By creating a new value class and tightening interfaces, tests become shorter and easier to understand. The refactoring leaves the tests isolated from Rails, significantly boosting efficiency and speed.

Lesson 2: Collapsing Services into Values

Building on the previous lesson, this session converts the Subscription value object to a database table and ActiveRecord model. Initially, the User class managed subscription logic, which gets streamlined by extracting to its own model. This raises important questions about the suitable location for logic in a complete system.

Lesson 3: Understanding Rubinius

Rubinius, a Ruby implementation, blends Ruby with C++. We’ll review its structure, focus on load order, and object system bootstrapping. This session includes a practical exercise: removing a feature by updating related source files and verifying changes through tests and inspections.

Lesson 4: Comparing Python and Ruby Object Systems

While Python and Ruby offer dynamic expressiveness, their approaches diverge. Python emphasizes attributes, whereas Ruby focuses on methods. This delineation influences language peculiarities, including Python's focus on correctness and Ruby's efficiency in method handling.

Lesson 5: Validating Data Integrity in Rails

Exploring Rails apps, this lesson highlights the pitfalls of controller-level data validation and ActiveRecord limitations. We examine bypass strategies, their consequences, and solutions via real database constraints to maintain robust data integrity.

Lesson 6: Decoupling with Actor-based Concurrency

Addressing hard coupling in code, this session suggests separating object boundaries to enhance design and testing. We explore alternative dependency management methods beyond dependency injection, enabling smooth transitions to actor-based concurrency models.

Lesson 7: Overcoming Primitive Obsession

Primitive obsession, or using basic data types in place of domain-specific objects, compromises design clarity. This lesson reviews the Screencast class transition to a structured object model, showcasing how this shift affects software architecture.

Lesson 8: Isolated Testing without Stubs or Mocks

Discover methods for writing isolated tests by separating data from behavior in objects. Testing focuses on value parts, preventing dissonance with production code. This approach serves well for data-heavy classes, avoiding complexities linked to stubs and mocks.

Lesson 9: Multi-paradigm Refactoring

This screencast covers refactoring across imperative, object-oriented, and functional paradigms. Beginning with imperative form, the lesson transitions through object-oriented approaches to functional solutions, highlighting strengths and limitations of each.

Lesson 10: Bug Report to Test Driven Development

Transform bug reports into tests for targeted defect resolution. This lesson emphasizes step-by-step test-driven development, facilitating problem-solving even when stack traces are deceptive or incomplete.

Lesson 11: Test Style Transition to RSpec

Pre-BDD test cases often lacked expressiveness. We refactor Hamster's test suite to an example style, balancing test coverage and readability with human-readable specifications for effective testing.

Lesson 12: Exploring C and Its Unit Tests

Most underlying software systems are crafted in C. This session introduces a C-based project, discussing its unit tests and structural similarities to object-oriented design principles, despite being lower-level.

Lesson 13: Analyze System Performance Tools

Performance analysis ranges from load average simplifications to detailed DTrace insights. Here, we evaluate tools like /usr/bin/time for measuring involuntary context switches, crucial for detecting system behavior anomalies.

Lesson 14: Implementing Theoretical Actor Syntax in Ruby

Utilizing Ruby's flexibility, this session demonstrates implementing theoretical actor syntax in practical code. By progressively making syntax operational, this lesson reveals the actor model’s potential.

Lesson 15: Asynchronous Test Execution Techniques

This lesson presents ways to run tests asynchronously using tools like tmux and Unix primitives. Learn to communicate between processes for smoother and more efficient test management strategies.

Lesson 16: Comprehensive Test Recommendations

A comprehensive guide to test design covers separating unit and integration tests, using stubs strategically, and listening to test setup complexities. Adopting these practices leads to streamlined and effective testing.

Lesson 17: Embracing Rails Primitives for Refactoring

While often critiqued, this session shows when Rails primitives offer optimal design solutions. By refactoring controllers, behavior is effectively separated, leaving controllers streamlined for HTTP interactions.

About the Author: destroyallsoftware

destroyallsoftware thumbnail
I'm Gary Bernhardt. You know me from Wat and, with luck, from Boundaries or The Birth & Death of JavaScript. These screencasts are the ones that I wish I'd had for myself: dense, brief, concrete demonstrations of topics that we usually only talk about in the abstract.

Watch Online 18 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 18 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Collapsing Services Into Values
All Course Lessons (18)
#Lesson TitleDurationAccess
1
Collapsing Services Into Values Demo
11:11
2
Splitting Active Record Models
10:37
3
Removing a Rubinius Feature
11:41
4
Python vs. Ruby Objects
08:56
5
Where Correctness Is Enforced
09:33
6
Separating Arrangement and Work
10:52
7
Primitive Obsession
15:49
8
Isolating by Separating Value
11:06
9
Imperative to OO to Functional
13:22
10
Debugging With Tests
09:47
11
Test Cases vs. Examples
14:00
12
A Bit of C
11:03
13
Analyzing Context Switches
11:47
14
Actor Syntax From Scratch
14:35
15
Running Tests Asynchronously
08:18
16
Test Recommendations
16:22
17
When Rails Is Right
10:47
18
A Day in The Life
13:08
Unlock unlimited learning

Get instant access to all 17 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription