Блог пользователя aram90

Автор aram90, 10 лет назад, По-английски

CodeFights just went out of beta and the biggest change is that there are 3 new languages supported — C++, Python and Java (previously tasks were only in JS). My favorite feature is solving challenges where most people seem to compete for getting shortest source code to given task (tasks are mostly easy so main challenge is usually solving it with a shortest code among all solvers). One issue I see is that Python solutions have big advantage since they are very short, also it is pretty annoying to see people copy-pasting solutions from each other, hopefully it will be given some solution soon.

By the way, users who perform good enough can post challenges themselves, would love to see new ones!

  • Проголосовать: нравится
  • +62
  • Проголосовать: не нравится

»
10 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

I've tried codefights — it's awesome! Once time I won Fcdkbear in tournament with score 201:200, and it was just "xdxdxdxdxd", next time he was leading with score 400:138, but when we both failed last easiest task in ~10sec (fixing eratosthenes sieve), it made my day completely. Moreover, tasks are interesting themselves (at least during first week). And "challenges" allow you to be a problem setter. Add several tests and description, push "post" button, and your task is on the index page! Users have already suffered from my tasks)

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

amazing site to practice your challenge and hacking skills

»
10 лет назад, # |
  Проголосовать: нравится +59 Проголосовать: не нравится

I don't see anything interesting in that site. Especially these bug-fixing tournaments where you have to find a mistake in the code written by a monkey and formatted by another monkey.

Also, I have to mention that the authors don't know that C++ vector's method size() returns unsigned int, so a lot of examples are full of conditions like i < v.size() - 1, which are completely wrong.

  • »
    »
    10 лет назад, # ^ |
    Rev. 2   Проголосовать: нравится +31 Проголосовать: не нравится

    I don't see how you don't see anything interesting in that site. The idea is new and fun, plus it just started so of course there will be mistakes. Was codeforces or any other site perfect from day one?

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    You performed really well in your first practice session (my first score with JS was zero).

    I think this site is designed for those who can't do that (mb even because of bad english). Increasing the lower bound of programmers is a good target, but I believe that there may be nothing interesting for 1900+ (without any dependence from used language). Lucky for devs — it's at most 10% of all possible users))

    • »
      »
      »
      10 лет назад, # ^ |
      Rev. 2   Проголосовать: нравится +28 Проголосовать: не нравится

      I wouldn't call it 'well', actually, I acted like a slowpoke. What I don't like there most is that their examples seem to be written by a green coder who doesn't care about readability and compiler warnings. For example, there was a function (with one bug to be fixed) which says if the number is a power of 2. It looked like this:

      bool isPowOfTwo(int x) {
        if (!(x & (x - 1))) {
          return true;
        }
        return true;
      }
      

      It's a complete shit, who on earth writes such ugly functions? You know, you are allowed to fix only one line of code. Thanks to C++, I immediately figured out how to make it work:

      bool isPowOfTwo(int x) {
        return (x & (x - 1)) == 0; if (!(x & (x - 1))) {
          return true;
        }
        return true;
      }
      

      As I didn't like this bug-fixing practice and competitions, the only useful thing remains there is the feed of small tasks to be written as short as possible. But I don't like this mode too, so there is nothing left for me on CodeFights.

      • »
        »
        »
        »
        10 лет назад, # ^ |
        Rev. 3   Проголосовать: нравится -23 Проголосовать: не нравится

        xdd) yes, your fix is great)) And such thoughts (why some tasks looks so artificial) was visiting me from time to time) I had a hunch that used bugs have some classification, and codes was generated semi-automatically (take working code, add one of N possible types of bugs, check it by hand/compiler), I've made a request "show us the bug types after failure/success", but they said that codes was made by hand + imagination. It seems strange, because there are many static code analysis tools, even opensource, isn't it a good idea to use several features from them?

        But still — codefights is not so bad. I believe such training helps to avoid stupid mistakes and debug faster. Previously I was doing it randomly. But now I have a simple algorithm — "check loops section by section, check declarations, check initial values, check indexes, etc." Even testing with debug output can be trained (using "Run" button). I've underestimated the power of this approach so many times, but now I've started to use it actively.

        Of course, there is much more can be done, but at this moment CODEFIGHTS IS NOT SO BAD :D

        UPD I am doomed to use "but" every 2-3 sentences? Why is it happening to me?)

      • »
        »
        »
        »
        10 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        I don't understand those task like if bool: return True return True

        or tons of tasks when you need replace or by and.

      • »
        »
        »
        »
        10 лет назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        And then you will lose to someone who simply replaces the true with false. The point is to make it work by editing as little as possible, not to make it look good.

      • »
        »
        »
        »
        10 лет назад, # ^ |
          Проголосовать: нравится +3 Проголосовать: не нравится

        I think it is similar to real-life situation — fixing bugs is a dominant case for developers working in big companies on codes written by previous developers (at least that's what most programmers I know were doing) and on many occasions you can find strange codes written by previous developers which will drive you mad. That case with if(bool) return true; else return false; looks similar to that — as Rivx already said the point is not to fix the code which looks bad, but fixing the bug in it. Maybe dirty codes like that are designed intentionally to make finding bugs harder.

»
10 лет назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

Nya!

»
10 лет назад, # |
  Проголосовать: нравится +69 Проголосовать: не нравится

When I opened this site, my first reaction was "oh! mathfights for programmers! it might be cool!". I was so wrong =( Yeah, it looks exactly like mathfights, but:

1)Your "rating" is not "how well you compete against other codefighters", but "how well you compete alone in practice session". When I opened a practice session, I solved some number of tasks, get bored (tasks are too easy) and just leave practice session.

2) Now, the only type of tasks is like this "your green-blue CF girlfriend write some code and don't understand where she did a mistake, help her by changing only one line of code". Sometimes, it is fun to help real people with such problems (because, you can troll them "haha, what a stupid mistake!" =)), but this stuff is boring, even if you do it well.

3) There is a special tab called "challenges". There are another kind tasks -- you must write a simple program (like "calculate phi-function of a number"), but they are not perfect as well :( Sometimes, there are no restrictions on input data ("how large N can be"). Sometimes, there are restrictions, but no max-tests, so more stupid solutions gets OK.

I hope, one day, codefights will be completly redesigned and be really cool. But, today it's not cool.

»
10 лет назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

Played for a bit. My first concern is how repeatitive are the challenges. My experience is that reading the problem statements take quite amount of time. If you have encountered the problem before (even though the bug itself is changed), you can perform much better simply by skipping the problem statement. Also, since you have already understand that program logic before, it gives you tremendous advantage.

I have played with around 10-20 problems, so far there are no repeats. but I still have doubt over the repeatitiveness if you keep playing.

  • »
    »
    10 лет назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I agree with this opinion. I've played several times in solo mode and competed in several tournaments and started encountering repeated tasks (at least the statements). My guess is that people with 200 solo attempts have seen them all so competing against them in a tournament makes little sense.

»
10 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Really awesome initiative !