7 kyu

Building blocks

3,918 of 13,017NaMe613
Description
Loading description...
Object-oriented Programming
Fundamentals
  • Please sign in or sign up to leave a comment.
  • humpandbump Avatar

    Cant pass Submit because in the Test (Java) assertEquals has no tolerence values.

  • trashy_incel Avatar

    the markdown in the description mixes code blocks with language blocks, resulting in confusing rendering, e.g.:

    `getWidth()` return the width of the `Block`
    

    either the languages tags should be replaced by conditional ones, or the backticks surrounding function names should be erased and the specification commented out

  • ToriForH Avatar

    A random test failed if I make check whether values of width, length and height are positive

  • Ganzanito Avatar

    This comment has been hidden.

  • akar-0 Avatar
  • Haksell Avatar

    Getters and setters are the two worst ideas in software engineering.

  • TanYiXun Avatar

    This comment has been hidden.

  • gjfgkdtgqdhgdkd Avatar

    For javascript : since the Class syntactic sugar is suggested, why not go the full length and use getters too ?

  • ajlomb Avatar

    I spent more time moving variables around to make the randomTest case work than I spent actually solving the problem.

  • matt1024 Avatar

    C# should probably also be changed to match convention... unlike Java GetX() methods aren't the way accessors are written in C#, so practicing this in C# should probably use properties instead.

  • hksong Avatar

    Ruby and Python need to be changed to match convention. Perhaps CoffeeScript as well.

  • PierreSelim Avatar

    I think in python the kata does force you to write non-pythonic way. Getter (and setter) are more Java style, I guess pythonist would prefer having @property :) Otheriwse, it's a simple a fun kata :)

  • dsub15 Avatar

    My code in Java is working fine on tests, however it's failing on a random test with a large number and without knowing what the values were I can't pass. Is this a problem with the tests or with my code?

  • jahav Avatar

    I am baffled. Why are submission for JS with ECMA6 considered best practice? Even on MDN there are many TBD sections, it was finalized in June 2015. IE doesn't support it, Android support is ... probably nonexistent. Do you precompile JavaScript before deploying or what?

  • perfidiousscript Avatar

    I'm having my code pass the test cases just fine but am getting caught up in the main submission with an (Expected: 3, instead got: 1) error. I tried changing around the 'data array' position that the various measures (width et c) were reading and got the first submission test to clear but then the second test was failing.

    Is this a problem with my code or in the submission tests?

  • Darnor Avatar

    This comment has been hidden.

  • wthit56 Avatar

    Nice and straightforward. On the whole, good job.

    What are the snake-case names there for? And why have different cases for different languages? It's just another layer of unnecessary complexity to read through before you can write this ostensibly simple kata. Try to make the description as simple and clear as possible, and cut down on caveats given after the actual information.

  • nivla Avatar

    it would be nice put some reference links for surface_area and volume.

  • MMMAAANNN Avatar

    CoffeeScript translation added. Please approve.

  • Luqpa Avatar

    At the moment, I would mark that (JS):

    1. the spec is for ECMAScript 2015 (ES6).
    2. Advise to check browser comatibility
    3. Give a link for the docs
  • bkaes Avatar

    Whoops, forgot to finish my draft. Haskell translation kumited. However, it differs sightly from the Python/JS ones, as Haskell has no classes (in the OOP sense).

  • ZozoFouchtra Avatar

    JS translation kumited.

    (Description modified) More info on how to approve it ( or not )

  • MMMAAANNN Avatar

    Nice simple kata.

    However, for Python, the standard is to use snake_case for method names, not camelCase. Consider renaming methods to get_height, get_length etc. in the Solution Setup (you can provide aliases in the test fixture so that already submitted solutions don't get broken).

  • ChristianECooper Avatar

    You might want to change the spelling of dimension in your tests! ;)