all 16 comments

sorted by: hot top controversial new old
[–] 61 points 4 months ago (3 children)

looks inside

Vibe-coded Electron running Claude.

  • source
  • hideshow 3 child comments
  • [–] 87 points 4 months ago (9 children)

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

  • source
  • hideshow 9 child comments
  • [–] 13 points 4 months ago (6 children)

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

  • source
  • parent
  • hideshow 6 child comments
  • [–] 11 points 4 months ago (5 children)

    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:

  • source
  • parent
  • hideshow 5 child comments
  • [–] 3 points 4 months ago* (2 children)

    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

  • source
  • parent
  • hideshow 2 child comments
  • [–] 6 points 4 months ago

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

  • source
  • [–] 2 points 4 months ago

    Clear names beat comments. Optimocracy.

  • source