{ "@context":[ "https://www.w3.org/ns/activitystreams", {"Hashtag":"as:Hashtag"} ], "published":"2021-10-25T12:01:01.122Z", "attributedTo":"https://epiktistes.com/actors/toddsundsted", "to":["https://www.w3.org/ns/activitystreams#Public"], "cc":["https://epiktistes.com/actors/toddsundsted/followers"], "content":"

before it was called \"agile programming\" it was called \"extreme programming\". one of the tenets of extreme programming is \"merciless refactoring\". another is \"edgy adjectives\".

an often overlooked \"freedom\" in a free software project is the freedom to refactor, mercilessly. why turn a free software project into a feature factory? you can get that in an office job, right?

anyway, commits 14d22ca to 14fb9af do away with 1860 lines of code, while only adding 880 lines. more importantly, they do away with quite a lot of distracting boilerplate—like explicit identifiers (IRIs) that usually have no bearing on the outcome of a test.

the one big addition was spec_helper/factory.cr (349 lines), which adds lightweight factories that take care of the details of instantiating a valid model instance.  i picked up the build/create paradigm from the factory_bot gem, and extended the let/let! pattern used in spectator.

#ktistec #agile #extreme #refactoring

", "mediaType":"text/html", "attachment":[], "tag":[ {"type":"Hashtag","name":"#ktistec","href":"https://epiktistes.com/tags/ktistec"}, {"type":"Hashtag","name":"#agile","href":"https://epiktistes.com/tags/agile"}, {"type":"Hashtag","name":"#extreme","href":"https://epiktistes.com/tags/extreme"}, {"type":"Hashtag","name":"#refactoring","href":"https://epiktistes.com/tags/refactoring"} ], "type":"Note", "id":"https://epiktistes.com/objects/xtZZnwR0p8k" }