Hacker News new | ask | show | jobs
by hqudsi 1021 days ago
When I was first starting out, a then senior engineer told me: "friends don't let other friends use kwargs".

That always stuck with me.

1 comments

I once worked on a code base where we had *kwargs passed down 4 or 5 layers deep (not my idea.) It was a true joy.
This is literally me. It is a math program that can evaluate equations and generate code. 6 layers of heterogeneous data structure which the math operation being act on 1st layer has its effect down to 6th layer. Temporarily using *kwargs to make it works but still thinking what is the proper way to do it right.
Out of interest, what sort of company/industry do you work in where you're able to work on this kind of thing?
Can you organize the data structures into classes or dataclasses?
Already doing this. The problem is there are 5 layers in between. Copy and paste the same docstring into all layers is doable but do not seem smart.