如何练习像 C# 这样的语言?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/486838/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to practice a language like C#?
提问by MainID
These days I have learned some basic usage of C#. I think that because C# is often used in application programming ,we should practice the language in an engineering way rather than solving some algorithmic problems. But what is the best way to practice C# if I cannot find any projects related to the language in the work.
这几天我学习了一些 C# 的基本用法。我认为因为 C# 经常用于应用程序编程,我们应该以工程方式练习语言,而不是解决一些算法问题。但是,如果我在工作中找不到与该语言相关的任何项目,那么练习 C# 的最佳方法是什么?
采纳答案by Canavar
I think you can try start with personal small utilities. For example, write a file backuper, personal asp.net blog site, password reminder, time tracker, etc..
我认为您可以尝试从个人小实用程序开始。比如写一个文件备份器、个人asp.net博客站点、密码提醒、时间跟踪器等。
the product will be used by you, so you will get exceptions or performance problems so you will be learning more..
该产品将由您使用,因此您会遇到异常或性能问题,因此您将学到更多..
回答by Oliver Friedrich
I always have the same problem, it is not easy to find a project that you can just implement using the new language.
我总是有同样的问题,要找到一个可以使用新语言实现的项目并不容易。
Why not try to implement a project that you once implemented in another language again in C#?
为什么不尝试在 C# 中再次实现您曾经用另一种语言实现的项目?
回答by Alterlife
Find an open-source project that you're interested in which uses this technology and try to contribute to it.
找到一个你感兴趣的开源项目,并尝试为它做出贡献。
回答by Dmitri Nesteruk
If you can't find your own work to apply your coding skills to, simply join an open-source project - you will find it a valuable real-life experience in coding and having your work critiqued by others.
如果您找不到自己的工作来应用您的编码技能,只需加入一个开源项目 - 您会发现这是一种宝贵的现实生活中的编码经验,并且您的工作受到他人的批评。
回答by Simon P
Think of something really big, and copy it. design it yourself and just work away at it... learn it all at once :)
想一些非常大的东西,然后复制它。自己设计并努力解决它......一次学习所有内容:)
回答by Sorskoot
I always go with a game. Think of a new game, or re-do an old one. I almost always start with lights-out. Like thisone in java. Start simple and extend on that. I use games to learn every aspect of a language. They're great to practice design patterns too.
我总是带着游戏去。想一个新游戏,或者重做一个旧游戏。我几乎总是从熄灯开始。就像java中的这个。从简单开始并扩展。我使用游戏来学习语言的各个方面。他们也很适合练习设计模式。
回答by Jim Anderson
I hear writing your own blog engine is a popular exercise these days.
我听说编写自己的博客引擎是当今流行的练习。
回答by Bj?rn
回答by BenAlabaster
There's a few things I use for practice - admittedly, they're more algorithmic than business oriented, but lets face it business oriented stuff can get tedious if that's what you do all day long:
有一些我用来练习的东西 - 诚然,它们比面向业务的更算法化,但让我们面对现实,如果你整天都在做这些,面向业务的东西可能会变得乏味:
Code Golf on SO - check out the following tags that all have great mini tasks
Project Euler - found at http://projecteuler.net/
Check out other questions on SO to give you ideas of tasks to program - a great one to start off with can be found here Alternate FizzBuzz Questions
Attempt to figure out answers to questions that come up on here that you wouldn't otherwise know the answer to.
Code Golf on SO - 查看以下所有都有很棒的小任务的标签
欧拉计划 - 在http://projecteuler.net/找到
查看关于 SO 的其他问题,为您提供有关编程任务的想法 - 一个很好的开始可以在这里找到替代 FizzBuzz 问题
尝试找出这里出现的问题的答案,否则您将不知道答案。
For practice in business aspects of programming, try and understand what most business wants when it comes to software and that is software to assist them to do their every day jobs. This may come down to software that does specific tasks for a user (i.e. you) or it may be software that allows storage, retrieval and reporting of business data.
对于编程的业务方面的实践,尝试了解大多数业务在软件方面的需求,即帮助他们完成日常工作的软件。这可能归结为为用户(即您)执行特定任务的软件,或者它可能是允许存储、检索和报告业务数据的软件。
- Create a project that allows you to store and retreive data using various patterns, taking note of performance differences of each - i.e. DataSet vs. DataAdapter vs. DataReader vs. LINQ-to-SQL and Stored Procedures vs. TableDirect vs. QueryStrings. There's only so many ways of storing and retrieving data from a database.
- Grab a demo database from the internet - like AdventureWorks or the infamous Northwind and write yourself reports displaying the data in various formats.
- 创建一个项目,允许您使用各种模式存储和检索数据,注意每个模式的性能差异 - 即 DataSet 与 DataAdapter 与 DataReader 与 LINQ-to-SQL 和存储过程与 TableDirect 与 QueryStrings。从数据库中存储和检索数据的方法只有这么多。
- 从互联网上获取一个演示数据库——比如 AdventureWorks 或臭名昭著的 Northwind,然后自己编写报告,以各种格式显示数据。
I often find that utility software I use that I find online just doesn't quite cut it. Sure some of them have some nice features, but inevitably there's always somethingmissing. So I surf around and find a bunch of utilities that cover everything I think one of them should do, take all the best/most useful bits and [taking note of things I like about each of the tools] I write my own. The best way is to always think: "How do I want to use it" rather than "how must I use it if I program it this way".
我经常发现我在网上找到的我使用的实用软件并没有完全削减它。当然,其中一些有一些不错的功能,但不可避免地总是缺少一些东西。因此,我四处浏览并找到了一堆实用程序,涵盖了我认为其中一个应该做的所有事情,采用了所有最好/最有用的部分,并[记录了我对每个工具的喜欢] 我自己编写的。最好的方法是始终思考:“我想如何使用它”而不是“如果我以这种方式编程,我必须如何使用它”。