哪一个更适合初露头角的程序员:经典的 schema 书籍还是像 python 这样的现代语言?

发布于 2024-09-11 15:02:04 字数 658 浏览 6 评论 0原文

我真的很感兴趣成为一名认真的程序员,人们钦佩的黑客技能,而不是一个甚至无法完成 FizzBu​​zz 的公司无人机。

目前我已经涉足了几种语言,我的大部分经验是 Perl 和 Shell,并且我也涉足了 Ruby。

然而,我不禁感到,虽然我懂一些语言,但我不知道如何编程

我真的并不急于立即学习一门可以让我找到工作的语言(尽管我想尽快做到),并且我正在考虑使用 PLT 方案(现在称为 Racket)来完成如何设计《程序》或《计算机程序的结构和解释》本质上是Scheme经典之一,因为我一直听说它们教人们如何编写高质量、可用、可读的代码。

然而,甚至麻省理工学院也将其入门课程从使用 SICP 和 Scheme 改为使用 Python。

因此,我向这里许多经验丰富的程序员寻求关于以下问题的明智建议:

  • Scheme(以及那些书籍)真的能教人们如何良好地编程吗?如果是这样,您推荐这两本书中的哪一本?
  • 这种学习方法仍然具有相关性和适用性吗?我走在正确的轨道上吗?
  • 我是否最好花时间学习像 Python 这样更实用/通用的语言?
  • Scheme(或一般的 lisp)真的是一种人们学习但永远不会使用的语言吗?或者你们中那些经常了解 Lisp 代码的人吗?

谢谢,抱歉胡言乱语。

I'm really interested in becoming a serious programmer, the type that people admire for hacker chops, as opposed to a corporate drone who can't even complete FizzBuzz.

Currently I've dabbled in a few languages, most of my experience is in Perl and Shell, and I've dabbled slightly in Ruby.

However, I can't help but feel that although I know bits and pieces of languages, I don't know how to program.

I'm really in no huge rush to immediately learn a language that can land me a job (though I'd like to do it soon), and I'm considering using PLT Scheme (now called Racket) to work through How to Design Programs or Structure and Interpretation of Computer Programs, essentially, one of the Scheme classics, because I have always heard that they teach people how to write high-quality, usable, readable code.

However, even MIT changed its introductory course from using SICP and Scheme to one in Python.

So, I ask for the sage advice of the many experienced programmers here regarding the following:

  • Does Scheme (and do those books) really teach one how to program well? If so, which of the two books do you recommend?
  • Is this approach to learning still relevant and applicable? Am I on the right track?
  • Am I better off spending my time learning a more practical/common language like Python?
  • Is Scheme (or lisp in general) really a language that one learns, only to never use? Or do those of you who know a lisp code in it often?

Thanks, and sorry for the rambling.

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

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

发布评论

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

评论(12

非要怀念 2024-09-18 15:02:04

如果你想学习真正的编程,就开始吧。停止涉足并编写代码。选择一种语言并编写代码。解决问题并发布应用程序。与经验丰富的程序员一起从事开源项目,但要开始行动。很多。

If you want to learn to really program, start doing it. Quit dabbling and write code. Pick a language and write code. Solve problems and release applications. Work with experienced programmers on open source projects, but get doing. A lot.

闻呓 2024-09-18 15:02:04
  • Scheme(以及那些书)真的能教人如何良好地编程吗?如果是这样,您推荐这两本书中的哪一本?

大概。可能比任何一本《Learn X in Y Timespan》书籍都要好。

  • 这种学习方法仍然具有相关性和适用性吗?我走在正确的轨道上吗?

是的。

  • 我是否最好花时间学习像 Python 这样更实用/通用的语言?

仅当您打算在其中找到工作时。不过,计划将为您提供更好的基础。

  • Scheme(或一般的 lisp)真的是一种人们学习但永远不会使用的语言吗?或者你们中那些经常了解 Lisp 代码的人吗?

我用 emacs elisp 摆弄来调整我的 emacs。我还兼职使用函数式语言,以保持思维灵活。

我个人的观点是,在学生声称了解一些编程知识之前,本质上需要走两条路。 Track one 是机器本身,即计算机。您应该从这里开始组装并了解计算机的工作原理。经过一些工作和理解之后 - 不要吝啬 - 你应该学习 C,然后 C++;真正了解资源管理以及实际发生的情况。第二轨道是非常高级的语言轨道——Scheme、Prolog、Haskell、Perl、Python、C#、Java 以及在虚拟机或解释器上执行的其他语言都位于该领域。这些也需要研究,以了解如何以不涉及真实计算机的繁琐部分的不同方式抽象和思考问题。

然而,在学习编程时,作为一个语言外行是行不通的。您需要找到一种语言 - 方案是可以接受的,尽管我建议首先从低水平开始 - 然后至少在好一年里坚持使用该语言。

  • Does Scheme (and do those books) really teach one how to program well? If so, which of the two books do you recommend?

Probably. Probably better than any of the Learn X in Y Timespan books.

  • Is this approach to learning still relevant and applicable? Am I on the right track?

Yes.

  • Am I better off spending my time learning a more practical/common language like Python?

Only if you plan to get a job in it. Scheme will give you a better foundation though.

  • Is Scheme (or lisp in general) really a language that one learns, only to never use? Or do those of you who know a lisp code in it often?

I do emacs elisp fiddling to adjust my emacs. I also work with functional languages on the side to try to keep my mind flexible.

My personal opinion is that there are essentially two tracks that need to be walked before the student can claim to know something about programming. Track one is the machine itself, the computer. You should start with assembly here and learn how the computer works. After some work and understanding there - don't skimp - you should learn C and then C++; really getting the understanding of resource management and what really happens. Track two is the very high level language track - Scheme, Prolog, Haskell, Perl, Python, C#, Java, and others that execute on a VM or interpreter lie in this area. These, too, need to be studied to learn how problems can be abstracted and thought about in different ways that do not involve the fiddly bits of a real computer.

However, what will not work is being a language dilettante when learning to program. You will need to find a language - Scheme is acceptable, although I'd recommend starting at the low level first - and then stick with that language for a good year at least.

她如夕阳 2024-09-18 15:02:04

Scheme 最重要的部分是您可以学到的编程语言概念,现代语言现在刚刚采用或添加了支持。

Lisp 和Scheme 早于大多数其他语言就已经支持了当时常常具有革命性的功能:闭包和一阶函数、延续、卫生宏等等。 C 没有这些。

但它们越来越频繁地出现在当今 Get Stuff Done 的编程语言中。为什么你可以在 JavaScript 中的任何地方声明函数?从函数内部引用的外部变量会发生什么情况? PHP 5.3 刚刚获得的这些新“闭包”是什么?什么是“副作用”以及为什么它们对并行计算不利? Ruby 中的“延续”是什么? LINQ 函数如何工作? Python 中的“lambda”是什么? F# 有什么大不了的?

这些都是学习Scheme会回答但C不会回答的问题。

The most important parts of Scheme are the programming-language concepts you can pick up that modern languages are now just adopting or adding support for.

Lisp and Scheme have supported, before most other languages, features that were often revolutionary for the time: closures and first-order functions, continuations, hygienic macros, and others. C has none of these.

But they're appearing more and more often in programming languages that Get Stuff Done today. Why can you just declare functions seemingly anywhere in JavaScript? What happens to outside variables you reference from within a function? What are these new "closures" that PHP 5.3 is just now getting? What are "side effects" and why can they be bad for parallel computing? What are "continuations" in Ruby? How do LINQ functions work? What's a "lambda" in Python? What's the big deal with F#?

These are all questions that learning Scheme will answer but C won't.

自此以后,行同陌路 2024-09-18 15:02:04

我想说这取决于你想做什么。

如果你想进入编程领域,Python 可能会更好。它是一种优秀的第一语言,类似于大多数常见的编程语言,并且广泛使用。您会发现更多方便的库,并且能够使事情变得更容易。

如果你想进入计算机科学,我会推荐Scheme和SICP​​。

无论哪种情况,我都建议最终学习几种截然不同的语言,以便为您提供更多看待和解决问题的方法。例如,相当熟练地掌握 Common Lisp 将使您成为一名更好的 Java 程序员。不过,我会一次拿一个。

I'd say it depends on what you want to do.

If you want to get into programming, Python is probably better. It's an excellent first language, resembles most common programming languages, and is widely available. You'll find more libraries handy, and will be able to make things more easily.

If you want to get into computer science, I'd recommend Scheme along with SICP.

In either case, I'd recommend learning several very different languages eventually, to give you more ways to look at and solve problems. Getting reasonably proficient in Common Lisp, for example, will make you a better Java programmer. I'd take them one at a time, though.

稳稳的幸福 2024-09-18 15:02:04

最好的开始语言可能是:

  • 你想用你
  • 想用的语言来玩/学习的语言

也可能按这个顺序,除非最迫切的需要是养活自己。

事情是这样的:学习编程的方法就是多做。为了做很多事情,你需要很大的耐心和一点点的热情。这比您选择的特定语言更重要......但是选择您喜欢工作的语言(无论是因为您喜欢这些功能还是因为您觉得它会教您一些东西)可以是一个很大的推动。

也就是说,这里有一些关于计划的评论:

是否计划(并做那些书)
真的教人如何良好地编程吗?

关于Scheme(或类似的东西)的事情是,如果你学习它,它会教你一些非常有用的抽象,许多程序员从未真正掌握过函数式编程语言永远学不会。你会以不同的方式思考编程语言和计算的实质对你来说会显得更加流畅。您将更好地了解如何从非常小的原语集合中组成您自己的准原语,而不是依赖于其他语言中提供的通常静态的原语集合。

问题是我所说的很多内容目前对你来说可能没有多大意义,而且与进入像 Perl、Python 或 Ruby 这样的通用动态语言相比,这更像是一条令人费解的道路......甚至是像 C 这样接近机器冯·诺依曼力学的语言。

这并不意味着从这里开始一定是一个坏主意:我参与了一项实验,我们向初次编程的程序员教授 Prolog 的所有内容,而且效果出奇的好。有时初学者的思维确实有帮助。 :) 但Scheme作为第一语言绝对是一条非常规的道路。我怀疑 Ruby 或 Python 会是一条更温和的道路。

Scheme(或一般的 lisp)真的吗?
学习一门语言,只是为了
从来没有用过?

您不太可能受雇使用这种语言进行编程。但是,当您学习编程时,以及在学习并在空闲时间进行编程之后,您可以编写您可以使用任何您想要的语言编写代码,并且由于互联网,您可能能够找到使用您想要的任何语言从事开源项目的人员。 :)

The best languages to start with are probably:

  • a language you want to play/learn in
  • a language you want to work in

And probably in that order, too, unless the most urgent need is to feed yourself.

Here's the thing: the way to learn to program is to do it a lot. In order to do it a lot, you're going to need a lot of patience and more than a little bit of enthusiasm. This is more important than the specific language you pick.... but picking a language that you like working in (whether because you like the features or because you feel it'll teach you something) can be a big boost.

That said, here's a couple of comments on Scheme:

Does Scheme (and do those books)
really teach one how to program well?

The thing about Scheme (or something like it) is that if you learn it, it'll teach you some very useful abstractions that a lot of programmers who don't ever really come to grips with a functional programming language never learn. You'll think differently The substance of programming languages and computing will look more fluid to you. You'll have a better idea of how to compose your own quasi-primitives out of a very small set of primitives rather than relying on the generally static set of primitives offered in some other languages.

The problem is that a lot of what I'm saying might not mean much to you at the moment, and it's a bit more of a mind-bending road than coming into a common dynamic language like Perl, Python, or Ruby... or even a language like C which is close to the Von Neumann mechanics of the machine.

This doesn't mean it's necessarily a bad idea to start there: I've been part of an experiment where we taught Prolog of all things to first-time programmers, and it worked surprisingly well. Sometimes beginner's mind actually helps. :) But Scheme as a first language is definitely an unconventional path. I suspect Ruby or Python would be a gentler road.

Is Scheme (or lisp in general) really
a language that one learns, only to
never use?

It's a language that you're unlikely to be hired to program in. However, while you're learning to program, and after you've learned and are doing it in your free time, you can write code in whatever you want, and because of the Internet, you'll probably be able to find people working on open source projects in whatever language you want. :)

陌伤浅笑 2024-09-18 15:02:04

我不想告诉你,但没有人钦佩程序员的“黑客才能”。有些人把事情做好了,然后还有其他人。前一种类型中的很多都是你似乎鄙视的“企业无人机”。

现在,对于你的问题,我个人喜欢Lisp(和Scheme),但如果你想要一些你更有可能在行业中使用的东西,“Beginning Python”可能对你来说是更好的材料,因为Python在野外更常见。或者,如果您喜欢 Ruby,请找到一些好的 Ruby 材料并开始生成可行的解决方案(与 Java 或 .Net 或其他类似的解决方案相同)。

确实,任何一条路线都适合您。诀窍是坚持下去,直到你将所教授的概念内化为止。

I hate to tell ya, but nobody admires programmers for their "hacker chops". There's people who get shit done, then there's everyone else. A great many of the former types are the "corporate drones" you appear to hold in contempt.

Now, for your question, I personally love Lisp (and Scheme), but if you want something you're more likely to use in industry "Beginning Python" might be better material for you as Python is found more often in the wild. Or if you enjoy Ruby, find some good Ruby material and start producing working solutions (same with Java or .Net or whatever).

Really, either route will serve you well. The trick is to stick with it until you've internalized the concepts being taught.

战皆罪 2024-09-18 15:02:04

询问一种学习方法是否相关且适用是很棘手的——有许多不同的学习风格,关键是要找出哪些适合您个人。请记住,您最喜欢的风格可能并不是最适合您的风格:-)

您有足够的时间,而且听起来您还有热情,所以这不是您应该选择哪种语言的问题学习,但您应该先学习哪一个。。就我个人而言,我会看看你到目前为止学到了什么,你掌握了哪些类型的语言和范例,然后偏离主题并选择一种完全不同的语言。

Asking whether an approach to learning is relevant and applicable is tricky - there are many different learning styles, and it's a matter of finding out which ones apply to you personally. Bear in mind that the style you like best might not be the one that actually works best for you :-)

You've got plenty of time and it sounds like you have enthusiasm to spare, so it's not a matter of which language you should learn, but which one you should learn first. personally, I'd look at what you've learnt so far, what types of languages and paradigms you've got under your belt, and then go off on a wild tangent and chose one completely different.

巷雨优美回忆 2024-09-18 15:02:04

我在很小的时候就开始编程了。当我在高中时,我认为我是一名优秀的程序员。从那时起,我开始学习语言的工作方式和原因,而不仅仅是语法。

在了解如何以及为什么之前,切换到一种新语言将是地狱。我学过语言,但没学会编程。现在我已经很好地了解了基本概念,我可以将它们应用于几乎任何语言并轻松掌握。

我强烈推荐一本书(甚至是一本学校粗略的书,如果你能负担得起的话),它可以引导你完成编码过程,而不依赖于特定的语言。

不幸的是,我没有任何书籍可以推荐,但如果其他人同意我的观点并且知道任何书籍,也许他们可以提供建议。

//编辑:重新阅读你的问题后,我意识到我可能没有真正回答其中的任何一个......对此感到抱歉。我认为,无论您选择哪种语言,挑选一本能够深入了解最佳实践的书都会非常有帮助。

I started programming at a very very young age. When I was in high school, I thought I was a good programmer. That's when I started learning about HOW and WHY the languages work rather than just the syntax.

Before learning the how and why, switching to a new language would have been hell. I had learned a language, but I hadn't learned to program. Now that I know the fundamental concepts well, I can apply them to virtually any language and pick it up with ease.

I would highly recommend a book (or even a school coarse, if you can afford it) that takes you through the processes of coding without relying on a specific language.

Unfortunately I don't have any books to recommend, but if others agree with me and know of any, maybe they can offer a suggestion.

//Edit: After re-reading your question, I realize that I may have not actually answered any of them... Sorry about that. I think picking up a book that will take you in-depth with best-practices would be extremely helpful, regardless of the language you choose.

狠疯拽 2024-09-18 15:02:04

有一些基本的编程概念(逻辑流、数据结构),可以通过使用 Python 等语言轻松教授。然而,还有更复杂的编程概念(设计模式、优化、线程等),经典语言并没有为您抽象出来。

如果您寻求的知识更倾向于算法开发和编程科学,请从 C 开始。如果您的寻求更多的是为了实际目的,我听说 Ruby 是一个很好的起点。

There are basic programming concepts (logic flow, data structures), which are easily taught by using languages like Python. However, there are much more complex programming concepts (design patterns, optimization, threading, etc.) which the classic languages don't abstract away for you.

If your search for knowledge leans more toward algorithm development and the science of programming, start with C. If your search is more for a practical ends, I hear Ruby is a good starting point.

半寸时光 2024-09-18 15:02:04

我同意格鲁兹奇的观点。我会开始使用 C 进行编程。

一开始可能会有点可怕(至少对我来说 :S ),但从长远来看,你会很感激它。我的意思是我喜欢 Python,但因为我先学了 C,所以其他语言的学习曲线一点也不陡峭。

从C开始并做到这一点。

记住要多练习,因为什么都不做是永远不会进步的。 ;)

I agree with gruszczy. I'd start programming with C.

It may be kind of scary at first (at least for me :S ) but in the long run you'd be grateful it. I mean I love Python, but because I learned C first, the learning curve for other languages wasn't very steep at all.

Start with C and make it so.

Just remember to practice, because you'll never improve at something by doing nothing. ;)

梓梦 2024-09-18 15:02:04

对于您问题中的某个特定点,您提到的“经典”将帮助您准确理解标题所说的内容。 SICP 是关于计算机程序的结构和解释。这与学习Scheme无关(尽管你会学习Scheme)。 HtDP是关于如何设计程序的,它不是关于学习Scheme的(尽管你会学习Scheme)。

原则上,Scheme 是一种非常小而简洁的语言,几乎没有任何问题。这使得它非常适合继续学习如何构建和解释程序,或者如何设计它们。更传统的“实用”语言,如 C、C++、Python 或 Java 不具备这种品质。它们充满了语法。学习这些语言意味着您必须同时学习语法怪癖,同时学习像程序员一样思考。在我看来,这是不幸的。在某些情况下,这些怪癖是好的,在另一些情况下,它们是历史的偶然,但在所有情况下都是不幸的。

To a specific point in your question, the "classics" you mention will help you with exactly what the titles say. SICP is about the structure and interpretation of computer programs. It is not about learning Scheme (though you will learn Scheme). HtDP is about how to design programs, it is not about learning Scheme (though you will learn Scheme).

Scheme, in principle, is a very small and concise language with almost no gotchas. This makes it excellent for moving on to learning how to structure and interpret programs, or how to design them. More traditional "practical" languages like C, C++, Python, or Java do not have this quality. They are rife with syntax. Learning with these languages means you must simultaneously learn syntactical quirks while learning to think like a programmer. In my opinion, this is unfortunate. In some cases the quirks are good, in others they are accidents of history, but in all cases it is unfortunate.

不…忘初心 2024-09-18 15:02:04

开始使用 C 进行编码。一开始这对你来说应该是一个恐怖,但这会教你最重要的东西,比如:指针、递归、内存管理。尝试阅读一些有关编程的经典书籍,例如 Donald Knuth 的《计算机编程艺术》。掌握了之后,你就可以考虑学习面向对象编程或者函数式编程。 基础知识。如果你设法学会它们,那么对你来说,一切都不再困难。

Start coding in C. It should be a horror for you at first, but this teaches you most important stuff like: pointers, recurrence, memory management. Try reading some classic books about programming like The Art of Computer Programming by Donald Knuth. After you master that, you can think about learning object oriented programming or functional programming. First basics. If fou manage to learn them, nothing will be hard for you ever again.

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