| 
	
 | 
 Posted by Ivαn Sαnchez Ortega on 07/06/07 21:53 
lawrence k wrote: 
 
> because if I do this and someone forgets to pass a file name to the 
> function, then the  PHP parser issues an error. I've been assuming 
> that relying on the  PHP parser to write my error messages for me is 
> unprofessional. Does anyone else feel that way? 
 
It's not unprofessional. It is over-engineered and unneccesary, tough. 
 
If "someone" forgets to pass you a parameter, it is because: 
- They haven't looked at your function definition (they are bad programmers) 
- You haven't specified that they have to pass you a parameter (*you* are a 
bad programmer) 
 
So: 
- Document your code (use doxygen/phpdoc/whatever) 
- Tell other programmers you work with how your code works, and what they 
can expect from it. 
 
 
The "professional" way to go is to write specs on paper, then have everyone 
read them, then assume everybody will be following them. 
 
 
And, finally: do not attempt to do some work that a interpreter or a 
compiler does better than you. And don't try implementing technical 
solutions to non-technical problems. 
 
Hope that helps, 
--  
---------------------------------- 
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org- 
 
Un ordenador no es un televisor ni un microondas, es una herramienta 
compleja.
 
  
Navigation:
[Reply to this message] 
 |