Skip to content

Comment on Ask HN: What are ways programmers "reframe" problems to make them easier?parent

Comments

While trivially true, I think the question has merit as some of these reframings are more interesting than others.

In physics for example, Lagrangian mechanics[1] is an interesting reframing of classical physics allowing for drastically simpler implementations in certain cases, while still just being a bunch of partial differential equations and numbers.

In engineering and signal processing, the Laplace transform reframes time-varying signals such[2] that it's much easier to calculate or design the resonse of a system.

Back in programmer land, several such useful reframings that aren't directly rooted in physics or linear algebra that I can think of come from crossing the functional-imperative border.

Another is inversion of control[3], in the general sense[4], where you pass the code modifying the behavior, rather than explicitly drive the modified behavior from the outside.

[1]: https://en.wikipedia.org/wiki/Lagrangian_mechanics

[2]: https://en.wikipedia.org/wiki/Transfer_function

[3]: https://en.wikipedia.org/wiki/Inversion_of_control

[4]: https://martinfowler.com/bliki/InversionOfControl.html

Thanks for these.

Here's another one: coordinate space (e.g object, world, normal, tangent) to make vertex transformation calculations almost trivial.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.