Weeknotes: 20 January to 24 January 2025
Exploring Ruby's Struct class, RSpec's failing tests, more insights on project structure and sustainability design

What I have found gripping
In Ruby programming, the class Struct creates a class that can store and fetch values. See an example from irb below:
Book = Struct.new('Book', :title, :author, :year)
Book = Struct.new('Book', 'Sula', 'Toni Morrison', '1973')
Book.inspect
=> "Struct::Book"
Book.members
=> [:Sula, :"Toni Morrison", :"1973"]
In RSpec, there is a command to only show failing tests: rspec --only-failures
Structuring a new project with a main feature and taking into account constraints involves slowing down before coding
What I have read
class Struct, Ruby doc
What I have watched
The Karlskrona Manifesto on Sustainability Design, Birgit Penzenstadler
Featured quote
Sustainability applies to both a system and its wider contexts. There are at least two spheres to consider in system design: the sustainability of the system itself and how it affects sustainability of the wider system of which it will be part. — The Karlskrona Manifesto
Further reading and resources
In English
You just read issue #51 of Sandra's Weeknotes. You can also browse the full archives of this newsletter.