I want to write the most spaghetti, working, hacky code that works. C#, Java, Php, JS or python. What tips do you have? You might need a throwaway for this hahaha.
One can make use of design patterns, clean code and separation of concerns and still get working spaghetti code without all the hacky stuff. Much less effort if use C.
Engineered C case studies as goto solutions! https://blog.feabhas.com/2017/02/abusing-c-switch-statement-... https://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
Just have to impliment the program as if it was an OS. aka mix/match abstraction levels!
Mix/match assembler / language macros / foreign language calls to other language libraries
Use C20 ability to assign case statement(s) to a thread (mixed with remote procedure calling and/or function stacks across multiple threads)
Mix & match unicode/non-unicode, hex, ascii, etc. where text is code that can be run.
Mix and match C# language extensions in which same thing can be implimented different ways (e.g. strings, vectors, templating)
start:
x = read(); // hope its a number
goto x;
10: ...
20: ...
30: ...
goto start;
If you aren't using goto and labels, it's not spaghetti code.
Failing that, design your software with nice abstractions, then do the compiler's job and strip them all out and turn it into a bunch of if/gotos. Preferably with vague (ideally numeric!) label statements.
Otherwise I'm not sure it's actually possible to write anything larger than a couple hundred lines without paying homage to design patterns and consistency, if only in your head. It took me a long time to learn that code's greatest enemy is the task of holding up its own weight.
Inelagant code that works. Just for personal use.
Not code that will run a space station obviously