前期迭代懒得优化,来一个需求,加一个if,久而久之,就串成了一座金字塔。 当代码已经复杂到难以维护的程度之后,只能狠下心重构优化。那,有什么方案可以优雅的优化掉这些多余的if/else? 有这么一种场景,根据不同的参数走不同的逻辑,其实这种场景很 ...
说起“if/else屎山代码”,相信很多工程师都有一肚子苦水要吐,包括我。 以前做过一个项目,客户老是改需求,那会水平 ...
Community driven content discussing all aspects of software development from DevOps to design patterns. All you need to do is open an online editor and code away! Which is exactly what we’re going to ...