How to Review Code | Best Practices | Pull/Merge Requests | iOS | Swift | Checklist

iCode
iCode
13.4 هزار بار بازدید - 3 سال پیش - In this video, I have
In this video, I have discussed about the things which we should keep in mind while reviewing the code (pull/merge request). Apart from this, I’ve also discussed about creating Pull/Merge requests, how to apply merge checks, best practices and compiled all the checks in an exhaustive checklist. Also, demonstrated each check with an example (by reviewing a dummy PR).

Checklist 👇🏼

https://gist.github.com/pallavtrivedi...

Chapters 👇🏼

00:00 Start
01:53 What’s there in the video.
02:16 Brief about demo project
03:34 How to apply merge checks
05:00 PR Creation
07:00 PR Review
07:58 Unnecessary Imports
08:15 Protocol Conformance in Extensions
09:25 Typo Checks
09:52 View should not have Data Object
10:25 Type Inference
11:46 Responsibility Division
12:00 Naming of the Variables
12:43 Single Responsibility - Different methods for different tasks.
13:10 Unnecessary Checks  
14:40 Consider edge cases (keep fallbacks) - Error Handling
15:30 Write code for maintainer
16:24 Hard Coded Values
17:24 Prefer Enums, Switch over if/else
18:30 Use APIs provided by Apple
19:20 Check for Force Unwraps (Prefer Optional Binding)
20:02 Check for Indentations
20:50 Check for efficient Memory Managment (avoid retain cycles)
21:26 Avoid using deprecated APIs
21:56 Dependencies should be injected
23:03 DRY (Don’t Repeat Yourself)
24:08 Prefer Higher Order Functions
25:35 YAGNI Principle (You Aren’t Gonna Need It)
27:33 Early Returns wherever possible
28:15 Check Array’s count before accessing the elements
29:09 ViewModel Should Only Have Business Logic
29:31 Unintended Changes
31:00 Boy-Scout Principle
32:55 Code Review Checklist
3 سال پیش در تاریخ 1400/06/27 منتشر شده است.
13,461 بـار بازدید شده
... بیشتر