学习编码的正确途径。 [英] Right path to learn to code.

查看:63
本文介绍了学习编码的正确途径。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.. !!



我是新手试图学习编码和我遇到的最大问题面对学习是我无法思考练习中给出的问题的正确解决方案(从我正在学习的书中)和这让我感到愚蠢。



我正在学习C#,这是我选择的第一种语言。虽然我理解像Loops,For Loop,While Loop和Arrays这样的概念,但我发现使用它们很难开发逻辑。我很困惑,我的意思是只是我面对这个问题,或者第一次学习语言的每个人都面对它。



我也想知道是否有任何特定的或可能是程序员在解决问题和开发编程逻辑时遵循的公认原则或程序?在编程时我能做些什么来提高我的思考能力?



顺便说一句,我正在学习的书是计算机基础知识使用c#编程 - Nakov eBook 2013。我喜欢这本书,概念也以一种很好的方式解释,但也许你们可以提出更好的建议。



我正在粘贴指数的一部分这本书给你们看看。



第1章编程简介.............. ........................... 69

第2章原始类型和变量....... ............................... 111

第3章运算符和表达式.... ....................................... 139

第4章控制台输入和输出........................................... 165

第5章有条件陈述...................................... ........ 195

第6章循环............................. ................................. 211

第7章阵列...... .................................................. ....... 235

第8章数字系统............................. ....................... 265

第9章。方法 ................................................. ........... 293

第10章递归.......................... ............................... 351

第11章创建和使用对象...... ..................................... 385

第12章例外处理................................................ 415

第13章字符串和文本处理................................... .... 457

第14章定义................................. ......................... 499

第15章文字............ .................................................. 615

第16章线性数据结构................................... ......... 641

第17章树木和图形.......................... ........................ 681

第18章字典,哈希表和集....... ......................... 727

第19章数据结构和算法的复杂性........ .......... ........ 769

第20章面向对象的编程原理......................... ...... 807

第21章高质量编程代码.............................. ....... 853

第22章Lambda表达式和LINQ ........................... ............... 915

第23章解决问题的方法.................... ................. 935

第24章样本编程考试 - 主题#1 .............. ................... 985

第25章样本编程考试 - 主题#2 ............ .................... 1041

第26章样本编程考试 - 主题#3 ........... ..................... 1071



我已经完成到第6章 - 循环。虽然我可以很好地向任何人解释这些概念,但在开发逻辑时面临问题。但是,这并不是在所有问题中都会发生,而是主要是在需要使用循环的问题中。



我在本书的开头读过前言/介绍完成章节后。 19数据结构和算法的复杂性阅读本书的人将对生成逻辑有很好的理解,但在我的案例中我非常怀疑。



< b>请伙计们,帮助我并提供一些解决方案,还请提及您对我所面临的问题的看法,我是否会逐步培养思维技能,还是应该尝试其他方法来学习编码。



请原谅我的英语,因为它不是我的母语



我尝试了什么:



我试图寻找其他更好的资源,我可以找到一些简单的资源解决问题来培养我的信心,却找不到一个。我也期待着一些网址,其中容易出现问题,逐渐增加难度。



提前感谢。 :-): - )

Hello everyone..!!

Hi, I'm a newbie trying to learn to code and the biggest problem I'm facing in learning is my inability to think about the right solution to the problem given in the exercises (from the book I'm learning) and this makes me feel dumb.

I'm learning C# and this is the first language I picked to start with. Although I understand the concepts like Loops, For Loop, While Loop and Arrays I find it hard to develop logic utilizing them. I'm confused, I mean is it just me who is facing this problem or everyone who learns a language first time faces it.

I also want to know is there anything specific or may be an accepted principle or procedure that the programmers follow while solving problems and developing programming logic? Is there something that I can do to improve my thinking capability while programming?

By the way, the book I'm learning from is "Fundamentals of Computer Programming with c# - Nakov eBook 2013". I like the book and the concepts are also explained in a good way but maybe you guys can suggest something better.

I'm pasting the Index part of the book for you guys to have a look.

Chapter 1. Introduction to Programming.........................................69
Chapter 2. Primitive Types and Variables ......................................111
Chapter 3. Operators and Expressions...........................................139
Chapter 4. Console Input and Output ...........................................165
Chapter 5. Conditional Statements..............................................195
Chapter 6. Loops ..............................................................211
Chapter 7. Arrays .............................................................235
Chapter 8. Numeral Systems ....................................................265
Chapter 9. Methods ............................................................293
Chapter 10. Recursion .........................................................351
Chapter 11. Creating and Using Objects ........................................385
Chapter 12. Exception Handling ................................................415
Chapter 13. Strings and Text Processing .......................................457
Chapter 14. Defining ..........................................................499
Chapter 15. Text ..............................................................615
Chapter 16. Linear Data Structures ............................................641
Chapter 17. Trees and Graphs ..................................................681
Chapter 18. Dictionaries, Hash-Tables and Sets ................................727
Chapter 19. Data Structures and Algorithm Complexity ..........................769
Chapter 20. Object-Oriented Programming Principles ............................807
Chapter 21. High-Quality Programming Code .....................................853
Chapter 22. Lambda Expressions and LINQ.........................................915
Chapter 23. Methodology of Problem Solving .....................................935
Chapter 24. Sample Programming Exam – Topic #1.................................985
Chapter 25. Sample Programming Exam – Topic #2................................1041
Chapter 26. Sample Programming Exam – Topic #3................................1071

I have completed till chapter 6th- Loops. While I can explain the concepts well to anyone but face problem in developing logic. However, this doesn't happen in all the questions but mostly in questions where a loop is needed to be used.

I read at the beginning of the book in the preface / introduction that after completing the chapter no. 19 Data Structures and Algorithm Complexity the person reading this book will develop a good understanding of generating logic, but I highly doubt it in my case.

Please, guys, help me and provide some solution, also please mention what you think about the problem I'm facing, will I gradually develop the thinking skill or should I try some other approach to learn to code.

Please excuse my English as it is not my native language.

What I have tried:

I tried to look for other better resources where I can find some easy to solve problems to develop my confidence, but couldn't find one. I would also be looking forward for some URLs where easy problems are given that increases in difficulty gradually.

Thanks in advance. :-) :-)

推荐答案

计算中的许多事情很难让你开始:它需要你以不同的方式思考,更具分析性比你可能习惯的方式(对于某些人来说,这是他们第一次实际上 认为 而且他们的问题比你这样做!)



循环非常简单,真的 - 它们只是多次做同样事情的一种方式。例如,您正在阅读一本书以了解C# - 所以过程如下:

Many things in computing can be difficult to get your head round to start with: it needs your to think in a different, more analytical way than you are probably used to (For some, it's the first time they have ever had to actually think and they have even worse problems than you do!)

Loops are pretty simple, really - they are just a way of doing the same thing many times. For example, you are reading a book to learn about C# - so the process is:
1) Open the book at the start of chapter 6
2) Read the page.
3) Turn to the next page.
4) Is that the end of the chapter?
4.1) No - go back to 2.
4.2) Yes - you have finished chapter 6, now do the exercises.





这很简单 - 这是你每天都要做的事情:阅读章节(或者也许是章节的一部分)。



在计算机方面,它是一样的事情:



That's simple - it's something you do every day: reading a chapter (or part of a chpter perhaps).

In computer terms, it's the same thing:

1) Initialize the loop - Open the book at the start of chapter 6
2) Body of the loop - Read the page.
3) Prepare for next iteration - Turn to the next page.
4) Check for completion - Is that the end of the chapter?
4.1) No - Loop round again - go back to 2.
4.2) Yes - Exit the loop - you have finished chapter 6, now do the exercises.



我们可以将其写为C# for 循环:


We can write that as a C# for loop:

for (int pageNo = chapterStart[5]; pageno < chapterstart[7]; pageNo++)
   {
   ReadPage(pageNo);
   }

或者 foreach 循环:

Or a foreach loop:

foreach Page page in Chapters[6])
   {
   page.Read();
   }

或者循环:

Or a while loop:

int pageNo = chapterStart[5]; 
while (pageno < chapterstart[7])
   {
   ReadPage(pageNo++);
   }

或者甚至是 do ... while 循环:

Or even a do ... while loop:

int pageNo = chapterStart[5];
do
   {
   ReadPage(pageNo++);
   } while (pageno < chapterstart[7]);

稍等一下,可能会更清楚一些 - 尝试将循环与真实世界事件进行比较,你会发现它们相当不错在大多数情况下匹配!

THink about that for a moment, and it may be a little clearer - try comparing loops to "real world" events, and you'll find they are a pretty good match in most cases!


能够处理问题并确定通过它们的方法是一项宝贵的技能 - 对你来说好消息是它可以学习,并且变得更容易练习。



有一些免费资源可以帮助你,例如如何像程序员一样思考 - 解决问题的经验教训 [ ^ ]



还有很多书:例如如何像程序员一样思考:解决困惑的问题:解决困惑的问题:Amazon.co.uk:Paul Vickers:9781408065822:图书 [ ^ ]



注意我不推荐上面的链接,因为我没有使用它们,它们只是我找到的例子。



然而,我发现一本非常有价值且可以推荐的书是务实的程序员:Amazon.co.uk:Andrew Hunt,David Thomas:8601404321023:书籍 [ ^ ]



祝您旅途中好运
To be able to approach problems and determine a way through them is a valuable skill - and the good news for you is that it can be learned, and it gets easier with practice.

There are some free resources out there that might help you e.g. How to think like a programmer — lessons in problem solving[^]

There are also a lot of books: e.g. How to Think Like a Programmer: Problem Solving for the Bewildered: Problem Solving for the Bewildered: Amazon.co.uk: Paul Vickers: 9781408065822: Books[^]

Note I can't recommend the links above as I haven't used them, they are just examples that I found.

However, a book I found invaluable and can recommend, was The Pragmatic Programmer: Amazon.co.uk: Andrew Hunt, David Thomas: 8601404321023: Books[^]

Good luck in your journey


您必须知道你几乎可以用任何语言做任何事情,只是一些语言对于初学者来说更难,因为有更多陷阱需要处理。

你需要掌握一套技术,这些技术是工作的基础,没有链接到语言。



建议:

- 从简单/安全的语言开始:VB,Java,C#,而不是C或C ++。我建议不要因为使用缩进而开始使用Python。

- 阅读文档/关注教程(很多)

- 从小/无用开始项目,目的是学习编程,而不是做一些有用的事情。

- 从控制台模式程序开始(没有花哨的图形,没有鼠标)

- 学习调试器(一个令人难以置信的学习工具)

调试器 - 维基百科,免费的百科全书 [ ^ ]

掌握Visual Studio 2010中的调试 - 初学者指南 [ ^ ]

- 有问题吗?谷歌是你的朋友。

- 学习算法和数据结构。

- 学习布尔代数

- 学习一种或多种分析方法, EW Djikstra自上而下的方法是一个良好的开端。

结构化编程.pdf [ ^ ]

https://en.wikipedia.org/wiki/Top- down_and_bottom-up_design [ ^ ]

https://en.wikipedia.org/wiki/Structured_programming [ ^ ]

https://en.wikipedia.org/wiki/Edsger_W._Dijkstra [ ^ ]

https://www.cs.utexas.edu/users/EWD/ewd03xx/EWD316.PDF [ ^ ]

- 学习SQL

- 学习数据库设计和管理

数据库设计简介 [ ^ ]

数据库规范化中的1NF,2NF,3NF和BCNF DBMS教程| Studytonight [ ^ ]

- 学习正则表达式



有趣的链接:

stanford.edu:学习编程 [ ^ ]



没有知识的捷径,没有人可以为你学习,你是唯一可以做到的人。

记住练习和小项目不是为了让你有用,他们在这里教你编程。
You have to know that you can do pretty much anything in any language, simply some languages are harder for beginners because there is more pitfalls to handle.
You need to master a set of techniques that are the basis of the job and are not linked to a language.

Advices:
- Start with an easy/safe language: VB, Java, C#, not C or C++. I do not recommend to start with Python either because of the usage of indentation.
- Read documentation / Follow tutorials (a lot of them)
- Start with tiny/useless projects, the purpose is to learn programming, not doing something useful.
- Start with console mode programs (no fancy graphics, no mouse)
- Learn debugger (an incredible learning tool)
Debugger - Wikipedia, the free encyclopedia[^]
Mastering Debugging in Visual Studio 2010 - A Beginner's Guide[^]
- A problem ? Google is your friend.
- Learn Algorithms and Data-Structures.
- Learn Boole algebra
- Learn one or more analyze methods, E.W. Djikstra top-Down method is a good start.
Structured Programming.pdf[^]
https://en.wikipedia.org/wiki/Top-down_and_bottom-up_design[^]
https://en.wikipedia.org/wiki/Structured_programming[^]
https://en.wikipedia.org/wiki/Edsger_W._Dijkstra[^]
https://www.cs.utexas.edu/users/EWD/ewd03xx/EWD316.PDF[^]
- Learn SQL
- Learn Databases design and Administration
Introduction to database design[^]
1NF, 2NF, 3NF and BCNF in Database Normalization | DBMS Tutorial | Studytonight[^]
- Learn Regular Expressions

Interesting link:
stanford.edu: Learn to Program[^]

There is no shortcut to knowledge, no one can learn for you, you are the only one that can do it.
Remember the exercises and little projects are not here to make something useful, they are here to teach you programming.


这篇关于学习编码的正确途径。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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