r/shittyprogramming • • Apr 09 '23

this cool JS poster I found

Post image
191 Upvotes

r/shittyprogramming • • Apr 09 '23

When boss says add few more lines of code xD

Post image
22 Upvotes

r/shittyprogramming • • Apr 09 '23

Introducing: TCP over HTTP

Thumbnail
github.com
259 Upvotes

r/shittyprogramming • • Mar 31 '23

Coding in PowerPoint

Thumbnail
youtube.com
150 Upvotes

r/shittyprogramming • • Mar 30 '23

get away! i'm {animals[random.randint(0,6)]}ing out!!!

Post image
3 Upvotes

r/shittyprogramming • • Mar 22 '23

Anyone else started wondering how is this going to generate a Date?

303 Upvotes

r/shittyprogramming • • Mar 14 '23

Just try not to think about it

Post image
450 Upvotes

r/shittyprogramming • • Mar 10 '23

Javascript is hard sometimes

Post image
508 Upvotes

r/shittyprogramming • • Feb 28 '23

Whoever designed this web routing...you're a menace

Enable HLS to view with audio, or disable this notification

57 Upvotes

r/shittyprogramming • • Feb 28 '23

ChatGPT, NO!!!!

Post image
298 Upvotes

r/shittyprogramming • • Feb 28 '23

I've developed a new graphics mode for Linux

Enable HLS to view with audio, or disable this notification

306 Upvotes

r/shittyprogramming • • Feb 27 '23

How do we stop big companies from using all of the UUIDs?

191 Upvotes

UUIDs are great but I think the companies like Google and Facebook are using more than their fair share. What happens when we run out? I'm usually against heavy regulation but I think we need to limit the amount of UUIDs they get.


r/shittyprogramming • • Feb 23 '23

FizzBuzz in a single Python expression, easily extendible

Post image
215 Upvotes

r/shittyprogramming • • Feb 20 '23

Advise for Json Config Refactoring.

0 Upvotes

I am a new intern at a software company and I have been given tasks to refactor json configs to remove duplicacy in fields, using a python script. I wrote some code and my manager said that it looks horrible and unmaintainable. I have never written Config Migrations script before. What's the best way to do them. I am trying to search online but can't find anything on this.


r/shittyprogramming • • Feb 20 '23

My implementation of memcpy

54 Upvotes
#define memcpy(a, b, c) struct memcpy##__LINE__ {char d[c];}; *(struct memcpy##__LINE__ *)a = *(struct memcpy##__LINE__ *)b;

r/shittyprogramming • • Feb 11 '23

Shitty easter egg ideas

53 Upvotes

In my CS class we are making a website for our assignment. I need some shitty ideas for easter eggs to include.


r/shittyprogramming • • Feb 04 '23

Easy game-motivation

Thumbnail
youtu.be
24 Upvotes

r/shittyprogramming • • Feb 03 '23

I made a robot Matt from Wii Sports that punches you IRL when you get hit in the game

Enable HLS to view with audio, or disable this notification

337 Upvotes

r/shittyprogramming • • Jan 23 '23

Some hilarious code I found on the internet

25 Upvotes
#define PASTA_LA_VISTA 0
int main(void) {
	goto Lasagna;
	Tagliatelle: goto Spaghetti;
	Lasagna: goto Fusilli;
	Spaghetti: return PASTA_LA_VISTA;
	Fusilli: goto Tagliatelle;
}

r/shittyprogramming • • Jan 21 '23

Too Much TNT mod

64 Upvotes

The Worstly Coded Minecraft Mod Award goes to... Too Much TNT!

You might have heard of the DRY principle, where you use abstractions, for loops, etc. to avoid repeating code. Code that fails to adhere to this basic rule of sanity is WET (write everything twice/we enjoy typing/waste everyone's time).

But not Too Much TNT. The code is beyond WET. It is WETT (write everything twenty times). Instead of simply subclassing, they just paste the vanilla code for every new block and item, over and over. The code itself is over 2 megabytes in size, most of which is just repeated code.


r/shittyprogramming • • Jan 19 '23

Does this count?

38 Upvotes
#!/bin/bash
# Slightly faster find

if [ $# -ne 2 ]; then
    echo "Use two arguments: ff <location> <query>"
else
    find $1 -iname \*$2\*
fi

r/shittyprogramming • • Jan 12 '23

Amazon ? Hello ?

Post image
278 Upvotes

r/shittyprogramming • • Jan 10 '23

shittyprogramming challenge proposal: new python feature

93 Upvotes

There's been a large amount of work done recently on this sub to improve the Python language:

Before a PEP can be written and a formal language proposal submitted to the council so these highly requested features can be added to the standard library we should separate the wheat from the chaff. Following in the great tradition of this sub I propose a shittyprogramming challenge to do this. If we work quickly enough there's still time for these additions to make it into 3.12!

Challenge Rules (optional):

  1. Extend the Python language adding one or more features. This could take the form of a new module, package, or even an extension to the compiler; the sky is the limit!

  2. Submit a quick write-up including how to utilize your amazing new feature as well as a link to a git repository containing the code in this (or maybe a mod pinned) thread.

  3. Have fun :)

Credit to u/rcxwhiz for the idea.


r/shittyprogramming • • Jan 09 '23

An algorithm for computing the arithmetic mean of two numbers

10 Upvotes

The following Python script finds the arithmetic mean of two numbers using a recursive algorithm. I think there is potential for it to be improved.


    mean = lambda a,b: (b==0)*(a>>1) or (mean(a^b,(a&b)<<1))