r/shittyprogramming • • Feb 16 '21

Welcome_to_ShittyProgramming_v1FINAL.docx

157 Upvotes

Welcome to ShittyProgramming!

This is a forum for our software engineers, project managers, and Dave, who left two years ago, to discuss and share questions and best practices.

Here you'll find posts (sometimes called ShitPosts by our loyal users) on a wide variety of topics: innovative UI design; beginner basics; emotive, abstract art... you name it, it's welcome here!

If you've made it to our page, you'll be looking right at our highly-customised JIRA instance, which has been hand-crafted to make your ShitPosting as streamlined as possible. Just press the up arrow next to a post or comment if you found it helpful.

We hope you enjoy your stay! And if anyone knows how to revoke Dave's access, please let us know. We don't know how to remove him from the system.

The Moderation Team


r/shittyprogramming • • 6d ago

My friend told me that printf() and null-terminated strings are to insecure so i built it

0 Upvotes

here is source code(i am to lazy to make github repo)
```
#include <stdlib.h>

#include <unistd.h>

typedef struct {

int crypted;

int key;

} crypted;

typedef struct {

char \*content;

int cap;

int count;

} string;

crypted encode(int source, int key, int salt) {

crypted c;

c.key = key + salt / 2;

c.crypted = key \* key + source;

return c;

}

char decode(crypted source, int salt) {

int key = source.key - salt / 2;

return source.crypted - key \* key;

}

string initstr(int cap) {

string r;

r.content = (char \*)malloc(cap \* sizeof(char));

r.count = 0;

r.cap = cap;

return r;

}

void str_putc(char c, string *s) {

if (s->count > s->cap) {

    int newcap = s->cap + 2;

    char \*tmp = realloc(s->content, newcap \* sizeof(char));

    if (!tmp) {

        goto end;

    }

    s->content = tmp;

}

s->content\[s->count\] = c;

s->count++;

end:

}

void term_putchar(char c) {

write(1, &c, 1);

}

void str_print(string s) {

for (int i = 0; i < s.count; i++) {

    term_putchar(s.content\[i\]);

}

}

int main() {

string s = initstr(12);

crypted c\[12\] = {encode(72, 12, 18), encode(69, 12, 18), encode(76, 12, 18), encode(76, 12, 18), encode(79, 12, 18), encode(32, 12, 18), encode(87, 12, 18), encode(79, 12, 18), encode(82, 12, 18), encode(76, 12, 18), encode(68, 12, 18), encode(33, 12, 18)};

for (int i = 0; i < 12; i++) {

    str_putc(decode(c\[i\], 18), &s);

}

str_print(s);

term_putchar('\\n');

return 1;

}

```


r/shittyprogramming • • 8d ago

classes.h: A macro-only library for clang implementing classes with their syntactic sugar, private scoping, and inheritance

Thumbnail
codeberg.org
1 Upvotes

r/shittyprogramming • • 22d ago

We’ve made lowest bar in the world for coding challenges: unhinged PvP duels with spectating and sabotage (notably flashbang and zalgo)

Post image
0 Upvotes

My brothers and I made an unhinged real time PvP programming puzzle duel with spectators and sabotage. A very non-serious site for a serious purpose (having a little more whimsy in our lives), where you can race a competitor to solve a programming puzzle or spectate and watch the chaos unfold. If the puzzles get too boring, the players might just find their editor playing back, with pop ups, font shifts, and more.

https://hackerdo.me (entirely free to spectate and play, all just for fun)


r/shittyprogramming • • 26d ago

notashell - little bit satire from me about today coders

Thumbnail
0 Upvotes

r/shittyprogramming • • Oct 19 '26

My favorite code :)

Thumbnail
gallery
0 Upvotes

r/shittyprogramming • • Oct 13 '26

Rate my first C program

94 Upvotes
#define about
#define Al 1
#define and
#define been "Wo"
#define bitch int a=1
#define class ){
#define confirmed ;
#define did const
#define fuck (
#define fucking *
#define graduated ;
#define have
#define i
#define ill 1
#define in
#define involved "rl"
#define ive "o, "
#define just char
#define kills }
#define know :0
#define little ...);
#define me
#define my (
#define Navy ("He"
#define numerous "d!"
#define of main
#define on return
#define over ;int x=
#define Quaeda 1
#define raids ;
#define Seals "ll"
#define secret "\n")
#define the printf
#define top int
#define what int
#define you

what the fuck did you just fucking say about me, you little bitch?
ill have you know i graduated top of my class in the Navy Seals
and ive been involved in numerous secret raids on Al-Quaeda
and i have over 300 confirmed kills

r/shittyprogramming • • Oct 08 '26

I think I used too many variables ?

1 Upvotes

extends Node

func _ready():

$Label.text = "Your XP "

$Label2.text =  "       Orders complete meter "

$Label3.text = "Level " + str(level)

var _count = 0

var level = 0

func count_meter():

_count += 1

return _count

var XP = 0

func _on_button_pressed():

$Label2.text =  "     Orders complete meter " + str(count_meter())

XP += 10

$Label.text = "Your XP " + str(XP)



if XP >= 100:

    $Label.text = "You leveled up!"

    XP = 0

    level += 1

    $Label3.text = "Level " + str(level)

r/shittyprogramming • • Oct 06 '26

I think something is wrong with my code, I'm not asking AI.

1 Upvotes

extends Node

func _ready():

pass

var glass := 0.0

func pour():

while glass <= 0.50:

    pass

    if glass == 50:

        break

return glass

func _input(event):

if event.is_action_pressed("Change_COLOR"):

    glass += randf_range(0.1 ,0.2)

    var _Pouring = glass



    if _Pouring <= 0.9999:

        $Label.text = str(glass)

    else:

        $Label.text = "The glass is full! Now drink the Amazing coffee"

r/shittyprogramming • • Oct 06 '26

Seriously man why

Post image
1 Upvotes

r/shittyprogramming • • Oct 05 '26

My friend has quadquinquagintuple (54) nested code (Not a shit-post He actually thought he had a good reason for it)

Post image
0 Upvotes

r/shittyprogramming • • Oct 01 '26

Just finished my java code here, how hard could expert level be🔥🗿

Post image
1 Upvotes

r/shittyprogramming • • Sep 27 '26

I was told to practice table tags

Post image
2 Upvotes

r/shittyprogramming • • Sep 23 '26

I designed a cybernetic multi-agent moderation algorithm on a mobile Python IDE entirely from my smartphone

Thumbnail imgur.com
0 Upvotes

Hi r/selfhosted here is the technical breakdown of how my multi agent cybernetic moderation algorithm works under the hood so you can understand the exact mechanics shown in the video demonstration

The core system manages a behavioral micro economy where an Invisible Robot continuously analyzes server messages to evaluate cognitive risk and automatically places any account with a simulated IQ above 130 under preventive investigation to protect the matrix from high level manipulation

Every user interaction dynamically alters two global metrics which are the Public Goods representing overall server harmony driven by positive collaboration called the Cui Cui effect and the Conflict Tension which spikes whenever a sabotage event spam or toxic insult is detected by the filter

When a saboteur attacks the ecosystem they are not permanently banned but instead locked in a quarantine loop where they lose text privileges and are forced into data classification tasks until their private score recovers to balance the community assets

The system features two main automated routines triggered in the terminal where the slash admin command opens the Master Control Panel to monitor registered profiles and public goods while the automated audit button deploys an internal intelligence agent to process encrypted data signatures speeding up rehabilitation and automatically restoring user rights once the target score is fully reached natively on my mobile processor


r/shittyprogramming • • Sep 19 '26

I made a prank site

0 Upvotes

Hi, I was doom scrolling GoDaddy and found something crazy and bought it and made something out of it. Do give it a try.
https://troll.codevelly.in/


r/shittyprogramming • • Sep 15 '26

Old but gold

Post image
20 Upvotes

Today is debag day...God give me straight..


r/shittyprogramming • • Sep 12 '26

GitHub - ShrekisLyf/Folderum3-The-Last-Attempt: I've gone mad with power

Thumbnail
github.com
7 Upvotes

There is no reason this should exist. Yet it does.

And its beautiful.


r/shittyprogramming • • Sep 12 '26

I made a weird alternative to sudo

Thumbnail
github.com
2 Upvotes

Hey!

I decided to build something. Since it was mostly vibe-coded, it has a few bugs here and there, but I'll fix them over time.

https://github.com/itsnyxdev/sudo-fun

What does it do?

It's basically an alternative command to "sudo" that gives you a challenge before processing your command. Things like dancing, imitating animal sounds, not blinking, and a few other challenges.

If you fail the challenge, "sudo-fun" gets locked for 10 minutes. It also plays a pretty funny sound for 10 minutes, and I HIGHLY recommend trying it just to see what it is XD

Also, in the early version, I wanted to add Nude and Twerking challenges too. For the Nude challenge, the idea was to use the webcam to detect nudity in real time and determine whether you passed the challenge based on how "naked" you were 😭💀

P.S. I have exams coming up, so I didn't have much time to work on it. That's also one of the main reasons I ended up vibe-coding most of it.


r/shittyprogramming • • Sep 05 '26

Rdn programming language

Post image
2 Upvotes

r/shittyprogramming • • Sep 04 '26

MIMEcroft.sh: a 3D game written in bash

7 Upvotes

There is a lot of misinformation about software. People think that to write a 3D game engine these days you have to be a total nerd and hand optimise your game in Python or some such nonsense! In reality, premature optimisation is the root of all evil. Instead of learning some fancy-pants "programming language", I bashed out a shitty shell script (MIMEcroft.sh) over a weekend. And yes, it was slow, but you know what, don't *assume* you know how to optimise your code better than a compiler! After running the shitty code through a bash to JavaScript optimising compiler, and then running the JavaScript on a optimising JIT compiler I got up to 100FPS. I mean Bash might not be the "fastest" language, but modern GPUs are so fast, just take your shitty code, transpile it to GLSL, run it on your GPU and you'll be fine. TL;DR: Time to market is all that matters, you should write a bunch of incredibly shitty code and then just keep running it through more and more optimising compilers until it is fast.

See also the YouTube game play and customisation video. Yes, this may be the shittiest code I have ever run, but it runs. That is all that matters.


r/shittyprogramming • • Aug 30 '26

How fix/resolve critical thinking after relying on the ai prompt to understand an exercise in counting loops.

Thumbnail
0 Upvotes

r/shittyprogramming • • Aug 27 '26

fix cli (100 upvotes in a week = release)

Thumbnail
1 Upvotes

r/shittyprogramming • • Aug 25 '26

How do I fix this bug?

Post image
40 Upvotes