Posted: Fri Sep 24, 2004 2:07 pm
Can I get "top" running on Win machine? Or is there a similar command? Because Task Manager is not much useful 
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Yes.. if you install Linux and reboot.MarK (CZ) wrote:Can I get "top" running on Win machine?
Haha ... you're offended by the term Mr Spaghetti? Are you kidding me?Buddha443556 wrote:First I really don't think name calling, should be part of this discussion. Especailly when the one doing the name calling is a moderator. Stooping to such level doesn't help your arguement.McGruff wrote:Let's say we have two almost identical apps: one written by Mr Spaghetti and one carefully refactored into lean & mean classes by Mr Oop. Both work, and Mr Spaghetti constantly annoys Mr Oop (who has better things to do) with the latest sightings on the edge of reality from his Hubble telescope.
One day the client wants to make a big change to the site. The update is carried out, both sites are still using the "same" underlying code, and both have slowed right down. Mr Oop starts examining the system to find the bottleneck. Within an afternoon, with his nice modular design, he has identified the problem and swapped out the problem code. Mr Spaghetti spends all day just trying to figure out his own script - he's long forgotten how it works and the mess on the page doesn't explain itself. He spends all week looking for bottlenecks: because his script is so tangled, it's a huge effort to compare alternative ideas.
When maintatining proceedural code that is almost always horrid to deal with due to its lack of modularity, it's 99% understanding what the hell the program is doing and the dozens of pages that one change affects, and 1% improvement/functionalityBuddha443556 wrote:I always thought programming was 99% thought and 1% effort. Maybe I'm doing it wrong?McGruff wrote:At least 2/3 of the effort of programming goes into writing code that is easy to assimilate and easy to work with. The other side of that - making a computer "do stuff" - is a relatively trivial task.
What? A well designed app is modular, hence any changes or optimisations (if properly designed) are localised in one place. That's the entire point of design and OOP. If it is well designed, it is NOT as challenging to improve than if it is badly designed - which is harder to improve since the changes are all over the place.Roja wrote:I disagree with that statement completely - the LESS well designed the app, the MORE benefit you can get from optimizations. If its well designed, its going to be VERY challenging to improve that.McGruff wrote: It's just an attempt to explain an important point: without a well-designed app, it's going to be tough to do any optimising at all.
Ummm ... flexibility is where the system is built from small pieces that do just one thing. That way, if anything needs to be changed, the change can be found and modifiied in a less number of places instead of many places. If a method does many things, then a change will propogate through all the layers instead of just the ones aboveRoja wrote:I disagree. Flexibility means "Responsive to change; adaptable" - the opposite of doing just one thing, the ability to do many things as needed.McGruff wrote: Flexibility arises from paring down classes and fns until they do just one thing. Reduced dependency = more flexibility.
Hehe ... touche =)markl999 wrote:If you care that much about speed, don't use PHP.
Ooops..did i just say that out loud![]()
Why is that? Though I might not always agree with McGruff on certain things, he is very trust worthy, and very intelligent.Buddha443556 wrote:I'm having trouble with that.McGruff wrote:Trust me, it is.
So it's usually not a good idea to sit there and say it's a massive improvement.Buddha443556 wrote:True, and I said they were very unscientific.McGruff wrote:Those test results aren't entirely reliable with just six iterations.
You're wrong. Optimization, by it's very nature, can't be done until AFTER the program is complete. This is not to say you don't program in an efficient manner from the beginning, but to say you cannot optimize any code until after it's written. It's been proven time and time again that pre-optimization, which is what you are advocating, does more harm than good.Buddha443556 wrote:Here we disagree greatly. You, correct me if I'm wrong, you think of optimization as something you do after all the coding is done. Where as I see as being part of the entire design and development process. Not an after thought.McGruff wrote:Even if you had achieved a speed increase of less than 2 hundredths of a second what impact will that have on your site? How much time did you spend to figure that out, and how much time would you subsequently spend to update all the scripts in the site according to your findings?