Every year, we reap 10 of the 100 wealthiest people to fight to the death. The odds of being chosen are proportional to their net wealth; they can surrender wealth to lower their odds.
The chosen have one week to prepare. If you can afford a giant killer robot, now's the time.
The losers' fortunes are donated to the poorest countries. The winner gets launched into space. If they did very well, they're inside the rocket instead of strapped to it.
@b0rk most of the time I need to use an algorithm like you'd learn getting a CS degree, it's for Advent of Code, and most of the time it's Dijkstra's algorithm.
The one time I used an algorithm on the job was writing a custom Maya plugin splineIK node for rigging characters. I used the binary search to precisely place the end point of each bone with a sample segment of the curve.
It is not fun "writing" a binary search in a node based, visual programming language.
One of the biggest points of disagreement I have with my supe about #python is accessing environment variables like the current project. He is adamant that it always has to be passed in, I made it optional and let it fall back to the environment. He has yet to explain it in a way that makes is case (or at all).
@meejah Counterpoint - this global is probably a singleton, so you can mock it once in the test config. Or mock the underlying environment variables once. If a specific test needs to do something different, it can mock the mock.
@meejah That is an ambitious goal, if you have control over your dependencies. But in a VFX pipeline, especially one dragging along 15 years of legacy code, you work with what you have.
@meejah Don't tell that to my boss... he has a package of Maya actions that he insists on writing unit tests for. So instead of using our Maya test runner to run the tests in Maya, he mocks everything the maya Python package. Which I feel only tests how good you are at mocking...
The fragmented nature of the Fediverse is hilarious because sometimes you'll see the most unhinged, insane shit posted freely and other times you'll see utterly ordinary posts tag like cw: cheese.
We're slowly moving to a more prescribed pipeline, where the artists do not need to know where files are on disk, only how to find them in the asset management system. Where the artists don't need to know what packages they need to select to do their work, just what app.
We'll get there... eventually.
And then it will all change when the next supe is hired. 🙃
@flipsideza We had the opposite problem - there's low turnover among the core staff; some of the leads have been here for over a decade, so there's a lot of inertia behind "this is how we've always done it" as we try to make the transition to a modern pipeline.
@flipsideza I completely understand. In a similar vein, my supe gives me grief for not having unit tests for Maya facing code - I prefer integration tests that run in Maya standalone to mocking all of Maya cmds.
And yet, another TD has zero tests for all of his code...
@flipsideza It's actually faster to have tests than to not have them.
Consider the time it takes to manually test your code, especially if you don't have a package unloader function and have to manually reload modules, or worse, restart Maya between code changes.
It's orders of magnitude faster to have an automated test suite. Ths time it takes to write the tests is less than the time it takes to manually test code.
Too, testable code is often better written and easier to maintain.
@flipsideza just as an example, a few years ago I wrote maya_fn as a toy project; an API of the most common things you do in Maya as simple functions rather than the flag/argument style of maya.cmds
It would take so much time to test this by hand. But the test suite runs in seconds, and covers positive and negative use cases.
@flipsideza The inertia of not having tests is probably the biggest obstacle to overcome. But once you set up your runners, you can start by requiring all new code have tests, and slowly extend coverage to old code...
...and then learn just how much your old code has embedded dependencies. On environment variables, on file naming conventions, on the database... pyfakefs and mock will he your friends.
@flipsideza a final thought; we have dozens of publish actions that artists use to commit work to the asset management system, and import actions for all of their outputs.
It would take all day to manually test them all.
With automated test suites, it takes less than a minute.