php-general Digest 31 Dec 2009 03:45:54 -0000 Issue 6514

Topics (messages 300745 through 300750):

Re: not able to use mysql server
        300745 by: Eric Lee

If design patterns are not supposed to produce reusable code then why use them?
        300746 by: Tony Marston
        300747 by: Ashley Sheridan
        300748 by: tedd
        300749 by: Paul M Foster

Survey+Report in PHP
        300750 by: aditya shukla

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
On 12/30/09, Jignesh Thummar <[email protected]> wrote:
>
> It is problem with mysql client, it's not able to connect with mysql
> server.
> Either mysql server is not running or windows firewall is blocking to the
> access of port 3306. Try to disable firewall.
>
> -Jignesh
>
> On Wed, Dec 30, 2009 at 11:41 AM, Sudhakar <[email protected]>
> wrote:
>
> > hi
> >
> > i am using windows vista and installed wamp server, initially i installed
> > wamp and accessed phpmyadmin and while setting a password for the root i
> > did
> > a mistake and could not access phpmyadmin and also renamed some php files
> > so
> > i uninstalled wamp server and re installed
> >
> > now the problem i am facing is when i click on mysql.exe located at
> > D:\wamp\bin\mysql\mysql5.1.36\bin i am getting the following error
> > error 2003 cant connect to Mysql server on localhost 10061
> >
> > in config.inc.php located at d:\wamp\apps\phpmyadmin3.2.0.1 i have the
> > following
> > $cfg['Servers'][$i]['host'] = 'localhost';
> > $cfg['Servers'][$i]['port'] = '3306';
> > $cfg['Servers'][$i]['auth_type'] = 'config';
> > $cfg['Servers'][$i]['user'] = 'root';
> > $cfg['Servers'][$i]['password'] = 'root';
> > $cfg['Servers'][$i]['AllowNoPassword'] = true;
> >
> > along with others.
> >
> > when i type http://localhost i am able to see the welcome screen of wamp
> > and
> > can click on phpinfo but when i click on phpmyadmin it takes a while to
> > load
> > and a blank screen appears
> >
> > also i have stopped all services and restarted all services from the
> > wampserver icon in the system tray, normally the colors change from red
> to
> > yellow to white, the color is at yellow and does not change to white
> >
> > how do i solve the error error 2003 cant connect to Mysql server on
> > localhost 10061 so that i can use phpmyadmin
> >
> > please advice.
> >
> > thanks.
> >
>

Are there any error entries of mysql server on the event viewer ?
Also, what is the starting state of mysql server on the services console ?
You can found all tool on administrative folder on the start menu.

--- End Message ---
--- Begin Message ---
I have recently been engaged in an argument via email with someone who 
criticises my low opinion of design patterns (refer to 
http://www.tonymarston.net/php-mysql/design-patterns.html ). He says that 
design patterns are merely a convention and not a reusable component. My 
argument is that something called a pattern is supposed to have a recurring 
theme, some element of reusability, so that all subsequent implementations 
of a pattern should require less effort than the first implementation. If 
design patterns do not provide any reusable code then what is the point of 
using them?



I do not use design patterns as I consider them to be the wrong level of 
abstraction. I am in the business of designing and developing entire 
applications which comprise of numerous application transactions, so I much 
prefer to use transaction patterns (refer to 
http://www.tonymarston.net/php-mysql/design-patterns-are-dead.html and 
http://www.tonymarston.net/php-mysql/transaction-patterns.html ) as these 
provide large amounts of reusable code and are therefore a significant aid 
to programmer productivity.



What is your opinion? Are design patterns supposed to provide reusable code 
or not? If not, and each implementation of a pattern takes just as much time 
as the first, then where are the productivity gains from using design 
patterns?


-- 
Tony Marston
http://www.tonymarston.net
http://www.radicore.org 



--- End Message ---
--- Begin Message ---
On Wed, 2009-12-30 at 16:50 +0000, Tony Marston wrote:

> I have recently been engaged in an argument via email with someone who 
> criticises my low opinion of design patterns (refer to 
> http://www.tonymarston.net/php-mysql/design-patterns.html ). He says that 
> design patterns are merely a convention and not a reusable component. My 
> argument is that something called a pattern is supposed to have a recurring 
> theme, some element of reusability, so that all subsequent implementations 
> of a pattern should require less effort than the first implementation. If 
> design patterns do not provide any reusable code then what is the point of 
> using them?
> 
> 
> 
> I do not use design patterns as I consider them to be the wrong level of 
> abstraction. I am in the business of designing and developing entire 
> applications which comprise of numerous application transactions, so I much 
> prefer to use transaction patterns (refer to 
> http://www.tonymarston.net/php-mysql/design-patterns-are-dead.html and 
> http://www.tonymarston.net/php-mysql/transaction-patterns.html ) as these 
> provide large amounts of reusable code and are therefore a significant aid 
> to programmer productivity.
> 
> 
> 
> What is your opinion? Are design patterns supposed to provide reusable code 
> or not? If not, and each implementation of a pattern takes just as much time 
> as the first, then where are the productivity gains from using design 
> patterns?
> 
> 
> -- 
> Tony Marston
> http://www.tonymarston.net
> http://www.radicore.org 
> 
> 
> 


In my opinion, patterns primarily aid development of systems where more
than one person will be working on it, or where more people may need to
refer to the code in the future as a basis for something else.

Programming essentially is about not reinventing the wheel all the time,
by reusing ideas either as they stand, or as a base for improving upon.
To an extent, I think every programmer uses design patterns, it's just a
matter of how complex a pattern one uses, and how closely one stays to
the original pattern.

Thanks,
Ash
http://www.ashleysheridan.co.uk



--- End Message ---
--- Begin Message ---
At 4:50 PM +0000 12/30/09, Tony Marston wrote:
What is your opinion? Are design patterns supposed to provide reusable code
or not? If not, and each implementation of a pattern takes just as much time
as the first, then where are the productivity gains from using design
patterns?

--
Tony Marston

Tony:

I don't think reusable code is the main point of "Design Patterns". From what I've read, "Design Patterns" are more of a "If you are faced with this problem, here's a solution" kind of thing. Reusable code is more a by-product of the process.

Instead "Design Patterns" are more about identifying and classifying common problems than reusable code. The point is if you can define your problem as a category referenced by "Design Patterns", then you are closer to solving it.

With that said, I find "Design Patterns" frustrating because of the level of abstraction most authors use to identify the problem/solution pair. Instead of showing a real world example, their solution are so broad, so encompassing, so abstract, that they lose me.

However, I must admit that the newer ways of doing things are bringing to the table ways to do things that were not possible before. So, in the end we all have to keep learning just to keep up. As I've said many times before "I've learned something new every day of my life -- and I'm getting damned tried of it."

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On Wed, Dec 30, 2009 at 04:50:40PM -0000, Tony Marston wrote:

> I have recently been engaged in an argument via email with someone who
> criticises my low opinion of design patterns (refer to
> http://www.tonymarston.net/php-mysql/design-patterns.html ). He says that
> design patterns are merely a convention and not a reusable component. My
> argument is that something called a pattern is supposed to have a recurring
> theme, some element of reusability, so that all subsequent implementations
> of a pattern should require less effort than the first implementation. If
> design patterns do not provide any reusable code then what is the point of
> using them?
> 

There's a weird terminology problem here. A "design pattern" is just an
idea. Once you implement it, it can become a source of reusable code.

> 
> 
> I do not use design patterns as I consider them to be the wrong level of
> abstraction. I am in the business of designing and developing entire
> applications which comprise of numerous application transactions, so I much
> prefer to use transaction patterns (refer to
> http://www.tonymarston.net/php-mysql/design-patterns-are-dead.html and
> http://www.tonymarston.net/php-mysql/transaction-patterns.html ) as these
> provide large amounts of reusable code and are therefore a significant aid
> to programmer productivity.
> 
> 
> 
> What is your opinion? Are design patterns supposed to provide reusable code
> or not? If not, and each implementation of a pattern takes just as much time
> as the first, then where are the productivity gains from using design
> patterns?
> 

It depends on how you implement it. You can prevent it from being
reusable by implementing it in such a way that there's just no way to
adapt it to different circumstances.

But for the most part, it's like any other code you expect to reuse,
whether it's just a function, a plain class or whatever. If you
implement it properly, it will be reusable elsewhere. 

Paul

-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
Hello Guys,

I am trying to make a web app which has a survey and report based on the
survey.The app is like a suvery and I have to generate a report based on the
survey.Can someone please give a clue of how to generate the report .I have
the answers to the questions of the survey and based on them a report will
be generated.

Thanks

Aditya

--- End Message ---

Reply via email to