r/shittyprogramming • • Oct 28 '21

CPython++

Post image
295 Upvotes

r/shittyprogramming • • Jun 06 '16

I've been told to expect some penetration testing by a third party over the next few weeks. I've never even had a girlfriend. How worried should I be?

295 Upvotes

r/shittyprogramming • • Feb 26 '18

Help... I wrote FizzBuzz, implemented iterative Fibonacci, defined a binary tree, and installed Node. My website still isn't making any money. What am I doing wrong?

294 Upvotes

r/shittyprogramming • • Dec 19 '16

Help! I'm looking for a regular expression that will match a JPEG file if it contains a picture of a dog

294 Upvotes

Surely you shouldn't parse HTML with regex, but this is JPEG.


r/shittyprogramming • • Feb 20 '16

I poured this all over my laptop and I'm still not able to use some of my variables in my method, should I try another flavor?

Thumbnail
imgur.com
294 Upvotes

r/shittyprogramming • • Jul 30 '14

This piece of quality code just popped up on my Facebook feed.

Thumbnail
imgur.com
293 Upvotes

r/shittyprogramming • • Apr 19 '22

Every of my commits

Post image
292 Upvotes

r/shittyprogramming • • Aug 26 '18

Be prepared to C++20's Spaceship Operator

Post image
292 Upvotes

r/shittyprogramming • • Apr 15 '16

My server is in a church. Can I still use daemons?

292 Upvotes

r/shittyprogramming • • Jul 16 '19

Why can't I use the letter "o" as a digit?

Post image
291 Upvotes

r/shittyprogramming • • Oct 02 '16

I don't think I'm ready for programming yet. Does anyone have any tutorials on amateur gramming?

291 Upvotes

r/shittyprogramming • • Jan 24 '17

BECAUSE FUCK YOU PASCAL CASE

Post image
290 Upvotes

r/shittyprogramming • • Jan 29 '16

Trumpscript - A programming language based on Donald Trump

Thumbnail
samshadwell.me
290 Upvotes

r/shittyprogramming • • Dec 02 '15

Pls critique my code style

290 Upvotes

Of late I've become dissatisfied with statements like

x += 5;

because they seem to me to be insufficiently self-documenting. So I've begun factoring all my operations like this into self-documenting functions, so the above, for example becomes

int giveMeAnIntegerAndIllAddFiveToIt(int x)
{
    return x + 5;
}

But in the end, is

x = giveMeAnIntegerAndIllAddFiveToIt(x);

any better? There's still far too much going on here that isn't (self-)documented. Clearly further factorization is needed:

void giveMeAPointerToAnIntegerAndIllAssignANewValueToItItBeingTheVariableNotThePointerAlsoPleaseProvideTheNewValueYouWishToAssign(int *x, int newValue)
{
    *x = newValue;
}

So now the original statement would look like:

giveMeAPointerToAnIntegerAndIllAssignANewValueToItItBeingTheVariableNotThePointerAlsoPleaseProvideTheNewValueYouWishToAssign(&x, giveMeAnIntegerAndIllAddFiveToIt(x));

Much clearer. But I'm still worried that there might be something going on here that isn't self-documented. I don't want someone else to run my code and say, "Whoa, I wasn't expecting that to happen!" Is there anything else I can do to avoid such ambiguities?


r/shittyprogramming • • Sep 16 '18

WHY WON'T YOU DIE!?

Post image
289 Upvotes

r/shittyprogramming • • Jun 13 '15

I want to murder my predecessor.

Post image
289 Upvotes

r/shittyprogramming • • May 05 '18

I have ascended in managing git on a phone.

Thumbnail
imgur.com
287 Upvotes

r/shittyprogramming • • Apr 20 '18

From an actual programming forum, users totally ignorant of source control software making up answers

Post image
287 Upvotes

r/shittyprogramming • • Nov 11 '20

The average Matlab experience

285 Upvotes

r/shittyprogramming • • May 03 '17

I love while loops

Post image
285 Upvotes

r/shittyprogramming • • Dec 12 '14

Pseudo-random is not good enough, we need TRUE randomness

Post image
285 Upvotes

r/shittyprogramming • • Nov 21 '15

No pun indented

Thumbnail
imgur.com
282 Upvotes

r/shittyprogramming • • Jul 23 '15

I guess that's one way to do it, W3Schools...

Thumbnail
i.imgur.com
282 Upvotes

r/shittyprogramming • • Nov 21 '18

Who even needs the " + " simbol

281 Upvotes

Sum ( a , b) {

   if( a == 1 && b == 2){
         return 3;
    }else if ( a  == 1 && b==3) { 
          return 4;
    }else 
        print("Unable to sum numbers not found")

}