FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Never log deprecation warnings
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Never log deprecation warnings [message #179103 is a reply to message #179101] Wed, 12 September 2012 19:39 Go to previous messageGo to next message
Shake is currently offline  Shake
Messages: 40
Registered: May 2012
Karma: 0
Member
Jerry Stuckle avait énoncé :
>
> A "regex search and replace" is a blind operation. Hand editing the files is
> not - and is much more reliable.

I don't need that you explain what you understood. I need that you
understand what you didn't and all other people did.

If you think "regex search and replace" is execute a commands or script
that does all unattended, is your limitation. Not the true.

Regards.
Re: Never log deprecation warnings [message #179104 is a reply to message #179101] Wed, 12 September 2012 22:13 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article <k2qm66$dnu$1(at)dont-email(dot)me>,
Jerry Stuckle <jstucklex(at)attglobal(dot)net> wrote:

> On 9/12/2012 12:13 PM, Shake wrote:
>> El 12/09/2012 18:08, Jerry Stuckle escribió:
>>>
>>> Just quoting what you said. If that is not what you meant, you should
>>> be more careful with your words. You said them, I didn't.
>>
>> He doesn't said blindly.
>>
>> If you don't understand the meant of what every other people
>> understood*, you should be more careful with your answers.

>> * Including people as me, with not precisely a perfect skill with
>> english language.
>
> A "regex search and replace" is a blind operation.

It certainly is, especially since most regexps are essentially line
noise. So you could end up with complete garbage. But then if you are
PointyHead that probably where you start, anyway, so what's the odds.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: Never log deprecation warnings [message #179107 is a reply to message #179084] Thu, 13 September 2012 09:31 Go to previous messageGo to next message
Jonathan Stein is currently offline  Jonathan Stein
Messages: 43
Registered: September 2010
Karma: 0
Member
On 11-09-2012 22:16, Jerry Stuckle wrote:

> I figured you had enough experience to understand the conclusion. I see
> I was wrong.

Everyone with the experience to understand your conclusions could have
drawn the conclusions by them selfs, so they are pretty useless without
any further explanation.

And when you present a conclusion, that is only valid in some cases as a
universal truth, it's directly misleading.

> And, every one of the people/groups I've seen crash and burn have
> promised "it won't happen to us". But it did.

I have noticed, that you don't accept the idea, that a site can be
useful as it is, but not important enough to keep alive forever, so I
don't think this will lead much further.
But at least you got a new experience this time: I said that it WILL
happen. Our sites WILL stop working at some day. We know that, and we
have accepted that.

Regards

Jonathan
Re: Never log deprecation warnings [message #179115 is a reply to message #179102] Thu, 13 September 2012 16:53 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 9/12/2012 3:35 PM, Anders Wegge Keller wrote:
> Jerry Stuckle <jstucklex(at)attglobal(dot)net> writes:
>
>> A "regex search and replace" is a blind operation. Hand editing the
>> files is not - and is much more reliable.
>
> You are indeed a moron, sir!
>
> If you had taken the time to read the qualifier from Pointedears, you
> would have seen that the statement was only related to the recent list
> of deprecated functions. Looking over it, it seems like a very safe
> guess that yes, in this particular case a regexp can be devised, that
> will provable create the same results as the unchanged code.
>
> Just dfor the record: I routinely do similar transforamtions on C
> code in my job, and so far we have yet to see an error being
> introduced there.
>

Which is a blind search and replace - and can cause all kinds of
unexpected problems.

You're fortunate you've never had the bad luck to have it happen to you.
I've seen code break very badly after such an effort.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Never log deprecation warnings [message #179116 is a reply to message #179103] Thu, 13 September 2012 16:55 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 9/12/2012 3:39 PM, Shake wrote:
> Jerry Stuckle avait énoncé :
>>
>> A "regex search and replace" is a blind operation. Hand editing the
>> files is not - and is much more reliable.
>
> I don't need that you explain what you understood. I need that you
> understand what you didn't and all other people did.
>
> If you think "regex search and replace" is execute a commands or script
> that does all unattended, is your limitation. Not the true.
>
> Regards.
>
>

OK, how many of these scripts allow the user to examine the code *in
context* and determine if the change is correct or not? I've never seen
one.

They *may* show one line of code (which might not even be a complete
statement) and ask if you want it changed, but that's not much better.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Never log deprecation warnings [message #179117 is a reply to message #179107] Thu, 13 September 2012 17:01 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 9/13/2012 5:31 AM, Jonathan Stein wrote:
> On 11-09-2012 22:16, Jerry Stuckle wrote:
>
>> I figured you had enough experience to understand the conclusion. I see
>> I was wrong.
>
> Everyone with the experience to understand your conclusions could have
> drawn the conclusions by them selfs, so they are pretty useless without
> any further explanation.
>
> And when you present a conclusion, that is only valid in some cases as a
> universal truth, it's directly misleading.
>
>> And, every one of the people/groups I've seen crash and burn have
>> promised "it won't happen to us". But it did.
>
> I have noticed, that you don't accept the idea, that a site can be
> useful as it is, but not important enough to keep alive forever, so I
> don't think this will lead much further.
> But at least you got a new experience this time: I said that it WILL
> happen. Our sites WILL stop working at some day. We know that, and we
> have accepted that.
>
> Regards
>
> Jonathan
>

Sure, I accept the idea the site can be useful. But it's obviously not
important or you would fix the warnings. So why waste any other
resources on it? Just get rid of it.

And BTW - when you do get ready to go to a new release of PHP, you'll
have a lot of work ahead of you in testing and validating the code.
Having to go back and fix warnings you should have fixed months or years
ago will just add to that workload, delaying the implementation even longer.

And no, it's not a new experience. Every one of the projects I've seen
who ignored the warnings have said exactly the same things you're saying
- including the fact the code "WILL stop working"... But when that
happened, the code all of a sudden becomes more important and can't be
dropped so easily.

OTOH, those who have taken the time to fix the warnings long before the
upgrade have had a much easier time.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Never log deprecation warnings [message #179118 is a reply to message #179116] Thu, 13 September 2012 17:24 Go to previous messageGo to next message
Shake is currently offline  Shake
Messages: 40
Registered: May 2012
Karma: 0
Member
El 13/09/2012 18:55, Jerry Stuckle escribió:
> On 9/12/2012 3:39 PM, Shake wrote:
>> Jerry Stuckle avait énoncé :
>>>
>>> A "regex search and replace" is a blind operation. Hand editing the
>>> files is not - and is much more reliable.
>>
>> I don't need that you explain what you understood. I need that you
>> understand what you didn't and all other people did.
>>
>> If you think "regex search and replace" is execute a commands or script
>> that does all unattended, is your limitation. Not the true.
>>
>> Regards.
>>
>>
>
> OK, how many of these scripts allow the user to examine the code *in
> context* and determine if the change is correct or not? I've never seen
> one.

Scripts? I amb talking about IDEs or whatever you use to write and
manage code.

>
> They *may* show one line of code (which might not even be a complete
> statement) and ask if you want it changed, but that's not much better.
>

The standard tools I use let me do more than this. (Emacs and Netbeans).

For example, on Netbeans:

CTRL+F
Write the RegExp pattern.

Now I have a list of all matches per file (showing the matching line.

CTRL+h to write the RegExp substitution.

And just decide where and how do substitution. And handle editing if
necesary.

Regards.
Re: Never log deprecation warnings [message #179120 is a reply to message #179118] Thu, 13 September 2012 19:02 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 9/13/2012 1:24 PM, Shake wrote:
> El 13/09/2012 18:55, Jerry Stuckle escribió:
>> On 9/12/2012 3:39 PM, Shake wrote:
>>> Jerry Stuckle avait énoncé :
>>>>
>>>> A "regex search and replace" is a blind operation. Hand editing the
>>>> files is not - and is much more reliable.
>>>
>>> I don't need that you explain what you understood. I need that you
>>> understand what you didn't and all other people did.
>>>
>>> If you think "regex search and replace" is execute a commands or script
>>> that does all unattended, is your limitation. Not the true.
>>>
>>> Regards.
>>>
>>>
>>
>> OK, how many of these scripts allow the user to examine the code *in
>> context* and determine if the change is correct or not? I've never seen
>> one.
>
> Scripts? I amb talking about IDEs or whatever you use to write and
> manage code.
>

That was not in the original post by Pointed Head. In fact, he even
said that "... can be done in PHP, of course." - which is not an editor.
>>
>> They *may* show one line of code (which might not even be a complete
>> statement) and ask if you want it changed, but that's not much better.
>>
>
> The standard tools I use let me do more than this. (Emacs and Netbeans).
>
> For example, on Netbeans:
>
> CTRL+F
> Write the RegExp pattern.
>
> Now I have a list of all matches per file (showing the matching line.
>
> CTRL+h to write the RegExp substitution.
>
> And just decide where and how do substitution. And handle editing if
> necesary.
>
> Regards.

Then when you're changing the subject you should specify that in your post.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Never log deprecation warnings [message #179121 is a reply to message #179120] Thu, 13 September 2012 19:12 Go to previous messageGo to next message
Shake is currently offline  Shake
Messages: 40
Registered: May 2012
Karma: 0
Member
El 13/09/2012 21:02, Jerry Stuckle escribió:
>>> one.
>>
>> Scripts? I amb talking about IDEs or whatever you use to write and
>> manage code.
>>
>
> That was not in the original post by Pointed Head. In fact, he even
> said that "... can be done in PHP, of course." - which is not an editor.

Can be done in PHP doesn't mean "must be done in PHP".

But also, An IDE could help to do a few lines in PHP.


>>>
>>> They *may* show one line of code (which might not even be a complete
>>> statement) and ask if you want it changed, but that's not much better.
>>>
>>
>> The standard tools I use let me do more than this. (Emacs and Netbeans).
>>
>> For example, on Netbeans:
>>
>> CTRL+F
>> Write the RegExp pattern.
>>
>> Now I have a list of all matches per file (showing the matching line.
>>
>> CTRL+h to write the RegExp substitution.
>>
>> And just decide where and how do substitution. And handle editing if
>> necesary.
>>
>> Regards.
>
> Then when you're changing the subject you should specify that in your post.
>

Nop, you are thinking in very narrow way. Or perhaps looking the tree
you cannot see the forest... I don't know which was your limitations.

Using an IDE you can do both things: some regexp search and replace, or
some watching and writing to get a few php that do the work (not
blindly, just after watching).

And I will finish here my opinions about this. People have enough
elements to take their conclusions.

Regards
Re: Never log deprecation warnings [message #179123 is a reply to message #179117] Thu, 13 September 2012 19:33 Go to previous messageGo to next message
Jonathan Stein is currently offline  Jonathan Stein
Messages: 43
Registered: September 2010
Karma: 0
Member
On 13-09-2012 19:01, Jerry Stuckle wrote:

>> I have noticed, that you don't accept the idea, that a site can be
>> useful as it is, but not important enough to keep alive forever, ...
>
> Sure, I accept the idea the site can be useful. But it's obviously not
> important or you would fix the warnings. So why waste any other
> resources on it? Just get rid of it.

Did you just want to prove my point, or is this a competition about
about writing the last message in the thread? - If so, you can win by
answering this message...

Regards

Jonathan
Re: Never log deprecation warnings [message #179124 is a reply to message #179121] Thu, 13 September 2012 20:20 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Shake wrote:

> Using an IDE you can do both things: some regexp search and replace, or
> some watching and writing to get a few php that do the work (not
> blindly, just after watching).

And I have found Eclipse PHP Development Tools (PDT) to be an excellent tool
for that (optionally recursive, optionally filtered, optionally interactive
optionally regexp, search-and-replace). (As a result, this works with Zend
Studio, which is based on PDT, as well.)

However, it would be interesting, indeed, to find out whether and if, to
what extent, it was reasonably possible to automate the process. (Analysis
and results can be written to stderr and stdout or another file, so that the
original is not necessarily lost.)

When the language changed radically from Python 2.x to 3.x, and programs had
to be made compliant with the new version efficiently, the Python people did
something very similar to what I suggest here (2to3) – and it does work.
Because, if you know your computer science, you know that an algorithm can
be devised, thus a program can be written, that transforms a program written
in one programming language into another, where the result is an approximate
simulation (Turing equivalence). (We all do that in our heads when we are
refactoring or porting code.) It would be nice to have something like that
for PHP versions.


PointedEars
--
Sometimes, what you learn is wrong. If those wrong ideas are close to the
root of the knowledge tree you build on a particular subject, pruning the
bad branches can sometimes cause the whole tree to collapse.
-- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom(at)94(dot)75(dot)214(dot)39>
Re: Never log deprecation warnings [message #179125 is a reply to message #179123] Fri, 14 September 2012 00:08 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 9/13/2012 3:33 PM, Jonathan Stein wrote:
> On 13-09-2012 19:01, Jerry Stuckle wrote:
>
>>> I have noticed, that you don't accept the idea, that a site can be
>>> useful as it is, but not important enough to keep alive forever, ...
>>
>> Sure, I accept the idea the site can be useful. But it's obviously not
>> important or you would fix the warnings. So why waste any other
>> resources on it? Just get rid of it.
>
> Did you just want to prove my point, or is this a competition about
> about writing the last message in the thread? - If so, you can win by
> answering this message...
>
> Regards
>
> Jonathan
>

No, I'm trying to "prove your point". I'm just saying I've heard EVERY
argument you've made before. And every time it's been crash and burn.

But some people refuse to learn from others mistakes. They need to make
those same mistakes for themselves.

I pity your clients.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Never log deprecation warnings [message #179126 is a reply to message #179121] Fri, 14 September 2012 00:10 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 9/13/2012 3:12 PM, Shake wrote:
> El 13/09/2012 21:02, Jerry Stuckle escribió:
>>>> one.
>>>
>>> Scripts? I amb talking about IDEs or whatever you use to write and
>>> manage code.
>>>
>>
>> That was not in the original post by Pointed Head. In fact, he even
>> said that "... can be done in PHP, of course." - which is not an editor.
>
> Can be done in PHP doesn't mean "must be done in PHP".
>

No, but the suggestion to do it that way shows he wants to do a blind
search and replace.


> But also, An IDE could help to do a few lines in PHP.
>
>

And how many IDE's support PHP code in the IDE? None that I know of -
at least not without writing a complex module which would be even harder
than fixing the original code in the first place.

>>>>
>>>> They *may* show one line of code (which might not even be a complete
>>>> statement) and ask if you want it changed, but that's not much better.
>>>>
>>>
>>> The standard tools I use let me do more than this. (Emacs and Netbeans).
>>>
>>> For example, on Netbeans:
>>>
>>> CTRL+F
>>> Write the RegExp pattern.
>>>
>>> Now I have a list of all matches per file (showing the matching line.
>>>
>>> CTRL+h to write the RegExp substitution.
>>>
>>> And just decide where and how do substitution. And handle editing if
>>> necesary.
>>>
>>> Regards.
>>
>> Then when you're changing the subject you should specify that in your
>> post.
>>
>
> Nop, you are thinking in very narrow way. Or perhaps looking the tree
> you cannot see the forest... I don't know which was your limitations.
>
> Using an IDE you can do both things: some regexp search and replace, or
> some watching and writing to get a few php that do the work (not
> blindly, just after watching).
>
> And I will finish here my opinions about this. People have enough
> elements to take their conclusions.
>
> Regards

Oh, I can see the forest. But I can also understand plain English. But
obviously you can't.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Never log deprecation warnings [message #179127 is a reply to message #179124] Fri, 14 September 2012 00:13 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 9/13/2012 4:20 PM, Thomas 'PointedEars' Lahn wrote:
> Shake wrote:
>
>> Using an IDE you can do both things: some regexp search and replace, or
>> some watching and writing to get a few php that do the work (not
>> blindly, just after watching).
>
> And I have found Eclipse PHP Development Tools (PDT) to be an excellent tool
> for that (optionally recursive, optionally filtered, optionally interactive
> optionally regexp, search-and-replace). (As a result, this works with Zend
> Studio, which is based on PDT, as well.)
>

And how do you write PHP code to do the search/replace in Eclipse?

> However, it would be interesting, indeed, to find out whether and if, to
> what extent, it was reasonably possible to automate the process. (Analysis
> and results can be written to stderr and stdout or another file, so that the
> original is not necessarily lost.)
>

Yes, once again you suggest a blind search and replace.

> When the language changed radically from Python 2.x to 3.x, and programs had
> to be made compliant with the new version efficiently, the Python people did
> something very similar to what I suggest here (2to3) – and it does work.
> Because, if you know your computer science, you know that an algorithm can
> be devised, thus a program can be written, that transforms a program written
> in one programming language into another, where the result is an approximate
> simulation (Turing equivalence). (We all do that in our heads when we are
> refactoring or porting code.) It would be nice to have something like that
> for PHP versions.
>
>
> PointedEars
>

Sure, it *can* work for the trinket code you write. But if you ever
wrote any serious code, you'd understand just how dangerous it could be.

However, we all know that is well beyond your capabilities.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Never log deprecation warnings [message #179135 is a reply to message #179125] Fri, 14 September 2012 13:41 Go to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma: 0
Senior Member
.oO(Jerry Stuckle)

> On 9/13/2012 3:33 PM, Jonathan Stein wrote:
>
>> Did you just want to prove my point, or is this a competition about
>> about writing the last message in the thread? - If so, you can win by
>> answering this message...
>
> No, I'm trying to "prove your point". [...]

We have a winner!

Micha

--
http://mfesser.de/
Fotos | Blog | Flohmarkt
Pages (2): [ «    1  2]  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: how format one date
Next Topic: Problem with PHP Driver Authentication
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Dec 18 12:58:53 GMT 2024

Total time taken to generate the page: 0.02757 seconds