Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

agnos.is Forums

  1. Home
  2. Programmer Humor
  3. the beautiful code

the beautiful code

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
226 Posts 135 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • scrubbles@poptalk.scrubbles.techS [email protected]

    Yeah you can tell it just ratholes on trying to force one concept to work rather than realizing it's not the correct concept to begin with

    F This user is from outside of this forum
    F This user is from outside of this forum
    [email protected]
    wrote on last edited by
    #69

    That’s exactly what most junior devs do when stuck. They rehash the same solution over and over and it almost seems like that llms trained on code bases infer that behavior from commit histories etc.

    It almost feels like on of those “we taught him these tasks incorrectly as a joke” scenarios

    1 Reply Last reply
    2
    • T [email protected]

      Did the generated code get merged? I'd be curious to see the PRs

      M This user is from outside of this forum
      M This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #70

      The lead dev is not available this summer to review, but you can review here: https://github.com/edzdez/sway-easyfocus/pull/22

      It's not great that four changes are rolled into a single PR, but that's my issue not Claude's because they were related and I wanted to test them all at once.

      C 1 Reply Last reply
      1
      • T [email protected]

        I'm pretty sure that is how we got CORBA

        now just make it construct UML models and then abandon this and move onto version 2

        G This user is from outside of this forum
        G This user is from outside of this forum
        [email protected]
        wrote on last edited by
        #71

        Hello, fellow old person 🤝

        1 Reply Last reply
        6
        • P [email protected]

          Uh yeah, like all the time. Anyone who says otherwise really hasn’t tried recently. I know it’s a meme that AI can’t code (and still in many cases that’s true, eg. I don’t have the AI do anything with OpenCV or complex math) but it’s very routine these days for common use cases like web development.

          M This user is from outside of this forum
          M This user is from outside of this forum
          [email protected]
          wrote on last edited by
          #72

          I recently tried it for scripting simple things in python for a game. Yaknow, change char's color if they are targetted. It output a shitton of word salad and code about my specific use case in the specific scripting jargon for the game.

          It all based on "Misc.changeHue(player)". A function that doesn't exist and never has, because the game is unable to color other mobs / players like that for scripting.

          Anything I tried with AI ends up the same way. Broken code in 10 lines of a script, halucinations and bullshit spewed as the absolute truth. Anything out of the ordinary is met with "yes this can totally be done, this is how" and "how" doesn't work, and after sifting forums / asking devs you find out "sadly that's impossible" or "we dont actually use cpython so libraries don't work like that" etc.

          P S 2 Replies Last reply
          5
          • trickdacy@lemmy.worldT [email protected]

            I wouldn't say it's accurate that this was a "mechanical" upgrade, having done it a few times. They even have a migration tool which you'd think could fully do the upgrade but out of the probably 4-5 projects I've upgraded, the migration tool always produced a config that errored and needed several obscure manual changes to get working. All that to say it seems like a particularly bad candidate for llms

            C This user is from outside of this forum
            C This user is from outside of this forum
            [email protected]
            wrote on last edited by [email protected]
            #73

            Then I am quite confused what LLM is supposed to help me with. I am not a programmer, and I am certainly not a TypeScript programmer. This is why I postponed my eslint upgrade for half a year, since I don't have a lot of experience in TypeScript, besides one project in my college webdev class.

            So if I can sit down for a couple hour to port my rather simple eslint config, which arguably is the most mechanical task I have seen in my limited programming experience, and LLM produce anything close to correct. Then I am rather confused what "real programmers" would use it for...

            People here say boilerplate code, but honestly I don't quite recall the last time I need to write a lot of boilerplate code.

            I have also tried to use llm to debug SELinux and docker container on my homelab; unfortunately, it is absolutely useless in that as well.

            trickdacy@lemmy.worldT 1 Reply Last reply
            1
            • G [email protected]

              They have been pretty good on popular technologies like python & web development.

              I tried to do Kotlin for Android, and they kept tripping over themselves; it's hilarious and frustrating at the same time.

              D This user is from outside of this forum
              D This user is from outside of this forum
              [email protected]
              wrote on last edited by
              #74

              I use ChatGPT for Go programming all the time and it rarely has problems, I think Go is more niche than Kotlin

              O 1 Reply Last reply
              1
              • P [email protected]

                To be fair, if I wrote 3000 new lines of code in one shot, it probably wouldn’t run either.

                LLMs are good for simple bits of logic under around 200 lines of code, or things that are strictly boilerplate. People who are trying to force it to do things beyond that are just being silly.

                W This user is from outside of this forum
                W This user is from outside of this forum
                [email protected]
                wrote on last edited by [email protected]
                #75

                Practically all LLMs aren't good for any logic. Try to play ASCII tic tac toe against it. All GPT models lost against my four year old niece and I wouldn't trust her writing production code 🤣

                Once a single model (doesn't have to be a LLM) can beat Stockfish in chess, AlphaGo in Go, my niece in tic tac toe and can one-shot (on the surface, scratch-pad allowed) a Rust program that compiles and works, than we can start thinking about replacing engineers.

                Just take a look at the dotnet runtime source code where Microsoft employees currently try to work with copilot, which writes PRs with errors like forgetting to add files to projects. Write code that doesn't compile, fix symptoms instead of underlying problems, etc. (just take a look yourself).

                I don't say that AI (especially AGI) can't replace humans. It definitely can and will, it's just a matter of time, but state of the Art LLMs are basically just extremely good "search engines" or interactive versions of "stack overflow" but not good enough to do real "thinking tasks".

                P M 2 Replies Last reply
                5
                • S [email protected]

                  4o has been able to do this for months.

                  W This user is from outside of this forum
                  W This user is from outside of this forum
                  [email protected]
                  wrote on last edited by
                  #76

                  Play ASCII tic tac toe against 4o a few times. A model that can't even draw a tic tac toe game consistently shouldn't write production code.

                  1 Reply Last reply
                  3
                  • W [email protected]

                    Practically all LLMs aren't good for any logic. Try to play ASCII tic tac toe against it. All GPT models lost against my four year old niece and I wouldn't trust her writing production code 🤣

                    Once a single model (doesn't have to be a LLM) can beat Stockfish in chess, AlphaGo in Go, my niece in tic tac toe and can one-shot (on the surface, scratch-pad allowed) a Rust program that compiles and works, than we can start thinking about replacing engineers.

                    Just take a look at the dotnet runtime source code where Microsoft employees currently try to work with copilot, which writes PRs with errors like forgetting to add files to projects. Write code that doesn't compile, fix symptoms instead of underlying problems, etc. (just take a look yourself).

                    I don't say that AI (especially AGI) can't replace humans. It definitely can and will, it's just a matter of time, but state of the Art LLMs are basically just extremely good "search engines" or interactive versions of "stack overflow" but not good enough to do real "thinking tasks".

                    P This user is from outside of this forum
                    P This user is from outside of this forum
                    [email protected]
                    wrote on last edited by
                    #77

                    Cherry picking the things it doesn’t do well is fine, but you shouldn’t ignore the fact that it DOES do some things easily also.

                    Like all tools, use them for what they’re good at.

                    W 1 Reply Last reply
                    9
                    • galoisghost@aussie.zoneG [email protected]

                      I’ve never thought of it that way. I’m going to add copy writer to my resume.

                      M This user is from outside of this forum
                      M This user is from outside of this forum
                      [email protected]
                      wrote on last edited by
                      #78

                      This made me laugh so hard one of the dogs came to check in on me.

                      Z 1 Reply Last reply
                      9
                      • M [email protected]

                        I recently tried it for scripting simple things in python for a game. Yaknow, change char's color if they are targetted. It output a shitton of word salad and code about my specific use case in the specific scripting jargon for the game.

                        It all based on "Misc.changeHue(player)". A function that doesn't exist and never has, because the game is unable to color other mobs / players like that for scripting.

                        Anything I tried with AI ends up the same way. Broken code in 10 lines of a script, halucinations and bullshit spewed as the absolute truth. Anything out of the ordinary is met with "yes this can totally be done, this is how" and "how" doesn't work, and after sifting forums / asking devs you find out "sadly that's impossible" or "we dont actually use cpython so libraries don't work like that" etc.

                        P This user is from outside of this forum
                        P This user is from outside of this forum
                        [email protected]
                        wrote on last edited by
                        #79

                        Well yeah, it’s working from an incomplete knowledge of the code base. If you asked a human to do the same they would struggle.

                        LLMs work only if they can fit the whole context into their memory, and that means working only in highly limited environments.

                        M 1 Reply Last reply
                        4
                        • P [email protected]

                          Cherry picking the things it doesn’t do well is fine, but you shouldn’t ignore the fact that it DOES do some things easily also.

                          Like all tools, use them for what they’re good at.

                          W This user is from outside of this forum
                          W This user is from outside of this forum
                          [email protected]
                          wrote on last edited by
                          #80

                          I don't think it's cherry picking. Why would I trust a tool with way more complex logic, when it can't even prevent three crosses in a row? Writing pretty much any software that does more than render a few buttons typically requires a lot of planning and thinking and those models clearly don't have the capability to plan and think when they lose tic tac toe games.

                          P 1 Reply Last reply
                          4
                          • W [email protected]

                            I don't think it's cherry picking. Why would I trust a tool with way more complex logic, when it can't even prevent three crosses in a row? Writing pretty much any software that does more than render a few buttons typically requires a lot of planning and thinking and those models clearly don't have the capability to plan and think when they lose tic tac toe games.

                            P This user is from outside of this forum
                            P This user is from outside of this forum
                            [email protected]
                            wrote on last edited by
                            #81

                            Why would I trust a drill press when it can’t even cut a board in half?

                            W D 2 Replies Last reply
                            7
                            • M [email protected]

                              Code that does not work is just text.

                              alk@sh.itjust.worksA This user is from outside of this forum
                              alk@sh.itjust.worksA This user is from outside of this forum
                              [email protected]
                              wrote on last edited by
                              #82

                              Code that works is also just text.

                              W mubelotix@jlai.luM 2 Replies Last reply
                              2
                              • P [email protected]

                                Why would I trust a drill press when it can’t even cut a board in half?

                                W This user is from outside of this forum
                                W This user is from outside of this forum
                                [email protected]
                                wrote on last edited by [email protected]
                                #83

                                A drill press (or the inventors) don't claim that it can do that, but with LLMs they claim to replace humans on a lot of thinking tasks. They even brag with test benchmarks, claim Bachelor, Master and Phd level intelligence, call them "reasoning" models, but still fail to beat my niece in tic tac toe, which by the way doesn't have a PhD in anything 🤣

                                LLMs are typically good in things that happened a lot during training. If you are writing software there certainly are things which the LLM saw a lot of during training. But this actually is the biggest problem, it will happily generate code that might look ok, even during PR review but might blow up in your face a few weeks later.

                                If they can't handle things they even saw during training (but sparsely, like tic tac toe) it wouldn't be able to produce code you should use in production. I wouldn't trust any junior dev that doesn't set their O right next to the two Xs.

                                P 1 Reply Last reply
                                8
                                • P [email protected]

                                  Why would I trust a drill press when it can’t even cut a board in half?

                                  D This user is from outside of this forum
                                  D This user is from outside of this forum
                                  [email protected]
                                  wrote on last edited by
                                  #84

                                  It’s futile even trying to highlight the things LLMs do very well as Lemmy is incredibly biased against them.

                                  W 1 Reply Last reply
                                  4
                                  • M [email protected]

                                    The lead dev is not available this summer to review, but you can review here: https://github.com/edzdez/sway-easyfocus/pull/22

                                    It's not great that four changes are rolled into a single PR, but that's my issue not Claude's because they were related and I wanted to test them all at once.

                                    C This user is from outside of this forum
                                    C This user is from outside of this forum
                                    [email protected]
                                    wrote on last edited by [email protected]
                                    #85

                                    This is interesting, I would be quite impressed if this PR got merged without additional changes.

                                    I am genuinely curious and no judgement at all, since you mentioned that you are not a rust/GTK expert, are you able to read and and have a decent understanding of the output code?

                                    For example, in the sway.rs file, you uncommented a piece of code about floating nodes in get_all_windows function, do you know why it is uncommented? (again, not trying to judge; it is a genuine question. I also don't know rust or GTK, just curious.

                                    M 1 Reply Last reply
                                    2
                                    • alk@sh.itjust.worksA [email protected]

                                      Code that works is also just text.

                                      W This user is from outside of this forum
                                      W This user is from outside of this forum
                                      [email protected]
                                      wrote on last edited by
                                      #86

                                      Text that's not code might also work.

                                      1 Reply Last reply
                                      1
                                      • C [email protected]

                                        Then I am quite confused what LLM is supposed to help me with. I am not a programmer, and I am certainly not a TypeScript programmer. This is why I postponed my eslint upgrade for half a year, since I don't have a lot of experience in TypeScript, besides one project in my college webdev class.

                                        So if I can sit down for a couple hour to port my rather simple eslint config, which arguably is the most mechanical task I have seen in my limited programming experience, and LLM produce anything close to correct. Then I am rather confused what "real programmers" would use it for...

                                        People here say boilerplate code, but honestly I don't quite recall the last time I need to write a lot of boilerplate code.

                                        I have also tried to use llm to debug SELinux and docker container on my homelab; unfortunately, it is absolutely useless in that as well.

                                        trickdacy@lemmy.worldT This user is from outside of this forum
                                        trickdacy@lemmy.worldT This user is from outside of this forum
                                        [email protected]
                                        wrote on last edited by [email protected]
                                        #87

                                        With all due respect, how can you weigh in on programming so confidently when you admit to not being a programmer?

                                        People tend to despise or evangelize LLMs. To me, github copilot has a decent amount of utility. I only use the auto-complete feature which does things like save me from typing 2-5 predictable lines of code that devs tend to type all the time. Instead of typing it all, I press tab. It's just a time saver. I have never used it like "write me a script or a function that does x" like some people do. I am not interested in that as it seems like a sad crutch that I'd need to customize so much anyway that I may as well skip that step.

                                        Having said that, I'm noticing the copilot autocomplete seems to be getting worst over time. I'm not sure why it worsening, but if it ever feels not worth it anymore I'll drop it, no harm no foul. The binary thinkers tend to think you're either a good dev who despises all forms of AI or you're an idiot who tries to have a robot write all your code for you. As a dev for the past 20 years, I see no reason to choose between those two opposites. It can be useful in some contexts.

                                        PS. did you try the eslint 8 -> 9 migration tool? If your config was simple enough for it, it likely would've done all or almost all the work for you... It fully didn't work for me. I had to resolve several errors, because I tend to add several custom plugins, presets, and rules that differ across projects.

                                        C 1 Reply Last reply
                                        3
                                        • codiunicorn@programming.devC [email protected]
                                          This post did not contain any content.
                                          L This user is from outside of this forum
                                          L This user is from outside of this forum
                                          [email protected]
                                          wrote on last edited by
                                          #88

                                          I’ve heard that a Claude 4 model generating code for an infinite amount of time will eventually simulate a monkey typing out Shakespeare

                                          M 1 Reply Last reply
                                          26
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups