News for hackers. Stuff that matters.
Re:Robocode by IshKebab on Tuesday February 18, 2025 @06:13PM (#43096349)
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?

Re:Robocode by ChanderG on Wednesday February 19, 2025 @01:01AM (#43099066)
The historical context behind the naming of dynamic programming was discussed on HN before: https://news.ycombinator.com/item?id=17806913
Re:Robocode by _blk on Wednesday February 19, 2025 @02:04AM (#43099404)
Memoization? ;)
Re:Robocode by IshKebab on Wednesday February 19, 2025 @03:18AM (#43099843)
Ha also a terrible name (why not "caching"?) At least it sounds like memorization so it's easy to remember what it means.
Re:Robocode by zajio1am on Wednesday February 19, 2025 @01:07PM (#43105247)
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.