The proposed strategy will work, as will plenty of others, because it's a small team. That is the fundamental reason. Small teams are more efficient. So if you're managing a team of 10+ individuals: split them in 2 teams and keep them out of each other's way/harm.
numpy is only fast if the computation does not escape it. There are plenty of cases where execution ping-pongs (if that's a verb) between python and the C(++) wrapper numpy actually is. Then everything becomes quite slow.
Anyway, I see data scientists and statisticians (at least 100% of the ones I know) completely ignoring Julia, just because they only have been exposed to Python and R in their education. The quality of the programming language/ecosystem seems to be irrelevant.
> But the interviewers will not appreciate this solution approach lol.
I once witnessed a programmer with a PhD in Maths find closed form formulas for a lot of questions where it was expected to write some code with loops building/accumulating a result. As a simple example, to explain what was going on, if the question would be "calculate the 100th fibonacci number", she would just use Binet's formula to do so (as opposed to using a loop). I was rather impressed how often that happened.
Is Binet's formula really that practical a way to calculate the Fibonacci numbers (except asymptotically)? The problem is, you have this nice clean expression, but you'd still have to implement a bunch of fancy arbitrary-precision arithmetic to approximate the golden ratio through Newton's method. In other words, the formula gives much more information about the structure of the Fibonacci numbers than their actual values.
For evaluating the Fibonacci numbers (as with any other integer linear recurrence), I'd generally prefer the matrix-exponentiation-by-squaring approach, or one of the simplified formulas based on it. Those don't need anything more complicated than bigint multiplication. [And from there, taking the ratio between two values gives you a quick way to approximate the golden ratio!]
Once you have postulated BigInt as available, the mathematician is going to make a rational approximation for phi using the continued fraction expansion that they know by heart (because of its “simplicity”).
Calculating φ from its continued-fraction expansion is equivalent to just iterating the Fibonacci sequence normally, since its convergents are precisely the ratios between the Fibonacci numbers. At that point, it's totally redundant to use Binet's formula on the approximation, since you have the values already!
If you want to beat the O(n^2) runtime of the trivial iteration, you pretty much have to use Newton's method for φ, exponentiation by squaring on the matrix form, or another method with faster-than-linear convergence.
If you think it is you should read up on linear algebra, specifically its use in finite difference equations and how that relates to linear differential equations.
The astonishment doesn't get less, but it shifts from Binet's single formula to the exponential map, and maybe the fundamental theorem of algebra (or generalisations).
I always cringe whenever someone who is well tenured on managing IT projects says on a group call that "They're not really a technical person"... It's often the result of being someone's protected buddy, but let's all be serious about it all, if these people continually manage technical programs, it's a huge failure for them to not be learning the landscape and regularly work on improving their understanding of how tech works, or at the bare minimum, leaving direction to accountable people that do know tech implications.
So many of the current apps we use now have been buried in adware and bloat due to the decisions of non-visionary minds leading as product owners... Most notably with Twitter/X, and frankly, it frustrates everyone and scuttles very mission critical operations that grow to rely on tools and services that were originally created by actual tech visionaries that learned and accelerated in the art...
Also, "learning on the fly" should not be a normal practice on mission critical operations... The ideal of under-bidding contracts and under-paying employees, and even hiring tons of junior employees for mission-critical development efforts is really destroying and undermining the entire industry.
Sometimes we need to just turn down the opportunity to work in a burning bowl of spaghetti, the resulting products & services always reflect the process applied to create them, no matter how many "smart" work-arounds are created.
> most companies forbid you from discussing your wages ....
Yes, but this interdiction might not be legal. Companies typically add such clauses to achieve a chilling effect. (Ie, you abide because you fear running a risk if you don't). Consult your legal representative.
reply