[buddypress-trac] [BuddyPress] #4140: URI page router

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Apr 12 13:21:55 UTC 2012


#4140: URI page router
-------------------------+-----------------------------
 Reporter:  foxly        |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Core         |     Version:
 Severity:  major        |  Resolution:
 Keywords:  1.7-early    |
-------------------------+-----------------------------

Comment (by foxly):

 We disagree with "Yoda" if statements, because that technique has little
 value anymore - all modern IDE's (netbeans will underline the error in
 yellow).

 But Yoda statements make code much harder to mentally parse/skim, because
 your brain has to flip the words so it makes sense.

 if('red' == $car && 'running_ok' == engineStatus() | | $driving =
 engineStatus( ))

 That's just not easy to read.

 You'll also notice we use "headings" to break up sections of large
 functions. This makes them much easier to skim when you're looking for
 something.

 Overall, just notice how much easier it is to go through our code than
 many other files in BP.

 I will look into the WP global error message object. The last time I
 checked it was not up to the task, is why I built our own system.

 ^F^

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4140#comment:8>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list