Would it be better to learn C before learning any type of WEB and desktop programming?
在学习任何类型的WEB和桌面编程之前学习C会更好吗?
I don't know how to program, I want to learn Javascript and my friends suggested to me that I should learn C first.
我不知道如何编程,我想学习Javascript,我的朋友们建议我先学习C语言。
13 个解决方案
#1
No.
JavaScript may be one of the klunkiest languages ever, but it has one huge advantage over C: You can play with it. (I spent 10+ years coding in C. I had some fun, but I'd never call what I did "playing".)
JavaScript可能是有史以来最笨的语言之一,但它比C有一个巨大的优势:你可以使用它。 (我花了10多年时间用C语言编写。我有一些乐趣,但我从来没有打电话给我所做的“玩”。)
My suggestion: Open up your favorite Web page, save it to disk, open up the JavaScript (or download it, if need be), and play. You'll learn a lot that way.
我的建议:打开您喜欢的网页,将其保存到磁盘,打开JavaScript(或下载,如果需要),然后播放。你会从中学到很多东西。
EDIT: Downvoters: Yes, there is a lot to like about JavaScript. But there's also a lot not to like.
编辑:Downvoters:是的,有很多关于JavaScript的东西。但也有很多不喜欢的东西。
#2
If your intent is to learn Javascript, start with Javascript now. The C language brings you a lot of general knowledge, but for Web programming it's better to start with HTML and Javascript. You need to answer yourself this question: 'how much time I can spend before be able to make money with programming?'
如果您的目的是学习Javascript,请立即开始使用Javascript。 C语言为您带来了许多常识,但对于Web编程,最好从HTML和Javascript开始。你需要自己回答这个问题:“我能花多少时间才能通过编程来赚钱?”
#3
I actually think that JavaScript is one of the best languages to start programming with. Later, when you you really get it and you want to go deeper, C is something great to know. It gives you a much deeper understanding of how computers really work.
我实际上认为JavaScript是开始编程的最佳语言之一。后来,当你真正得到它而你想要更深入时,C是一件很棒的事情。它让您更深入地了解计算机的工作原理。
JavaScript really lets you get started fast, see immediate results, and ramp up to more complex concepts very fluidly.
JavaScript确实可以让您快速入门,立即看到结果,并且可以非常流畅地使用更复杂的概念。
The rest of my answer assumes you know practically nothing about programming - web or otherwise. Maybe you know a little html basics.
我的其余部分假设您几乎不了解编程 - 网络或其他方面。也许你知道一些小的HTML基础知识。
Open up a text editor. You can even just start with notepad or something. And put in the following:
打开文本编辑器。你甚至可以从记事本或其他东西开始。并提出以下内容:
<html>
<head>
<script>
alert("Hello, World!");
</script>
</head>
<body></body>
</html>
Save the file as hello.html and open it in a browser. Poof! You've written a program. Doesn't get easier than that. No need to get into the command line or download or build anything. I remember when I first started being frustrated trying to get PHP running on my machine and wishing it was as simple as getting started with JavaScript.
将文件另存为hello.html并在浏览器中打开它。噗!你写了一个程序。不容易做到这一点。无需进入命令行或下载或构建任何内容。我记得当我第一次开始感到沮丧时,试图在我的机器上运行PHP并希望它像开始使用JavaScript一样简单。
The next step is just to read and explore. Documentation is freely available all over for learning more. I highly recommend anything from Douglas Crockford and JavaScript:The Definitive Guide.
下一步就是阅读和探索。文档可以免费获取,以便了解更多信息。我强烈推荐Douglas Crockford和JavaScript:The Definitive Guide。
A pretty good basic project would be a calculator program, but there's lots of fun things you can do. When you've gotten your feet wet, and you feel a little more confident, explore some other languages. Ruby is a pretty good step from JavaScript. By that point you'll probably know where to go yourself. You may never take the road to learning C. Even if you learn it, you will likely never really have to use it.
一个非常好的基础项目是计算器程序,但你可以做很多有趣的事情。当你已经湿透了脚,并且感觉自己有点自信时,可以去探索其他一些语言。 Ruby是JavaScript的一个很好的步骤。到那时你可能知道自己要去哪里。你可能永远不会走上学习之路。即使你学习了它,你也可能永远不会真正使用它。
#4
I think it depends on your motives - are you aiming to become a professional programmer? If so, there could be some value in learning C first.
我认为这取决于你的动机 - 你的目标是成为一名专业的程序员吗?如果是这样,首先学习C可能有一些价值。
Most entry-level programming subjects at University are taught in terms of C; it can give you a deeper insight into how software works. Also, K&R is a valuable programming manual in its own right.
大学的大多数入门级编程科目都是用C语言教授的;它可以让您更深入地了解软件的工作原理。此外,K&R本身就是一本有价值的编程手册。
If your aim is to create a simple set of DHTML pages, then by all means, jump straight into JavaScript. However, I think C can offer you a lot, if you're serious about programming.
如果您的目标是创建一组简单的DHTML页面,那么请务必直接跳转到JavaScript。但是,如果你认真对待编程,我认为C可以为你提供很多帮助。
#5
Don't pick a language to start learning.
不要选择语言来开始学习。
Pick a project that solves a simple problem, then choose an appropriate language to solve that problem.
选择一个解决简单问题的项目,然后选择合适的语言来解决该问题。
If you want to start a simple web application, then learning Javascript instead of C is a fine approach.
如果你想启动一个简单的Web应用程序,那么学习Javascript而不是C是一个很好的方法。
If you want to learn to write a desktop app, then Javascript is absolutely the wrong way to go about this.
如果你想学习编写桌面应用程序,那么Javascript绝对是错误的方法。
BTW, if you're learning web applications, then you'll need to learn HTML, & some kind of web application backend language (which won't be C!). Javascript will be the least of your issues in this case too.
顺便说一句,如果您正在学习Web应用程序,那么您将需要学习HTML,以及某种Web应用程序后端语言(不会是C!)。在这种情况下,Javascript也是您最少的问题。
#6
No absolutely not. Learn an easy to learn language such as Python or Ruby that come with an interactive interpreter/shell that you can play around in. You wont have to save any files or refresh any browser, just execute right there on the command line. Best way to learn in my opinion.
绝对没有。学习一门易学的语言,比如Python或Ruby,它们带有你可以使用的交互式解释器/ shell。你不必保存任何文件或刷新任何浏览器,只需在命令行执行即可。在我看来,最好的学习方式。
#7
C is a difficult language, especially for a beginner, as it is much "closer to the machine" than many other languages, and has little bearing on the web-development framework/model
C是一种难以理解的语言,特别是对于初学者而言,因为它比许多其他语言“更接近机器”,并且对Web开发框架/模型几乎没有影响
now, if you do learn C, everything else will seem easy ;-)
现在,如果你确实学习C,其他一切看起来都很容易;-)
i would start with python or C# or something with more guardrails
我会从python或C#开始,或者用更多的护栏开始
good luck!
#8
Since you don't know how to program, I agree with recommendations here that you start with Python or Ruby, etc. First learn some basic concepts or programming and see if you like it. If you don't like it much, then learn only what you feel you need. If you love to write programs, then continue playing with Python/Ruby but at the very least make yourself familiar with C. Be comfortable enough in C to write moderate programs and definitely good enough to read someone else's C code. There is a lot of C code out there, and more being written all the time.
由于你不知道如何编程,我同意你从Python或Ruby等开始的建议。首先学习一些基本概念或编程,看看你是否喜欢它。如果你不喜欢它,那么只学习你认为你需要的东西。如果你喜欢编写程序,那么继续使用Python / Ruby,但至少要熟悉C语言。在C语言中写得足够舒服以编写适度的程序,并且非常适合阅读其他人的C代码。那里有很多C代码,而且还有更多的代码。
#9
No. Although C contains the raw power and flexibility which surpasses most modern languages, learning C would not give you much of an edge when transitioning to other languages. I worked with C#, ASP.net and javascript before I started programming in C++. Starting with a language like C# or java might be better for a beginner since it saves you the pain of having to worry about most of the core functioanality of your programs (s.a. memory management, data structures etc.) But it would certainly be a great advantage if you could learn C and C++ (even assembly) as you move along.
不会。虽然C包含的原始功能和灵活性超过了大多数现代语言,但学习C在转换到其他语言时不会给你带来太大的优势。在开始用C ++编程之前,我使用过C#,ASP.net和javascript。从像C#或java这样的语言开始对初学者来说可能更好,因为它可以省去你不必担心程序的大部分核心功能(内存管理,数据结构等)的痛苦。但它肯定会很棒如果您可以在移动时学习C和C ++(甚至是汇编),那将是一个优势。
#10
Definitely not.
C is a great language that can be used for a lot of things, but it operates at too-low a level for many of the needs of web and desktop software. When you are writing code, you want to focus on what makes your application unique among other applications in its domain. You don't want to deal with a lot of details that are not directly relevant. There are great (and bad) languages for writing web and desktop applications that will let you accomplish what you need faster. They may not be as elegant, but they'll get you where you want first.
C是一种很好的语言,可用于很多事情,但它的运行水平太低,无法满足Web和桌面软件的许多需求。在编写代码时,您需要关注使您的应用程序在其域中的其他应用程序中独一无二的原因。您不希望处理许多不直接相关的细节。编写Web和桌面应用程序有很好的(和坏的)语言,可以让您更快地完成所需的工作。它们可能不那么优雅,但它们可以让你先到达你想要的地方。
C is important to understand how things work under the surface, but it shouldn't be a first priority.
C对于理解表面下的工作原理非常重要,但它不应该是首要任务。
#11
Not at all.
一点也不。
If you already do HTML, and want to take it to the next level with JavaScript, then just do it. read w3schools, Douglas Crockford essays, lot of sample code. That, should be enough to get you rolling.
如果您已经使用HTML,并希望使用JavaScript将其提升到一个新的水平,那就去做吧。阅读w3schools,Douglas Crockford的文章,大量的示例代码。那应该足以让你滚动。
On the side, but without any hurry, do experiments with PHP, Python and maybe Java or C. maybe you won't use any of them, but it would really make you a better programmer.
在侧面,但没有任何匆忙,做PHP,Python和Java或C的实验也许你不会使用它们中的任何一个,但它会真正让你成为一个更好的程序员。
If, OTOH, you want to be a real developer, you do have to know C; but you don't have to start there. i'd say start with one or two 'easy' languages (JavaScript, Lua, Python), then C/C++ heavily, then go for other ways, according to your chosen path. the best three paths from there would be (subjectively, in my own opinion, etc):
如果,OTOH,你想成为一名真正的开发者,你必须要知道C;但你不必从那里开始。我会说从一个或两个“简单”语言(JavaScript,Lua,Python)开始,然后是C / C ++,然后根据您选择的路径选择其他方式。那里最好的三条路径(主观地,在我看来,等等):
- scripting: Python, Lua, Scheme
- web: 'deep' JavaScript, Java, PHP, Python
- hardcore programming: more C++, LISP, Haskell
web:'deep'JavaScript,Java,PHP,Python
硬核编程:更多C ++,LISP,Haskell
脚本:Python,Lua,Scheme web:'深'JavaScript,Java,PHP,Python硬核编程:更多C ++,LISP,Haskell
#12
if you have any intent to create something useful, that is, something more than a hobby, yes learn C first, or even better spend some time learning how modern computer architectures actually work before spending any time telling them what to do.
如果你有意创造一些有用的东西,那就是一些不仅仅是一种爱好,首先要学习C,或者更好地花一些时间学习现代计算机架构的实际工作方式,然后再花时间告诉他们该做什么。
it can be argued that javascript has little to nothing to do with C but C will force you to learn how things really work and therefore provide invaluable insight into performance, data storage and teach you what actually happens when you call some random library call that may be taking many orders of magnitude more time to execute than it needed to.
可以说javascript与C几乎没什么关系,但是C会迫使你学习事物是如何工作的,因此提供了对性能,数据存储的宝贵见解,并教你在调用一些随机库调用时实际发生的事情。执行所需的时间比需要多出几个数量级。
#13
Learning C++(the new version of C) first would be best, at least it was for me because it gave me a general understanding of computers, and once I learned C++, all the other languages like Java, PHP, and even javascript was easily learned.
学习C ++(C的新版本)首先是最好的,至少对我来说是因为它给了我对计算机的一般理解,一旦我学习了C ++,所有其他语言,如Java,PHP,甚至javascript都很容易学到了。
If you have no interest on how computers work, and just want to get to the fun designing part, start with HTML/CSS then javascript.
如果您对计算机的工作方式不感兴趣,并且只想进入有趣的设计部分,请先使用HTML / CSS然后使用javascript。
hope that helped!
希望有所帮助!
#1
No.
JavaScript may be one of the klunkiest languages ever, but it has one huge advantage over C: You can play with it. (I spent 10+ years coding in C. I had some fun, but I'd never call what I did "playing".)
JavaScript可能是有史以来最笨的语言之一,但它比C有一个巨大的优势:你可以使用它。 (我花了10多年时间用C语言编写。我有一些乐趣,但我从来没有打电话给我所做的“玩”。)
My suggestion: Open up your favorite Web page, save it to disk, open up the JavaScript (or download it, if need be), and play. You'll learn a lot that way.
我的建议:打开您喜欢的网页,将其保存到磁盘,打开JavaScript(或下载,如果需要),然后播放。你会从中学到很多东西。
EDIT: Downvoters: Yes, there is a lot to like about JavaScript. But there's also a lot not to like.
编辑:Downvoters:是的,有很多关于JavaScript的东西。但也有很多不喜欢的东西。
#2
If your intent is to learn Javascript, start with Javascript now. The C language brings you a lot of general knowledge, but for Web programming it's better to start with HTML and Javascript. You need to answer yourself this question: 'how much time I can spend before be able to make money with programming?'
如果您的目的是学习Javascript,请立即开始使用Javascript。 C语言为您带来了许多常识,但对于Web编程,最好从HTML和Javascript开始。你需要自己回答这个问题:“我能花多少时间才能通过编程来赚钱?”
#3
I actually think that JavaScript is one of the best languages to start programming with. Later, when you you really get it and you want to go deeper, C is something great to know. It gives you a much deeper understanding of how computers really work.
我实际上认为JavaScript是开始编程的最佳语言之一。后来,当你真正得到它而你想要更深入时,C是一件很棒的事情。它让您更深入地了解计算机的工作原理。
JavaScript really lets you get started fast, see immediate results, and ramp up to more complex concepts very fluidly.
JavaScript确实可以让您快速入门,立即看到结果,并且可以非常流畅地使用更复杂的概念。
The rest of my answer assumes you know practically nothing about programming - web or otherwise. Maybe you know a little html basics.
我的其余部分假设您几乎不了解编程 - 网络或其他方面。也许你知道一些小的HTML基础知识。
Open up a text editor. You can even just start with notepad or something. And put in the following:
打开文本编辑器。你甚至可以从记事本或其他东西开始。并提出以下内容:
<html>
<head>
<script>
alert("Hello, World!");
</script>
</head>
<body></body>
</html>
Save the file as hello.html and open it in a browser. Poof! You've written a program. Doesn't get easier than that. No need to get into the command line or download or build anything. I remember when I first started being frustrated trying to get PHP running on my machine and wishing it was as simple as getting started with JavaScript.
将文件另存为hello.html并在浏览器中打开它。噗!你写了一个程序。不容易做到这一点。无需进入命令行或下载或构建任何内容。我记得当我第一次开始感到沮丧时,试图在我的机器上运行PHP并希望它像开始使用JavaScript一样简单。
The next step is just to read and explore. Documentation is freely available all over for learning more. I highly recommend anything from Douglas Crockford and JavaScript:The Definitive Guide.
下一步就是阅读和探索。文档可以免费获取,以便了解更多信息。我强烈推荐Douglas Crockford和JavaScript:The Definitive Guide。
A pretty good basic project would be a calculator program, but there's lots of fun things you can do. When you've gotten your feet wet, and you feel a little more confident, explore some other languages. Ruby is a pretty good step from JavaScript. By that point you'll probably know where to go yourself. You may never take the road to learning C. Even if you learn it, you will likely never really have to use it.
一个非常好的基础项目是计算器程序,但你可以做很多有趣的事情。当你已经湿透了脚,并且感觉自己有点自信时,可以去探索其他一些语言。 Ruby是JavaScript的一个很好的步骤。到那时你可能知道自己要去哪里。你可能永远不会走上学习之路。即使你学习了它,你也可能永远不会真正使用它。
#4
I think it depends on your motives - are you aiming to become a professional programmer? If so, there could be some value in learning C first.
我认为这取决于你的动机 - 你的目标是成为一名专业的程序员吗?如果是这样,首先学习C可能有一些价值。
Most entry-level programming subjects at University are taught in terms of C; it can give you a deeper insight into how software works. Also, K&R is a valuable programming manual in its own right.
大学的大多数入门级编程科目都是用C语言教授的;它可以让您更深入地了解软件的工作原理。此外,K&R本身就是一本有价值的编程手册。
If your aim is to create a simple set of DHTML pages, then by all means, jump straight into JavaScript. However, I think C can offer you a lot, if you're serious about programming.
如果您的目标是创建一组简单的DHTML页面,那么请务必直接跳转到JavaScript。但是,如果你认真对待编程,我认为C可以为你提供很多帮助。
#5
Don't pick a language to start learning.
不要选择语言来开始学习。
Pick a project that solves a simple problem, then choose an appropriate language to solve that problem.
选择一个解决简单问题的项目,然后选择合适的语言来解决该问题。
If you want to start a simple web application, then learning Javascript instead of C is a fine approach.
如果你想启动一个简单的Web应用程序,那么学习Javascript而不是C是一个很好的方法。
If you want to learn to write a desktop app, then Javascript is absolutely the wrong way to go about this.
如果你想学习编写桌面应用程序,那么Javascript绝对是错误的方法。
BTW, if you're learning web applications, then you'll need to learn HTML, & some kind of web application backend language (which won't be C!). Javascript will be the least of your issues in this case too.
顺便说一句,如果您正在学习Web应用程序,那么您将需要学习HTML,以及某种Web应用程序后端语言(不会是C!)。在这种情况下,Javascript也是您最少的问题。
#6
No absolutely not. Learn an easy to learn language such as Python or Ruby that come with an interactive interpreter/shell that you can play around in. You wont have to save any files or refresh any browser, just execute right there on the command line. Best way to learn in my opinion.
绝对没有。学习一门易学的语言,比如Python或Ruby,它们带有你可以使用的交互式解释器/ shell。你不必保存任何文件或刷新任何浏览器,只需在命令行执行即可。在我看来,最好的学习方式。
#7
C is a difficult language, especially for a beginner, as it is much "closer to the machine" than many other languages, and has little bearing on the web-development framework/model
C是一种难以理解的语言,特别是对于初学者而言,因为它比许多其他语言“更接近机器”,并且对Web开发框架/模型几乎没有影响
now, if you do learn C, everything else will seem easy ;-)
现在,如果你确实学习C,其他一切看起来都很容易;-)
i would start with python or C# or something with more guardrails
我会从python或C#开始,或者用更多的护栏开始
good luck!
#8
Since you don't know how to program, I agree with recommendations here that you start with Python or Ruby, etc. First learn some basic concepts or programming and see if you like it. If you don't like it much, then learn only what you feel you need. If you love to write programs, then continue playing with Python/Ruby but at the very least make yourself familiar with C. Be comfortable enough in C to write moderate programs and definitely good enough to read someone else's C code. There is a lot of C code out there, and more being written all the time.
由于你不知道如何编程,我同意你从Python或Ruby等开始的建议。首先学习一些基本概念或编程,看看你是否喜欢它。如果你不喜欢它,那么只学习你认为你需要的东西。如果你喜欢编写程序,那么继续使用Python / Ruby,但至少要熟悉C语言。在C语言中写得足够舒服以编写适度的程序,并且非常适合阅读其他人的C代码。那里有很多C代码,而且还有更多的代码。
#9
No. Although C contains the raw power and flexibility which surpasses most modern languages, learning C would not give you much of an edge when transitioning to other languages. I worked with C#, ASP.net and javascript before I started programming in C++. Starting with a language like C# or java might be better for a beginner since it saves you the pain of having to worry about most of the core functioanality of your programs (s.a. memory management, data structures etc.) But it would certainly be a great advantage if you could learn C and C++ (even assembly) as you move along.
不会。虽然C包含的原始功能和灵活性超过了大多数现代语言,但学习C在转换到其他语言时不会给你带来太大的优势。在开始用C ++编程之前,我使用过C#,ASP.net和javascript。从像C#或java这样的语言开始对初学者来说可能更好,因为它可以省去你不必担心程序的大部分核心功能(内存管理,数据结构等)的痛苦。但它肯定会很棒如果您可以在移动时学习C和C ++(甚至是汇编),那将是一个优势。
#10
Definitely not.
C is a great language that can be used for a lot of things, but it operates at too-low a level for many of the needs of web and desktop software. When you are writing code, you want to focus on what makes your application unique among other applications in its domain. You don't want to deal with a lot of details that are not directly relevant. There are great (and bad) languages for writing web and desktop applications that will let you accomplish what you need faster. They may not be as elegant, but they'll get you where you want first.
C是一种很好的语言,可用于很多事情,但它的运行水平太低,无法满足Web和桌面软件的许多需求。在编写代码时,您需要关注使您的应用程序在其域中的其他应用程序中独一无二的原因。您不希望处理许多不直接相关的细节。编写Web和桌面应用程序有很好的(和坏的)语言,可以让您更快地完成所需的工作。它们可能不那么优雅,但它们可以让你先到达你想要的地方。
C is important to understand how things work under the surface, but it shouldn't be a first priority.
C对于理解表面下的工作原理非常重要,但它不应该是首要任务。
#11
Not at all.
一点也不。
If you already do HTML, and want to take it to the next level with JavaScript, then just do it. read w3schools, Douglas Crockford essays, lot of sample code. That, should be enough to get you rolling.
如果您已经使用HTML,并希望使用JavaScript将其提升到一个新的水平,那就去做吧。阅读w3schools,Douglas Crockford的文章,大量的示例代码。那应该足以让你滚动。
On the side, but without any hurry, do experiments with PHP, Python and maybe Java or C. maybe you won't use any of them, but it would really make you a better programmer.
在侧面,但没有任何匆忙,做PHP,Python和Java或C的实验也许你不会使用它们中的任何一个,但它会真正让你成为一个更好的程序员。
If, OTOH, you want to be a real developer, you do have to know C; but you don't have to start there. i'd say start with one or two 'easy' languages (JavaScript, Lua, Python), then C/C++ heavily, then go for other ways, according to your chosen path. the best three paths from there would be (subjectively, in my own opinion, etc):
如果,OTOH,你想成为一名真正的开发者,你必须要知道C;但你不必从那里开始。我会说从一个或两个“简单”语言(JavaScript,Lua,Python)开始,然后是C / C ++,然后根据您选择的路径选择其他方式。那里最好的三条路径(主观地,在我看来,等等):
- scripting: Python, Lua, Scheme
- web: 'deep' JavaScript, Java, PHP, Python
- hardcore programming: more C++, LISP, Haskell
web:'deep'JavaScript,Java,PHP,Python
硬核编程:更多C ++,LISP,Haskell
脚本:Python,Lua,Scheme web:'深'JavaScript,Java,PHP,Python硬核编程:更多C ++,LISP,Haskell
#12
if you have any intent to create something useful, that is, something more than a hobby, yes learn C first, or even better spend some time learning how modern computer architectures actually work before spending any time telling them what to do.
如果你有意创造一些有用的东西,那就是一些不仅仅是一种爱好,首先要学习C,或者更好地花一些时间学习现代计算机架构的实际工作方式,然后再花时间告诉他们该做什么。
it can be argued that javascript has little to nothing to do with C but C will force you to learn how things really work and therefore provide invaluable insight into performance, data storage and teach you what actually happens when you call some random library call that may be taking many orders of magnitude more time to execute than it needed to.
可以说javascript与C几乎没什么关系,但是C会迫使你学习事物是如何工作的,因此提供了对性能,数据存储的宝贵见解,并教你在调用一些随机库调用时实际发生的事情。执行所需的时间比需要多出几个数量级。
#13
Learning C++(the new version of C) first would be best, at least it was for me because it gave me a general understanding of computers, and once I learned C++, all the other languages like Java, PHP, and even javascript was easily learned.
学习C ++(C的新版本)首先是最好的,至少对我来说是因为它给了我对计算机的一般理解,一旦我学习了C ++,所有其他语言,如Java,PHP,甚至javascript都很容易学到了。
If you have no interest on how computers work, and just want to get to the fun designing part, start with HTML/CSS then javascript.
如果您对计算机的工作方式不感兴趣,并且只想进入有趣的设计部分,请先使用HTML / CSS然后使用javascript。
hope that helped!
希望有所帮助!