Another nice simple example of the "pseudoinverse idiom" is when you have a "boolean" variable in C, i.e. 0 is false and non-zero is true, and you want to set a particular bit in a bit flag to 0/1 from this boolean value. If the origianl "boolean" value is foo, you do "!!foo" since !<non-zero> == 0 and !0 == 1, and bit-shift the result. I never made the connection with Moore-Penrose pseudoinverses, but there it is.