Yesterday on IQfy, there was a thread where a large number of people were not only defending but encouraging the use of a giant 1000+ switch case statement for a dialogue system, and some even said it was the best way.
This calls into question the issue of the "no-coder" which is a person with little to no programming experience but nevertheless frequently engages in and poses as an expert in online programming discussion.
In recent years it has gotten so bad that sometimes there are more no-coders than programmers in discussions. This could lead to a future where programming languages features are basically entirely influenced by memes.
How do we fix this?
Common no-coder behaviors:
>language wars, often arguing about only memes and syntax because they don't know anything else
>parroting internet programmer personalities (i watched a clean code video where i learned switch cases are based + rp and now i must repeat this)
>bringing up american politics
>shuffling all tech into 'based' and 'not based' camps (linux and c le based because uh...!)
What did I miss?
>rambling about "correctness"
>rambling about "memory correctness"
>watches lain once, learns lisp
>something about a "c replacement"
i didnt exactly look closely, its not using strcpy
anyway thanks for your input Black person
So Hoare and Dijkstra would be classed as "nocoders"?
you probably think stallman wrote unix.
No? Stallman doesn't even like Unix. He worked at MIT's AI lab and liked lisp mschines better than Unix. He only made a Unix clone because it was more popular at the time (and probably easier to copy than a lisp machine although he doesn't say it).
gnu is not unix thoughoweverbeit
yes, they are better than coders, they're mathematicians
>watches lain once, learns lisp
that one hurt...
>performance is the most important thing, because the ubishit game they pirated ran like ass and now we must microoptimize everything
you're describing cargo culting LARPing goy Black person golem normaloid cuckaloid gaygaloid homosexual maggot mystery meat pigmutt pork NPCs, bro.
yea aka nocoders
Who cares about your nuWords though
Wow. Are you trying to hit buzzword bingo?
I invented those terms.
Hello mr cancer of IQfy. Would you please kys
Tfw I'm 95% sure I coined "nocoder" as well as responding "unemployed" to moron posts like the ones you described. Feels good to be a IQfy thot leader. Too bad I'm still a moron stuck at mid-level 5 years into my dev job.
>How do we fix this?
Hyperbullying, rangeban the Arab/Hindu world, have jannies implement permanent dunce caps that show up on all your posts if you get caught saying something megatarded.
Either being moronic pro oop or calling it the devil with 0 argumentation for either position
"X is all you need"
"Databases are bloat"
Eceleb bullshit in general
Also a hilarious number of them get completely filtered by memes and obvious jokes. I saw one have an aneurysm in response to "diamond dozen."
I was briefly in the g Telegram chat and it was nothing but snarky Muslims and trannies larping (with 0 code to show for it) as bell labs people. First time in my life I've ever had to leave a group chat from second hand embarrassment.
Those meme words you like to use like "nocoder", "tarded", "filtered" etc. encourage shit flinging and low IQ behavior.
Not necessarily, but good. Accelerate the decay and let this shithole finally die. I already poison twg with bad advice.
You are the problem, find a new /qa/ in stead of shitting up other Anons' havens.
So you're asking for a hug box where no one can use memes or bad words? Aren't there other sites for that?
>i give bad advice on purpose
>what are you, a snowflake?
I know that back in the day when moderators cared I would have spent a higher percentage of the time banned than free to post but if that is what it'd take for morons like you to be permabanned then I would make the trade.
Genuinely: Wtf are you talking about? Do you not remember the funny crystals prank or the aplay "cool music generation" command that still gets posted here? This place has never been a hugbox and it's already way too much of one.
I was not even here back then, I first visited in 2022 (reddit refugee) but I have screencaps of Moot and others banning people for what today are the average-quality post and I have seen that other chans are still stringent with their rules.
That's what I thought. Frick off and never come back. Nice Hitler trips though.
They started it with "three-month-bootcamp = coder = hire me for a programming position".
>x is bad because trans people use it
- Focusing on the appearance frameworks and languages rather than the underlying algorithms and performances on various workloads that differentiate them
- Vehemently hating some codebase or derivatives because of politics, makes sure to sperg out any time its mentioned
- Can fizzbuzz in 20 memelangs but cant implement a hash table in a single one
All very true. and you see it on here daily.
You forgot
>anything I don't like
Since I'm the original author of the word I get to make these decisions
>shuffling all tech into 'based' and 'not based' camps (linux and c le based because uh...!)
you are on IQfy
95% of posters split the entire world into a based/cringe dichotomy
>Drooling over worthless optimizations
I don't care if a list is slower than a fricking hash map when all there ever will be in it is like 100 entries and the CPU deciding to boost like 5 MHZ higher that day is an order of magnitude more difference.
And yet you will USE the epithet simply on anyone who doesn't agree with you.
t. coded for 30 years+
is he just using it to map numbers to dialogues? that's not too bad, is this C or C++?
t. programmer since 12 y/o
programmer since 12 and you think that might be c? frick off
Do you even know what a decompiler and pseudocode are?
stand back, the expert has entered
what's the issue here, morons?
quick, name the most popular decompiler out there
wait did you mean pseudocode is related to decompilers?
are you fricking kidding me? do you really think you can decompile C code and get working code? do you think they will be able to give you give the name of enum members? kek
Ida Pro
Second most popular Ghidra
Third most popular radare2
This better be bait
Egg blew back on your face. It is in fact valid use of string literals in C, moron.
Games often use a game state counter to track your progress and when to do things like unlock areas or display world messages.
That would appear to be what is going on here.
Toby Fox used YoYo GameMaker and whatever scripting lang that came with
Completely irrelevant for previous anons egged face.
IIRC undertale code is decompiled shit, good chance whatever game engine compiler they used could have transformed it like that, like how C compilers change some if statements into jump tables
the 1000 line long switch statement is fine, most programs nowadays use 30 dynamic libraries, loading 2 new lines of instructions everytime a character speaks isnt a problem, a switch statement is also just neat.
>the global variable
also a non-issue, the guy's data section is hot in cache all the time because all of the dialog lines are in there and characters speak a lot.
>but this isnt the fastest way
it is fast enough and when writing an actual big project simplicity trumps +5% optimization.
>the 1000 line long switch statement is fine
For a solo project. The original thread was a twitter screencap where some 90-IQ person was saying "See? Programming is not so hard!"
We do not want to encourage this kind of behaviour. I do not want to work with a 1000-line switch statement written by someone else.
This isn't even that moronic, relatively speaking. Game dev has extremely low standards for code quality.
Exactly how moronic do you think it can get
isn't stallman just a fatfrick that does computer politics and eats toe fungus
>Exactly how moronic do you think it can get
DA, but I've seen worse.
>large number of people
*1 pajeet samegayging
But yes, this board is full of nocoders and morons
point and laugh.
at a good solution?
It's absolutely fricking awful.
>but his game was a success!
One has nothing to do with the other.
>but you need to ship not be perfect!
Doing it right would have saved time.
>but i'm too stupid to understand any solution other than a switch statement!
Obvious from the thread yesterday.
>technology is only for developers!!!1!
>everyone who thinks getting shit done is better than mental masturbation over coding processes is not a developer
Kill you'reself, you fricking homosexual!
>noooo he got shit done!
A correct solution would take less time and effort you fricking nocoder.
arguing against demonstrated results is obviously unconvincing. the proof of the pudding is in the eating.
>but muh results!!!
Low IQ nocoder employing fallacy of irrelevance. Game success had nothing to do with this, and doing it correctly would have been more productive.
too moronic a troll to even be fun to argue with, kys
>A correct solution would take less time and effort you fricking nocoder.
You kind of unmasked yourself as a no coder by saying this. The correct solution often takes more time and effort than the incorrect solution. The correct solution usually is something that is able to adapt to changes and easy to maintain. The fast solution usually works, but sets you up for failure later on. The correct way to do this would have been to develop some format in order to load dialogue and have a generalized way of retrieving it from a file. This would have probably required developing a method to load files in, parse the custom format, and a method for uniformly marking dialogue so that it can be algorithmically retrieved. That entire process would take way longer than just using a switch. It would pay for itself in the long run, but if you are not planning to make dlc or change dialogue it makes more sense to use the fast solution.
I don't see the issue
name? does she have a penis
What a fricking newbie
no penis no interest
So uh, how should this be done exactly then? How would (You) implement a dialogue like that?
Just ban the student jeettards honestly. It's not that hard, unless the jannies themselves are incompetent.
Sorry, forgot to clarify. I meant the switch statement.
>a giant 1000+ switch case statement for a dialogue system
Yeah it's hard to maintain, but it's quick to write and it works.
I still hate it though.
A much cleaner, more modular way to implement an FSM is to use function pointers/closures/etc. (FP-style) or a State class (OOP-style.)
Like I said in the last thread, is this real source code or is this a disassembly?
If it's the latter, there is nothing to discuss.
wtf do you tards think this could have been that disassembles into a massive switch statement? its real
Compilers are a hell of a drug. The literal numbers and the global object thing looks sussy as hell.
literal nums and globals means either decompiler or dogshit programmer and its hard to tell
*have seen
dialog_identifier:
condition:
has_aids:
* That spark in your eyes.../
* You're really eager to& die^1, aren't you?./%%
has_herpes:
* .../%%
There are people in this thread who actually hard code dialog in a switch statement because they hate life.
i think they larp about it but have never actually written a single switch statement or any program really
If it works, then it's valid. If you want to stop people from doing it, make a language that's more strict than doesn't allow for it. good luck making people use it however.
>write a language that makes a key feature of programming unusable
Thank you genius.
fricking chud. you are such a fricking chud
Or keep crying over a dude making bank doing something a compiler or interpreter thinks is a-ok and valid code, knowing you will never be successful. But hey, at least you're writing memory safe, readable code!
We're talking about a game, a piece of software most people shit out and don't maintain. "Technical debt" doesn't exist if you never visit that code base again
moron if you have to change that spaghetti code dialog (which you will) you'll end up paying compounding tech debt. Every single line of dialog you add to the massive piece of turd makes everything more unmanageable. Changes that should take 60 seconds will instead take 4 hours because you have to disentangle everything. Hope you don't have to make any major dialog changes :^)
>moron if you have to change that spaghetti code dialog (which you will)
I don't have to change shit, it's not my project. And I doubt the dudes changing much on a single project he already shipped and made all the money off of years ago. I doubt the kid opened that repo in years. It's not my problem, most likely not his problem anymore, and only seems to be your problem. Which is weird because I don't think you have any kind of investment in that project. But you go ahead be mad about something that doesn't affect you that happened a long time ago I guess.
Wow anon you're really taking the high road replying to comments about a random game that happened years ago. Take your own advice, moron.
I'm replying to your comment that happened a few seconds ago, because (you) keep replying to me. Im just commenting how funny it is how angry it makes people on this board to the point that it has gone on for two(2) threads. And the dude that everyone's mad at that wrote the code probably hasn't lost a single minute of sleep over any of the decisions he's made.
some of us enjoy debating and aren't angry
You forget that I just added a picture of a wojak depicting you as very angry
I will be the greatest engineer to have ever lived in all tech fields, suck my dick and swallow b***h.
Yes anon, tech debt is "working" code.
>morons still arguing about a code churned out by Gamemarker and then decompiled by another frickwit
This picture means nothing. Your discussion means nothing. The guy that created this game didn't write a single line of code. The code you are looking at comes from a decompiler.
How is it possible that you morons have spent two days arguing about something that isn't even real?
It doesn't change the fact there are people who think this is a correct way to write the code.
>T-there could be people that think this way
But you aren't arguing about them, are you? You use a made up imaginary enemy to yell at. Getting riled up for nothing
that's worse, because people are defending code nobody wrote
Are they though? Have you any inkling of the amount of people who will 'defend' or 'attack' anything on a given thread? Taking things on IQfy seriously at face value will hurt you in real life
>How is it possible that you morons have spent two days arguing about something that isn't even real?
First week on the site?
90% of threads is just deliberately misrepresenting something to seem completely outlandish in order to farm (you)'s from perseverating autists.
shush
Lower you're tone when talking to me.
how is it not a problem that chuds on here are calling decompiled garbage 'kino'
now you admit it's decompiled
>hurr durr its decompiled bro!!!!
>DEWD ACHCHYUALLY UR SUPPOSED TO USE A BIG ARRAY NOT A SWITCH STATEMENT
gyat...
ohnononono
How fricking hard is it for people itt to say, YES THIS CODE IS SHIT
>first it's actually good code
>then, well it doesn't matter because its decompiled
>finally there were people saying that it was decompiled code but thats fine its still good code
JUST ADMIT DEFEAT FRICKING PIECES OF HUMAN TRASH
relax
Are you ok little buddy? Still waiting for your optimized code that made you millions. You could have spent all the time getting baited in both threads on something else you know?
So is it real or not real? I thought it was real
Dude is no coder and produced something most pro coders here can only dream of.
Undertale got big because of its SOVL, not because it was some outstanding game with outstanding mechanics or whatever the frick
Survivorship bias, for every Undertale there is 10,000 indie projects which essentially bankrupted the no coder.
> literal no coder fricking moron tries to create a thread for a second time
..
> gets BTFO. again.
ahahahahaha. i love this board.
> indie projects
> bankrupting anyone
> ever
LMAO. the absolute state of nocoders of this board. post face and hands. i'm most certain you shit in the street and squat under cows, waiting for them to piss so you can have a shower before you go to work at the "paypal/amazon/irs" scam call center.
Anon, if you work full time on a project for two years and it makes you $500, it bankrupted you.
not how it works, Black person.
Pretty much is unless mommy and daddy are subsidizing you. Anyways doesn't matter, you think because some lottery tickets win it must mean buying lottery tickets is smart.
>This calls into question the issue of the "no-coder" which is a person with little to no programming experience
Actually I think the problem is that these kids do have programming experience, as in they've followed tutorials or picked it up through trial-and-error, and know the basics, but unfortunately haven't learned the proper fundamentals. This is what leads them to writing/defending garbage code, because they simply don't have a proper frame of reference.
>How do we fix this?
You can't. It's best to just call them out and discourage them from stinking up the programming community even further.
What makes them no coders is that anyone who has written real code would know first hand why doing it this way is a mistake. It makes it really obvious that they have no production experience because anyone who has done a real project will know what a pain shitty code is to refactor. Double so with games because it's not unexpected to have to make major changes to your code as you go along because you need to add or change features. Like if you were doing the dumbass switch dialog system, if you realized halfway through you'd need to add hooks or actions to the dialog system, you'd probably want to have a nice day refactoring it.
The biggest problem was that no one could actually give a coherent reason WHY this switch case was bad, just general appeals to maintainability.
Yes anon, maintainability is extremely important. Doing the switch is bad because you're literally wasting hours maintaining it and the longer it becomes the more time it takes it maintain it. And believe it or not, we don't have infinite time or patience.
But HOW is this difficult to maintain?
Here, I'll give you a 5000 line switch statement and tell you you need to change the order of it by hand.
Ok, I change the numbers around accordingly.
No you didn't and you're just outing yourself as a no coder. You've never worked on anything that couldn't be shat out by ChatGPT.
Do you even know how a switch case works?
Are you even aware of game state counters?
If you want the text to appear at a different time in the game, you just change the number.
Anon, I know you're a no coder, but you might want to use your brain and realize those numbers might conflict with each other and you can easily override or otherwise mess up your game state, and good fricking look tracking down where you transposed some numbers accidentally. All because you're too stupid to use a maintainable system that not only is faster to work with but doesn't have this problem at all.
Thank you for finally saying a coherent argument against it.
See, it wasn't that hard.
I shouldn't have to point out the obvious.
Obvious for one is not obvious for all.
You could have saved yourself a number of posts in this, and probably last, thread by saying that instead "switch case bad because you spend hours maintaining it".
Anon you will never be a programmer if you need people to spoonfeed you and you can't sit down and use your brain in self-contemplation. You are and will always be a no coder. You don't have the brain for it.
Oh, no I worked that out before you said it. I'm just making people state the actual problems rather than hand waving at general areas complaint.
Also, I never want to be employeed as a programmer. That'd ruin all the fun of it.
>I was only pretending to be moronic for your sake
>I always knew the answer, was just making sure you knew the answer
Haha sure buddy haha you're funny. You're one of *those* guys. Just so you know, people hate people like you.
I know. I hate people like people who hate people like me, too.
one point of failure is the index of global.msg[index]. when you write a new line of dialogue you have to write the correct number. if you remove one line, you have to edit all the ones that came after it to fix it. on top of taking more man hours, if you make any mistake, content will go missing from the game without an error message or any indication that it happened. then your shit appears in a did you know gaming video 10 years later where they talk about your bugged dialogue
Anon, languages have enums. Compiler will reassign values automatically.
ok?
He's right, you know.
you stupid? the op code has hardcoded ints, you can frick them up easily. you nocoders think compilers are magic now?
The code has clearely been decompiled, you midwit. The original likely usee enums.
>The code has clearely been decompiled
kek you're a moron bro
let's see the not-decompiled source code, then
in op
>cschizo takes time out of raging about the existence of C... only to be clueless in other ways
0 evidence enums were used. even if they were, you're extremely stupid. you think its like
global.msg[enum.first] = ""
global.msg[enum.second] = ""
its still garbage lmfaoi
absolute mong
i accept your concession
No one's talking about the array indices, you zoomer moron.
i am, you two are the morons that are no-coder enough to misunderstand my post and think i was talking about the switch and not the code inside it.
So your problem is the assignment of sequences of dialogue to consecutive indices of global.msg. How would you write it? Provide an example.
how no coder are you? even using a simple .push or .add method on the array instead of hardcoding indices would fix this. you must seriously be bad if you've never encountered this. what i love about no-coders is how they out themselves without realizing it
you don't code, you knowing does not matter
https://en.wikipedia.org/wiki/Spaghetti_code
If you are not a programmer, then you will find no issues with a 1000-line switch statement. In this exact case, where the code is written and maintained by a solo dev, there is no issue. The rest of us work in teams, and we have "best practices" for that reason.
https://en.wikipedia.org/wiki/Coding_best_practices
Note "maintainability".
It's still a problem with a solo dev because anyone who has worked on a large project -- especially a game -- would know that changes happen, a lot. Even something as simple as dialog might need a massive change if halfway through the project you realize you need to change big parts of the story around.
I agree with you. Even solo, you might come back to your own code 2 years down the line and wish for a time-machine in order to give your younger self a very tight slap.
...but when you are in a team, and your code is trash, your own teammates might want to give you that tight slap, without the 2 year wait.
If it's a solo dev writing moronic code then I don't care since it will never be my problem, but if I'm in the same team, you couldn't pay me enough to continue working with this shit.
that's the thing. no coders don't think maintainability is important because they've never maintained code. they think speed is most important because they're pissed they're mom won't buy them a 4090 and they want the new borderlands to run better
This is also leaving out the possibility that this is a generated file that is never directly modified.
Toby Fox was a literal nocoder before he started this project, he basically learned as he went. So he probably didn't figure out how to do that reliably.
What if he started out hand coding the switch case, realized after a while how annoying it was to maintain but also how difficult it would be to rewrite the code incorporating it and so then wrote code to generate it?
Maybe. But blunderfail does a lot of wonky things under the hood, so he probably just wanted to get the game working and ready instead of doing things correctly.
it's the learn to code shit that was spammed on /misc/ from 2016-2019 nonstop. massive moron influx not only online but the whole industry
>a person with little to no experience but nevertheless frequently engages in and poses as an expert in online discussion.
>In recent years it has gotten so bad that sometimes there are more no-coders than programmers in discussions. This could lead to a future where ____ are basically entirely influenced by memes.
This problem applies to every board. II's shitposters, bad actors from other websites and normies who use memes to build their education on the subject at hand. Most of the oldgays who actually knew how to do things have left and the new people only care about farming (You)s and "put me in the screencap"
Oldgays are now rich and have groups of supermodels that pay for suckysucky and frickyfricky. The only "people" that still post here are... normalturds. Clogged may their throtes be by Andy Sixx's logs.
>undertale
This is written on an engine that even Toby disliked in the end.
>proceed to write deltarune on it
kek
>he only browses one website
>in 2024
>he only browses one website
How did you draw that conclusion you midwit?
The form doesn't matter.
If your dialog system is best representable as a table with some conditions, you can store it as such. Be it a giant switch statement or a giant data file - doesn't matter, as both have the same level of maintainability.
If you want it to be easier, you can write an editor program and it can either work with data file directly or it can generate source code with switch statement.
the real problem here is the fact people are getting mad without knowing anything about the snippet
>ITS NOT DECOMPED BRO
>can't even come up with a design that would get compiled into this
>uses GUI editor that visualizes dialog system
>generates giant switch statements
>makes nocoders seethe
any proof other than cope that such a thing was made and used here?
You have a proof of the opposite?
yea, occam's razor
Occam's razor doesn't proof anything. Any code generated by RAD tools looks like this. With your logic we must assume they were all handwritten.
That seems most likely to me, how would you as a human ever even keep track of a fricking switch with 1000 cases and actually know where which dialogue/choice braches to?
anyone who thinks its decompiled from some magic god code is a fricking no-coder through and through. add this one to the list of no-coderisms:
>thinks compilers make incredible optimizations 100% of the time
This has nothing to do with optimizations. Decompiler shows that the original had a giant switch statement, but it doesn't mean it used hardcoded it's or that it was even written by a human.
mmmh the god class with dubious boolean logic is not really the problem, ok?
https://github.com/fachinformatiker/undertale/blob/master/scripts/scr_papcall.gml
this is clearly decompiled and the original source code is probably emitted by a branching dialogue system
>(Someone said its most likely decompiled)
surprise
That makes it funnier because people are defending decompiled code
actually, people are trying to explain why that particular code is so ugly. you still think it's hand-typed, though, being the utter noob that you are.
nah you were just telling me enums would fix it all you're no-coder as frick and btw, you still have no proof of your outrageous claim
That was me, not him. And I successfully debunked your argument that indexes need to be remapped. Using enums to represent a list of states is a common thing and people do changes you described just fine.
you haven't debunked anything considering you still think i'm talking about the switches
This is worse.
dood its autogenerateed. all the game logic le auto generated by a tool nobody can find
the older I get the more I realize nothing that we used to say is bad practice matters anymore, we have so much memory, if you don't deliberately leak memory it all should be fine who cares if it's 1000 long switch statement, it's just manual labour your PC won't allow down. becomes it's long.
It is legitimately funnier if its autogenerated because of the people who thought it was genius code from the mind of a master coder, and the way it should be written. When not even the homie that made it wanted to write it.
I remember a thread where a nocoder wrote essay after essay arguing how a simple pair search was O(n log(n)), but never once showed it mathematically. Another poster showed it's O(n^2) with mathematical proof, but that wasn't enough for our brainlet poster.
whats pair search? like is there a pair in an array? its clearly n log n
the end user doesn't care about how something is programmed if the performance is good. If you want to ship a game you need to work fast
also unlike real programming in vidya you rarely care about maintainability or future development
for one-off event scripts like a custcene script sure but some parts like the gameplay systems will get worked on a lot and probably carried over to the next game the studio makes
& assuming this was the real code he wrote he has to deal with it TO THIS DAY with deltarune unless he finally bit the bullet and rewrote it all
ridiculing code from working products based on misconceptions is definitely nocode behavior, and doubly so if your ridicule is borrowed from some youtuber or twitter personality
The best code is code that WORKS
OP absolutely seething
g is just cniles who have never written a functioning program.
90% of you should never have been taught to read, holy frick
>In recent years it has gotten so bad that sometimes there are more no-coders than programmers in discussions
>sometimes
have you seen IQfy
Better than a 1000 long if else statement
This works for undertale boss fights though because there is different dialogue each time you retry
So it makes sense to have case 827 and case 183 in a switch statement I don't see what else would be better
>How do we fix this?
We are much to stupid to fix anything.
while the switch statement (and all the global state) is moronic, it's not that bad. It has a few special properties that might be nice. Firstly, it is a central place to add new dialogue, should be very fast to get new dialogue, offers a centralized mapping of magic numbers to dialogue, etc. Stupid, but not the worst thing in existence
well if it works for pythons cpython
how would you do it?
frick you're right. after 70 years of computer science nobody has come up with a better way to show rpg text at the right time. frick you're so right dude this is the best way.
how would you do it?
No coder:
>I don't see anything wrong with the switch statement!
Midwit coder:
>Holy frick, that switch statement is terrible. How the frick are these people working on best-selling games? The West has fallen
Smart coder:
>Factoring it out to a data file would be better but if it works it works
Who cares, they shipped. Programming is the means not the ends, you idiot nerds.
>1 dev
>$90m revenue
between money and cs masturbation will take the money
For those that don't get it, the problem is not that the switch statement is slow. And it's also not a big problem, modern bloated software has worse problems.
HOWEVER giant if/switch statements like this show that you have very, very skill and can't even use lists/arrays. This is common to see with total beginners, often kids.
For a problem like mapping numbers to strings, instead of having a big if/switch statement you should use a list, array or whatever such a structure is called in your language.
// This is bad:
if (n === 0 ) {
string = "zero"
} else if ( n === 1) {
string = "one"
}
...
//This is what you should do:
const numberStrings = ["zero", "one", ...]
const string = numberStrings[n]
This is much easier to work with, and the code is much shorter. Easier to let other people work on as well. And it's ready to take in the list of string from another source as well, such as if you refactor or add translations to another language.
>instead of drinking piss, you should eat shit!
Thanks, ChatGPT.
I don't care about the switch statement but I hate that it uses numbers as the cases
>all this seething about what's probably a decompilation artifact in an incredibly succesful and fairly bug-free piece of software
M8 you're not ready for real enterprise©® software: dozen billions dollars in yearly revenue depend on a tool that works almost entirely through global state stored by creating and dropping sql tables on the prod db.
>lazy people making things harder on themselves spending hours navigating their hard-coded resource catalogue instead of taking 15 minutes to learn any form of basic resource management
you'd have better luck trying to fix homelessness than self-destructive laziness
>write shit code for a game
>make millions of dollars
>pay IQfy chuds some peanuts to refactor if needed
BASED
Replace the IQfy captcha with programming exercises instead, let the user choose the language and they have to write a short program to do something like print a fibonachi sequence with some sort of random spin on it. Trivial for someone that actually programs but filters no-coders.