760
top 18 comments
sorted by: hot top new old
[-] kubica@fedia.io 92 points 2 months ago

Everything is a helper funcion. "Main" might be the most helpful though.

[-] joyjoy@piefed.social 33 points 2 months ago

But all it does is shoot me in the foot!

[-] death_to_carrots@feddit.org 11 points 2 months ago
sed -i 's|main\((.*)\)|footgun(\1)|g' file.c
[-] Sasquatch@lemmy.ml 2 points 2 months ago

Then how do you trick the linker?

[-] MonkderVierte@lemmy.zip 13 points 2 months ago

For me, "helper functions" are the small bits i'm too lazy to categorize.

[-] addie@feddit.uk 12 points 2 months ago

Are you the person at my work that keeps raising pull requests with all the code stuffed into AbstractWidgetReaderWriterManagerImplHelperV2 classes consisting purely of static methods with fourteen parameters each? :shakes fist angrily:

[-] MonkderVierte@lemmy.zip 6 points 2 months ago* (last edited 2 months ago)

No. What he hell? Send them a coding guide for a start.

[-] whotookkarl@lemmy.dbzer0.com 4 points 2 months ago

It's always either static calls with at least a dozen parameters or no input no output mystery state pinball madness

[-] diaphragmwp@discuss.tchncs.de 3 points 2 months ago* (last edited 2 months ago)

Here's this masterpiece I wrote for Python class.

import document
def greeting(user_name: str):
    def generate_greeting(greet_user: str):
        # Java
        class Abstract_greeting_generator_factory_factoryClass:
            def __init__(self):
                def abstract_greeting_generator_factory_factory():
                    def abstract_greeting_generator_factory():
                        def abstract_greeting_generator(user_name: str):
                            def greeting_generator(user_name: str):
                                #return("Hello, " + user_name + "!")
                                # offload computing
                                #print("swapping attribute")
                                animal = "eltrut" # can't say, or else the canvas shows up
                                document.getElementById("python_" + animal[::-1] + "Canvas").setAttribute("greet_name", user_name)
                                #print("inserting script")
                                document.getElementById("python_" + animal[::-1] + "Canvas").innerHTML = "<input type=image src=1 onerror=\"document.getElementById('python_" + animal[::-1] + "Canvas').setAttribute('greet_name', 'Hello, ' + document.getElementById('python_" + animal[::-1] + "Canvas').getAttribute('greet_name') + '!')\">"
                                #print("waiting for response")
                                while document.getElementById("python_" + animal[::-1] + "Canvas").getAttribute("greet_name") == user_name:
                                    pass # CPU waste inator 3000
                                #print("hiding crimes")
                                # id=xss doesn't w*rk, I tried
                                document.getElementById("python_" + animal[::-1] + "Canvas").innerHTML = ""
                                #print("returning")
                                return(document.getElementById("python_" + animal[::-1] + "Canvas").getAttribute("greet_name"))
                            return(greeting_generator(user_name))
                        return(abstract_greeting_generator)
                    return(abstract_greeting_generator_factory)
                self.abstract_greeting_generator_factory_factory = abstract_greeting_generator_factory_factory
            def return_greeting_generator_factory_factory(self):
                return(self.abstract_greeting_generator_factory_factory)
        Abstract_greeting_generator_factory_factoryClassInstance = Abstract_greeting_generator_factory_factoryClass()
        abstract_greeting_generator_factory_factoryInstance = Abstract_greeting_generator_factory_factoryClassInstance.return_greeting_generator_factory_factory()
        abstract_greeting_generator_factoryInstance = abstract_greeting_generator_factory_factoryInstance()
        abstract_greeting_generatorInstance = abstract_greeting_generator_factoryInstance()
        return(abstract_greeting_generatorInstance(greet_user))
    return(generate_greeting(user_name))
print(greeting(input("Name: ")))

I also have one somewhere that runs Minecraft

[-] tdawg@lemmy.world 5 points 2 months ago

It's all arbitrary. The only difference is understanding

[-] aeronmelon@lemmy.world 63 points 2 months ago

looks inside

Vibe-coded Electron running Claude.

[-] muhyb@programming.dev 37 points 2 months ago

--- How bad could it get?

Vibe-coded Electron


Yeah.

[-] python@lemmy.world 15 points 2 months ago
[-] NigelFrobisher@aussie.zone 6 points 2 months ago

Helper function has comment explaining what it’s for instead of being named for what it does.

[-] Marija@programming.dev 2 points 2 months ago

Clear names beat comments. Optimocracy.

this post was submitted on 30 Jun 2026
760 points (99.6% liked)

Programmer Humor

33314 readers
1724 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS