Windows is Easier - Linux

This is a discussion on Windows is Easier - Linux ; Kelsey Bjarnason writes: > [snips] > > On Thu, 20 Sep 2007 17:16:18 -0500, Erik Funkenbusch wrote: > >> Let's use gets as an example. Suppose you're writing something for an >> embedded device that has all forms of input ...

+ Reply to Thread
Page 4 of 4 FirstFirst ... 2 3 4
Results 61 to 76 of 76

Thread: Windows is Easier

  1. Re: Windows is Easier

    Kelsey Bjarnason writes:

    > [snips]
    >
    > On Thu, 20 Sep 2007 17:16:18 -0500, Erik Funkenbusch wrote:
    >
    >> Let's use gets as an example. Suppose you're writing something for an
    >> embedded device that has all forms of input sanitized and scrubbed. Gets
    >> will work fine.

    >
    > Until the sanitizer fails, or someone points the code at a new version of
    > the data grabber, or any of a thousand other things, at which point gets
    > pukes, your code is clobbered and your life support system kills you, your
    > nuke plant melts down, or you bill Mr. Zabowski $113 trillion for last
    > month's dental work. Whichever.
    >
    > It's a very simple thing to remember: gets *cannot* be used safely. Ever.
    > Period. Nor is there ever a reason to try, since fgets has all the
    > functionality without the failings of gets.


    Of course gets can be used safely. In a clean environment. In HW where
    the input CAN NOT exceed a certain predetermined buffer size. In a
    system where the input stream is guaranteed to contains the necessary
    termination. Would you use it? No. Probably not.


    --
    Legge di Swipple sull'Ordine:
    La precedenza va sempre a chi grida piu' forte.

  2. Re: Windows is Easier

    On Thu, 20 Sep 2007 20:01:03 -0500, Erik Funkenbusch wrote:

    > On Thu, 20 Sep 2007 17:24:05 -0700, Kelsey Bjarnason wrote:
    >
    >> [snips]
    >>
    >> On Thu, 20 Sep 2007 19:12:12 -0500, Erik Funkenbusch wrote:
    >>
    >>> How many friends and acquaintances of yours run Linux? I mean, besides
    >>> people you might have because of your Linux affiliation?

    >>
    >> Dunno about him, but for myself, several.
    >>
    >> Rob and his wife.
    >> About six people I know through them.
    >> Clayton and his wife.
    >> My lady.
    >> Her sister.
    >> At least three people from work, on an at least occasional basis.
    >> Roddy.
    >>
    >> Okay, that's a bakers dozen regular users, and three or four occasional
    >> users, plus me, and I've probably overlooked several.

    >
    > Ok. How many of those were not converted by you? That's not me moving the
    > goalposts, I'm just curious.


    One could argue that my lady's sister was, but that's a bit dicey - she
    hated Windows with a passion before I'd ever met her, she just didn't know
    what the alternatives were. The lady herself had installed Ubuntu before
    I'd even met her. Couple folks from work were looking for viable
    alternatives, or simply something new to try, so at most my involvement
    was "here's a CD, knock yourself out".

    Rob arguably got me into Linux in the first place; at least, he and I had
    a long history together of trying different things and comparing results -
    DesqView, OS/2, later Linux. The rest were all long-time Linux users
    before I ever met them, or at least before I'd discussed the subject with
    them (I'd known Roddy for years, but never discussed Linux until he
    mentioned he was running DeadRat.)

    So, all in all, I didn't "convert" any of them; they were already
    converts, if not _to_ Linux, then at least _away from_ Windows, mostly
    before I ever even knew them.

    Or one could argue I converted several - her sister and the folks at work,
    at least - because while they wanted something different, they didn't know
    what alternatives were available until I pointed them at Linux.

    Meanwhile I'm having a discussion with the Uberboss here at work... he's
    interested in the possibility of migrating existing Windows machines over
    to Linux. If that goes through, there will be an uncertain number of
    people using it on the desktop (not sure how many people we actually have)
    plus, presumably, some more servers migrated.

  3. Re: Windows is Easier

    [snips]

    On Fri, 21 Sep 2007 06:42:10 -0700, The Ghost In The Machine wrote:

    >>> free() -- some implementations don't check the pointer carefully enough.

    >>
    >> What's to check? It's either something previously allocated, NULL, or a
    >> coding error - and no return value to report error. Could use errno, I
    >> suppose.

    >
    > AIUI, some old implementations bombed in interesting ways when passed a
    > pointer not previously returned by malloc()/calloc().


    Some still do.

    > Presumably
    > the spec for this function assumes "undefined behavior" in that case.


    Doesn't _assume_ it - defines it.

    The free function causes the space pointed to by ptr to
    be deallocated, that is, made available for further
    allocation. If ptr is a null pointer, no action occurs.
    Otherwise, if the argument does not match a pointer earlier
    returned by the calloc, malloc, or realloc function, or if
    the space has been deallocated by a call to free or realloc,
    the behavior is undefined.


    >> Ick. %d and sizeof? No. sizeof returns an unsigned integer value. In
    >> C99, there's actually a format specifier for this, in C90 there isn't,
    >> so canonical is to cast to unsigned long and use %lu. However, that
    >> aside...

    >
    > Well, I can certainly replace it with %u if you like. :-)


    Not %u, %lu - and cast to unsigned long.

    >>> which is not really what it should be but never mind; sizeof(char *)
    >>> is 4 on my system (some might have 8 if they're 64-bit) so it's what
    >>> one should expect in C/C++.

    >>
    >> No, it is what one expects for certain implementations.

    >
    > Well, the reason is why it shouldn't be what it is returning is mostly
    > because the third line should arguably be 31 4, with the compiler
    > issuing a diagnostic about a type mismatch.


    No, it shouldn't. The third line is from call2, printing the size of
    parameter n1, which is a pointer - thus it is the size of a pointer, which
    in this case is 4.

    > OK. So how does a function determine whether *++p is a valid operation,
    > if p is passed in?


    Exemplar:

    void func( char *p )
    {
    *p++ = 3;
    }

    int main(void)
    {
    char buff[32] = {0};
    func(buff);
    return 0;
    }

    The question, then, is how does func know whether the line *p++ = 3 is
    valid? Of course it is; p is a non-const pointer to a non-const type,
    func is free to modify it as it likes. Even to do p = malloc(100); if it
    likes.

    > [1] Punt!
    > [2] A hidden parameter is added to indicate the bounds of the pointer.
    >
    > C/C++ takes the first route


    Say what? C does nothing of the sort. Neither does C++. A specific
    implementation might, but there's no way conforming code can tell; if you
    want the size passed in, pass it in yourself.

    Perhaps the confusion comes in in regarding _what_ is passed to func.
    Recall C is pass-by-value, so whatever is being passed to func is a
    _value_. Not a _reference_. The value, in this case, is the address of
    the buffer, which is then stored in a local pointer, p. As a local
    pointer containing the _address_ of the buffer, it can be used to modify
    the contents of the buffer, but it can also be used for any other valid
    pointer operation, such as storing the results of a call to malloc.


    --
    “Real Men Love Jesus.” But wear a condom. -- Promise Keepers Motto

  4. Re: Windows is Easier

    [snips]

    On Fri, 21 Sep 2007 02:07:44 +0000, cc wrote:

    >> Didn't say it did. In fact, I *explicitly* said it didn't. You *did*
    >> read that bit before responding, right?

    >
    > I did, but you contradict yourself when you say:
    >
    > "It is, however, a handy refutation of the nonsense view than Windows
    > is universally better, simpler, friendlier."


    No, I don't. If Windows were universally better, simpler, friendlier,
    then this - which occurred in Windows - could not have occurred. It did.

    Is it a failing of Windows? No; it is at most a failing of the installer.
    It is, however, quite sufficient to demonstrate that the oft-argued bit
    about how using Windows just makes things easier is simply balderdash, as
    there are more things involved than Windows itself - and that's if we
    grant that Windows itself is easier.

  5. Re: Windows is Easier

    [snips]

    On Fri, 21 Sep 2007 12:22:51 +1000, Gregory Shearman wrote:

    >> Not hardly, I just dislike perl. Intensely.

    >
    > Personal choice, eh?


    Indeed.

    > I love it.


    There's no accounting for taste.

    > After using PHP and absolutely hating it I'm now using perl
    > for all dynamic http content. It works wonderfully and is far more
    > versatile.


    It might work for you - hell, it generally works for me, I simply dislike
    it - but as to more versatile, well... not IME. About the most one can
    say is there's a lot of pre-written modules for perl available. Sort of
    like there are for PHP.

    Chacun a son gout and all that. I find perl code, on the whole, to be
    messy, unmaintainable and enough to gag a maggot. I'm also quite sure
    there is good, clean, maintainable perl code out there. I'm simply not
    masochistic enough to endure the pain of wading through the slop to find
    the - if you'll permit a small bon mot - perls.

  6. Re: Windows is Easier

    Kelsey Bjarnason wrote:

    > [snips]
    >
    > On Fri, 21 Sep 2007 12:22:51 +1000, Gregory Shearman wrote:
    >
    >>> Not hardly, I just dislike perl. Intensely.

    >>
    >> Personal choice, eh?

    >
    > Indeed.
    >
    >> I love it.

    >
    > There's no accounting for taste.


    I agree.

    >> After using PHP and absolutely hating it I'm now using perl
    >> for all dynamic http content. It works wonderfully and is far more
    >> versatile.

    >
    > It might work for you - hell, it generally works for me, I simply dislike
    > it - but as to more versatile, well... not IME. About the most one can
    > say is there's a lot of pre-written modules for perl available. Sort of
    > like there are for PHP.


    PHP modules? BLEEEEEEERRRRRRK!!!!!

    > Chacun a son gout and all that. I find perl code, on the whole, to be
    > messy, unmaintainable and enough to gag a maggot. I'm also quite sure
    > there is good, clean, maintainable perl code out there. I'm simply not
    > masochistic enough to endure the pain of wading through the slop to find
    > the - if you'll permit a small bon mot - perls.


    You sound like a perl novice.

    You write perl as if you are going to maintain it forever. You keep it
    modular.... you format it properly and provide liberal sprinklings of
    comments....

    Nothing could be easier.

    --
    Regards,

    Gregory.
    Gentoo Linux - Penguin Power

  7. Re: Windows is Easier

    [snips]

    On Mon, 24 Sep 2007 16:19:11 +1000, Gregory Shearman wrote:

    > You write perl as if you are going to maintain it forever.


    I tend to write code as though someone _else_ were going to maintain it:
    it must be clear, concise, readable. Perl, PHP, C, doesn't matter.

    > Nothing could be easier.


    Then why is virtually all the perl code I encounter bad enough to make me
    suspect perl actually causes immediate and irreversible brain damage?


    --
    “A great big asteroid might be a more humane way to go, methinks.” EM

  8. Re: Windows is Easier

    On Sep 23, 5:53 pm, Kelsey Bjarnason wrote:
    > [snips]
    >
    > On Fri, 21 Sep 2007 02:07:44 +0000, cc wrote:
    > >> Didn't say it did. In fact, I *explicitly* said it didn't. You *did*
    > >> read that bit before responding, right?

    >
    > > I did, but you contradict yourself when you say:

    >
    > > "It is, however, a handy refutation of the nonsense view than Windows
    > > is universally better, simpler, friendlier."

    >
    > No, I don't. If Windows were universally better, simpler, friendlier,
    > then this - which occurred in Windows - could not have occurred. It did.



    If this is a problem which could occur regardless of which OS is used,
    which you admit is true, then Windows could still be universally
    better, simpler, and friendlier. All OSes are equal in regards to
    ****ty installers and code will behave ****ty on your OS. Windows
    could be universally better, simpler, and friendlier still in all
    other respects (but come on, who believes that anyway). So you
    contradict yourself when you say this proves Windows isn't better, but
    then say it doesn't have anything to do with Windows. It can't be not
    related to Windows and prove something about Windows at the same time.
    They are distinct entities in this case.


    > Is it a failing of Windows? No; it is at most a failing of the installer.
    > It is, however, quite sufficient to demonstrate that the oft-argued bit
    > about how using Windows just makes things easier is simply balderdash, as
    > there are more things involved than Windows itself - and that's if we
    > grant that Windows itself is easier.


    Please explain again how this demonstrates that Windows doesn't make
    things easier if the problem is not with Windows, and the problem of a
    failing installer occurs regardless of what OS you're using? It
    doesn't, and it can't.


  9. Re: Windows is Easier

    Kelsey Bjarnason wrote:

    > [snips]
    >
    > On Mon, 24 Sep 2007 16:19:11 +1000, Gregory Shearman wrote:
    >
    >> You write perl as if you are going to maintain it forever.

    >
    > I tend to write code as though someone _else_ were going to maintain it:
    > it must be clear, concise, readable. Perl, PHP, C, doesn't matter.
    >
    >> Nothing could be easier.

    >
    > Then why is virtually all the perl code I encounter bad enough to make me
    > suspect perl actually causes immediate and irreversible brain damage?


    Either:

    a) You've got a Perl phobia

    or

    b) The code was written to do a quick job.

    or

    c) All of the above.

    --
    Regards,

    Gregory.
    Gentoo Linux - Penguin Power

  10. Re: Windows is Easier

    Erik Funkenbusch wrote:

    > PHP has had chronic security problems


    Could you enumerate such problems and any large scale loss of online
    data, provide citations please ..

    > and an attitude of not wanting to fix them.


    Could you provide citations as to such an attitude, a single quote from
    a single developer doesn't count as 'an attitude'. How exactly does a
    programming language develop an attitude.

    > This was so bad their head security guy quit in disgust because nobody was serious about security.


    What security guy, what was his name .. what number of people complained
    that 'nobody' was serious about security. You're being very vague here.
    Telling me to go Google on it isn;t a proper answer .. ?

    > How can you complain about Microsoft and then call PHP "particularly _good_"?


    There is no causal relationship between crappy MICROS~1 product and the
    merits or demerits of PHP ..

    --

    talking to fuddie is just like having a theological discussion with
    Beelzebub .. ...

  11. Re: Windows is Easier

    Kelsey Bjarnason wrote:

    > Let's repeat that: for some reason, the PHP installer has put stuff into a _document_ folder ..


    What did the developer say when you pointed this out to him ..

  12. Re: Windows is Easier

    On Sat, 20 Oct 2007 10:56:34 +0100, Doug Mentohl wrote:

    > Erik Funkenbusch wrote:
    >
    >> PHP has had chronic security problems

    >
    > Could you enumerate such problems and any large scale loss of online
    > data, provide citations please ..


    I don't need to. PHP security (or lack of it) is well documented in
    numerous places. Many of those problems are related to bad code by those
    implementing PHP (PHP doesn't encourage good security practices), but often
    times flaws in PHP have made large PHP projects insecure.

    > > and an attitude of not wanting to fix them.

    >
    > Could you provide citations as to such an attitude, a single quote from
    > a single developer doesn't count as 'an attitude'. How exactly does a
    > programming language develop an attitude.


    http://www.heise-security.co.uk/news/82500

    It does count as an attitude when that "single developer" has been the only
    person interested in serious security.

    >> This was so bad their head security guy quit in disgust because nobody was serious about security.

    >
    > What security guy, what was his name .. what number of people complained
    > that 'nobody' was serious about security. You're being very vague here.
    > Telling me to go Google on it isn;t a proper answer .. ?


    See above.

    >> How can you complain about Microsoft and then call PHP "particularly _good_"?

    >
    > There is no causal relationship between crappy MICROS~1 product and the
    > merits or demerits of PHP ..


    I think you need to lookup the meaning of the word causal. None of its
    meanings have any bearing on this discussion.

  13. Re: Windows is Easier

    Erik Funkenbusch wrote:

    > On Sat, 20 Oct 2007 10:56:34 +0100, Doug Mentohl wrote:


    >> Erik Funkenbusch wrote:


    >>> PHP has had chronic security problems


    >> Could you enumerate such problems and any large scale loss of online data, provide citations please ..


    > I don't need to. ..


    In other words, NO !!!

  14. Re: Windows is Easier

    On Tue, 23 Oct 2007 13:16:24 +0100, Doug Mentohl wrote:

    > Erik Funkenbusch wrote:
    >
    >> On Sat, 20 Oct 2007 10:56:34 +0100, Doug Mentohl wrote:

    >
    >>> Erik Funkenbusch wrote:

    >
    >>>> PHP has had chronic security problems

    >
    >>> Could you enumerate such problems and any large scale loss of online data, provide citations please ..

    >
    >> I don't need to. ..

    >
    > In other words, NO !!!


    Dishonest ****.

  15. Re: Windows is Easier

    Erik Funkenbusch wrote:

    > On Tue, 23 Oct 2007 13:16:24 +0100, Doug Mentohl wrote:


    >> Erik Funkenbusch wrote:


    >>> On Sat, 20 Oct 2007 10:56:34 +0100, Doug Mentohl wrote:


    >>>> Erik Funkenbusch wrote:


    >>>>> PHP has had chronic security problems


    >>>> Could you enumerate such problems and any large scale loss of online data, provide citations please ..


    >>> I don't need to. ..

    >> In other words, NO !!!


    > Dishonest ****.


    lookup IRONY ..

  16. Re: Windows is Easier

    Doug Mentohl wrote:

    > Erik Funkenbusch wrote:
    >
    >> On Tue, 23 Oct 2007 13:16:24 +0100, Doug Mentohl wrote:

    >
    >>> Erik Funkenbusch wrote:

    >
    >>>> On Sat, 20 Oct 2007 10:56:34 +0100, Doug Mentohl wrote:

    >
    >>>>> Erik Funkenbusch wrote:

    >
    >>>>>> PHP has had chronic security problems

    >
    >>>>> Could you enumerate such problems and any large scale loss of online
    >>>>> data, provide citations please ..

    >
    >>>> I don't need to. ..
    >>> In other words, NO !!!

    >
    >> Dishonest ****.

    >
    > lookup IRONY ..


    It is hilarious. Erik F talking about "dishonesty"

    Erik would not know honesty if it bit him right in the arse
    --
    Failure is not an option. It comes bundled with your Microsoft product.


+ Reply to Thread
Page 4 of 4 FirstFirst ... 2 3 4