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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: How to become a better programmer?

29 点作者 Paton超过 15 年前
My questions is: <i>what abilities are required to effectively build complex web apps and services?</i><p>My current knowledge is limited to PHP and MySQL, with no real understanding of OOP.<p>That said, what would you suggest my next step be? Should I take a stab at Ruby? Javascript? Python? Frameworks?<p>I would appreciate any suggestions.

22 条评论

tlrobinson超过 15 年前
Learn another language. Not just because PHP isn't a particularly good one (IMHO), but because learning new languages inevitably teaches you new ways of thinking about programming.<p>Ruby is good for OOP.
评论 #1017551 未加载
jacquesm超过 15 年前
Hey Paton,<p>The quickest way to become a better programmer is to take a real world problem and then to solve that with a technology that is as far removed from the ones that you are already familiar with as you can imagine.<p>Since you're already in to the imperative mode why not try a functional or a logic language for a change to see what the other side of the street looks like ?<p>The interesting bit in that approach is that when you return to your current languages you'll look at them in a completely new way.
评论 #1018686 未加载
tsally超过 15 年前
It's important to differentiate between the technical ability to build web applications and the craft of programming. It seems you are interested in the former, in which case I would recommend learning a popular framework (Ruby on Rails or Django). While you are learning a framework you'll pick up the base language just fine.<p>If you'd like to learn the more general craft of programming, Peter Norvig has some excellent advice: <a href="http://norvig.com/21-days.html" rel="nofollow">http://norvig.com/21-days.html</a>. You'll find some language recommendations in the appendix.
评论 #1017268 未加载
zaidf超过 15 年前
A lot of good programmers aren't fans of OOP.<p>Of course, before you can decide whether you're a fan or not, you should understand it. So I'm all for that:)
评论 #1017536 未加载
Asa-Nisse超过 15 年前
Since nobody suggested it, go to college/university and learn about data structures, lists and processor architecture. It will help you become a much more insightful programmer.
评论 #1017451 未加载
Zarathu超过 15 年前
"improve my PHP abilities to OOP"<p>Reading that made me laugh. PHP's OOP is extremely flawed (among various other things, like their inability to universalize the $needle and $haystack argument order: <a href="http://bugs.php.net/bug.php?id=37088" rel="nofollow">http://bugs.php.net/bug.php?id=37088</a>), so using PHP to "improve your technical abilities" wouldn't really get you anywhere except having a better understanding of PHP.<p>I think that what you're trying to accomplish really needs to be defined in terms that aren't so broad. Especially these days, "technical skills" is such a vague term that it can really be applied to anything.<p>You don't need to have a complete understanding of some silly framework or whatever in order to still be considered an excellent developer in many ways. For example, you could write a stunningly elegant and clever mathematical algorithm in C without using a function more complex than sqrt(). (Or maybe you could write a more efficient sqrt!)<p>I think that learning something like that might improve your understanding of machines and could, indirectly, improve your understanding of "web apps and services"—that is, understanding HTTP, statelessness, and so forth.<p>tl;dr Figure out exactly what it is you want.
评论 #1017545 未加载
评论 #1017436 未加载
prakash超过 15 年前
<a href="http://norvig.com/21-days.html" rel="nofollow">http://norvig.com/21-days.html</a>
ngom超过 15 年前
You need a sound understanding of CSS, HTML and javascript. Although you may have been messing about with them a lot, try and get an in depth understanding of CSS selectors, what semantic HTML mark up is, and how to write quality code in javascript -- unobtrusive javascript is something to look up.<p>Javascript is really worth learning in depth. It has some quirks that will gently introduce to some useful topics such as JSON, closures, elements of functional programming, prototype based inheritance, and so on. Further, it will help you understand how to get more out of other dynamic languages too; python, ruby, etc. Douglas Crockford has some great videos on Javascript that are worth looking up.<p>You're not restricted to client-side programming with Javascript either. For instance, look up nodejs - a nascent server-side javascript framework that looks quite promising. It will <i>really</i> make you think if you've just been a PHP guy up to now!<p>Try and get a handle on PHP's more advanced aspects - many of which have only really arrived in recent versions. Classes, name spaces, closures and so on. Although I'd really suggest another dynamic language altogether; python is a good choice, but ruby is splendid too.<p>Once you're confident with that stuff you may want to go in a slightly different direction. Try Java, C, Clojure or Erlang. Try reading some more general computer science books.<p>I hope that helps. Good luck and all the best.
yannis超过 15 年前
Before making any suggestions I would ask what is the definition of a better programmer? Since this can be a bit subjective I will suggest that you strive to become an 'expert programmer'. It is difficult to even define what an 'expert' is, but normally one would recognize an expert as someone that effortlessly accomplishes a task. Some characteristics of experts from psychological studies are:<p>1. Experts such as chess grandmasters rely on a vast store of knowledge of game positions. They tend to organize this information in chunks, which can easily be retrieved from long-term memory. The same is true for other experts from sports to mathematics.<p>2. They also typically engage in years of effortful study, continually tackling challenges that <i>lie just beyond their competence</i><p>In my opinion you need to accumulate both, ie, expand your store of knowledge, as well as continually striving to handle situations where the task in hand is beyond your ability.<p>At this point in your experience my personal recommendation is to actually focus on number 2, for example refactor some PHP code into OOP, to give you another angle of programming as well as tackle JavaScript for the same reason.<p>The 10-year rule states that it takes approximately a decade of heavy labor to master any field. As one that has gone through a couple of 10 years:) the best advise I can give is 'learn to program' rather than learn 'to-days-popular-framework-or-language'. Think about it as similar to writing a book, knowing English will not turn you into an author. Practice will as well as motivation.
fleitz超过 15 年前
PHP is mostly an imperative language with a C-like syntax. In imperative languages with a C-like syntax most OOP is just syntatic sugar on a pointer called "this" with a bit of RTTI checks for casting. If your code is unmaintainable with out OOP, OOP isn't going to help.<p>A far more effective skill to have is to figure out how to build a complicated application simply rather than switching to language that makes it easier to increase line count and have semi-working code.<p>I know PHP isn't cool anymore but at the same time, Facebook was built with it. One person can't build Facebook (in it's current incantation) so it's pretty useless to try and find the magic framework that will let you. Figure out how to prototype quickly: once your userbase exceeds the capabilities of whatever tech you have picked you'll usually have enough users to find capital/revenue or have it knocking your door down. At that point it's easy to find the skills to port to whatever the language / paradigm de jour is.<p>Figure out how to make the SMTPs of the world not the X.400s once your not building X.400 you can implement SMTP in just about any language.
csallen超过 15 年前
I was in your position not long ago. I'd recommend using Ruby on Rails, which will teach you a lot about OOP and the MVC framework. There are some similar frameworks for PHP (like CakePHP), but Rails' established community and abundant documentation make it a better starting place.<p>Javascript (<a href="http://www.w3schools.com/js" rel="nofollow">http://www.w3schools.com/js</a>) is an extremely important part of the web today, and jQuery (<a href="http://www.jquery.com" rel="nofollow">http://www.jquery.com</a>) makes it more manageable than ever before. It's not difficult to learn -- you can make a lot of headway in a single day.<p>If at all possible, work alongside other people. You'll learn a lot from their habits and their code. And work on actual projects. Learning for the sake of learning is much more difficult than learning while you're building something.
macco超过 15 年前
I wouldn't concentrate so much on certain programming languages, instead I would concentrate on designing programms. I don't know your background. I guess you are learning on your own, so I would recommend <a href="http://www.htdp.org" rel="nofollow">http://www.htdp.org</a> or <a href="http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-00Fall-2008/CourseHome/index.htm" rel="nofollow">http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Compute...</a>. Some people will recommend Structure and Interpretation of Computer Programs. This book maybe the best on programming, but I don't think it suits a selfteaching individual.
评论 #1017712 未加载
NathanKP超过 15 年前
I can do everything I need to with PHP and MySQL, however I'm currently working on JSP, and planning to learn Ruby and Python.<p>If you want to learn object oriented thinking I would recommend Java or C++. Fortunately I was already proficient at C++ before I started web programming so I already had a fairly firm grasp of object oriented thinking.<p>As for learning programming languages, to my way of thinking the more languages you know the better, both from a job standpoint and from a flexibility standpoint.
评论 #1017397 未加载
jdietrich超过 15 年前
Build stuff. Break it. Fix it. Build more stuff.
vdoma超过 15 年前
I'd say focus on the basics - learn more about algorithms, operating system internals, data structures, concurrency, human-computer interaction, general OO/Functional/Procedural programming principles, etc. Languages are dime a dozen - once you're strong in fundamentals, picking up a new technology/language/framework becomes a lot more easier.
mattm超过 15 年前
Buy a subscription to Safari Online and spend 15 minutes each day reading about programming.<p>It doesn't really matter what you read. Just pick a book that currently sounds interesting and read it. Since you are interested in OO PHP, there is a book called something like "Developing Object-Oriented Applications in PHP 5"
breck超过 15 年前
Sounds similar to where I was a few years ago. Here are my tips:<p><a href="http://breckyunits.com/twelve_tips_to_master_programming_faster" rel="nofollow">http://breckyunits.com/twelve_tips_to_master_programming_fas...</a><p>Feel free to email me if you want to talk further. Good luck!
cabalamat超过 15 年前
Lots of people like Ruby+Rails or Python+Django, so these are obvious choices. Also, if you choose a system that lots of people use, it's easier to get support from the net when things go wrong (as they are bound to from time to time).
alrex021超过 15 年前
Learn a new programming paradigm. For example, if you are a OOP literate, learn FP.
meddah超过 15 年前
91 Ways to Become the Coolest Developer in the World <a href="http://www.techquark.com/2008/11/91-ways-to-become-coolest-developer-in.html" rel="nofollow">http://www.techquark.com/2008/11/91-ways-to-become-coolest-d...</a>
评论 #1017241 未加载
daleharvey超过 15 年前
to build complex web applications you need to learn javascript, I would also take move along to ruby / python / erlang as well as/instead of php.<p>then I would start bashing out applications as quick as you can, stuff with a smaller scope and a clear end so you can keep them public for quite a while and learn how to reduce/remove maintenance cost.
olalonde超过 15 年前
I can't describe how OOP changed my life. You have to learn it.