I'm a React Native Developer from the past 7 months. And this is my first technology I'm working on. So, I recently got to know that there are certain coding rules which I wasn't following and was unaware of. I have two general programming questions.

  1. So I just got to know from an inteview that one should create wrapper functions in their code, by which I can just call a single function which points to a module or a API.

    Like wrapper functions, what else is a good practice in programming?

  2. Since I never worked on Android/iOS before and directly jumped to React Native. I often find myself doing trial and erros when it comes to do styling in my application.

    Or what is the right way to style an element without giving too much margin/padding, which I assume is wrong. Or what is the right way to style where the styling works the same in all devices. Can someone recommend me a right article or video or something for this styling issue?

1 Answers

Marc Q. On Best Solutions

This may well be the broadest question(s) on StackOverflow :-). Just a few suggestions for the first question.

1. Read : Many books have been written, some down-to-earth (Clean Code, The Pragmatic Programmer, Code Complete, Refactoring, ...), some more theoretical (Structure and Interpretation of Computer Programs, ...).

2. Collaborate : You can sollicit code reviews from colleagues, have pair-programming sessions with them, attend coding dojos or hackathons. All of these are ways to share and transfer knowledge among peers, are very helpful, and almost always fun, too.

3. Play : Sites like codewars.com are great to let you experiment with huge numbers of coding challenges, risk-free, and with the bonus benefit of seeing the solutions of others (once you're done :-)).

Maybe it's worth posting the second question separately, with the appropriate title. Good luck!