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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Poll: I'm a noob programmer - What should I focus on to become better?

10 点作者 DrorY超过 12 年前
Following ScotterC thread about what makes one a good programmer (http://news.ycombinator.com/item?id=4759510) it got me thinking.<p>I am a starting programer, programming mostly for iPhone and Web. When I work as a freelance with customers they'd say I'm the best. When I work with fellow programmers on the other hand they'd say I am the worse.Trying to get better, It would be great if you could help me understand what makes one a good web or mobile developer?<p>Could you please help me rank these?<p>1. Simplicity<p>2. Readability<p>3. Abstracting a problem<p>4. Encapsulation<p>5. Code efficiency<p>6. Speed \ Quantity<p>Am I missing any other parameter?<p>Thanks!

5 条评论

debacle超过 12 年前
1. Encapsulation<p>Learning to encapsulate code is very easy. It basically comes down to templating your code. Everywhere you might put a comment like:<p>// Do database authentication<p>That should instead be a function:<p>var db = do_database_authentication();<p>Learning to write functions into your code before you write the actual function is an important skill and will make you a better programmer.<p>2. Simplicity<p>Simplicity is relatively easy as a concept. Don't ever nest logic more than 3 levels deep (and try and keep it to 2 or less), don't ever pass more than ~6 parameters to a function (unless the limitations of your language dictate as such), and don't ever have a method more than ~50 lines or a single file more than ~500.<p>3. Readability<p>I think if you follow the rules of simplicity, readability comes down to indentation, code organization, and naming conventions. Follow what your language idioms are, not what you prefer (in most cases).<p>4. Abstracting a problem<p>This is probably the biggest and hardest beast to tackle, but it's also probably the least important when you're starting out. If you focus on this now, you'll never ship anything. The biggest thing to know is that if you've got a class with more than ~10 public-facing methods, or an object that has a constructor with ~10 parameters, you probably have something in place that could be refactored into a more abstract solution.<p>5. Speed / Quantity<p>Writing code quickly is important. If you follow what I've said above and you're relatively competent, you'll produce good code quickly.<p>6. Code efficiency<p>Never worry about this until it's an issue. When it is, use a profiler or debugger to isolate issues, and fix them one at a time. Optimization needs to be surgical.
anujkk超过 12 年前
Don't get hassled by opinions of other people but keep improving. Here is how I would rank the things that makes a good programmer in a real world:<p>1. Abstracting a problem - Understanding/analyzing problems and finding solutions. You first need to be able to solve it before anything else.<p>2. Coding Efficiency - How quickly you can code it? In most scenarios (at job/freelancing/etc), the ability to deliver a working solution on time matters most. You can always improve the code if it is not perfect but it is hard to make up for a lost customer/time.<p>3. Code Efficiency i.e. How fast the program runs? If your solution works the next thing to ensure is that the performance is good.<p>4. Simplicity/Readability/Maintainability - After that you can refactor the code to make it more simple, readable, and maintainable.<p>5. Enacpsulation and everything else comes later.
codegeek超过 12 年前
<i>"When I work as a freelance with customers they'd say I'm the best"</i><p>Great. This means you are delivering to your customers which is what they care about. Whether the code is efficient or not, they probably dont care about that.So keep going there. You are doing great.<p><i>"When I work with fellow programmers on the other hand they'd say I am the worse"</i><p>To make a good programmer especially within other programmers, your items from 1-6 are good but i would not rank them necessarily in a specific sequence. They are all good to have.
ajshroff超过 12 年前
1. Abstracting a problem<p>2. Encapsulation<p>3. Code efficiency<p>4. Speed \ Quantity<p>5. Simplicity<p>6. Readability
评论 #4763656 未加载
评论 #4764326 未加载
davs超过 12 年前
Google "Programmer Competency Matrix" for more ideas how to improve ;)