Wednesday, March 14, 2018

Object-oriented design review

March 14, 2018

Introduction


It is so exciting to have a partner to work together on the object-oriented design. The peer was very passion and like to apply factory pattern on the design. What an exciting project! Also the project is divided into two parts, version one and version two. We had half an hours discussion in mock interview, and later I received the code.

Code review


I work hard and also like to give some good support to encourage the peer to work hard. So I wrote a code review. Here is my review. I also pasted in the following:

I read your email and also code. Overall I like to see the business rules are defined in your words, and user cases are defined in your function spec. But I am not sure if this practice is old school style. I may be wrong, sorry for my honesty feedback.

You reminded me the elevator simulation algorithm I did last year in the contest. I ended up staying later 4:30 AM.


So here is my coding blog called Hackerrank contest algorithm: elevator simulation.

So here is the discussion panel.

Here is the discussion panel about the algorithm. Every business rule is determined by players as a user case, so we have to define how many user cases in your design, otherwise you will fail test cases.

I like to refer you to those discussion, one of test cases is wrong, then the publisher apologized for the error.

I like to say that it is good idea to get involved in the community like hackerrank contest, some of problems are totally object-oriented design, you have to go through exactly the process of system design, define how to scale, storage, define user cases, and also data structure and algorithm design. There are unknown test cases to pass.

Remember that I may have some hacker spirit, and behave like a warrior borrowed from tennis player Maria Sharapova; that is what I believe and just share with you. I do not worry about too much factory pattern or implementation. Sometimes you know that the job market is so competitive, you cannot expect that the project is waterfall style, you even do not have time to think about the pattern and you have to figure out the business rule you miss and hidden test case you can not pass, how to scale is more important these days, like I did in the contest, staying later up to 4:30 AM to try to score something to improve my ranking, just business-minded and stay aggressive.

That is just my opinion, you can be very intelligent that you are believed that you can apply any pattern you want, if you have time, you have interest, and also you think that it is right thing to do.



No comments:

Post a Comment