A programming idiom is the usual and customary way to write code in a particular language.
I'm designing a class that defines a highly complex object with a ton (50+) of mostly optional parameters, many of which …
php class constructor instantiation idiomsSay I have a matplotlib axes called ax, and I want to set several of its properties. Currently, I do …
python matplotlib idiomsI have an expensive (time-consuming) external request to another web service I need to make, and I'd like to cache …
ruby-on-rails ruby caching idioms memoizationI have seen a few mentions of this idiom (including on SO): // Deliberately empty subscriber public event EventHandler AskQuestion = delegate {}; …
c# coding-style delegates events idiomsI have a standard many-to-many relationship between users and roles in my Rails app: class User < ActiveRecord::Base has_…
ruby-on-rails activerecord associations idiomsImagine you have a map like this: (def person { :name { :first-name "John" :middle-name "Michael" :last-name "Smith" }}) What is the idiomatic …
clojure idiomsWhich is preferred ("." indicating whitespace)? A) def foo(): x = 1 y = 2 .... if True: bar() B) def foo(): x = 1 y = 2 if True: …
python coding-style idiomsThere's quite a few JavaScript idioms that coerce between types and similar things. ! can convert anything falsey to boolean true, !! …
javascript null undefined idioms coercion