简体   繁体   English

从PHP到C / C ++和Java及更高版本

[英]Going from PHP to C/C++ & Java & beyond

I've been a LAMP developer for 5+ years. 我是一名LAMP开发人员已有5年多。 I have learned quite a bit on my own, but I feel like my "context" as a software developer is limited (ie. I can only create scripts & web applications). 我自己学到了很多,但我觉得我作为软件开发人员的“上下文”是有限的(即我只能创建脚本和Web应用程序)。 Ultimately I'd like to be able to create a range of applications from daemons to desktop apps. 最终,我希望能够创建从守护进程到桌面应用程序的一系列应用程序。 Additionally I'd like to learn more about the "internals" of programming (ie. PHP is a wrapper for c, perhaps I should learn more c?) 另外,我想了解更多关于编程的“内部”(即PHP是c的包装,也许我应该学习更多的c?)

I'd like to know what resources & methods that have helped people further their knowledge of computer science / software creation. 我想知道哪些资源和方法帮助人们进一步了解计算机科学/软件创建。 Unfortunately I don't think I'll be able to go back to school and get another degree :-P 不幸的是,我认为我不能回到学校获得另一个学位:-P

If you want to jump in with both feet, there's MIT's Open Courseware. 如果你想双脚跳进去,那就是麻省理工学院的开放课件。 For example, here's the online version of the famous course " 6.001 Structure and Interpretation of Computer Programs ". 例如,这里是着名课程“ 6.001计算机程序的结构和解释 ”的在线版本。

To take smaller steps, I'd suggest learning other programming languages that are complementary to PHP, like Python or Ruby. 为了采取更小的步骤,我建议学习其他与PHP互补的编程语言,如Python或Ruby。 Maybe eventually Java. 也许最终是Java。 The more languages you learn, the easier it becomes to learn even more languages, or to deepen the knowledge you have of the languages you already know. 您学习的语言越多,学习更多语言就越容易,或者加深您对已知语言的了解。

我真的会推荐Stroustrup的优秀书来学习现代C ++ :)

I don't recommend that you directly move to the MIT course ware and SICP. 我不建议您直接转到麻省理工学院课程和SICP​​。 Start from some basics. 从一些基础知识开始。 Read the "C Programming Language" by Brian Kernighan and Dennis Ritchie. 阅读Brian Kernighan和Dennis Ritchie的“C编程语言”。 Write some C extensions to PHP. 为PHP编写一些C扩展。 After you are comfortable with C move on to C++ (Read "The C++ Programming Language" by Bjarne Stroustrup) or Java (tons of documentation and tutorial are available at http://java.sun.com/ ). 在您熟悉C之后,继续学习C ++(阅读Bjarne Stroustrup的“C ++编程语言”)或Java( http://java.sun.com/上提供了大量的文档和教程)。 Note that the books you choose are important. 请注意,您选择的书籍很重要。 While learning a new language, a book written by it's creator should be preferred, as it will show you the right idioms, which is very important. 在学习一门新语言时,应该首选一本由其创作者编写的书,因为它会向你展示正确的习语,这非常重要。 Then move on to learn about new paradigms, like functional programming. 然后继续学习新的范例,比如函数式编程。 At this point I think SICP will be a good choice. 在这一点上,我认为SICP将是一个不错的选择。 Learn one or more functional languages - Lisp/Scheme, Clojure, Haskell etc. 学习一种或多种函数式语言--Lisp / Scheme,Clojure,Haskell等。

Make it a point that you never stop learning! 让你永远不要停止学习!

Pick a language, then seek out resources for learning it. 选择一种语言,然后寻找学习它的资源。

The one thing I'd suggest is to treat C, C++ and Java as sibling languages. 我建议的一件事是将C,C ++和Java视为兄弟语言。 Don't think "If I start with C, I can proceed to C++ and then to Java" or similar. 不要想“如果我从C开始,我可以继续使用C ++,然后再使用Java”或类似的东西。 Each of them can and should be learned independently of the others. 他们每个人都可以而且应该独立于其他人学习。

Java is often said to be inspired by C++, which any C++ programmer can see is clear nonsense. 人们常说Java受到C ++的启发,任何C ++程序员都可以看到它是明确无意义的。 It is inspired by the earliest versions of C++, the ones that had more in common with C. And likewise, C and C++ have little in common as well. 它的灵感来自最早的C ++版本,与C语言有更多共同之处。同样,C和C ++也没有什么共同之处。 Good C code is almost guaranteed to be horrible C++ code. 好的C代码几乎可以保证是可怕的 C ++代码。

All three languages are worth learning, and all of them will probably teach you a lot about programming. 这三种语言都值得学习,所有这些语言都可能会教你很多关于编程的知识。 So pick one, and buy a good book on it. 所以选一个,买一本好书。

Have a look over at Stanford 's online courses it is a great place to start programming in more complex languages. 看看斯坦福大学的在线课程,这是一个开始用更复杂的语言编程的好地方。 the site has both java and c++ courses online and much more. 该网站有在线java和c ++课程等等。

When i started to learn PHP i found this really good site http://tizag.com 当我开始学习PHP时,我发现这个网站非常好http://tizag.com

It kept all the stuff i needed to learn basic.. When any complex programming was required i looked else where, However without tizag being my cheat sheet for web bassed languages i would have been lost; 它保留了我需要学习基本的所有东西..当需要任何复杂的编程时,我看起来在哪里,但是没有tizag是我的网络基础语言的备忘单我会丢失;

My cheat sheet for C++ was http://cplusplus.com/doc/tutorial/ 我的C ++备忘单是http://cplusplus.com/doc/tutorial/

Its basic stuff, with very clear explination. 它的基本内容,非常清晰的探索。 However i do recomand you try coding the examples rather than just read over it. 但是我会重新尝试你尝试编写示例而不是只是阅读它。

Practice Makes Perfect (Speaking of Which gota beat Suzuka in GT5 Proluge in under 1:33:487) 练习做得很完美(说到在1:33:487中GT5 Proluge中击败了铃鹿)

Get a job as a starting C++ developer. 获得一份起始C ++开发人员的工作。 A bit of fiddling around at home isn't going to do much good, except for getting your foot in the door at an interview. 除了在接受采访时踩到门外,在家里稍微摆弄一下并不会有多大好处。 To get to that level, anything is good - Accelerated C++ being a good book, or The C++ Programming Language (quite hard to learn the basics from, but if you're proficient in other languages its doable). 要达到这个水平,任何事情都是好的 - 加速C ++是一本好书,或者是C ++编程语言(很难学习基础知识,但如果你精通其他语言,那么它是可行的)。

Everyone here made great recommendations, here are my two cents to the lot. 这里的每个人都提出了很好的建议,这里是我的两分钱。 You can learn language internals, there is no dearth of them. 你可以学习语言内部,没有它们的缺乏。 There is so much to learn about them that you can go on for years. 有很多东西要学习它们,你可以继续多年。 I suggest you read Art of Programming by Donald Knuth, it was a great experience for me and I don't know why it is not a standard textbook in our universities. 我建议你阅读唐纳德克努特的编程艺术,这对我来说是一次很棒的经历,我不知道为什么它不是我们大学的标准教科书。

Programming is an art indeed and it's the only art I know. 编程确实是一门艺术,它是我所知道的唯一艺术。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM