Hacker News new | ask | show | jobs
by IshKebab 485 days ago
Yeah some names make a concept more confusing. Dependency injection is definitely one of those. I understand where the name comes from but it's just a really bad name. Sounds way more complex than it is.

Still, not as bad as "dynamic programming". Sounds complicated right? It's just recursion with caching. There the name was almost deliberately bad. "dynamic" is just a generic fancy sounding adjective (yeah really), and "programming" is not a reference to coding; it's a reference to scheduling. Because that's not at all confusing... "Cached recursion" doesn't sound like you've really invented anything though I guess.

Please can we all call it "cached recursion" from now on?

3 comments

The historical context behind the naming of dynamic programming was discussed on HN before: https://news.ycombinator.com/item?id=17806913
While 'recursion with caching' is an easy way how to start explaining 'dynamic programming', there is a slight difference - recursion works top-down, while dynamic programming algorithms generally works bottom-up.
Memoization? ;)
Ha also a terrible name (why not "caching"?) At least it sounds like memorization so it's easy to remember what it means.