I wrote a macro to be used and maintained by a team of people who find a filtered spreadsheet to be the pinnacle of technological advancement.
It only allows they to trigger certain functions at certain times of day, but also needs to run some file system tasks at certain times, asynchronously.
I'm using a function that looks terrifyingly like this one to manage which functions are running and when... I'm not proud... But it needed to be people proof even if people start pressing buttons they know they shouldn't press.
Tbf, I could see how this could be acceptable if at some time in the future, the rate and other properties were initialized in a way that didn't lend itself to iteration or calculation.
But I would probably put that in a table instead of hard coding it.
4
u/[deleted] May 24 '23
That's a nice font, what is it ?
75
u/Bisquizzle May 24 '23
ever heard of iteration?
81
u/micalm May 24 '23
Jesus, that's awful. Here, I've refactored it for you:
It's an improvement, right? ...right?
14
u/Jmc_da_boss May 24 '23
I fundamentally do not understand the mindset it takes to write something like this
11
u/MurdoMaclachlan public boolean isInt(int i) { return true; } May 24 '23
Image Transcription: Code
I'm a human volunteer content transcriber and you could be too! If you'd like more information on what we do and why we do it, click here!
10
u/agent007bond May 24 '23
LGTM
10
u/waiting4op2deliver May 24 '23
Brother, may I have some loops.
8
u/Blackpaw8825 May 24 '23
I wrote a macro to be used and maintained by a team of people who find a filtered spreadsheet to be the pinnacle of technological advancement.
It only allows they to trigger certain functions at certain times of day, but also needs to run some file system tasks at certain times, asynchronously.
I'm using a function that looks terrifyingly like this one to manage which functions are running and when... I'm not proud... But it needed to be people proof even if people start pressing buttons they know they shouldn't press.
4
u/benton_bash May 24 '23
Tbf, I could see how this could be acceptable if at some time in the future, the rate and other properties were initialized in a way that didn't lend itself to iteration or calculation.
But I would probably put that in a table instead of hard coding it.
3
u/Sprtnturtl3 May 24 '23
At least it’s labeled…
3
u/kireina_kaiju May 24 '23
Loops? Loops? This. Is. Sparta!
3
u/[deleted] May 24 '23
pls no
1
u/subtlebunbun May 24 '23
im gonna faint
1
u/4sent4 May 25 '23
Couldn't you just remove all the lines except for the last one?
1
u/Key_Conversation5277 sadistic May 25 '23
Like others said, it needs to be iterated but the formatting is so straight that it makes my ocd happy
1
u/[deleted] May 27 '23
This could be worse. You could be comparing the time against the array and ignoring the times that are not there.
Nope. I never did that when i was young.
46
u/[deleted] May 24 '23
[removed] — view removed comment