Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 09-30-2011, 12:21 PM   #1
Registered: Dec 2010
Posts: 36

Rep: Reputation: 0
when the grounds break

When I used PHP, MySQL, Apache and CakePHP, then something broke, I wouldn't know if it was PHP, MySQL, Apache or CakePHP that broke.

The source code of big projects is huge like nobody knows the whole code. Do you have to know PHP, MySQL, Apache or CakePHP's source code? CakePHP probably has the smallest source code, but even so it's big, because it's a full-stack framework. Do you have to know CakePHP's source code?

When something breaks and you look at the stack trace, you see lots of return statements. If you don't know the whole source code and how the functions interact, how come you know what went wrong?
Old 09-30-2011, 01:47 PM   #2
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 200

Rep: Reputation: 30
Your post is quite confusing. I don't really understand what your question is. If you just use LAMP you do not need to understand the code of it's components. If your environment is configured properly then all errors you should see are result of the bugs in your code or bad configuration - which by the way is very well documented. Stack traces are sometimes long, but again, if your LAMP and framework are configured properly they will always point you to the error in your code, reporting entire function call stack - only for your debugging convenience! It's very rare event that application like Apache crashes on it's own. I don't know CakePHP but given it's popularity I doubt that it's unstable product.

Last edited by krizzz; 09-30-2011 at 01:50 PM.
Old 09-30-2011, 02:20 PM   #3
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,398
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You should almost always look first at your own code to determine where something went wrong. Most mature packages like PHP, Apache, etc have very few bugs, and those generally tend to be obscure and affect only unusual cases. Rarely does anything in software 'break' spontaneously. Something changes, usually for some kind of upgrade, which adds or exposes bugs in the code. Always look first at the body of code where change was introduced. Adding changes incrementally, and testing as you proceed is a good way to avoid the possibility of introducing problems whose origins are difficult to ascertain.

As either a programmer or system implementer, it is good strategy to create small modules which can be tested entirely or substantially in isolation (unit testing). When these are confirmed to work properly, they can be added to the larger body of work. Eventually, when all of the individual pieces are known to work, the probability of the whole working correctly should also be high. This is a sort of converse of the divide-and-conquer strategy.

As a system implementer, it is rarely required to look at source code (unless that is the only documentation).

--- rod.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Third Plasma Summit Lifts KDE Desktop To Higher Grounds LXer Syndicated Linux News 0 09-08-2009 02:00 PM
linux mint 3d cube question about resizing and back grounds. Kobra Kommander Linux - Newbie 0 07-27-2008 11:42 AM
Fantasy Grounds in WINE: Is it possible? Cainen Linux - Games 2 09-20-2007 08:22 PM
starting grounds to help develop Linux davidguygc Linux - Newbie 5 02-04-2007 12:21 AM
LXer: Developing Countries Breeding Grounds For Open Source LXer Syndicated Linux News 0 01-06-2007 10:54 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration