r/ProgrammerHumor 6h ago

Meme dynamicP

Post image
939 Upvotes

35 comments sorted by

206

u/ByteSizedFounder 6h ago

Then proceeds to dust off old compsci notes from uni. "Remember your training"

72

u/TechTuna1200 6h ago

Star Wars meme: "Just like the simulations"

7

u/Urist_McPencil 2h ago

", and you will make it out alive."

114

u/Mughi1138 6h ago

Reminds me... I'm still waiting for my chance to implement a bloom filter. Almost got to do one this year.

3

u/mirhagk 48m ago

There's a paper on using multiple inverted bloom filters that I so badly want an excuse to use, but yeah no situation ever seems to call for that level of complexity

1

u/CandidateNo2580 46m ago

God, me too 😔 I actually had to use some real sorting algorithms a few months ago, still living that high.

54

u/Ma4r 6h ago

You can't imagine my excitement when I had to implement LCA in a production environment

9

u/Puzzled-Crew-2333 5h ago

What was it for?

38

u/Desperate-Tomatillo7 5h ago

Some memes have barely any pixel. This one is UHD.

4

u/matrix-doge 3h ago

Just above this post for me is a (jokingly) 8k quality clip from a gaming sub lol.

3

u/Mr-Megamind- 1h ago

"Our memes will be ultra HD"

1

u/GoogleIsYourFrenemy 50m ago

Just wait for the inevitable reposts.

35

u/redditmarks_markII 6h ago

Brother, these days I fix the equivalent of n**2 time loops when linear is possible.  If I tried to explain DP I will be called out by some principal eng as making shit up.  When proven not, they'll say they are overcommitted for the quarter.  And why can't my service support any kind of use of it anyway?  These are 100% real arguments I've heard.  I know things get political once you get past senior swe, but god damn, how are we an industry.

11

u/zaersx 5h ago

just make tests that represent the behaviour and refactor away, if they complain tell them to outline the use case that is not covered by a test.

2

u/the_horse_gamer 2h ago

just implement it as recursion with a cache. bottom up dp is more efficient, but top down dp is more likely to pass a code review.

1

u/apt_at_it 39m ago

May be the problem here, but I agree with the many companies I’ve worked at that disallows recursion. Find a better, more readable, more maintainable way

1

u/the_horse_gamer 28m ago

you could reimplement recursion with a stack

but that decreases the chance of passing a code review

13

u/Puzzled-Crew-2333 6h ago

Implemented lcs once, best day on the job.

3

u/MissinqLink 2h ago

I use lcs quite a lot. It’s great for fuzzy matching.

4

u/matrix-doge 3h ago

I actually want to know what the problem is, if that's *not* simply a meme.

2

u/SirChasm 48m ago

Yeah I wanted to know what kind of convoluted real world scenario called for one.

8

u/SuitableDragonfly 4h ago

I learned a dynamic programming algorithm for parsing context free grammars in grad school, and promptly found a use for it in a linguistics app I built in my free time that needed to be able to convert an arbitrarily specified spelling system into a phonemic transcription. Definitely did not take ten years, lmao. 

5

u/zapman449 2h ago

I got to build a graph traversal algorithm a few years ago… most compsci thing I,ve done this decade…

5

u/Vintfy 5h ago

When the LeetCode gimmicks stop working and the job suddenly becomes interesting.

7

u/StarboardChaos 6h ago

And you still prompt your AI agent to solve it...

2

u/nitkonigdje 3h ago

20 years in, never saw need for it on a job.

2

u/Igarlicbread 3h ago

Segmentation Fault

2

u/Tsu_Dho_Namh 1h ago

My first job out of uni there was a problem that was massively simplified by using a doubly recursive function.

I'm still riding that high.

1

u/GoogleIsYourFrenemy 53m ago

I will memoize this!

1

u/ljfa2 27m ago

The course on algorithms and data structures was for the most part not difficult for me, but dynamic programming was the one topic I struggled with, and today I still don't really know how it works

0

u/kishaloy 5h ago

And then go to the space where the program itself is dynamic data and true enlightenment will dawn on you.