52 minutes ago · 12 min read2421 words · Tech · hide

Weighing unnecessary network calls against simplicity and expected cost. Ever since I first started talking about Impueriem Sandwiches, and later Recawr Sandwiches, the most common question has been: What if I need to fetch some data, make a decision based on that data, and so on? I've already responded to such questions a few times: A conditional sandwich example Song recommendations as an Impureim Sandwich As I have also stated, the problem with selling this design pattern is exactly that it's not a general-purpose architecture. No design pattern is. I am, therefore, always happy when I receive particular questions about it, because I believe that the more examples I give, the easier it is to see the value. A letter from a reader # Sam Frances recently wrote to me: "Lets say you have a pure function like the following: def choose_command(config, permissions): if "my_feature_flag" in config and "my_perm" in permissions: return FooCommand() return BarCommand() "This is nice and pure,…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town