Click here to Skip to main content

Welcome to the Lounge


For lazing about and discussing anything in a software developer's life that takes your fancy except programming questions.

Technical discussions are encouraged, but click here to ask your programming question.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.

GeneralRe: Spam Mail PinmemberBarrRobot7-Nov-12 4:29 
GeneralRe: Spam Mail PinmemberMehGerbil7-Nov-12 4:48 
GeneralRe: Spam Mail PinmvpRichard MacCutchan7-Nov-12 6:26 
GeneralRe: Spam Mail PinmvpAbhinav S7-Nov-12 7:36 
GeneralRe: Spam Mail PinmemberPeter_in_27807-Nov-12 15:33 
GeneralBest question ever Pinmemberjim lahey7-Nov-12 3:24 
GeneralRe: Best question ever PinmemberCDP18027-Nov-12 3:37 
GeneralRe: Best question ever PinmemberMember 85751217-Nov-12 4:51 
You make it sound as if you will never, ever, accept any sort of critisism of your favorite programming language...
First: Any programming language can be (ab)used to write really obfuscated code. Some programmer subcultures tend to write unreadable code, whatever language is used, but if that is PHP, it leads other people to associate unreadable code with that language. Furthermore, if most subcultures (ab)use the language that way, the few programmers that use it properly might not be strong enough to save the reputation of the language.
Second: If you don't know/understand the "philosophy" of a language (or of whatever) - the rationale for the mechanisms offered, the inteded usage pattern - then it always looks messy. To the guy who understands the reasoning behind the design, and is trained in the same thought patterns as the programmer of the obfuscated code, the code is not at all obfuscated. Nine out of ten times claims of "obfuscation", "unreadable" or "messy" code (or coding style) really says "I am lacking the background to understand why it is done that way".
Surely, some philosophies are easier to grasp than others, and some rather elegant programming languages failed in the marketplace because its protagonists were mostly programmers rather than teachers (of the philosophy of the language). Some languages excel in clean and simple basic mechanisms but rely on the programmer to handle any sort of abstractions, which some programmers do better than others. (Everyone understands that we need higher basic abstractions than Turing machine marks, but many lisp programmers don't understand that we need higher basic abstractions than car and cdr.) And then, some languages offer mechanisms that is an open invitation to obfuscation. My favorite example is Fortran 'return k': A function can take (numeric) labels as arguments. 'return 4' means: Do not return to the statement following the function call, but to the label supplied as the 4th argument. More recent languages provide several comparable mechanisms, such as switch fallthrough and address-of-operators that might have null effect, but none as grave as 'return k'.
I have worked some, but not much, with PHP. It will never become my favorite language, but I would never agree than you can't write well structured, readable code in PHP. I don't think obfuscated code is a bigger problem with PHP than with, say, classical C.
GeneralRe: Best question ever PinmemberGenJerDan7-Nov-12 4:57 
GeneralRe: Best question ever PinprotectorPete O'Hanlon7-Nov-12 3:58 
GeneralRe: Best question ever PinmemberBergholt Stuttley Johnson7-Nov-12 4:10 
GeneralRe: Best question ever PinmemberDalek Dave7-Nov-12 4:26 
GeneralRe: Best question ever PinprotectorPete O'Hanlon7-Nov-12 4:58 
JokeRe: Best question ever PinmemberMarc A. Brown7-Nov-12 4:39 
GeneralI hate fixing computers PinmvpOriginalGriff7-Nov-12 3:22 
GeneralRe: I hate fixing computers Pinmemberjim lahey7-Nov-12 3:26 
GeneralRe: I hate fixing computers PinmemberBert Mitton7-Nov-12 7:22 
GeneralRe: I hate fixing computers Pinmemberjim lahey7-Nov-12 7:26 
GeneralRe: I hate fixing computers PinmemberTom Lint7-Nov-12 23:58 
GeneralRe: I hate fixing computers Pinmemberjim lahey8-Nov-12 0:04 
GeneralRe: I hate fixing computers Pinmemberalexander ypema8-Nov-12 2:59 
GeneralRe: I hate fixing computers PinmemberDan Neely8-Nov-12 3:38 
GeneralRe: I hate fixing computers Pinmemberpatbob8-Nov-12 7:45 
GeneralRe: I hate fixing computers Pinmemberichramm8-Nov-12 6:25 
GeneralRe: I hate fixing computers PinmemberS Houghtelin7-Nov-12 3:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Advertise | Privacy | Mobile
Web03 | 2.8.150302.1 | Last Updated 4 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid