 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Debuggable Blog: Programming Psychology II Private methods
by Chris Cornutt July 08, 2008 @ 08:44:58
According to Felix Geisendorfer's newest post on the Debuggable blog, he thinks that "private and protected methods and properties are one of the most stupid concepts of OOP."
This is a thought I first shared at CakeFest Orlando this year, but could not explain properly at the time.
He illustrates with an example of a protected "balance" variable in a BankAccount class. Sure, it's marked as private but less skilled programmers might not use it that way. He recommends a method without the getters/setters to help make the usage of the variable a bit simpler. He also suggests that using protected/private scoping helps to promote "crappy code" - using them to provide a sort of protection for code that you either don't want getting used or hiding it away so the API can't get at it.
voice your opinion now!
private method protected bad code concept stupid getter setter
Typical Programmer Blog: Doing it wrong getters and setters
by Chris Cornutt June 16, 2008 @ 11:19:17
According to this new post on the Typical Programmer blog, using getters and setters in your scripts only adds in a bit of unnecessary coupling and complexity to your scripts that you just don't need.
Today most of the popular programming languages support objects, limiting scope, modularity, passing by value, and sophisticated built-in types. There should be no reason to deliberately expose an object's data to the rest of the code because the language can enforce encapsulation and data hiding.
While not specific to PHP, the post does recommend against them because of one simple reason common to all languages that make them possible - they "break the encapsulation OOP offers". For them, they're like a cheat to get around bad coding practices and are not needed to make a successful application work.
voice your opinion now!
getter setter break object oriented encapsulation scope bad
Alan Knowles' Blog: Licence to release PHP code?
by Chris Cornutt March 28, 2008 @ 11:10:37
A little while back, Alan Knowles wondered something that I'm sure has crosses the mind of every PHP developer out there, especially when they came across a particularly bad chunk of code - some people should need to apply for a license before releasing their PHP code out into the wild.
Unlike most of the reviews you get, I was specifically looking at code quality [of the CMSs]. not fuzzy does it look nice!
He looks at a whole list of them including: Tanslucis, Siteman, Pivot, jaf-cms, Guppy, Doop and CutePHP. Unfortunately, most of the news is bad - between badly structured code and mixes of HTML and PHP, there was almost nothing good in any of them.
voice your opinion now!
license release cms good bad ugly structure functionality
Tim Bray's Blog: 2008 Prediction 4 PHP Problems
by Chris Cornutt February 20, 2008 @ 14:37:00
As Cal Evans and others in the PHP community have pointed out, there's a post on Tim Bray's blog (of Sun Microsystems) with his prediction for PHP for the upcoming year:
The short version: PHP will remain popular but its growth will slow, as people get nervous about its maintainability and security stories.
He does mention the two different stances of this statement - the good side (with low entry level, good applications and speed) and the stance he seems to believe in more - that there are just things about PHP and how its handled that could cause major issues down the line.
Be sure to check out the comments for community views on both sides of the story too.
voice your opinion now!
problem prediction issue language oragnization good bad
Ligaya Turmelle's Blog: NuSphere PHPEd review
by Chris Cornutt October 30, 2006 @ 11:37:00
In her new blog post today, Ligaya Turmelle has a mini-review/listing of her look into the editor offered by NuSphere - PHPed.
I am normally a vim user when I code but I decided to pop my head out of my cubicle and try something new on the editor front. So I decided to check out NuSphere.
She breaks it out into the two lists - what she likes and what she doesn't like. Included in the positives list were things like an easy learning curve, built in CVS support, and its many customizable features. On the bad list, there were things like inconsistent syntax highlighting, irritation with "code insight" feature, and not having the option to use Firefox as the embedded browser.
voice your opinion now!
nusphere review list good bad phped editor ide nusphere review list good bad phped editor ide
Jacob Santos' Blog: Multitasking in PHP
by Chris Cornutt August 19, 2006 @ 15:23:43
In his latest blog post, Jacob Santos takes a look at a common request PHP developers hit after a while - is it possible to multitask processes/actions in php?
The ability to run two or more commands in parallel is totally sexy, but the Web is a different playing field and it doesn't make complete sense.
PHP loses control, once the output is sent and the connection is closed. Multithreading would probably make sense in streaming, but PHP already handles that for you where it makes sense for the function. Furthermore, mulithreading has its purpose in applications that continue to run and not something that closes and cleans up everything after the last command is issued.
He continues talking more about what multitasking is, a more real life example, the goods, the bads, and some of the issues that can come along with it. Finally, he suggests a feature to be added to the core of PHP - an "internal multitasking mechanism" to help aid these kinds of processes.
voice your opinion now!
multitasking common questions real world good bad multitasking common questions real world good bad
|
Community Events
Don't see your event here? Let us know!
|