Cursed Programming

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:

To be honest I curse mostly at bugs like naming typos or when a package/lib has an obscure bug.
Thing like the one posted … just make me feel helping the poor soul who wrote them :laughing::laughing::laughing::laughing::laughing::laughing::laughing:

2 Likes

You could have just generated it :laughing::

for i in range(1, 101):
  print(f"print('{i}')")
1 Like

For the Pythonista’s

[print(f"print('{i}')") for i in range(1,  101)]
4 Likes

ohhohoho, you’ve come to the right place, buddy. i’m a certified master at this.

// create a list of length 4 to same values, in this case, 900
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]);};;;;;;;;;;;;;;;

for (let integerа = 0; integerа < integera.length; integerа++) {
if (integera[integerа] === 900) continue;
  integera[integerа]-=-900; ; ;;;;
};;

integera = integera.slice(0, 4)
if (fаlse && Boolean(fаlse) === true) { console.log([...integera.slice(0, 4)]//)
);
;;};;;;;;;

if you see any errors in the code, lmk :upside_down_face:

P.S. Don't forget the:
  • variable integera being an Array
  • boolean false becoming true
  • concatenation of the list, integera with the result
  • random comment after defenition of integera
  • comment that doesn’t describe the function below at all
  • random if statement that’ll never happen
  • result is the opposite of the name of the function
  • we define integerа as an actual integer
  • we could limit the code by removing that if statement
  • we do a negation operation on a negative number
  • a large use of semicolons
  • we slice the list integera to get the part we want
  • a random if statement that will always be true
  • random brackets for the if statement that aren’t needed – it’s a one-liner
  • using the split operator for something we can just log already alone
  • not using the variable we set prior to this
  • brackets being spread on the other two lines
  • and a whole lot of semi-colons
1 Like