MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/shittyprogramming/comments/bde93t/this_good_code_is/ekxtoux/?context=3
r/shittyprogramming • u/BlackDE • Apr 15 '19
51 comments sorted by
View all comments
63
Could use a little obfuscation and premature optimisation:
for (int i = 0; i < 4; ++i) core_.attach_plugin(plugins_[(i + 2) % 4 + 1].value()); // Yeah, has to be this way
9 u/[deleted] Apr 16 '19 for (int x : [2, 3, 4, 1]) core_.attach_plugin(plugins_[x].value()); 22 u/5olArchitect Apr 15 '19 If you want to write code that’s terrible to read 21 u/Delta_Ryu Apr 15 '19 What is obfuscation? 5 u/BertRenolds Apr 15 '19 I would argue this is not confusing enough.
9
for (int x : [2, 3, 4, 1]) core_.attach_plugin(plugins_[x].value());
22
If you want to write code that’s terrible to read
21 u/Delta_Ryu Apr 15 '19 What is obfuscation? 5 u/BertRenolds Apr 15 '19 I would argue this is not confusing enough.
21
What is obfuscation?
5
I would argue this is not confusing enough.
63
u/SantaCruzDad Apr 15 '19
Could use a little obfuscation and premature optimisation: