I just failed a interview ,need help

I have a iOS interview,and failed. I need someone to give me advice how to improve .

This company gave me a home work, one iOS project ,which only have one screen a list of time table ,which from a web service. It is very worse way and not maintainable. Let me modify it let it become maintainable,and to do some test.

I have spent a way to modify the project,and add some unit test,uitest,snapshot test,performance test,integration test. Code coverage is 98.7%

This company ‘s code reviewer still not satisfied my code,mentioned code quality not good ,lack of design pattern, don’t know any architecture

  • :x: Separation of concerns
    • There are some level of separation between VC and network layer
    • VC is 304 lines long and deals with loading, decoding and displaying of the data
    • CommonLib is used as a kitchen sink
  • Some tests are hitting the network (VC)
  • VC is in a very mutable state

:x: Code Quality (cleanliness, re-use, consistency, etc.) - Lots of commented code, inconsistent styling, print statements left in code, random white spacing between functions.

:x: Comments complex part of the code
:person_shrugging: Documents and explains the architecture - lots of documentation but didn’t talk about architecture at a high level

As I am a sole iOS developer,never worked with other iOS developer before,
Is there anyway to improve code quality and architecture area of iOS proejct

1 Like

You’ve been given the information you need to improve your code; and while this may feel overwhelming, it’s also fairly thorough. This may be a good time for you to go back to the MVC architecture (other alternatives exist, but may be overkill). I would start with separation of concerns - make the viewController display the code, and handle loading and decoding in other classes. This means that you can more easily swap in a static class for testing instead of relying on the live network.

It also sounds as if you might have a problem with side effects (modifying local variables inside of unrelated functions), so try and keep your functions pure (this is not completely possible with iOS, but you can go a long way).

If you can get a hold of AppCode you can run “Inspect Code…”. You can run it multiple times as you make improvements if need be.

This topic was automatically closed after 166 days. New replies are no longer allowed.