@snoofle said:
Gaaah - she just said that we can support any number of states for the boolean object.....
Shoot me now!
It's quantum!
@snoofle said:
Gaaah - she just said that we can support any number of states for the boolean object.....
Shoot me now!
It's quantum!
High five!
And yeah - I forgot to mention the GOTOs. There was a GOTO for every case, so the code was basically one big chunk broken into sections, where you'd jump from section to section based on the numbers entered. And of course the printing of the menu and getting input from the user was copy-pasted in each section. Ah, memories ...
The WTF seems obvious enough to me.
The menu is hard-coded, complete with with an huge if ... elseif block. A saner approach would of course be to make the whole thing generic and read the object types from a file or database or whatever.
This approach reminds me of my very early days of programming where I'd write games that were basically computerized versions of 'Choose your own adventure' games where the 'gameplay' consisted of the player selecting from a number of different numbered choices to make each time his input was required. Seriously, it looked just like this. Except copy-pasted over and over. And written in BASIC.
@chadillac said:
doesn't he know that a "strpos(Invalid argument supplied for foreach() in /usr/cvs/projects/13xx/1371/Classes/XML/XML_inc.php on line 392) === false" if statement is faster!!!
But, but ... regular expressions are COOL!