This is a rant about videos analysing Yandere Simulator's code that have been bothering me lately.

I want to get this off my chest, so hold on to your hats folks because I'm firing on all cylinders just this once.

tl;dr: Don't watch them to improve as a programmer.
First, I won't defend anyone's or even my own code. I'm highly pessimistic and because of that I have 2 core values:
1. Elegant architecture.
2. Correctness.
Elegance leads to maintainability and correctness, and correctness is a result of simplification which leads to elegance.
Recently, "professional" programmers have taken to decompiling YanSim and trying to improve it by offering refactoring tips.

Viewers think they're learning and becoming better programmers themselves from this. It's a valiant effort, but my core values are never met.
If you think the solution to a 2000 line method is adding ternaries or splitting into sub-methods, to game state is to have statics, to performance is to not use `Debug.Log()` in your code, etc...

Then you have much to learn.
If you're calling yourself competent at and analysing Unity performance, meanwhile apparently oblivious to e.g. the generous amount of calls to `GetComponent()` in critical paths (which analysers would warn you about: https://github.com/JetBrains/resharper-unity/wiki/Avoid-usage-of-GetComponent-methods-in-performance-critical-context)..

Then you have much, much to learn.
If you're analysing a bunch of "UpdateX" methods and don't see the potential for architectural improvement, or looking at 20 if-statements in a row and the only thing that comes to mind is combining them, then guess what?

You still have much to learn.
When I watch these videos (don't worry - I don't spend long on them), I often find that the uploader is misleading viewers down the wrong path more than the original code is.

That's not praise for the original code but it is the reason why I'll advise against watching them.
I'm sure that YanDev is more than aware of the shortcomings of his architecture, but conversely many aren't aware that re-architecting is a multi-month/multi-year investment for a project of such scale.

By the way, osu!lazer was started because of similar architectural reasons.
You can follow @smoogipoo.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: