TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What should I learn first, Algorithms or ..?

3 点作者 sanosuke大约 10 年前
Algorithms or Programming Languages Theory (Grammars, lexers, etc)?<p>Background: I just know the basics about programming (conditions, loops, classes, etc) And I almost got 30 years old, hopefully is not to late.<p>My goal is to help the advance the Computer Science field (No kidding).<p>P.S: Could you elaborate on your answer please, besides &quot;Learn Algorithms first&quot;. Thank you.

4 条评论

greenyoda大约 10 年前
Given a choice between those two, I&#x27;d recommend algorithms, since you can probably apply that knowledge more readily to everyday programming projects. For example, it&#x27;s useful to know roughly how long it takes to sort an array, add an element to a hash table (like a Python dictionary), etc.<p>Language theory probably won&#x27;t be that useful unless you&#x27;re planning to write a parser for a programming language or something similar. I occasionally need to deal with grammars (for the Bison parser generator) in the work that I do, but most people probably do that kind of thing very rarely, if at all.<p>Also, it&#x27;s never too late to learn stuff.
angersock大约 10 年前
Neither, because you&#x27;ll either get burned out or full of trivia that is not useful.<p>Instead, pick some practical projects, and work on those. Maybe a music player, or a game. Games are good because they bring you through the whole spectrum of high-level abstraction (how should I build this system?) to the low-level drudgery (oh god why is this buffer getting corrupted how do I fix this aaaagh).
hashberry大约 10 年前
You should start with what interests you. Passion is a strong motivator for learning.
blawa大约 10 年前
As a computer science graduate, and having worked as a s&#x2F;w engineer, researcher and quant and currently writing code in strongly typed language, I can assure you that unless you&#x27;re doing research and writing your own PL, you wouldn&#x27;t need to understand PL theory, so much so that now I&#x27;m rusty in less than 6 years.<p>Also, just to clarify- PL itself has not much to do Grammars and lexers. PL theory mostly deals with programming paradigms, and type-safety. Lexers and grammars knowledge can help you write a compiler for a PL, but PL theory doesn&#x27;t care about it- its the job of compiler writer.<p>I suspect you mean &#x27;theory&#x2F;models of computation&#x27; when you refer to Languages theory (<a href="http://en.wikipedia.org/wiki/Introduction_to_Automata_Theory,_Languages,_and_Computation" rel="nofollow">http:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Introduction_to_Automata_Theory...</a>) That&#x27;s what covers &quot;language&quot;&#x2F;grammars. While it&#x27;s good information to have- a ground up understanding of &quot;computation&quot; science- you would need that pretty late into your foray if you really want to learn about &quot;Computer Science&quot;<p>CS is a big field- you&#x27;ll have to choose what you want to learn.<p>So start with Algorithms first, when you come to the Big(O) notation, you&#x27;ll get a brief and usually enough introduction to the Theory of Computation.