开发者

Does constantly checking the documentation make you a bad coder?

开发者 https://www.devze.com 2022-12-22 19:21 出处:网络
When writing PHP code for any given project, do you find you can write code off the top of your head? Or do you make multiple round trips to php.net? If it is the later, can you still be considered a

When writing PHP code for any given project, do you find you can write code off the top of your head? Or do you make multiple round trips to php.net? If it is the later, can you still be considered a good coder. This is a legitimate question as I find I have difficulty always remembering all of the functions that 开发者_如何学Pythonare available to me so I find I use php.net as a crutch. Is there anyway to improve this?


The same as any language (computer or otherwise) - the more you use it, the better you get.

An issue with PHP is the unpredictability of function names and arguments.


Being a good coder doesn't exclusively mean that you know everything off the top of your head. Most of being a good coder is knowing how to approach problems and solve them. I've been writing PHP for 7 years now and regularly find myself consulting the manual. Sure, I don't check it as often as I used to, but with a language as large as PHP (and with as many inconsistencies), it'll always be necessary to check the documentation. As with anything, over time you will remember more and more.


I think that one of the secrets of becoming a great coder is to read a lot of documentation. I have seen far too many people using the same limited tools over and over again, or desperately doing trial and error instead of broaden the perspective by reading documentation. Don't be ashamed of looking things up - be proud that you have the right attitude to be able continously learning things.


Don't judge your ability based on how fluent you are in a specific language or framework. Always keep in mind that the PHP gods would likely flounder if they were told to write something in C#.

If you are able to put out good code in a reasonable amount of time, it really doesn't matter what you use for assistance.


Being a good coder and having a good memory (thankfully) have nothing to with one another.

Now, not having to look up method names and such can be a time saver, and being fast is part of being a good coder. However, that's what IDEs are there for. If you find yourself looking things up really often, get a PHP IDE with good intellisense and context specific help.


My frequent trips to PHP.NET are mainly due to confusion with the other languages I work with. I usually remember the names of the functions in PHP, but need to double-check the order of the parameters. I don't think that makes someone a bad programmer. If your reason for visiting PHP.NET is to remember how to do an if statement on the other hand...


I think that referencing the documentation when you are unsure is a very good practice. Not only can you avoid making silly mistakes you may also discover different ways to go about doing something, potentially saving you a lot of headaches.

I don't think having a perfect recall of everything you have learned in the past is what makes you a good programmer; I think developing the problem solving skills that are necessary is what will enable you to become a good programmer.

My two bits, Rob


When I was new to PHP, I used to refer to official PHP file (a chm file) a lot but now I don't make much trips to either that file or php.net as i have been using all those functions again and again, remembered automatically with passage of time that is experience. :)

In short:

Practice does the trick.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号