官术网_书友最值得收藏!

Planning before programming

Often, people start programming before having a general idea of what they want to accomplish. If you're an experienced programmer, this may be a good way to get a feel for the problem, since you have already developed intuition, and you'll probably end up throwing away the first couple of attempts anyway. However, if you're a novice programmer, I recommend you make your objectives clear and explicit before writing any code (putting them into writing can help). It will help you make better decisions by asking yourself how a certain way of doing things will affect your objectives. So, before we set up anything, we need to understand and make our general objectives explicit:

  1. Understand the big picture of the analysis quickly.
  2. Reproduce our analysis automatically by executing a single file.
  3. Save all the resulting objects, text, and images for the analysis.
  4. Measure the amount of time it takes to perform the full analysis.
  5. When working on iterative processes, know the completed percentage.
  6. Be able to find and change each part of the analysis easily.

To fulfill these general objectives, we need to develop modular code with well-managed dependencies that are flexible (easy to change) and friendly to side-effects (saving objects, texts, and images). Even if your explicit objectives don't require it, you should make a habit of programming this way, even when just doing data analysis.

主站蜘蛛池模板: 邵东县| 淮滨县| 曲阜市| 岳普湖县| 和政县| 城市| 乐昌市| 唐海县| 永顺县| 桃园县| 饶河县| 黑水县| 大洼县| 慈利县| 阜平县| 乐平市| 伊宁市| 鄂尔多斯市| 沛县| 马山县| 武邑县| 五河县| 通江县| 剑阁县| 渭南市| 白朗县| 定边县| 子洲县| 阳西县| 竹溪县| 巨野县| 蒙山县| 高邮市| 莲花县| 平泉县| 犍为县| 大石桥市| 宝山区| 吐鲁番市| 佛冈县| 中宁县|