Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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. Modern Programming

Modern Programming

Scheduled Pinned Locked Moved Programmer Humor
programmerhumor
74 Posts 46 Posters 2 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.
  • rbos@lemmy.caR [email protected]

    It certainly has its issues. I find that the things people have trouble with are the things I tend to like about it. Of course, reading it later is a problem sometimes. 🙂

    Write only language!

    I still reach for it sometimes.

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

    The point of code is to be read by other humans, not just computers.

    rbos@lemmy.caR 1 Reply Last reply
    0
    • S [email protected]

      The point of code is to be read by other humans, not just computers.

      rbos@lemmy.caR This user is from outside of this forum
      rbos@lemmy.caR This user is from outside of this forum
      [email protected]
      wrote on last edited by
      #60

      Sure. Nothing stopping you writing readable well commented perl. Just avoid some of the more terse statements. It can be a challenge though.

      Shrug. If you don't like Perl, don't use it.

      S M 2 Replies Last reply
      1
      • rbos@lemmy.caR [email protected]

        Sure. Nothing stopping you writing readable well commented perl. Just avoid some of the more terse statements. It can be a challenge though.

        Shrug. If you don't like Perl, don't use it.

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

        But I want to mock it good-naturedly, too.

        1 Reply Last reply
        0
        • rbos@lemmy.caR [email protected]

          Sure. Nothing stopping you writing readable well commented perl. Just avoid some of the more terse statements. It can be a challenge though.

          Shrug. If you don't like Perl, don't use it.

          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
          #62

          A lots of things stop you from writing readable Perl code.

          You have to forget half of the syntax first. Set perlcritic to max. Force whitespaces.

          Download ton of packages for every little thing and hope they are cool with each other.

          And still deal with edge cases that make you pluck your eyes out.

          rbos@lemmy.caR 1 Reply Last reply
          1
          • M [email protected]

            A lots of things stop you from writing readable Perl code.

            You have to forget half of the syntax first. Set perlcritic to max. Force whitespaces.

            Download ton of packages for every little thing and hope they are cool with each other.

            And still deal with edge cases that make you pluck your eyes out.

            rbos@lemmy.caR This user is from outside of this forum
            rbos@lemmy.caR This user is from outside of this forum
            [email protected]
            wrote on last edited by
            #63

            FVO readable for future me, it's not so bad. I don't have to worry about other people so much. 🙂

            1 Reply Last reply
            1
            • rovingnothing29@lemmy.worldR [email protected]

              Oh, (you) (really) (like) (Lisp)?
              (That's) (great!)

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

              (is great (oh (really (like-p lisp you))))

              1 Reply Last reply
              4
              • S [email protected]

                Because of all the garbage

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

                One example that's giving you problems? Maybe even on a daily basis if you use it for work? What's garbage about it?

                1 Reply Last reply
                1
                • satyrsack@lemmy.sdf.orgS [email protected]

                  It doesn't make sense. I understand it, but it doesn't make sense.

                  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
                  #66

                  I agree. If anything it should check if there is a nuumber and 0 is clearly a number.

                  1 Reply Last reply
                  0
                  • maven@lemmy.zipM [email protected]

                    In JS 0 is the same as False

                    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
                    #67

                    They are not the same, but 0 can be implicitly converted to false.

                    What do you get if you do: 0 === false

                    L 1 Reply Last reply
                    0
                    • idunnololz@lemmy.worldI [email protected]

                      At least you guys have ternary syntax cries in kotlin.

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

                      It's really special to not have ternary, but have Elvis.

                      1 Reply Last reply
                      1
                      • L [email protected]

                        They are not the same, but 0 can be implicitly converted to false.

                        What do you get if you do: 0 === false

                        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
                        #69

                        Explosion?

                        1 Reply Last reply
                        0
                        • entropicdrift@lemmy.sdf.orgE [email protected]
                          print("odd" if num % 2 else "even")
                          

                          That's the native python version, for those curious

                          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
                          #70

                          Oh wow, I think I hate that... Condition between the results? Yuck.

                          1 Reply Last reply
                          2
                          • sleeplessone@lemmy.mlS [email protected]

                            In JS at least, there's a concept of truthiness and falsiness. 0, undefined, null, and a few other non-boolean values are treated as false if used in conditionals and logical operations, while every other value is treated as true. I'm pretty sure python has something similar.

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

                            It does. Empty collections, 0, None

                            1 Reply Last reply
                            1
                            • J [email protected]

                              I think the idea is it reads more naturally, so you can read it like this return A if statement is true else return B

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

                              Is it really more natural for a non-programmer than "if statement is true than a else b"? I can't evaluate because of decades of C, so for me the python logic is still bizarre.

                              J 1 Reply Last reply
                              0
                              • N [email protected]

                                Is it really more natural for a non-programmer than "if statement is true than a else b"? I can't evaluate because of decades of C, so for me the python logic is still bizarre.

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

                                Maybe?

                                For C at least it doesn't have the actual words, so you need to know what the specific symbols are var = condition ? a : b. In that expression we don't know what a or b are in regards to the condition.

                                Python literally is a if condition else b, so it reads out what is being done.

                                1 Reply Last reply
                                0
                                • idunnololz@lemmy.worldI [email protected]

                                  At least you guys have ternary syntax cries in kotlin.

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

                                  in Scala, everything is an expression, including “if”, maybe kotlin is the same?

                                  1 Reply Last reply
                                  0
                                  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