Though many people Kongming was not a very good military general he held against Wei when he still lived. On the other hand after Jiang Wei's sucession to leader of the military, after Zhuge's death, lead to the fall of Shu Han. Jiang Wei still had many men left from Kongming's Northern Caimpaigns yet he kept attacking Wei and almost alway's loses to Deng Ai. He keep's up his unsucessful attacks on Wei untill he goes to a defensive battle against Dend Ai. Even though Deng Ai still defeated Jiang Wei untill he captured Cheng Du. After the capture of Cheng Du Shu Han gives in to Wei.
Now most people belive Kongming was unsucessful in his Northern Caimpaigns but Kongming wasn't unsucessful. If Zhuge took risks like Jiang Wei did he also may have lead to the downfall of Shu. Instead Kongming lead attacks but didn't go all out. Zhuge because of this stategy keep Shu Han strong and didn't lose to Wei.