LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 09-30-2011, 11:21 AM   #1
deltrem
Member
 
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, 12:47 PM   #2
krizzz
Member
 
Registered: Oct 2004
Location: NY
Distribution: Slackware
Posts: 198

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 12:50 PM.
 
Old 09-30-2011, 01:20 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.
 
  


Reply

Tags
programming


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 01:00 PM
linux mint 3d cube question about resizing and back grounds. Kobra Kommander Linux - Newbie 0 07-27-2008 10:42 AM
Fantasy Grounds in WINE: Is it possible? Cainen Linux - Games 2 09-20-2007 07:22 PM
starting grounds to help develop Linux davidguygc Linux - Newbie 5 02-03-2007 11:21 PM
LXer: Developing Countries Breeding Grounds For Open Source LXer Syndicated Linux News 0 01-06-2007 09:54 AM


All times are GMT -5. The time now is 07:48 AM.

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