작게 만들어라

public static String renderPageWithSetupsAndTeardowns(
	PageData pageData, boolean isSuite
) throws Exception {
	boolean isTestPage = pageData.hasAttribute("Test");
	if(isTestPage) {
		WikiPage testPage = pageData.getWikiPage();
		StringBuffer newPageContent = new StringBuffer();
		includeSetupPages(testPage, newPageContent, isSuite);
		...
		...
		...
	}
	return pageData.getHtml();
}

⬇️

public static String renderPageWithSetupsAndTeardowns(
	PageData pageData, boolean isSuite
) throws Exception {
	if(isTestPage(pageData)) includeSetupAndTeardownPages(pageData, isSuite);
	return pageData.getHtml();
}

블록과 들여쓰기(+ if문 처리)

 // bad
if(a) {
	if(b) {
		if(c) {
		}
	}
}

else 부분을 먼저 처리 + 성능 향상을 위해 function early return 으로 조기종료

// good
function aaa() {
	if(c) return c;
	if(b) return b;
	if(a) return a;
}

한 함수당 작업 하나