您使用什么过程来学习新的编程语言?

发布于 2024-07-25 05:26:28 字数 1432 浏览 10 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(13

梅倚清风 2024-08-01 05:26:28

就我个人而言,我发现我需要一个实质性的项目来用一种新的有趣的语言来实现。 您可以阅读一本书来熟悉语法,并接触有趣的功能,但没有什么能让您像项目这样的新语言进行思考。

Personally I find that I need a substantial project to implement in a new interesting language. You can read a book at become familiar with syntax, and be exposed to interesting features, but a nothing gets you thinking in a new language like a project.

岁月打碎记忆 2024-08-01 05:26:28

我的目的不仅仅是学习一门新语言。 我找到一个需要(或非常适合)新语言的项目并开始编码。

资源取决于语言,但在线教程或一本好的“学习语言”书籍都非常有帮助。 我不会尝试记住任何东西,只是将文档放在身边并搜索我需要编写的每一段代码的解决方案。 不同语言之间的算法变化不大,因此大多数时候只需查找我需要的特定结构的语法即可。

而且,我可能永远不会了解一门语言的一切。 我只是不断查阅有关我需要的东西的文档,最终我不需要再查找大多数东西了。 然而,即使对于我多年来每天都使用的语言,仍然有一些东西我必须偶尔查找,因为我以前从未使用过它们。

I don't set out to merely learn a new language. I find a project that requires (or would be a good fit for) the new language and start coding.

The resources depend on the language, but either an online tutorial or a good "learning the language" book is very helpful. I don't try to memorize anything, just keep the documentation close and search for the solution to each piece of code I need to write. Algorithms don't change much between languages, so most of the time it's just a matter of looking up the syntax for the particular structure I need.

Also, I may never KNOW everything about a language. I just keep consulting the documentation on things that I need and eventually I don't need to look most things up anymore. However, even on the language that I've worked with every day for years, there are still things I have to look up on occasion because I've never used them before.

永不分离 2024-08-01 05:26:28

这是我通常做的事情:

  • 阅读以熟悉新事物
    语言语法
  • 查找现有的开源项目
    我有兴趣
  • 将其移植到新语言
  • 必要时重复

Here's what I normally do:

  • Read to get familiar with the new
    language syntax
  • Find an existing open source project
    I am interested in
  • Port it to the new language
  • Repeat as necessary
谁人与我共长歌 2024-08-01 05:26:28

我通常从一些基本程序开始。 通常是我正在阅读的书中的示例,然后稍微修改它们以使其更加复杂并修整粗糙的边缘。

之后,我前往 Project Euler 并开始快速解决问题。 这是适应新语言和基本结构的好方法。

I usually start off with a few basic programs. Typically samples from the book I'm reading and then modifying them slightly to be more complex and round off the rough edges.

After that, I head over to Project Euler and start rattling off problems. It's a great way to get comfortable with a new language and the basic constructs.

短暂陪伴 2024-08-01 05:26:28

这是一次疯狂的冲刺。

首先,我必须确保我知道如何以“旧”方式做事,即我在其他语言中习惯的方式。

但我不想陷入(例如)像 C 代码一样编写 Python 代码的陷阱,因此我阅读了新语言为我提供的所有内容,而更熟悉的语言则没有。

It's a mad dash.

First I have to make sure I know how to do things the "old" way, meaning the way I'm used to in other languages.

But I don't want to fall into the trap of (for example) writing my Python code as if it were C code, so I read up on all the stuff the new language gives me that more familiar languages don't.

懵少女 2024-08-01 05:26:28

我阅读了一本很好的手册,并将其与我已经了解的语言进行了比较。 所以我只是了解它们之间的区别。

I read a good manual, and compare it to a language I already know. So i just learn the diff between them.

意中人 2024-08-01 05:26:28

学习新语言的一种非常流行的方法是为自己创建一个简单的项目并用新的目标语言实现它。

a very popular way to learn a new language is to create a simple project for yourself and implement it in your new target language.

人间不值得 2024-08-01 05:26:28

我会创建一些我以前已经做过的东西,这样我就可以专注于语言本身,而不是项目的设计或主题。
我还会花一些时间寻找(这个地方是一个很好的起点;-)并阅读一本关于该语言的好书。

剩下的就是练习练习(就像外面的一切一样,不是吗)。

I would create something I've already done before, so I can focus on the language itself, and not the design or the subject of the project.
I would also put some time in searching for (this place is a good starter ;-) and reading a good book about the language.

For the rest it's practice practice practice (like about everything out there isn't it).

仄言 2024-08-01 05:26:28

编程的基础知识需要很少的构造 - 优秀的程序员只需使用一小部分可用的语言功能即可编写出色的代码。

一本书通常是学习新语言的基础知识并获得概述的好方法,这样您就知道该语言的哪些领域可以在您以后需要时为您提供帮助,但最好的方法是编写程序来完成这些事情你需要做的事情,并在做的过程中学习你需要知道的事情。

这样做的好处是,当你想做一些新的事情时,你知道去哪里寻找,而且你做得很好,但你不会费心去学习大量你永远不会真正使用的垃圾。

The basics of programming require very few constructs - A good programmer will be able to write great code with only a small fraction of the available language features.

A book is often a good way to learn the basics of a new language and get an overview so you know what areas of that language could help you when you need them later, but then the best approach is to just write programs to do the things you need to do, and learn what you need to know as you go.

The great thing about this is that you know where to look when you want to do something new, and you do things well, but you don't bother to learn loads of junk that you'll never actually use.

千秋岁 2024-08-01 05:26:28

我会阅读一些有关该语言的大概念的常见问题解答/书籍。

然后我会尝试找到我已经知道的语言之间的比较,以避免在语言 X 中应用语言 Y 中使用的概念。每种语言作为完成任务的方式,你不应该混合它们,即使它们看起来相似乍一看。

这将是第一步。

从长远来看,我会关注论坛或 SO 上专门讨论这种语言的部分。 这些天我会阅读许多帖子的答案,以便掌握高级概念、技巧和最常用的库。 这也将帮助我注意到我何时开始流利地使用该语言:当你开始能够回答有关特定语言的许多随机问题时,这意味着你已经非常擅长它了。

I would read some FAQ/book about the big concepts of the langage.

Then i would try to find comparisons between the langages I already know so as to avoid applying in langage X a concept used in langage Y. Each langage as its way to get things done, you shouldn't mix them even if they look similar at first glance.

This would be the first steps.

On a longer basis, I would follow the section dedicated to this langage on a forum or SO. I would read the answers to many threads over the days, so as to grab advanced concepts, tips and most commonly used librairies. This would also helps me to notice when I'm starting to get fluent in the langage : when you start being able to answer to many random questions on a specific langage that means you're getting quite good at it.

纵性 2024-08-01 05:26:28

我假设您学习了一门新的支持 OOP 的高级编程语言。 此类语言的示例有:Java、Typescript、Perl、C#、C++ 等。您也是一位经验丰富的程序员,因此您已经了解一些其他面向对象的语言。

我希望我有一个有效的方法或一个待办事项列表,我可以遵循它来使学习过程更加简化。

您应该创建一个涵盖以下主题的项目。

语法

  • 注释
  • 命名空间
  • 语句
    • 如果否则
    • 循环
    • 开关盒
  • 函数和类
  • include / import / use

类特定:

  • 静态
  • const/final
  • 重写方法
  • 创建接口并实现
  • 继承
  • 嵌套类

数据结构

  • 数组
  • 集合:
    • 列表
    • 映射、队列、堆栈
    • 对它们的操作:
      • 删除
      • 插入
      • 搜索
      • 迭代
  • 字符串

您可以通过多种方式操作字符串

  • 替换
  • 匹配
  • 连接
  • 拆分

运算

符赋值运算符= 有时很棘手。 您必须检查它是否创建浅复制或深复制。

== 是如何工作的? 也许有像 obj.equals(other) 这样的替代方案?

连接: s1 。 s2 或 s1 + s2

可以重载运算符吗?

编程技术

  • 异常处理
  • lambda
  • 与用户交互(readwrite
  • 单元测试

什么是简单类型,如 intbool >,字符? 它们是一成不变的吗? 如果这是弱类型语言,标量、数组和哈希表之间可能存在差异。

Functions.

参数是按值传递还是按引用传递?

其他正则

  • 表达式
  • 线程
  • 数据格式:
    • JSON
    • XML
  • 文件和流
  • HTTP 方法
  • 日期和时间

    您应该熟悉流行的库,例如 Mathalgorithm

I assume you learn a new high-level programming language which supports OOP. Examples of such langages are: Java, Typescript, Perl, C#, C++ etc. You are an experienced programmer as well, so you already know some other object-oriented langage.

I wish I had an efficient method or a to-do list that I could follow to make the learning process more streamlined.

You should create a project covering the following topics.

Syntax

  • comments
  • namespaces
  • statements
    • if else
    • loops
    • switch case
  • functions and classes
  • include / import / use

Class-specific:

  • static
  • const/final
  • override methods
  • create interface and implement
  • inherit
  • nested class

Data structures

  • array
  • collections:
    • list
    • map, queue, stack
    • operations on them:
      • deletion
      • insertion
      • search
      • iteration
  • strings

You can manipulate with strings in many ways:

  • replace
  • match
  • join
  • split

Operators

Assignment operator = is tricky sometimes. You have to check, if it creates shallow or deep copy.

How does == works? Maybe there is an alternative like obj.equals(other)?

Concatenation: s1 . s2 or s1 + s2?

Can you overload operators?

Programming techniques

  • exception handling
  • lambdas
  • interaction with user (read, write)
  • unit tests

What are simple types like int, bool, char? Are they immutable? If this is weakly typed language, there might be difference between scalars, array and hash tables.

Functions.

Is a parameter passed by value or reference?

Miscellaneous

  • regex
  • threads
  • data formats:
    • JSON
    • XML
  • files and streams
  • HTTP methods
  • dates and hours

    You should get familiar with popular libraries like Math, algorithm.

禾厶谷欠 2024-08-01 05:26:28

我通常安装运行时。
然后我从编译器或解释器的命令行运行一些常用命令。
我在网上寻找论坛以了解其他人对此的看法。
然后我研究如何在 java 中使用外部参数,例如 psvm(String[] args)。
我想总而言之,由于我在Solaris 中的系统管理背景,我一直对命令行上的语言功能感兴趣。

I usually install the runtime.
Then I run some common commands from the command line at the compiler or interpreter.
I look online for forums to find out what other think about it.
Then I investigate how to work with external parameters such as psvm(String[] args) in java.
I guess to sum it up, I am always interested in the languages power on the command line due to my sys admin background in solaris.

乜一 2024-08-01 05:26:28

如果您没有机会加入一个项目并从头开始学习并应用它。 您可以从开放的在线课程获得帮助。 例如,“Edx.org”就是一个很棒的平台。 有很多关于计算机科学和软件开发的课程。 IE
这里是数据结构和软件设计课程。

If you do not have a chance to join a project and learn it and apply it from scratch. You can get help from open online courses. "Edx.org" is a great platform for instance. There are plenty of courses about computer science and software development. i.e.
Here is a course for Data Structures and Software Design.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文