SitePoint Sponsor |
|
User Tag List
Results 251 to 274 of 274
-
Nov 17, 2004, 12:08 #251
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Selkirk
-
Nov 17, 2004, 12:15 #252
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Manor
-
Nov 17, 2004, 12:34 #253
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by seratonin
It does, however, back up my claim that using XML and XSL to create a web application is 'a good thing'.
Originally Posted by seratonin
-
Nov 17, 2004, 12:40 #254
- Join Date
- Dec 2003
- Location
- Arizona
- Posts
- 411
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Tony Marston
JT
-
Nov 17, 2004, 12:54 #255
- Join Date
- Oct 2004
- Location
- downtown
- Posts
- 145
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Don't make me refactor your architecture!
-
Nov 17, 2004, 13:08 #256
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Version0-00e
Originally Posted by Version0-00e
Originally Posted by Version0-00e
Originally Posted by Version0-00e
If you read my article What is/is not considered to be good OO programming you will see that there are quite a few ideas floating round the OO community that I (and others) consider to be rubbish.
Originally Posted by Version0-00e
Originally Posted by Version0-00e
Originally Posted by Version0-00e
Originally Posted by Version0-00e
-
Nov 17, 2004, 13:21 #257
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Version0-00e
-
Nov 17, 2004, 13:26 #258
- Join Date
- Jun 2004
- Location
- Bogota
- Posts
- 101
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Tony Marston
If I have wings, why am I walking?
-
Nov 17, 2004, 13:58 #259
- Join Date
- Oct 2004
- Location
- Sutton, Surrey
- Posts
- 259
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by otnemem
-
Nov 17, 2004, 14:03 #260
- Join Date
- Oct 2004
- Location
- downtown
- Posts
- 145
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
'Good' or 'bad' is a matter of personal opinion and difficult to quantify, whereas 'effective', 'ineffective', 'easy to use', 'difficult to use' are less difficult to quantify.
Surely this cannot be difficult to quantify? As for providing concrete proof a lot of people, myself included are bound by contracts and non disclosure agreements so no point following that argument as it's mute basically.
If you require proof look at WACT for example. Look at Propel as another project that I can thik of at the moment. No doubt there are countless others
Also I did not look at the link you've posted as I am of the understanding that this would (proberly) consist of your views only? I may be wrong though
I left because they could not teach me anything, and they were unwilling to learn from me. I also left because they failed to deliver what they promised at the interview.
In doing so the company would have been in a better positoin to offer the job to someone who actually was interested not just in the job but maybe the company as well?
It's not btw about brown nosing, it's about doing a job your are asked to do and are payed to do without causing too much conflict. If you want an opinion then maybe you should seek a management role in the future?
-
Nov 17, 2004, 14:33 #261
- Join Date
- Jan 2004
- Location
- Oslo, Norway
- Posts
- 894
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Tony Marston
Either you're curious whether refactoring it might help, or you aren't. If you aren't -- and you don't seem to be -- then there's not much point in discussing it further. I say you don't know until you've tried, but nobody pays me to convince you, and I don't cry myself to sleep if I can't. Maybe someone else is angry enough to actually do it.Dagfinn Reiersøl
PHP in Action / Blog / Twitter
"Making the impossible possible, the possible easy,
and the easy elegant" -- Moshe Feldenkrais
-
Nov 17, 2004, 14:58 #262
- Join Date
- Jan 2004
- Location
- Oslo, Norway
- Posts
- 894
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Tony Marston
Originally Posted by Tony Marston
What's happening is simply what always (nearly always, perhaps) happens when someone who is relatively new in an Internet forum makes strong, bold, categorical statements based on understandings that are not shared by the majority in the forum. I've seen it many times before and done it a couple of times myself. It's almost a sure way to be attacked. I'm not saying it's a good thing, but it is the way the social dynamics of these forums work.Dagfinn Reiersøl
PHP in Action / Blog / Twitter
"Making the impossible possible, the possible easy,
and the easy elegant" -- Moshe Feldenkrais
-
Nov 17, 2004, 15:08 #263
- Join Date
- Oct 2004
- Location
- downtown
- Posts
- 145
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Something to look out for maybe?
Allen Holub's forthcoming book Holub on Patterns: Learning Design Patterns by Looking at Code (Apress, summer 2004) presents another example of using Builder for I/O, but in the context of importing and exporting database tables. In particular, all knowledge of the format used to store the data on the disk is encapsulated in the Builder rather than the database classes. This way the database can export tables to multiple formats, even ones that didn't exist when the classes were written.
-
Nov 17, 2004, 16:21 #264
- Join Date
- Nov 2002
- Posts
- 841
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Tony Marston
PHP Code:function getValRep ($item = 'option_id')
// get Value/Representation list from this table
// custom method to obtain table contents as an associative array
{
$array = array();
if (strtolower($item) == 'option_id') {
// get data from the database
$this->sql_select = 'option_id, option_desc';
$this->sql_orderby = 'option_id';
$this->sql_ordery_seq = 'asc';
$this->rows_per_page = 0; // turn off pagination
$data = $this->getData(null);
// start array with blank entry
$array[' '] = '';
// convert each row into 'id=desc' in the output array
foreach ($data as $row => $rowdata) {
$rowvalues = array_values($rowdata);
$array[$rowvalues[0]] = $rowvalues[1];
} // foreach
return $array;
} // if
return $array;
} // getValRep
PHP Code:function _cm_getValRep ($item = '')
// get Value/Representation list as an associative array.
{
$array = array();
if (strtolower($item) == 'tree_type_id') {
// get data from the database
$this->sql_select = 'tree_type_id, tree_type_desc';
$this->sql_orderby = 'tree_type_id';
$this->sql_ordery_seq = 'asc';
$this->rows_per_page = 0; // turn off pagination
$data = $this->getData(null);
// start array with blank entry
$array[' '] = '';
// convert each row into 'id=desc' in the output array
foreach ($data as $row => $rowdata) {
$rowvalues = array_values($rowdata);
$array[$rowvalues[0]] = $rowvalues[1];
} // foreach
return $array;
} // if
return $array;
} // _cm_getValRep
PHP Code:function getValRep ($item = 'pers_type_id')
// get Value/Representation list from this table
// custom method to obtain table contents as an associative array
{
$array = array();
if (strtolower($item) == 'pers_type_id') {
// get data from the database
$this->sql_select = 'pers_type_id, pers_type_desc';
$this->sql_orderby = 'pers_type_id';
$this->sql_ordery_seq = 'asc';
$this->rows_per_page = 0; // turn off pagination
$data = $this->getData(null);
// start array with blank entry
$array[' '] = '';
// convert each row into 'id=desc' in the output array
foreach ($data as $row => $rowdata) {
$rowvalues = array_values($rowdata);
$array[$rowvalues[0]] = $rowvalues[1];
} // foreach
return $array;
} // if
return $array;
} // getValRep
I also have to say you have some brilliant naming.
PHP Code:require_once 'include.inc';
PHP Code:// initialise session
initSession();
PHP Code:} // if
Originally Posted by Tony Marston
-
Nov 17, 2004, 16:52 #265
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi...
Originally Posted by Selkirk
.
The really sad/funny part is the "challenge" that claims 10 minutes a "component". To do this you have to create nearly a dozen files by cut and paste (with all sorts of dodgy include chains). A Marston "component" by the way is an update script, a delete script, etc. That's one "component" each by the way! Six of them at a go is recommended.
These "components" take 60 mins of cut and paste for him. For that you get a few standard controls and your only navigation option appears to be to change the button title (uh? - why bother putting that in the PHP code). Defining a tree structure appears to take 36 files(I cannot be sure what's happening with these as not surprisingly I stopped looking at that point). Encapsulation?
I really couldn't make head nor tail of what was supposed to be an explantory sample. It protects itself through obscurity.
Whenever I attempt to correct Mr. Marston's more crass misunderstandings he accuses me of spouting only an opinion as if they were pulled out of thin air. Well this is my opinion of this library in the style of Mr. Marston. I am sure he won't complain if I adopt his own forthright (but never arrogant?) "style". After all you reap what you sow.
Here goes...
It's the biggest pile of horse manure I have had the misfortune to come across for some time. To describe 200+K of code as a KISS way of displaying a few tables is jaw dropping. Configuration of each class is by uncommenting in the middle of a class file would you believe. Definitely a write once and I'll never be out of a job piece of "software". I felt I had to go and wash my hands. And also wash the underside of my chin as it spent most of the time resting on my desk. POOP doesn't begin to describe it. It makes PHPNuke look exemplary. I cannot imagine the shame of leaving a mess like this behind for someone to clear up, never mind calling it an "application". To make a small sample application, designed to illustrate the system, into such an entangled mess takes an extraordinary comedy talent.
...I feel much better now.
There, I now feel I am communicating with Mr. Marston on his own terms. Opinion it is. No calling spades shovels or beating about the bush I hope you'll agree. The direct approach. I hope Mr. Marston appreciates it. Maybe he'll even quote me. If not, well no one cares what I think next to Mr. Marston I am sure.
Now, can we now all go back to the much neglected other treads on this forum and stop wasting our time?
yours, MarcusMarcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
-
Nov 17, 2004, 17:31 #266
- Join Date
- Dec 2003
- Location
- Arizona
- Posts
- 411
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
One more message and this thread beats out the "Patterns Tutorial Series" for most replies...
JT
-
Nov 17, 2004, 17:37 #267
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi.
Then it has to be this quote from the comments in his own code. From std.add3.inc amongst others...
PHP Code:// Note that there is no dialog with the user.
Marcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
-
Nov 17, 2004, 18:33 #268
- Join Date
- May 2003
- Location
- Calgary, Alberta, Canada
- Posts
- 275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Tony,
Here's an excerpt of std.table.class.php. Theres alot of comments but I cant quite figure this code out. Could you explain this?
It might be another code smell but I havent read any OO tutorials that say code like this is bad practice so Ill just ignore my instincts for now and chalk it up to another arbitrary rule and ignore any problems I think are here.
PHP Code:function _cm_commonValidation ($fieldarray, $originaldata)
// perform validation that is common to INSERT and UPDATE.
{
return $fieldarray;
} // _cm_commonValidation
// ****************************************************************************
function _cm_formatData ($fieldarray)
// perform custom formatting before values are shown to the user.
{
return $fieldarray;
} // _cm_formatData
// ****************************************************************************
function _cm_getExtraData($where, $fieldarray)
// Perform custom processing for the getExtraData method.
// $where = a string in SQL 'where' format.
// $fieldarray = the contents of $where as an array.
{
return $fieldarray;
} // _cm_getExtraData
// ****************************************************************************
function _cm_getForeignData ($fieldarray)
// Retrieve data from foreign entities.
{
//if (!empty($fieldarray['node_id']) and empty($fieldarray['node_desc'])) {
// // get description for selected node
// include_once 'tree_node.class.inc';
// $dbobject = new Tree_Node;
// $dbobject->sql_select = 'node_id, node_desc';
// $foreign_data = $dbobject->getData("node_id='{$fieldarray['node_id']}'");
// // merge with existing data
// $fieldarray = array_merge($fieldarray, $foreign_data[0]);
//} // if
return $fieldarray;
} // _cm_getForeignData
// ****************************************************************************
function _cm_getInitialData ($fieldarray)
// Perform custom processing for the getInitialData method.
// $fieldarray contains data from the initial $where clause.
{
return $fieldarray;
} // _cm_getInitialData
// ****************************************************************************
function _cm_post_deleteRecord ($fieldarray)
// perform custom processing after database record is deleted.
{
return $fieldarray;
} // _cm_post_deleteRecord
// ****************************************************************************
function _cm_post_getData ($rowdata, &$where)
// perform custom processing after database record(s) are retrieved.
// NOTE: $where is passed BY REFERENCE so that it may be modified.
{
return $rowdata;
} // _cm_post_getData
// ****************************************************************************
function _cm_post_insertRecord ($fieldarray)
// perform custom processing after database record is inserted.
{
return $fieldarray;
} // _cm_post_insertRecord
// ****************************************************************************
function _cm_post_updateMultiple ($fieldarray)
// perform custom processing after multiple database records have been updated.
{
return $fieldarray;
} // _cm_post_updateMultiple
// ****************************************************************************
function _cm_post_updateRecord ($fieldarray, $old_data)
// perform custom processing after database record is updated.
{
return $fieldarray;
} // _cm_post_updateRecord
// ****************************************************************************
function _cm_pre_deleteRecord ($fieldarray)
// perform custom processing before database record is deleted.
{
return $fieldarray;
} // _cm_pre_deleteRecord
// ****************************************************************************
function _cm_pre_getData ($where_str)
// perform custom processing before database record(s) are retrieved.
{
return $where_str;
} // _cm_pre_getData
// ****************************************************************************
function _cm_pre_insertRecord ($fieldarray)
// perform custom processing before database record is inserted.
{
return $fieldarray;
} // _cm_pre_insertRecord
// ****************************************************************************
function _cm_pre_updateLinkdata ($fieldarray, &$postarray)
// $fieldarray is an array of field data (multiple rows).
// $select is an array of entries which have been selected.
// NOTE: $postarray is passed BY REFERENCE so that it may be modified.
// NOTE: $fieldarray starts at 0, $select starts at 1.
{
return $fieldarray;
} // _cm_pre_updateLinkData
// ****************************************************************************
function _cm_pre_updateMultiple ($fieldarray)
// perform custom processing before multiple database records are updated.
{
return $fieldarray;
} // _cm_pre_updateMultiple
// ****************************************************************************
function _cm_pre_updateRecord ($fieldarray)
// perform custom processing before a database record is updated.
// errors are added to $this->errors.
{
return $fieldarray;
} // _cm_pre_updateRecord
// ****************************************************************************
function _cm_validateDelete ($fieldarray)
// verify that the selected record can be deleted.
// (put any errors in $this->errors)
{
return;
} // _cm_validateDelete
// ****************************************************************************
function _cm_validateInsert ($fieldarray)
// perform custom validation before insert.
{
return $fieldarray;
} // _cm_validateInsert
// ****************************************************************************
function _cm_validateUpdate ($fieldarray, $originaldata)
// perform custom validation before update.
{
return $fieldarray;
} // _cm_validateUpdate
-
Nov 18, 2004, 02:57 #269
- Join Date
- Jan 2004
- Location
- Oslo, Norway
- Posts
- 894
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by lastcraft
Originally Posted by lastcraft
Maybe it would be better to start new threads to discuss the topics that have been raised that are not specific to the discussion for and against Tony's approach.Dagfinn Reiersøl
PHP in Action / Blog / Twitter
"Making the impossible possible, the possible easy,
and the easy elegant" -- Moshe Feldenkrais
-
Nov 18, 2004, 03:06 #270
- Join Date
- Jan 2004
- Location
- Oslo, Norway
- Posts
- 894
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Tony Marston
Dagfinn Reiersøl
PHP in Action / Blog / Twitter
"Making the impossible possible, the possible easy,
and the easy elegant" -- Moshe Feldenkrais
-
Nov 18, 2004, 03:34 #271
- Join Date
- Jan 2004
- Location
- Oslo, Norway
- Posts
- 894
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by lastcraft
And how would the average PEAR package measure up to your standards of filth? Do we even dare talk about it? It's more important than Tony's example; PEAR is influential almost by definition.
Have you ever heard the expression "horse apple" for a lump of horse manure? The equivalent in Norwegian is "horse pear" (hestepære).
-
Nov 18, 2004, 03:51 #272
- Join Date
- Jan 2004
- Location
- Oslo, Norway
- Posts
- 894
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by seratonin
-
Nov 18, 2004, 05:40 #273
- Join Date
- Jul 2004
- Location
- office.bh.mg.br
- Posts
- 23
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
what happened here? What I see is: A guy made a set of code that worked fine for him. It's working for over 20 years, he says. Of course he feels confident: "hey, what a nice structure I've made!!!". Then, he shares his "stuff". What a surprise, everybody is pointing: bad code, bad smell, this, that, manure. Who in the world wouldn't feel sad or angry? He tried to make things simple and good, but he didn't know about lots of best-practices and patterns and theories. He just did his job of building apps and it worked. His mistake was taking the attitude of arrogance, instead of listening the presented ideas. By the other hand, his arrogant attitude raised the anger of everybody(almost). Although there are lots of proofs these guys at SitePoint are really good at coding, they gave a proof that they're no so humble. The politically-correct attitude would be to show their impression without attacking each other. Excuse me by talking in general, I know some guys kept their serenity. No matter winner or looser, I never felt any good feeling by arguing. After this thread, I'm affraid to come here with some idea to ask opinions, maybe they will make a joke about my code, maybe they'll call it manure. I've been learning a lot here, I don't feel I'm able to contribute (yet) in the threads but, be sure I'm always around, reading and taking my conclusions, and learning, thank you all. There are many others like me that only know each other by these nicknames from sitepoint, and be sure these nicknames have their reputation.
Alex Brina
"...sempre q eu tirar a cabeça fora d'agua eu dou um alô..." JC
-
Nov 18, 2004, 07:06 #274
- Join Date
- Oct 2001
- Posts
- 2,686
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It seems like some of you didn't read my warning careful enough.
Closed.
Bookmarks