Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

This login session: $13.76, but for you $11.88.


devel / comp.lang.php / Re: How do you handle debug code? Removing from production versus conditional execution

SubjectAuthor
* Re: How do you handle debug code? Removing from production versusAngle
`* Re: How do you handle debug code? Removing from production versusRichard
 `- Re: How do you handle debug code? Removing from production versusJerry Stuckle

1
Re: How do you handle debug code? Removing from production versus conditional execution

<c028adea-b315-4ba3-8f93-a44b6a097630n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=844&group=comp.lang.php#844

  copy link   Newsgroups: comp.lang.php
X-Received: by 2002:ac8:7d94:0:b0:3e6:970e:a405 with SMTP id c20-20020ac87d94000000b003e6970ea405mr3339752qtd.6.1682226412762;
Sat, 22 Apr 2023 22:06:52 -0700 (PDT)
X-Received: by 2002:a05:620a:1006:b0:74e:4504:46da with SMTP id
z6-20020a05620a100600b0074e450446damr614083qkj.11.1682226412602; Sat, 22 Apr
2023 22:06:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.php
Date: Sat, 22 Apr 2023 22:06:52 -0700 (PDT)
In-Reply-To: <a2740b73-91c2-4002-9573-d0204fe2bec7@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=82.131.76.206; posting-account=JYCD-AoAAABJjYHTEug7bzEvKBag4Jpy
NNTP-Posting-Host: 82.131.76.206
References: <a2740b73-91c2-4002-9573-d0204fe2bec7@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c028adea-b315-4ba3-8f93-a44b6a097630n@googlegroups.com>
Subject: Re: How do you handle debug code? Removing from production versus
conditional execution
From: angleaaaaaaa@zohomail.eu (Angle)
Injection-Date: Sun, 23 Apr 2023 05:06:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 23
 by: Angle - Sun, 23 Apr 2023 05:06 UTC

You know how stupid You look ? It is absolutely beyond belief !!!!!!!!!!!!!!!

On Friday, May 3, 2019 at 3:00:29 AM UTC+2, Ryan wrote:
> Perhaps an age old question, but how do you all deal with your debug code? Do you remove it before deploying to production, if so how do you make sure you remove it all without removing something important that will break your code? Or do you use conditional execution such as:
>
> if ($_ENV['DEGUG'] == true) {
> var_dump($data);
> }
>
> If so what condition are you using? An environment variable like above, a constant defined elsewhere in a config file?
>
> I think conditional execution would be easier but question if having to check if the debug code can run would slow down a production server, but the question is how much overhead really does it take to check $_ENV or a constant...
>
> So I am curious to see how others deal with this.

Re: How do you handle debug code? Removing from production versus conditional execution

<u26fgh$2qb5h$1@news.xmission.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=846&group=comp.lang.php#846

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: legalize+jeeves@mail.xmission.com (Richard)
Newsgroups: comp.lang.php
Subject: Re: How do you handle debug code? Removing from production versus
conditional execution
Date: Mon, 24 Apr 2023 17:50:10 -0000 (UTC)
Organization: multi-cellular, biological
Sender: legalize+jeeves@mail.xmission.com
Message-ID: <u26fgh$2qb5h$1@news.xmission.com>
References: <a2740b73-91c2-4002-9573-d0204fe2bec7@googlegroups.com> <c028adea-b315-4ba3-8f93-a44b6a097630n@googlegroups.com> <u236qf$150$59@gallifrey.nk.ca>
Reply-To: (Richard) legalize+jeeves@mail.xmission.com
Injection-Date: Mon, 24 Apr 2023 17:50:10 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:2607:fa18:0:beef::4";
logging-data="2960561"; mail-complaints-to="abuse@xmission.com"
X-Reply-Etiquette: No copy by email, please
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: legalize@shell.xmission.com (Richard)
 by: Richard - Mon, 24 Apr 2023 17:50 UTC

[Please do not mail me a copy of your followup]

doctor@doctor.nl2k.ab.ca (The Doctor) spake the secret code
<u236qf$150$59@gallifrey.nk.ca> thusly:

>This abusive spamtroll came from

You're only making it worse by responding to their posts. Either
report the abuse to their posting ISP or adjust your KILL file to drop
their posts so you don't see them.

To answer the real question from 2019 (whee!), instead of addding
"debug" code to your production deployment, write unit tests for
everything you do so that you have confidence in the deployed code.

An example can be found here:
<https://github.com/LegalizeAdulthood/manx>
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

Re: How do you handle debug code? Removing from production versus conditional execution

<u26hlb$eo0k$1@jstuckle.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=847&group=comp.lang.php#847

  copy link   Newsgroups: comp.lang.php
Path: i2pn2.org!rocksolid2!i2pn.org!eternal-september.org!news.eternal-september.org!jstuckle.eternal-september.org!.POSTED!not-for-mail
From: stuckle.jerry@gmail.com (Jerry Stuckle)
Newsgroups: comp.lang.php
Subject: Re: How do you handle debug code? Removing from production versus
conditional execution
Date: Mon, 24 Apr 2023 14:27:03 -0400
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <u26hlb$eo0k$1@jstuckle.eternal-september.org>
References: <a2740b73-91c2-4002-9573-d0204fe2bec7@googlegroups.com>
<c028adea-b315-4ba3-8f93-a44b6a097630n@googlegroups.com>
<u236qf$150$59@gallifrey.nk.ca> <u26fgh$2qb5h$1@news.xmission.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 24 Apr 2023 18:26:51 -0000 (UTC)
Injection-Info: jstuckle.eternal-september.org; posting-host="c8b8894fc37de7e06af1ab423be5903c";
logging-data="483348"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JMdPfKpdjm1BPNclh9E/PFdSJQAvmqiE="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.0
Cancel-Lock: sha1:dReNErPCSUtWiGY2OAGxzhebjSI=
Content-Language: en-US
In-Reply-To: <u26fgh$2qb5h$1@news.xmission.com>
 by: Jerry Stuckle - Mon, 24 Apr 2023 18:27 UTC

On 4/24/2023 1:50 PM, Richard wrote:
> [Please do not mail me a copy of your followup]
>
> doctor@doctor.nl2k.ab.ca (The Doctor) spake the secret code
> <u236qf$150$59@gallifrey.nk.ca> thusly:
>
>> This abusive spamtroll came from
>
> You're only making it worse by responding to their posts. Either
> report the abuse to their posting ISP or adjust your KILL file to drop
> their posts so you don't see them.
>
> To answer the real question from 2019 (whee!), instead of addding
> "debug" code to your production deployment, write unit tests for
> everything you do so that you have confidence in the deployed code.
>
> An example can be found here:
> <https://github.com/LegalizeAdulthood/manx>

Actually I don't have a problem with The Doctor calling out the posting
ISP. But I wish he wouldn't copy the entire message. It just gives the
message more popularity.

--
==================
Remove the "x"'s from my email address
Jerry Stuckle
stucklex.jerryx@gmail.com
==================

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor