Not so much as there is still logic going on and a continual flow.
Spaghetti code is more like jumbled code, which is usually due to unnecessary complexity and tangled controls.
Also, the more people working on a project, the greater the chances for spaghetti, unless there are rules and structures already set in place.
One Big indicator if your code is spaghetti or not is to look at it and realize going through the source code is a lot like going through a labyrinth... minotaur and all...
For example, the guy we recently let go, his source code was atrocious. He used classes, yet not in an object oriented way, at the same time using functions. Inside his classes he would still push all variables through parameters of functions or set them globally and grab them back in. His naming convention would change line by line to whatever he felt like using, examples (from same class): im_updateStatus, clearStatus, clear_history().
His JavaScript, even scarier... (and extremely open to exploitation)...
Also, Spaghetti code isn't exclusive to PHP, it's for any programming language.
My understanding is that "spaghetti code" is the result of not using (or misusing) modular and/or OOP techniques.
Nowadays I'd agree and say that's a big contributing aspect. It was originally based on GOTO in Basic, where all they GOTO's would make it hard to follow and knowing where from was a big problem.
Other aspects: multiple naming conventions, mixing structures, cross includes\requires, hard to find functions, peculiar names, mismatching loops\conditionals, etc.
Heh, didn't add coldfusion or php as I was looking for an actual programming language and not templating languages. By actual meaning a language you could use to create a whole application\terminal. While ColdFusion is pretty much just HTML on steroids, and steroids as we know are totally evil (some exceptions).
VB definitely makes a list of evil, or just BASIC. It's GOTO time!
Heh, didn't add coldfusion or php as I was looking for an actual programming language and not templating languages. By actual meaning a language you could use to create a whole application\terminal. While ColdFusion is pretty much just HTML on steroids, and steroids as we know are totally evil (some exceptions).
VB definitely makes a list of evil, or just BASIC. It's GOTO time!
ColdFusion is not evil and is a very efficient server side language.
ColdFusion server (actually the JRun underneath CF) provides J2EE high performance.
ColdFusion has solid object-oriented programming principles and frameworks including Fusebox, MVC and other common design patterns.
Computers are no more logical than any naturally occurring phenomenon. After being assembled, they simply adhere to the laws of physics, just like everthing else. Programmers read into these physical occurrences and see "logic" where it may or may not exist!
I assert that every single particle in the universe is a computer and they all calculate their own wave functions in discrete time intervals.
lulz ... is that so? That could be true. Though, if it is, I think it may require us to redefine computer:an electronic device for storing and processing data, typically in binary form, according to instructions given to it in a variable program. (Oxford American Dictionary)
Two things catch my eye in this definition: the phrasing suggests that the electronic device must be created for the purpose of processing and storing data, and that those processing and storing "routines" must operate according to some variable program.
If you were to assert that God created all particles for the purpose of processing and storing "data," our first condition is met. However, we must also show that every particle not only processes and stores data, but that this data storage and processing is performed according a program, which may vary. And while the implication is that this program is a intelligently/human written/created thing, it is not directly stated (and is therefore a debatable condition).
We must also loosely accept that every particle is electronic--which of course, we really need loosen the definition for. We would need to first use the most broad definition of electronic (of or relating to electrons (Oxford American Dictionary)) and just sort of accept the notion that all particles are related to electrons somehow. This may be a stretch--I'm not sure. I can imagine that some sub-subatomic particles don't have a direct relationship to electrons at all ... Though, I could be wrong.
So, there are several conditions which must be met to validate your assertion. Do you agree of the conditions stated in this post? Or has my "philosophy" just gotten too nit-picky?
Bookmarks