• 0 Posts
  • 15 Comments
Joined 11 months ago
cake
Cake day: July 31st, 2023

help-circle





  • paholg@lemm.eetoProgrammer Humor@programming.devExam Answer
    link
    fedilink
    English
    arrow-up
    21
    ·
    3 months ago

    Works even better in Ruby, as the code as given is valid, you just need to monkey patch length:

    #!/usr/bin/env ruby
    
    module DayLength
      def length
        if ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"].include? self
          "24 hours"
        else
          super
        end
      end
    end
    
    class String
      prepend DayLength
    end
    
    day = "Monday"
    
    x = day.length
    
    print(x)
    

  • paholg@lemm.eetoProgrammer Humor@programming.devExam Answer
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    3 months ago

    It could be Ruby; puts is more common, but there is a print. With some silly context, the answer could even be correct:

    #!/usr/bin/env ruby
    
    module DayLength
      def length
        if ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"].include? self
          "24 hours"
        else
          super
        end
      end
    end
    
    class String
      prepend DayLength
    end
    
    day = "Monday"
    
    x = day.length
    
    print(x)
    








  • I’m not so sure. The study discusses specifically people who engage in partisan subreddits, which is not the same as being politically engaged. It also uses an AI to grade toxicity, which surely mischaracterizes many interactions.

    For example, I have been in communities of a non-political nature, where political discussions occur. These are often about real issues that affect real people in the community, and yet there are people complaining about political content.

    To complain about political content is, at best, a very privileged take, demonstrating that you are in a position where politics do not affect you much. At worst, it is actively hostile behavior with the goal of continuing the status quo and shutting down discourse. I would call most of these kinds of comments “toxic”, and yet the rhetoric is usually fine, so I doubt an AI would agree.