Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #15854

Re: Check for military time

From Matthew Carter <m@ahungry.com>
Newsgroups comp.lang.php
Subject Re: Check for military time
Date 2015-11-04 21:18 -0500
Organization Ahungry (http://ahungry.com)
Message-ID <87fv0ljiik.fsf@ahungry.com> (permalink)
References (10 earlier) <5631e20e$0$23743$e4fe514c@news.xs4all.nl> <87y4elb05f.fsf@ahungry.com> <56375c5b$0$23788$e4fe514c@news.xs4all.nl> <5637A403.5030200@arnowelzel.de> <563a13ba$0$23779$e4fe514c@news.xs4all.nl>

Show all headers | View raw


Erwin Moller <erwinmollerusenet@xs4all.nl> writes:

> On 11/2/2015 6:57 PM, Arno Welzel wrote:
>> Erwin Moller schrieb am 2015-11-02 um 13:51:
>
> <snip>
>
>>> People who include files and put whitespaces after the closing tag
>>> will quickly see the infamous "Output created before headers bla
>>> bla, etc etc." error.
>>
>> This will just happen, if a scripts wants to add headers which is not
>> always the case.
>>
>>
>>> Hmmm, HUGE PROBLEM! Now what?
>>>
>>> We have a few choices:
>>> 1) Remove the offending whitespace, and tell the programmer NOT to do
>>> that again.
>>
>> And hope that he will obey this rule. More likely this will happen
>> again many times.
>
>
> Is it really that hard?
> And why accept it when "programmers" make this mistake, and refuse to
> improve their act?
>
>
>>
>>> 2) Change the language, violate the logical assumption that each
>>> opening tag should be accompanied by a closing tag.
>>>
>>>
>>> It is beyond my understanding how anyone can opt for the second
>>> option.
>>
>> You will do this, when you first had to spend hours in finding bugs
>> in a system which consist of hundreds of files and some problem shows
>> up caused by unintentional whitespaces.
>
> No, that would not change my mind.
> I know how hard it can be to find bugs, especially on a huge codebase.
> I feel your pain.
> But cure is worse than the pain.
>
> The reason I make such a fuzz about this is this:
> Where does this kind of "improvements" end?
>
> Do you think it is acceptable if all calls to a method or function
> that cannot be found will be replaced (by the language) by the one
> that closely resembles the spelling used in the code because sometimes
> people mistype the name of the function, or are confused by
> camelCase/CamelCase?
>
> Do you think it is acceptable if programmers leave out the closing
> curly bracket in conditional statement, because they "forget
> sometimes" to close it, and you have spend hours finding the problem?
>
>
> Really, sometimes you just have to draw a line, and demand a certain
> mastery of the job. If people cannot deliver, they should go
> elsewhere.
>
>
>>
>>> What is even more flabberghasting is the fact many people are willing to
>>> defend that crazy decision.
>>
>> As already mentioned by T. Lahn:
>>
>> <http://www.php-fig.org/psr/psr-2/>
>>
>> Cite:
>>
>> "The closing ?> tag MUST be omitted from files containing only PHP."
>>
>
> I choose to respond with:
>
> https://yourlogicalfallacyis.com/appeal-to-authority
>
> And Thomas Pointedears Lahn replaced critical thinking with following
> guidelines to the letter, a long time ago.
> My advice: Don't follow him there.
>
> Regards,
> Erwin Moller

Symfony 2 framework already provides suggestions if you mispell a word
in the error output above the stack trace (did you mean XYZ instead of
XWZ? type of thing).

Although in PHP camelCase will never get you in functions/methods, as
they're all case insensitive :)

<?php

function blub() {
  echo 1;
}

BLUB();

class foo
{
  public function bar()
  {
    echo 2;
  }
}

$f = new foo();
$f->BAR();


-- 
Matthew Carter (m@ahungry.com)
http://ahungry.com

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Check for military time Derek Turner <frderek@suremail.je> - 2015-10-20 18:57 +0000
  Re: Check for military time Derek Turner <frderek@suremail.je> - 2015-10-20 19:00 +0000
    Re: Check for military time Richard Yates <richard@yatesguitar.com> - 2015-10-20 21:35 -0700
      Re: Check for military time Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-10-21 16:12 -0400
        Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-21 22:38 -0400
          Re: Check for military time Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-10-22 10:43 -0400
            Re: Check for military time Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-10-22 10:48 -0400
            Re: Check for military time Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-22 17:20 +0200
            Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-22 12:19 -0400
            Re: Check for military time "Peter H. Coffin" <hellsop@ninehells.com> - 2015-10-22 15:32 -0500
              Re: Check for military time Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-22 23:08 +0200
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-22 20:19 -0400
                Re: Check for military time Matthew Carter <m@ahungry.com> - 2015-10-22 22:07 -0400
                Re: Check for military time "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2015-10-23 02:26 +0000
              Re: Check for military time Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-10-22 17:13 -0400
                Re: Check for military time Tim Streater <timstreater@greenbee.net> - 2015-10-22 22:57 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-22 20:22 -0400
                Re: Check for military time Tim Streater <timstreater@greenbee.net> - 2015-10-23 09:19 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-23 09:32 -0400
                Re: Check for military time Tim Streater <timstreater@greenbee.net> - 2015-10-23 15:43 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-23 11:11 -0400
                Re: Check for military time gordonb.nwjln@burditt.org (Gordon Burditt) - 2015-10-23 12:36 -0500
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-23 13:40 -0400
                Re: Check for military time Tim Streater <timstreater@greenbee.net> - 2015-10-23 18:54 +0100
                Re: Check for military time Norman Peelman <npeelman@cfl.rr.com> - 2015-10-23 22:44 -0400
                Re: Check for military time Tim Streater <timstreater@greenbee.net> - 2015-10-24 10:32 +0100
                Re: Check for military time Derek Turner <frderek@suremail.je> - 2015-10-24 11:41 +0000
                Re: Check for military time Norman Peelman <npeelman@cfl.rr.com> - 2015-10-24 15:15 -0400
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-22 20:21 -0400
                Re: Check for military time Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-10-22 20:38 -0400
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-22 20:47 -0400
              Re: Check for military time gordonb.90ylr@burditt.org (Gordon Burditt) - 2015-10-22 18:21 -0500
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-22 20:23 -0400
            Re: Check for military time gordonb.c5zx1@burditt.org (Gordon Burditt) - 2015-10-22 17:40 -0500
        Re: Check for military time Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-22 11:12 +0200
          Re: Check for military time Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2015-10-22 11:06 -0400
            Re: Check for military time Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-22 17:18 +0200
        Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-22 13:17 -0400
  Re: Check for military time Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-21 13:55 +0200
    Re: Check for military time "M. Strobel" <strobel@example.com> - 2015-10-21 20:56 +0200
      Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-21 16:48 -0400
  Re: Check for military time Stephan Elinghaus <221015.6.seli@spamgourmet.com> - 2015-10-22 13:16 +0200
    Re: Check for military time Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-22 15:11 +0200
      Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-22 10:23 -0400
        Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-10-27 14:10 +0100
          Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-27 09:25 -0400
            Re: Check for military time Jørn Andersen <jorn@jorna.dk> - 2015-10-27 15:19 +0100
              Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-27 10:41 -0400
                Re: Check for military time Matthew Carter <m@ahungry.com> - 2015-10-27 23:03 -0400
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-27 23:29 -0400
                Re: Check for military time Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-10-29 10:08 +0100
                Re: Check for military time Matthew Carter <m@ahungry.com> - 2015-10-29 21:44 -0400
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-29 22:35 -0400
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-10-30 20:08 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-30 16:22 -0400
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-01 11:58 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-01 08:27 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-01 14:36 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-01 09:05 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-01 16:51 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-01 11:09 -0500
                Re: Check for military time Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-30 22:33 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-30 20:01 -0400
                Re: Check for military time Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-11-03 19:51 +0100
                Re: Check for military time Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-11-02 13:51 +0100
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-02 18:57 +0100
                Re: Check for military time Erwin Moller <erwinmollerusenet@xs4all.nl> - 2015-11-04 15:18 +0100
                Re: Check for military time Matthew Carter <m@ahungry.com> - 2015-11-04 21:18 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-05 07:51 +0100
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-10-30 20:04 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-30 16:24 -0400
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-01 12:06 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-01 08:30 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-01 14:39 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-01 09:07 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-01 16:58 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-01 11:05 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-02 08:14 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-02 10:01 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-02 17:54 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-02 12:50 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-02 19:05 +0100
                Re: Check for military time Tim Streater <timstreater@greenbee.net> - 2015-11-02 18:23 +0000
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-02 15:23 -0500
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-02 15:16 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-03 05:47 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-03 08:47 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-04 03:55 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-03 22:09 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-04 08:49 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-04 08:29 -0500
                Re: Check for military time Paul Herber <paul@pherber.com> - 2015-11-04 14:14 +0000
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-04 10:00 -0500
                Re: Check for military time Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-11-06 13:11 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-06 09:45 -0500
                Re: Check for military time Matthew Carter <m@ahungry.com> - 2015-11-07 21:50 -0500
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-07 22:05 -0500
                Re: Check for military time gordonb.2zzss@burditt.org (Gordon Burditt) - 2015-11-08 20:50 -0600
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-09 10:29 +0100
                Re: Check for military time gordonb.00syf@burditt.org (Gordon Burditt) - 2015-11-10 23:42 -0600
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-11 07:46 +0100
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-11 07:50 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-11 08:06 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-11 15:15 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-11 09:21 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-11 17:46 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-11 15:12 -0500
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-11 22:23 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-11 17:17 -0500
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-11 08:05 -0500
                OT: Munging addresses (was: Re: Check for military time) Arno Welzel <usenet@arnowelzel.de> - 2015-11-11 19:18 +0100
                Re: OT: Munging addresses Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-11 15:16 -0500
                Re: OT: Munging addresses Arno Welzel <usenet@arnowelzel.de> - 2015-11-11 22:29 +0100
                Re: OT: Munging addresses Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-11 17:20 -0500
                Re: OT: Munging addresses Arno Welzel <usenet@arnowelzel.de> - 2015-11-12 07:47 +0100
                Re: OT: Munging addresses Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-12 10:15 -0500
                Re: OT: Munging addresses Arno Welzel <usenet@arnowelzel.de> - 2015-11-12 17:17 +0100
                Re: OT: Munging addresses Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-12 11:59 -0500
                Re: OT: Munging addresses Arno Welzel <usenet@arnowelzel.de> - 2015-11-12 18:51 +0100
                Re: OT: Munging addresses Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-12 14:20 -0500
                Re: OT: Munging addresses Arno Welzel <usenet@arnowelzel.de> - 2015-11-12 20:59 +0100
                Re: OT: Munging addresses Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-12 16:54 -0500
                Re: OT: Munging addresses Jim Higgins <ILikeMy@Privacy.invalid> - 2015-11-18 16:24 +0000
              PHP code section end marker (was: Check for military time) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-10-27 22:58 +0100
            Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-10-30 20:01 +0100
              Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-10-30 16:27 -0400
                Re: Check for military time Arno Welzel <usenet@arnowelzel.de> - 2015-11-01 12:12 +0100
                Re: Check for military time Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-01 08:31 -0500

csiph-web