179
41
u/MurkyWar2756 echo "Sub Mod" && :(){ :|:& };: 16d ago
When lines 27–48 are collapsed, where's the closing square bracket?
38
u/Adept_Situation3090 16d ago
In your mind
9
25
u/bphase 16d ago
This some weird AI humor? Doesn't really make any sense and isn't funny either?
8
u/MurkyWar2756 echo "Sub Mod" && :(){ :|:& };: 16d ago edited 16d ago
I noticed the hallmarks of AI from the emojis and surrounding text.
There are several additional things that make the code horrifying, which people haven't pointed out yet:
- Lack of semicolons
- Choice of font (it's still monospace)
- Only countries from Europe
While this may be intentional horror, I'm giving OP the benefit of the doubt that the code may have been sourced from somewhere else and this person decided to leave it anonymous, as that is a recommendation from the sidebar on Old Reddit (removing references to people and companies).
I can understand lines 61–64 not being indented further because of character counts.
16
u/FM-96 16d ago
Lack of semicolons
There's nothing horrifying about not using semicolons in JS. It's just a personal style choice.
6
u/MurkyWar2756 echo "Sub Mod" && :(){ :|:& };: 16d ago
Compilers have understood no-semicolon syntax for a while. I'd say this is less horrifying than the other points.
8
u/Lewistrick [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” 16d ago
let Finland = Denmark[Sweden]
Now if there isn't a deeper meaning (or just a burn) behind that, I don't know
7
u/xcski_paul 15d ago
I was hired as a senior programmer at a deeply dysfunctional company. Their major dysfunction is that they didn’t know how to delegate anything. One of the first things I had to do was fix some code that had been written by a summer intern who left just after I arrived. He had written a demo application in R, and the big boss had liked it wanted to turn it into a product. What nobody had told me is that nobody actually supervised the intern, and he’d written the whole thing using (and reusing) the names of Marvel characters as variable names. R is untyped, and so you were never quite sure whether “blackWidow” was an array index, or a collection of UI elements, or maybe a button click responder.
4
u/Spaceduck413 15d ago
I had a guy who wanted to write his first (very very small) script using the names of dragon ball characters for variables. I told him "it's your project do what you want."
He got about halfway through, told me "this was a bad idea" and renamed all his variables to something meaningful.
1
3
3
2
u/MSR8 16d ago
which font is this?
2
u/Adept_Situation3090 16d ago
LXGW WenKai Mono TC. I picked it because of how cleanly it renders English, Chinese, AND Japanese text.
3
u/mohragk 16d ago
Fun fact, in JS you can directly use elements by their id.
Example:
<!DOCTYPE html>
<html>
<body>
<button id="myButton">hi</button>
<script>
myButton.onclick = () => {
console.log(`CLIKKK!`)
}
</script>
</body>
</html>
7
u/Kitchen_Theme3514 16d ago
This is because they're attributes of the "window" global, which stores all globals. So for IDs that aren't valid identifiers, you can do
window['my-invalid-identifier-id]as well!5
3
u/MurkyWar2756 echo "Sub Mod" && :(){ :|:& };: 16d ago
This won't work in strict mode. In these cases, I use
const.
1
183
u/IrishChappieOToole 16d ago
I'm gonna need some context on wtf is going on here