如何改进程序编码

时间:2021-01-12 03:19:02

I am a C# developer. Still learning. I had not learn all the features of C# 2.0 and now the new version of c# is being released. how do we cope up with this.what is the best option to cope up with the latest programming skills.

我是C#开发人员。还在学习。我还没有学习C#2.0的所有功能,现在正在发布新版本的c#。我们如何应对这一点。什么是应对最新编程技巧的最佳选择。

9 个解决方案

#1


4  

As Steve M said: Read. But don't stop there. You also have to write.

史蒂夫M说:读。但不要止步于此。你还必须写。

First: Write Code. Try out the stuff you read about. Look at open source software and how things are done by others. Try those new techniques out.

第一:编写代码。试试你读到的东西。查看开源软件以及其他人如何完成工作。尝试这些新技术。

Second: Write text. Write a blog post or whatever on how to do something. You had a problem and you solved it, now write down what the problem was, what ideas for solutions you had and what solution you picked for which reasons. Get people to comment, get peer review of your own thinking that way.

第二:写文字。撰写博客文章或其他任何有关如何做某事的内容。你有一个问题,你解决了它,现在写下问题是什么,你有什么想法的解决方案,以及你选择了什么解决方案。让人们发表评论,通过这种方式对自己的想法进行同行评审。

#2


4  

  1. Read good quality code. Locate other projects (open source or proprietary projects within your organizations) and look for how other engineers have approached particular issues. Look for idioms, design patterns, styles that you find particularly good and adopt them in your coding practices.

    阅读高质量的代码。找到其他项目(组织内的开源或专有项目),并查找其他工程师如何处理特定问题。寻找您认为特别好的习语,设计模式和风格,并在编码实践中采用它们。

  2. Concentrate on the basics. Sure knowing how to perform a particular operation best in C# is good, but knowing how and when to abstract, avoiding duplication, following style rules, and giving your identifiers appropriate names are more important skills. These are also more valuable because you can apply them to any language.

    专注于基础知识。当然知道如何在C#中最好地执行特定操作是很好的,但是知道如何以及何时抽象,避免重复,遵循样式规则以及为您的标识符指定适当的名称是更重要的技能。这些也更有价值,因为您可以将它们应用于任何语言。

  3. Improve your code. When you find in code something complicated or suboptimal try to think of a better way to write it. For instance, if you write a lot of boilerplate code, examine how you can use abstraction mechanisms, like subroutines, methods, or classes, to avoid the code duplication. If an expression is particularly long, think whether putting some of it into a separate function can increase its readability.

    改善您的代码。当你在代码中找到一些复杂或次优的东西时,试着想出一个更好的方法来编写代码。例如,如果您编写了大量的样板代码,请检查如何使用抽象机制(如子例程,方法或类)来避免代码重复。如果表达式特别长,请考虑将其中的一部分放入单独的函数中是否可以提高其可读性。

  4. Use tools. There are tools, like FindBugs, that can locate suboptimal or downright wrong code constructs. Make it a habit to have your code pass cleanly through these tools, and also from your compiler's highest warning setting.

    使用工具。像FindBugs这样的工具可以找到次优或彻底错误的代码结构。养成通过这些工具以及编译器的最高警告设置完全通过代码的习惯。

  5. Have your code reviewed. Find a mentor and have him or her review your code. Be ready to accept criticism and learn from this experience. Later repay this favor to the community by acting as a mentor.

    检查您的代码。寻找导师并让他或她审查您的代码。准备好接受批评并从中吸取经验。后来通过担任导师来回报社区。

#3


3  

A good method to learn is to see what has changed in the language specifications and try them out yourself with small programs. Search some examples, try them, change them and see the results. There will be a time when you do some "real" work when you'll remember that stuff and think "that might actually help here"

一个好的学习方法是查看语言规范中的变化,并使用小程序自行尝试。搜索一些示例,尝试它们,更改它们并查看结果。有一段时间你会做一些“真实”的工作,当你记住那些东西并想“这可能真的有帮助”

#4


2  

There are no magic tricks or secret ninja-methods. If you want to be good programmer, work. Work a lot and hard.

没有魔法技巧或秘密忍者方法。如果你想成为优秀的程序员,工作。工作很多,很努力。

Book reading will not make you a professional if you don't use new knowledge in practice. Don't worry if you don't know all nifty features of .NET X.Y.Z. Work hard, try to solve different problems, ask your boss to give you different tasks and you will succeed. It's hard, but it's the only way to go. Work + learn at the free time and you will become professional.

如果你不在实践中使用新知识,书籍阅读不会让你成为一名专业人士。如果您不了解.NET X.Y.Z的所有漂亮功能,请不要担心。努力工作,尝试解决不同的问题,让老板给你不同的任务,你就会成功。这很难,但这是唯一的出路。工作+在空闲时间学习,你将变得专业。

But don't rush, remember that professionalism comes at a price - you can't be proficient at many different fields of work at once. Choose some technology that you like and can give you money, and go along with it. You will feel when time for changes comes.

但不要急于求成,请记住专业性是有代价的 - 你不能同时熟练地掌握许多不同的工作领域。选择一些你喜欢的技术并且可以给你钱,然后继续使用它。当变化的时间到来时,您会感觉到。

#5


1  

Read, read and when you're done reading, read some more. Reading also helps.

阅读,阅读以及阅读完毕后,请阅读更多内容。阅读也有帮助。

But seriously, sign up to relevant mailing lists and RSS feeds so that you can be updated as things happen.

但严重的是,请注册相关的邮件列表和RSS源,以便在事情发生时进行更新。

#6


1  

Read good code.

阅读好的代码。

Pick an open source project you support. Start going through it on a regular basis, learning how it works by actually reading the code.

选择您支持的开源项目。定期开始,通过实际阅读代码了解它的工作原理。

#7


1  

the only way to learn to code, is to code... you become a better coder by observing people better than you.

学习编码的唯一方法就是编码......你通过比你更好地观察人来成为一个更好的编码器。

Don't worry too much about new features in a languae, be aware of them sure, but concentrate on the core language

不要过分担心语言中的新功能,确切地注意它们,但要专注于核心语言

#8


1  

1) I try to get involved with my local user groups for c# it would be a Microsoft Technical User group

1)我尝试与c#的本地用户组合作,这将是一个Microsoft技术用户组

http://www.microsoft.com/communities/usergroups/default.mspx

They are usually a bunch of like minded individuals who want to learn about the new features in certain tools.

他们通常是一群志同道合的人,他们想要了解某些工具中的新功能。

Microsoft are generally very good at helping to fund these groups and talks and seminars are held frequently. Often with the developer who created the tools you want to learn more about.

微软通常非常擅长为这些团体提供资金,并经常举办讲座和研讨会。通常与开发人员一起创建您想要了解的工具。

2) Get some RSS Feeds/News letters to c# sites such as C# Corner or Channel 9 They are usually the places

2)获取一些RSS源/新闻信件到c#网站,如C#Corner或Channel 9。它们通常是地方

3) Oh and as mentioned by others, read a LOT and try stuff out. It's not easy to keep up with the new features but read about them, try them out on small little stand alone projects and have fun with them. I don't know about you but I derive great satisfaction from getting something new and cool to work.

3)哦,正如其他人所提到的,阅读很多东西并尝试一下。要跟上新功能并阅读它们并不容易,只需要在小小的独立项目上试一试,并与它们玩得开心。我不了解你,但我从获得新的和酷的工作中获得了极大的满足感。

As the Pragmatic programmers would say, improve your tool belt all the time.

正如实用程序员所说,一直在改进你的工具带。

#9


1  

It is useful to keep up with technologies, but even more useful to learn timeless skills that will apply whatever development tools you use.

跟上技术是很有用的,但是学习永久技能会更有用,这些技能将适用于您使用的任何开发工具。

To that end, I recommend reading Code Complete, and then some of the other classic programming books.

为此,我建议阅读Code Complete,然后阅读其他一些经典编程书籍。

The other thing is just to keep on coding. My experience is that you'll pick up specific technologies as and when you need them. Sometimes you'll do this by looking at other people's code, sometimes by reading an interesting article or book, sometimes by going on a course. But however you do it, you'll find the tools you need when you need them.

另一件事就是继续编码。我的经验是,您将在需要时随时获取特定技术。有时你会通过查看其他人的代码来做到这一点,有时通过阅读有趣的文章或书籍,有时通过上一门课程。但无论如何,您都可以在需要时找到所需的工具。

#1


4  

As Steve M said: Read. But don't stop there. You also have to write.

史蒂夫M说:读。但不要止步于此。你还必须写。

First: Write Code. Try out the stuff you read about. Look at open source software and how things are done by others. Try those new techniques out.

第一:编写代码。试试你读到的东西。查看开源软件以及其他人如何完成工作。尝试这些新技术。

Second: Write text. Write a blog post or whatever on how to do something. You had a problem and you solved it, now write down what the problem was, what ideas for solutions you had and what solution you picked for which reasons. Get people to comment, get peer review of your own thinking that way.

第二:写文字。撰写博客文章或其他任何有关如何做某事的内容。你有一个问题,你解决了它,现在写下问题是什么,你有什么想法的解决方案,以及你选择了什么解决方案。让人们发表评论,通过这种方式对自己的想法进行同行评审。

#2


4  

  1. Read good quality code. Locate other projects (open source or proprietary projects within your organizations) and look for how other engineers have approached particular issues. Look for idioms, design patterns, styles that you find particularly good and adopt them in your coding practices.

    阅读高质量的代码。找到其他项目(组织内的开源或专有项目),并查找其他工程师如何处理特定问题。寻找您认为特别好的习语,设计模式和风格,并在编码实践中采用它们。

  2. Concentrate on the basics. Sure knowing how to perform a particular operation best in C# is good, but knowing how and when to abstract, avoiding duplication, following style rules, and giving your identifiers appropriate names are more important skills. These are also more valuable because you can apply them to any language.

    专注于基础知识。当然知道如何在C#中最好地执行特定操作是很好的,但是知道如何以及何时抽象,避免重复,遵循样式规则以及为您的标识符指定适当的名称是更重要的技能。这些也更有价值,因为您可以将它们应用于任何语言。

  3. Improve your code. When you find in code something complicated or suboptimal try to think of a better way to write it. For instance, if you write a lot of boilerplate code, examine how you can use abstraction mechanisms, like subroutines, methods, or classes, to avoid the code duplication. If an expression is particularly long, think whether putting some of it into a separate function can increase its readability.

    改善您的代码。当你在代码中找到一些复杂或次优的东西时,试着想出一个更好的方法来编写代码。例如,如果您编写了大量的样板代码,请检查如何使用抽象机制(如子例程,方法或类)来避免代码重复。如果表达式特别长,请考虑将其中的一部分放入单独的函数中是否可以提高其可读性。

  4. Use tools. There are tools, like FindBugs, that can locate suboptimal or downright wrong code constructs. Make it a habit to have your code pass cleanly through these tools, and also from your compiler's highest warning setting.

    使用工具。像FindBugs这样的工具可以找到次优或彻底错误的代码结构。养成通过这些工具以及编译器的最高警告设置完全通过代码的习惯。

  5. Have your code reviewed. Find a mentor and have him or her review your code. Be ready to accept criticism and learn from this experience. Later repay this favor to the community by acting as a mentor.

    检查您的代码。寻找导师并让他或她审查您的代码。准备好接受批评并从中吸取经验。后来通过担任导师来回报社区。

#3


3  

A good method to learn is to see what has changed in the language specifications and try them out yourself with small programs. Search some examples, try them, change them and see the results. There will be a time when you do some "real" work when you'll remember that stuff and think "that might actually help here"

一个好的学习方法是查看语言规范中的变化,并使用小程序自行尝试。搜索一些示例,尝试它们,更改它们并查看结果。有一段时间你会做一些“真实”的工作,当你记住那些东西并想“这可能真的有帮助”

#4


2  

There are no magic tricks or secret ninja-methods. If you want to be good programmer, work. Work a lot and hard.

没有魔法技巧或秘密忍者方法。如果你想成为优秀的程序员,工作。工作很多,很努力。

Book reading will not make you a professional if you don't use new knowledge in practice. Don't worry if you don't know all nifty features of .NET X.Y.Z. Work hard, try to solve different problems, ask your boss to give you different tasks and you will succeed. It's hard, but it's the only way to go. Work + learn at the free time and you will become professional.

如果你不在实践中使用新知识,书籍阅读不会让你成为一名专业人士。如果您不了解.NET X.Y.Z的所有漂亮功能,请不要担心。努力工作,尝试解决不同的问题,让老板给你不同的任务,你就会成功。这很难,但这是唯一的出路。工作+在空闲时间学习,你将变得专业。

But don't rush, remember that professionalism comes at a price - you can't be proficient at many different fields of work at once. Choose some technology that you like and can give you money, and go along with it. You will feel when time for changes comes.

但不要急于求成,请记住专业性是有代价的 - 你不能同时熟练地掌握许多不同的工作领域。选择一些你喜欢的技术并且可以给你钱,然后继续使用它。当变化的时间到来时,您会感觉到。

#5


1  

Read, read and when you're done reading, read some more. Reading also helps.

阅读,阅读以及阅读完毕后,请阅读更多内容。阅读也有帮助。

But seriously, sign up to relevant mailing lists and RSS feeds so that you can be updated as things happen.

但严重的是,请注册相关的邮件列表和RSS源,以便在事情发生时进行更新。

#6


1  

Read good code.

阅读好的代码。

Pick an open source project you support. Start going through it on a regular basis, learning how it works by actually reading the code.

选择您支持的开源项目。定期开始,通过实际阅读代码了解它的工作原理。

#7


1  

the only way to learn to code, is to code... you become a better coder by observing people better than you.

学习编码的唯一方法就是编码......你通过比你更好地观察人来成为一个更好的编码器。

Don't worry too much about new features in a languae, be aware of them sure, but concentrate on the core language

不要过分担心语言中的新功能,确切地注意它们,但要专注于核心语言

#8


1  

1) I try to get involved with my local user groups for c# it would be a Microsoft Technical User group

1)我尝试与c#的本地用户组合作,这将是一个Microsoft技术用户组

http://www.microsoft.com/communities/usergroups/default.mspx

They are usually a bunch of like minded individuals who want to learn about the new features in certain tools.

他们通常是一群志同道合的人,他们想要了解某些工具中的新功能。

Microsoft are generally very good at helping to fund these groups and talks and seminars are held frequently. Often with the developer who created the tools you want to learn more about.

微软通常非常擅长为这些团体提供资金,并经常举办讲座和研讨会。通常与开发人员一起创建您想要了解的工具。

2) Get some RSS Feeds/News letters to c# sites such as C# Corner or Channel 9 They are usually the places

2)获取一些RSS源/新闻信件到c#网站,如C#Corner或Channel 9。它们通常是地方

3) Oh and as mentioned by others, read a LOT and try stuff out. It's not easy to keep up with the new features but read about them, try them out on small little stand alone projects and have fun with them. I don't know about you but I derive great satisfaction from getting something new and cool to work.

3)哦,正如其他人所提到的,阅读很多东西并尝试一下。要跟上新功能并阅读它们并不容易,只需要在小小的独立项目上试一试,并与它们玩得开心。我不了解你,但我从获得新的和酷的工作中获得了极大的满足感。

As the Pragmatic programmers would say, improve your tool belt all the time.

正如实用程序员所说,一直在改进你的工具带。

#9


1  

It is useful to keep up with technologies, but even more useful to learn timeless skills that will apply whatever development tools you use.

跟上技术是很有用的,但是学习永久技能会更有用,这些技能将适用于您使用的任何开发工具。

To that end, I recommend reading Code Complete, and then some of the other classic programming books.

为此,我建议阅读Code Complete,然后阅读其他一些经典编程书籍。

The other thing is just to keep on coding. My experience is that you'll pick up specific technologies as and when you need them. Sometimes you'll do this by looking at other people's code, sometimes by reading an interesting article or book, sometimes by going on a course. But however you do it, you'll find the tools you need when you need them.

另一件事就是继续编码。我的经验是,您将在需要时随时获取特定技术。有时你会通过查看其他人的代码来做到这一点,有时通过阅读有趣的文章或书籍,有时通过上一门课程。但无论如何,您都可以在需要时找到所需的工具。