我如何开始阅读其他人的代码? [英] How Do I Get Started At Reading Other People's Code ?

查看:91
本文介绍了我如何开始阅读其他人的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每个人都说,要成为更好的程序员,你必须学会​​阅读其他人的代码。我开始从github开始研究一些开源的c#项目,但每次我真的不知道如何开始。我应该从哪里开始阅读代码?阅读其他人的代码的正确方法是什么?



所以我需要一些书籍或教程(如果有的话)来解释一些开源项目的代码。



我可能不是唯一一个坚持这个问题的人,我相信有很多人喜欢我。那么他们是如何做到的?



任何形式的帮助和建议都有帮助..

Everybody says, "to be a better programmer you have to learn to read other people's code ". I started working on some open source c# projects from github but each time i really don't get how to get started. Where should i start to read the code ? What is the proper way of reading other people's code ?

So i need some books or tutorials (if there are any) that explains the code of some open source source projects.

I may not be the only one who stuck on this problem, i am sure there are many like me. So how do they do it ?

Any kind of help and suggestions are helpful..

推荐答案

我同意F-ES。不要担心阅读其他人的代码。当我开始时,我会看到的代码是在技术演示中,我确实学到了一些很好的技术来观察它们。



但是,成为更好的程序员的最好方法是为了不断获得越来越多的经验。
I agree with F-ES. Don't worry about reading other people's code. When I started out, the code I would see was in technical demonstrations and I did learn some good techniques watching those.

However, the best way to become a better programmer is to keep getting more and more experience.


是的,我同意你们大多数人都在努力;



他们需要在哪里开始。以及如何开始。



简单的答案是将您的项目拆分为小型小模块并在一个记事本中记下所有内容并开始从小模块实施。



需求: 假设您需要根据以下方式显示员工详细信息部门选择;



您需要将其分成几个部分,

1)需要获得部门详细信息

2)根据部门选择绑定员工详细信息



首先我们需要获取部门详细信息,我们需要将这些信息存储到某个控件中,您需要确定哪个控件是,通常我们使用下拉控件,然后将部门详细信息绑定到下拉列表中,以满足您的需求..?



您需要打开数据库连接并从数据库获取数据将其分配到下拉列表中。



将数据绑定到下拉列表后,您的下一步是根据下拉选择(部门选择)绑定员工详细信息,以便在此场景中哪个事件有用OnSelectedIndexChanged 下拉事件因此重新选择你的网格选择下降的下拉事件。



而不是阅读阅读...开始实施项目,顺便说一下你可以了解更多。



当你想要了解更多的实施项目时,你应该从谷歌学到一些文章。



这是我的个人经历..
Yes, I agree with you most of them are struggling with;

where they need to start.? and how to start.?

The simple answer is split up your project in to small small modules and note down all that in one notepad and start to implement from small module.

Req: Assume that you have a requirement to show employee details based on department selection;

You need split this into several parts,
1) Need to get department details
2) Bind employee details based on department selection

first we need to get department details and we need to store those into some control, you need to decide which control that is, usually we are using dropdown control, then bind department details into dropdown for that what you need..?

You need to open database connection and get data from database and assign that into dropdown.

After Bind data into dropdown, what is your next step bind employee details based on dropdown selection(dept selection), so which event will be useful in this scenario "OnSelectedIndexChanged" event of dropdown so rebind your grid onselectedindexchanged event of dropdown.

Instead of reading reading.. start to implement project, by the way you can able to learn more.

while implement project you want to know more at that time you should learn some articles from Google.

This is my personal experience..


这篇关于我如何开始阅读其他人的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆