21 votes

Daily (or at least regular) programming challenges

I am a great fan of the subreddit /r/DailyProgrammer. I think it's pretty fun to do some curated programming challenges now and again, and I learn a lot by reading other people's solutions.

What does the ~comp Tildarians think?

19 comments

  1. [13]
    bel
    Link
    Daily activities that aren't bound to participants' availability sound like a great way to establish consistent visitors. I've only done things like LeetCode to prepare for interviews myself, so...

    Daily activities that aren't bound to participants' availability sound like a great way to establish consistent visitors. I've only done things like LeetCode to prepare for interviews myself, so take that as an outsider's perspective. There doesn't seem to be a straightforward way to track a challenge of the day. Is anyone familiar with plans to implement sticky posts in groups?

    3 votes
    1. [8]
      zowesiouff
      Link Parent
      I think we could try one time and see how the "activity" sort handles it: if folks keep posting new solutions / feedback, it'll probably stay quite visible and it will naturally die down when...

      I think we could try one time and see how the "activity" sort handles it: if folks keep posting new solutions / feedback, it'll probably stay quite visible and it will naturally die down when folks aren't interested in that challenge anymore.

      If anyone has an idea of a nice "challenge", the week-end is upon us so more time to get nice solutions out :)

      2 votes
      1. [4]
        iiv
        Link Parent
        We could always re-use old challenges, either from /r/DailyProgramming or other websites. Here's a draft for a challenge that I might post later, it's a (barely) rewritten version of Talking Clock...

        We could always re-use old challenges, either from /r/DailyProgramming or other websites. Here's a draft for a challenge that I might post later, it's a (barely) rewritten version of Talking Clock

        Task description

        Your task is to translate a 24-hour formatted time to words.

        Input description

        An hour between 00 and 23 followed by a colon followed by a minute between 0 and 59.

        Output description

        The time expressed in words, in 12-hour format followed by "am" or "pm".

        Sample input

        00:00
        01:30
        12:05
        14:01
        

        Sample output

        It's twelve am
        It's one thirty am
        It's twelve oh five pm
        It's two oh one pm
        
        7 votes
        1. [3]
          Emerald_Knight
          Link Parent
          That would be an excellent intro-level challenge, actually!

          That would be an excellent intro-level challenge, actually!

          1 vote
          1. [2]
            iiv
            Link Parent
            I'll wait a bit for more answers, and if there seems to be a positive consensus I will post this challenge tomorrow.

            I'll wait a bit for more answers, and if there seems to be a positive consensus I will post this challenge tomorrow.

            2 votes
            1. Emerald_Knight
              Link Parent
              Sounds good. So far I like all three challenges, and they're each of different difficulty levels, so I'm fine with any of them showing up. Even the intro-level ones are opportunities for...

              Sounds good. So far I like all three challenges, and they're each of different difficulty levels, so I'm fine with any of them showing up. Even the intro-level ones are opportunities for practicing maintainable code!

      2. [2]
        bel
        Link Parent
        I don't seriously mean this as a suggested challenge, but it'd be criminal if nobody put up Fizz-Buzz

        I don't seriously mean this as a suggested challenge, but it'd be criminal if nobody put up Fizz-Buzz

        3 votes
        1. Emerald_Knight
          Link Parent
          It's FizzBuzz. Of course it should be one of our challenges!

          It's FizzBuzz. Of course it should be one of our challenges!

          1 vote
      3. Emerald_Knight
        Link Parent
        Possible idea that should be accessible to different skill levels: implementing bitwise AND, OR, or XOR for integers without using existing bitwise operators. Bonus points for not using any...

        Possible idea that should be accessible to different skill levels: implementing bitwise AND, OR, or XOR for integers without using existing bitwise operators. Bonus points for not using any built-in binary conversion utilities. Extra bonus points for handling multiple types.

        Thoughts?

        2 votes
    2. [4]
      Emerald_Knight
      Link Parent
      If a special sub is created specifically for those challenges, then you could go directly to that sub and sort by new. Otherwise, if tag filtering is put in place, then we could filter by a tag...

      If a special sub is created specifically for those challenges, then you could go directly to that sub and sort by new. Otherwise, if tag filtering is put in place, then we could filter by a tag e.g. daily challenge and, once again, sort by new.

      There are plenty of ways to handle this problem! :)

      1 vote
      1. [3]
        bel
        Link Parent
        Tag filtering sounds like the way to go for this case. Even if the group was made specifically for daily challenges, I doubt the challenges would be the only posts, thus the main post of the day...

        Tag filtering sounds like the way to go for this case. Even if the group was made specifically for daily challenges, I doubt the challenges would be the only posts, thus the main post of the day would be lost or obscured.

        2 votes
        1. [2]
          pun-master-general
          Link Parent
          Could be a good application of subgroups. You could have something like comp.challenges, with comp retaining the general talk, and possibly a filterable subgroup like comp.challenges.discussion...

          Could be a good application of subgroups. You could have something like comp.challenges, with comp retaining the general talk, and possibly a filterable subgroup like comp.challenges.discussion for talk about the challenges.

          1. bel
            Link Parent
            In an ideal world where all users obediently used each group as intended, yes. Alternatively if subgroups had permissions on them where only the creator could create posts but any users could...

            In an ideal world where all users obediently used each group as intended, yes. Alternatively if subgroups had permissions on them where only the creator could create posts but any users could comment for the comp.challenges group, then it'd stay orderly.

  2. [3]
    Emerald_Knight
    Link
    I haven't seen that subreddit, but I would love to try my hand at an occasional programming challenge! I love seeing the solutions others come up with as well. If we go this route, I think it...

    I haven't seen that subreddit, but I would love to try my hand at an occasional programming challenge! I love seeing the solutions others come up with as well. If we go this route, I think it would be good to throw in a way to opt-in for feedback on your code, as I love giving my feedback and receiving it as well, but also understand that some users may feel too much pressure at first if feedback is a given.

    We would probably want a ranking system for difficulty and to provide different difficulty levels, too, just to provide programmers of different skill levels equal opportunity to participate :)

    2 votes
    1. [2]
      iiv
      Link Parent
      Yes, the subreddit has different difficulty levels for different days. An alternative to that could be to have one task with more difficult subtasks. A problem with their current system is that...

      Yes, the subreddit has different difficulty levels for different days. An alternative to that could be to have one task with more difficult subtasks.

      A problem with their current system is that challenges rates easy aren't always that easy, and the opposite for hard. One simple task with harder subtasks would fix that. On the other hand, that would create more work for the task creators.

      2 votes
      1. Emerald_Knight
        Link Parent
        As the community grows, I'm sure different ideas will have been tested and an ideal setup agreed upon. Probably the best approach is just to try anything at all and see where it takes us!

        As the community grows, I'm sure different ideas will have been tested and an ideal setup agreed upon. Probably the best approach is just to try anything at all and see where it takes us!

        1 vote
  3. Kenny
    Link
    I'm a mod for /r/webdev and /r/web_design back on reddit and I've hosted several weekly challenges. It's a ton of work to manage and the participation is a mixed bag. When it first starts it has...

    I'm a mod for /r/webdev and /r/web_design back on reddit and I've hosted several weekly challenges. It's a ton of work to manage and the participation is a mixed bag. When it first starts it has some momentum but it runs its course after 6 or so weeks - and those were weekly challenges. Daily challenges reek of burnout.

    2 votes
  4. Silbern
    Link
    This sounds awesome :D I would love for something like this to happen here. I didn't know about that subreddit, but it does look like it's not very active anymore...

    This sounds awesome :D I would love for something like this to happen here. I didn't know about that subreddit, but it does look like it's not very active anymore...

    1 vote
  5. BBBence1111
    Link
    I'm up for some challenges.

    I'm up for some challenges.