Cursed Programming

In the reply section put in code that would make any professional roll in their grave. For example:

#this is just a while True loop
count = 0
cOuNt = 1
while count > 10:
  count -= cOuNt
  cOuNt *= -1

Here’s another example:

def toInt(var):
  return int(var)

Have fun! Eventually I’ll make a poll to vote on the most cursed one after enough people shared.

  • def toInt(var): return int(var)
  • var integera = [0, 0, 0, 0,]// let fаlse = true; integera = integera.concat(Array(4).fill(900)) /* define */ function mathmaximum(floatvalu) { if (floatvalu !== floatvalu) return false; return Math.min([...floatvalu]);};;;;;;;;;;;;;;;
  • #include <iostream> #define literallyAllOfTheCode int main() {int score=0; int guess=0; int answer=42; while(guess!=answer){std::cout<<"Guess the number: ";std::cin>>guess;score++;}; std::cout<<"Congratulations! You guessed it in "<<score<<" tries.";return 0;} literallyAllOfTheCode
  • sometinG= -5*-5+2+8949/2895669)))))) SomeTHinGelsE = ((((78982356 - 399326* 389589 +9 83 8)) #+. ++. + def pythonN (somethinG): #becuz for IdK in range(sometinG /89383. * 395983/24): print(“IonestlYDonTCaRE”’’’’) pythonN( sometinG+++++++ [. }. )
  • var Variable = 'a varibale, who needs to use let or const?'
  • print('i am string)
  • #this is just a while True loop count = 0 cOuNt = 1 while count > 10: count -= cOuNt cOuNt *= -1
  • import os os.remove(__file__)
  • [print(f"print('{i}')") for i in range(1, 101)]
  • print("1" + 1); //out: "11"
  • false=True;#the first random comment while(false or True or 1or not False or false or false):#a random comment class sOmErAnDClaSS:#a random comment def sOmEfUncRTIOn(sOmEunUsEdArG):#a random comment import replit,os,random,time,schedule,flask,bs4;global sOmEvArIaBle;sOmEvArIaBle=f"your mom";#a random long comment if(sOmEvArIaBle or false):print(sOmEvArIaBle); pass;#a random comment sOmErAnDClaSS.sOmEfUncRTIOn(sOmErAnDClaSS);#a random comment if(false):print("this will never run lol");

0 voters

1 Like

print('i am string)

and

var Variable = 'a varibale, who needs to use let or const?'

Notice how the spelling is wrong, for maximum “ughh”-age.

1 Like

I think you’re supposed to put actual code. Not wrong code.

2 Likes
                    sometinG= -5*-5+2+8949/2895669))))))

      SomeTHinGelsE = ((((78982356  -        399326*    389589 +9  83 8))

#+. ++.          +
def pythonN         (somethinG):
                                            #becuz
  for            IdK            in range(sometinG    /89383. *      395983/24):
                            print(“IonestlYDonTCaRE”’’’’)

           pythonN(           sometinG+++++++ [.       }.                )
2 Likes

Now the code itself is cursed because it won’t run

It’s not really cursed, just broken

4 Likes

when you try to make a python joke but you can’t code in python

2 Likes

I think you’ve just put a hex on it by this point.

MagicError: Refer to your witches manual in case of code revolting or going on strike

This one took me a long time to type

print('1')
print('2')
print('3')
print('4')
print('5')
print('6')
print('7')
print('8')
print('9')
print('10')
print('11')
print('12')
print('13')
print('14')
print('15')
print('16')
print('17')
print('18')
print('19')
print('20')
print('21')
print('22')
print('23')
print('24')
print('25')
print('26')
print('27')
print('28')
print('29')
print('30')
print('31')
print('32')
print('33')
print('34')
print('35')
print('36')
print('37')
print('38')
print('39')
print('40')
print('41')
print('42')
print('43')
print('44')
print('45')
print('46')
print('47')
print('48')
print('49')
print('50')
print('51')
print('52')
print('53')
print('54')
print('55')
print('56')
print('57')
print('58')
print('59')
print('60')
print('61')
print('62')
print('63')
print('64')
print('65')
print('66')
print('67')
print('68')
print('69')
print('70')
print('71')
print('72')
print('73')
print('74')
print('75')
print('76')
print('77')
print('78')
print('79')
print('80')
print('81')
print('82')
print('83')
print('84')
print('85')
print('86')
print('87')
print('88')
print('89')
print('90')
print('91')
print('92')
print('93')
print('94')
print('95')
print('96')
print('97')
print('98')
print('99')
print('100')
  

I made this a while ago :wink:

false=True;#the first random comment
while(false or True or 1or not False or false or false):#a random comment
 class sOmErAnDClaSS:#a random comment
      def sOmEfUncRTIOn(sOmEunUsEdArG):#a random comment
            import replit,os,random,time,schedule,flask,bs4;global sOmEvArIaBle;sOmEvArIaBle=f"your mom";#a random long comment
            if(sOmEvArIaBle or false):print(sOmEvArIaBle);
            pass;#a random comment
 sOmErAnDClaSS.sOmEfUncRTIOn(sOmErAnDClaSS);#a random comment
if(false):print("this will never run lol");

Repl link: https://replit.com/@QwertyQwerty88/This-Code-Will-Make-You-Mad?v=1

(note the SINGLE SPACE INDENTATION on the while loop, the SEMICOLONS, and how can we forget unnecessary use of global!)

3 Likes
print(number for number in range(100))

(I haven’t tested this btw)

1 Like

I think ‘improper use of camel casing’ is an understatement, and for some odd reason, the no space between 1 and or just really hurts.

2 Likes

rp as a pythoneer not trying to turn everything in c++ into an object

Proceeds to shove the entire game into a single line

#include <iostream>

#define literallyAllOfTheCode int main() {int score=0; int guess=0; int answer=42; while(guess!=answer){std::cout<<"Guess the number: ";std::cin>>guess;score++;}; std::cout<<"Congratulations! You guessed it in "<<score<<" tries.";return 0;}

literallyAllOfTheCode
3 Likes

It just hurts. Man this makes me love indents.

1 Like

If you didn’t love indents in the first place, you are crazy.

3 Likes

I feel like people who use 4 space indentation instead of 2 just want to see the world burn.

2 Likes

VSCode users who just want consistency:

4 Likes

I want to make a vote to have an offical indent size option of 3. :100:

import os
os.remove(__file__)

cursed programming:

  1. gain the trust of person over countless months of bonding and helping eachother out.
  2. get invited to their repl they have spent the most amount of work on and is the most important to them.
  3. delete the config files. delete replit.nix file. delete the packager files. delete all of their hidden files.
  4. Proceed to message them saying you found a syntax error that pops up when you try to run the program :sunglasses: