Expressing GoF Patterns using First-Class Functions
Written by Grigory Rechistov in Uncategorized on 13.10.2025. Tags: oop, fp, patterns,
Let’s see if I can express those patterns found in the GoF book, meant for object-oriented languages, in a …
Let’s see if I can express those patterns found in the GoF book, meant for object-oriented languages, in a …
“What/who tests the tests?” This question arises at some point while learning Test-Driven Development (TDD). If every piece of production code ends up tested in the TDD process by construction, does the same apply to the code of the produced tests themselves?
It’s time to go meta.
Before we talk about how a test case could end, let’s recall its canonical structure. It is needed because we will refer to events that can happen in test’s …
The following is quoted from Wilbert McKeachie, McKeachie’s Teaching Tips, an older edition from the 1990-s.
Teachers’ manuals that are provided for many textbooks contain multiple-choice items. You will not be able to rely on a manual as the source of all your questions, because it often will not …
https://www.byggmax.se/verktygstavla-tellbe-p705228#1250=89042
https://www.clasohlson.com/se/Knipex-tangnyckel-250-mm/p/41-1789
https://www.amazon.se/T%C3%A5ngnyckel-skruvnyckel-flerkomponents%C3%B6verdrag-250-86/dp/B01H73UPXE
Början: del 1.
Forumtråden: https://happyride.se/forum/threads/restaureringsprojekt-magura-durin-md100-race.3702162/.
Hade lite tid att ta isär luftkammaren och ta en bild. Elastomererna är helt tillplattade och smulas:
Om man jämför mot en bild funnen i service-PDF:en ser man skillnaden på nya brickor:
De nya verkar vara …
Forumtråden: https://happyride.se/forum/threads/restaureringsprojekt-magura-durin-md100-race.3702162/.
Jag har fått den Magura Durin MD100 Race som en del av en barncykel.
TL;DR: there is a difference between “is proven” and “could not be disproven”.
Let’s say you have a hypothesis A. How do you test it? By doing a set of experiments E₁, E₂, E₃, etc., observing their outcomes and comparing them against predictions made by A.
How do …
Do you write your tests after corresponding production code has been written? Do you run your new test, see it pass, consider the job done and then move on onto the next task?
Here is a thought experiment for you. I hope it will illustrate a problem with this approach …
I came to realisation that certain design principles originally formulated within object-oriented programming (OOP) are applicable to a wider range of programming concepts. Inheritance is one of them.
Bureaucracy has good (wut?) and bad sides.
The good intentions behind of formalizing an activity into a documented process is to reduce variation, reduce possibility for corruption and thus improve scaling. While all good things, there is a price to consider.
Automation has lower flexibility than humans have when it …
Many x86 instructions from AVX512 and AVX10 families (encoded with EVEX prefix) allow specifying “suppress all exceptions” (SAE) flag in instruction’s opcode (EVEX.b field). While the intention of avoiding throwing exceptions on certain floating point inputs is clear, it is …
There are patterns in why and how tests fail and pass, and what corrective actions should and should not be applied by developers in response to that. Here are some do’s and don’t s for different good and bad situations.
We have a …
A more detailed example of how a Null Object mentioned in my previous post could be used for good in a more down to earth example.
As before, clearly defining what a “null” behavior in all your specific cases should be is the key towards successfully defining good behavior for …
Inspired by Sandi Metz’s video about the Null Object pattern and related things.
This is a continuation of my thoughts about how the ideas of object oriented programming (OOP) have changed over my time.
I am comparing the OOP applications and ideas that I was taught early in my life against my relative recent “discoveries”. These differences are reflected in the designs of …
This is very likely not a new idea. I most probably have seen it somewhere but have since forgotten where. Now I feel as it was my own idea. I wanted to share it.
Any non-trivial software application has a structure with many units of behavior interacting with each other …
As my friend Jacob Gabrielson once put it, advocating Object-Oriented Programming is like advocating Pants-Oriented Clothing. // Steve Yegge
I was taught the Objected Oriented Programming (hereinafter “OOP”) long ago. Looking back now, it turned out that it maybe caused more harm than it was useful to my software design skills …
Updated 2023-07-06
Recently I realized that there is a common pattern for many testing-like activities performed during daily development cycles. Many of them provide the biggest benefit if their results are reported in an incremental manner, i.e. against individual change requests, rather than against the whole code base.
Examples …
Tack vare Brexit det är nu mindre krångligt att beställa vissa små prylar direkt från Kina än från Storbritanien. Men i det här fallet var Ebay.co.uk den enda platsen där jag kunde hitta vevpartier med 127 mm långa vevarmar och 32 kuggar för fyrkantsvevlager.
Paketet var löjligt …
G16. Obscured Intent. We want code to be as expressive as possible. Run-on expressions, Hungarian notation, and magic numbers all obscure the author’s intent. .. Small and dense as this might appear, it’s also virtually impenetrable. It is worth taking the time to make the intent of our code …
Static analysis is great because it allows to catch many types of issues without the need to run the code. It is not perfect however. When you consider it in the scope of a big evolving project, there dangers not always pointed out by the adopters. The main danger is …
Hjulparet har äntligen kommit fram. Här är vad kartongen innehöll.
Enkla snabbkopplingsaxlar och en kassettdistans insvepta i tidsenlig (från juli 2021) pappersbit. Till QR-axlarna har jag ett bättre par liggandes någonstans. Kassettdistansen kom dock till nytta vid bygget.
Själva hjulen. Dekalerna var lättavskalade. Naven är av enkel konstruktion …