This is a rant about videos analysing Yandere Simulator& #39;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& #39;m firing on all cylinders just this once.

tl;dr: Don& #39;t watch them to improve as a programmer.
First, I won& #39;t defend anyone& #39;s or even my own code. I& #39;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& #39;re learning and becoming better programmers themselves from this. It& #39;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& #39;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">https://github.com/JetBrains... you have much, much to learn.
If you& #39;re analysing a bunch of "UpdateX" methods and don& #39;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& #39;t worry - I don& #39;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& #39;s not praise for the original code but it is the reason why I& #39;ll advise against watching them.
I& #39;m sure that YanDev is more than aware of the shortcomings of his architecture, but conversely many aren& #39;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: