Ad
  • Custom User Avatar

    Yeah, this platform is fun for experienced programmers trying out new problems or crowdsourcing interesting challenges, but for learning and going through a curriculum that, say, prepares for coding interviews, I've been really impressed with codesignal.

  • Custom User Avatar

    @FArekkusu, please try to remember that we were all beginners at one point, so it's better to keep comments positive and constructive.

    @TheGeekZeus, it looks like you might be getting confused between lists and strings, and it would help to refresh on some basics, like if-statements. Googleing for python tutorials can be overwhelming, but a few good ones are https://pythonbasics.org/ and http://www.learnpython.org/ . Once you've gone through these, you might find the official python tutorial easier to follow: https://docs.python.org/3/tutorial/

  • Custom User Avatar

    I agree that codewars isn't the right format for an intro to programming, but I wanted to experiment with that concept a few years ago when I created this. It was originally as supplementary exercises for RailsSchool, but has evolved over time to be more of a simple standalone exercise.

    It's actually frustrating and embarassing as the author that this is the most popular thing I've done on codewars, like how the obvious simple questions+answers on stackoverflow get the most votes, but that's just how this community works :/

    Regarding if this is too easy for an 8kyu, I can see your point here, but on the flipside, 80% of 419 votes have rated it positively and it's been translated to several languages and solved several thousand times, so the community seems to have spoken. Also, it fits under the guidelines ( https://docs.google.com/document/d/1eseD5xyhGdtQ-DaWdqfK2yf6mvTDWHWEpkQGBppI8cw/edit ) as a fundamental language feature. Personally, I think it's okay for 8kyu questions to range from ridiculously easy to fairly easy.

  • Custom User Avatar

    In most of the languages, it should be lowercase true, but in at least Python, it should be the capitalized True. Unfortunately, we can't have a different description per language. Any suggestions for how to handle this discrepancy?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    The description says that this function "returns two-dimensional array where numbers from 1 to N should be represented as clockwise spiral," but it should be "numbers from 1 to N2"

  • Custom User Avatar

    Good point! I updated the 2nd paragraph to add this.

  • Custom User Avatar

    I've updated the example solution for ruby to include randomness. It also includes a solution to the kata itself, but if a beginner can figure that out from the test code, then more power to them!

    I wasn't able to update the official solution, because it's locked.

  • Custom User Avatar

    That's an awesome hack! It seems overkill for such a simple kata, but then again, that's the whole point of this site, so... challenge accepted!

  • Custom User Avatar

    Thanks for pointing this out. I've updated the description to be more language neutral.

  • Custom User Avatar

    I first intended this kata to be a nice standalone introduction to programming in ruby, but a limitation of these katas is that the same description has to be used for all languages. After finding this out the hard way (translated the description to Java and realized I borked the ruby one), I've edited it to be nice and minimal, introducing the core concepts of most languages quickly.

  • Custom User Avatar

    Thanks for this translation and sorry it took me so long to get to it. I forked it and removed all mentions of ruby.

  • Custom User Avatar

    Thanks for the feedback. I updated the second example to make this clearer, rather than just having a test case for it.

  • Custom User Avatar

    Thanks for translating this. It looks great!

  • Custom User Avatar

    This was intended as a first introduction to ruby, for people who've never dealt with the syntax before. Can you offer some suggestions for how to cut down / alter the text while still being beginner-friendly?