Windows easier to use...

Discussion in 'C Programming' started by Kelsey Bjarnason, Jul 22, 2003.

  1. I'm online at the moment, trying to help someone with a programming
    problem. His code, which isn't as bad as it could be, is trying to open a
    file "file.in".

    The file exists, is called "file.in" and is in the right place - but the
    code won't open it - can't find the file.

    Say what? Can't find the file? But it's right there, with the right
    name, so why can't it find it?

    Some poking around reveals the problem. First, the file was created with
    notepad - which insists upon appending a .txt to everything. Fine so
    far... but Windows Explorer *shows* the file as being simply "file.in" -
    because the default setting is to hide file extensions.

    So the user _sees_ "file.in" and can't tell what's going wrong - the fact
    that the file is actually called "file.in.txt" and will never be found
    with his application.

    Ah, ease of use. Doesn't get any better than this.
     
    Kelsey Bjarnason, Jul 22, 2003
    #1
    1. Advertising

  2. On Mon, 21 Jul 2003 21:52:33 -0700, Kelsey Bjarnason wrote:

    Arrgh. What is with this newsreader? Twice in one week, the post goes to
    the wrong newsgroup... sigh.
     
    Kelsey Bjarnason, Jul 22, 2003
    #2
    1. Advertising

  3. Kelsey Bjarnason

    MG Guest

    Well...the solution is that the file has the icon of that of a notepad ( or
    that of the default pgm to open the .txt files)...
    this is a common thing that pops up...

    "Kelsey Bjarnason" <> wrote in message
    news:p...
    > I'm online at the moment, trying to help someone with a programming
    > problem. His code, which isn't as bad as it could be, is trying to open a
    > file "file.in".
    >
    > The file exists, is called "file.in" and is in the right place - but the
    > code won't open it - can't find the file.
    >
    > Say what? Can't find the file? But it's right there, with the right
    > name, so why can't it find it?
    >
    > Some poking around reveals the problem. First, the file was created with
    > notepad - which insists upon appending a .txt to everything. Fine so
    > far... but Windows Explorer *shows* the file as being simply "file.in" -
    > because the default setting is to hide file extensions.
    >
    > So the user _sees_ "file.in" and can't tell what's going wrong - the fact
    > that the file is actually called "file.in.txt" and will never be found
    > with his application.
    >
    > Ah, ease of use. Doesn't get any better than this.
    >
    >
     
    MG, Jul 22, 2003
    #3
  4. Re: [OT] Windows easier to use...

    <off-topic>

    "Richard Heathfield" <> wrote in message
    news:...
    > Kelsey Bjarnason wrote:
    >
    > > Some poking around reveals the problem. First, the file was created
    > > with notepad - which insists upon appending a .txt to everything.

    >
    > Suggested fix: remove notepad from your computer system.
    >
    > > Fine so far... but Windows Explorer *shows* the file as being simply
    > > "file.in" - because the default setting is to hide file extensions.

    >
    > Suggested fix: remove Windows Explorer from your computer system.


    I think I have a better solution:

    In Windows 2000:

    1. Select Start->Settings->Control Panel.
    2. Double-click on "Folder Options."
    3. Select the "View" tab.
    4. Uncheck "Hide file extensions for known file types."

    In Windows XP:

    1. Select Start->Control Panel.
    2. Select "Appearance and Themes."
    3. Select "Folder Options."
    4. Select the "View" tab.
    5. Uncheck "Hide file extensions for known file types."

    Definitely an irritating default setting. I've known several students who
    have experienced exactly the same problem Kelsey did.

    > Yesterday, I picked up a new computer for my sister, and set it up for
    > her. We were horrified to discover that the operating system insisted on
    > an Internet connection so that it could phone home. Since my sister
    > doesn't /have/ an Internet connection, she has two choices - get one, in
    > the next thirty days, or have an operating system, that she has paid for,
    > refuse to "work" any more.


    Are you talking about Windows XP and the "product activation" system? If
    so, your sister does not have to have an Internet connection. See Myth #4
    on this page:

    http://www.microsoft.com/piracy/basics/activation/myths.asp

    "Product Activation provides two methods to activate: Internet and
    telephone. The Internet method requires that the PC be able to make a
    connection to the Internet. The telephone method requires the user to
    provide information to a customer service representative over the
    telephone."

    </off-topic>

    --
    Russell Hanneken
     
    Russell Hanneken, Jul 22, 2003
    #4
  5. Kelsey Bjarnason wrote:

    > I'm online at the moment, trying to help someone with a programming
    > problem. His code, which isn't as bad as it could be, is trying to open a
    > file "file.in".


    Does it exist?

    >
    > The file exists,


    Sure about that?

    > is called "file.in"


    Sure about that?

    > and is in the right place - but the
    > code won't open it - can't find the file.


    Perhaps it doesn't exist, at least not by that name.

    > Say what? Can't find the file? But it's right there, with the right
    > name, so why can't it find it?


    Perhaps it doesn't have the right name after all.

    > Some poking around reveals the problem. First, the file was created with
    > notepad - which insists upon appending a .txt to everything.


    Suggested fix: remove notepad from your computer system.

    > Fine so
    > far... but Windows Explorer *shows* the file as being simply "file.in" -
    > because the default setting is to hide file extensions.


    Suggested fix: remove Windows Explorer from your computer system.

    > So the user _sees_ "file.in" and can't tell what's going wrong - the fact
    > that the file is actually called "file.in.txt" and will never be found
    > with his application.


    Write him a decent text editor. Well, a text editor better than Notepad.
    This is strictly a two-banana problem.

    > Ah, ease of use. Doesn't get any better than this.


    Oh, but my dear chap, it does; it really, really does. Vastly better.
    Incomparably better.

    Yesterday, I picked up a new computer for my sister, and set it up for her.
    We were horrified to discover that the operating system insisted on an
    Internet connection so that it could phone home. Since my sister doesn't
    /have/ an Internet connection, she has two choices - get one, in the next
    thirty days, or have an operating system, that she has paid for, refuse to
    "work" any more.

    Unfortunately, she's already invested quite a lot of money in buying Windows
    applications, so she's more or less locked in already.

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
     
    Richard Heathfield, Jul 22, 2003
    #5
  6. Re: [OT] Windows easier to use...

    Russell Hanneken <> scribbled the following:
    > <off-topic>


    > "Richard Heathfield" <> wrote in message
    > news:...
    >> Yesterday, I picked up a new computer for my sister, and set it up for
    >> her. We were horrified to discover that the operating system insisted on
    >> an Internet connection so that it could phone home. Since my sister
    >> doesn't /have/ an Internet connection, she has two choices - get one, in
    >> the next thirty days, or have an operating system, that she has paid for,
    >> refuse to "work" any more.


    > Are you talking about Windows XP and the "product activation" system? If
    > so, your sister does not have to have an Internet connection. See Myth #4
    > on this page:


    > http://www.microsoft.com/piracy/basics/activation/myths.asp


    > "Product Activation provides two methods to activate: Internet and
    > telephone. The Internet method requires that the PC be able to make a
    > connection to the Internet. The telephone method requires the user to
    > provide information to a customer service representative over the
    > telephone."


    > </off-topic>


    And how would the Windows itself know that the information has been
    provided, if there's no possibility of a data connection between it and
    Microsoft? You could give your bank account number and bank card PIN to
    Microsoft, and tell them it's all right to empty your whole bank account
    into their pockets, and the Windows would be none the wiser, and accuse
    you of stealing it.

    --
    /-- Joona Palaste () ---------------------------\
    | Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
    | http://www.helsinki.fi/~palaste W++ B OP+ |
    \----------------------------------------- Finland rules! ------------/
    "A computer program does what you tell it to do, not what you want it to do."
    - Anon
     
    Joona I Palaste, Jul 22, 2003
    #6
  7. Kelsey Bjarnason

    Simon Biber Guest

    Re: [OT] Windows easier to use...

    "Joona I Palaste" <> wrote:
    > And how would the Windows itself know that the information has been
    > provided, if there's no possibility of a data connection between it and
    > Microsoft?


    The client software generates a unique identifier for the particular
    installation of Windows by looking at the CD Key, the timestamp plus
    the hardware environment. You quote the unique identifier to the
    phone operator who enters it into his/her terminal. Once you have
    been identified and registered, the server generates the unlock code
    corresponding to the given unique identifier. The phone operator
    relays this back to the customer, who enters it into the text field
    in the registration wizard.

    This could link with public/private key cryptography -- the unlock
    code is generated by microsoft encrypting the unique identifier with
    its private key, and every copy of Windows contains the public key
    with which it verifies the unlock code.

    When the client validates that the unlock code matches the unique
    identifier, if so, it knows that Microsoft generated it and so the
    information has been provided.

    --
    Simon.
     
    Simon Biber, Jul 22, 2003
    #7
  8. [OT] Re: Windows easier to use...

    On Tue, 22 Jul 2003, Richard Heathfield wrote:
    >
    > Kelsey Bjarnason wrote:
    > >
    > > Some poking around reveals the problem. First, the file was created
    > > with notepad - which insists upon appending a .txt to everything.

    >
    > Suggested fix: remove notepad from your computer system.
    >
    > > Fine so
    > > far... but Windows Explorer *shows* the file as being simply "file.in"
    > > - because the default setting is to hide file extensions.

    >
    > Suggested fix: remove Windows Explorer from your computer system.
    >
    > > So the user _sees_ "file.in" and can't tell what's going wrong - the fact
    > > that the file is actually called "file.in.txt" and will never be found
    > > with his application.

    >
    > Write him a decent text editor. Well, a text editor better than Notepad.
    > This is strictly a two-banana problem.


    Hmm. Judging from the popularity of Emacs, are you sure it's not
    simply a "banana" problem?

    http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?banana problem

    -Arthur, poor fool,
    who uses Notepad and likes it
     
    Arthur J. O'Dwyer, Jul 22, 2003
    #8
  9. Kelsey Bjarnason

    Tobias Oed Guest

    Kelsey Bjarnason wrote:

    > I'm online at the moment, trying to help someone with a programming
    > problem. His code, which isn't as bad as it could be, is trying to open a
    > file "file.in".
    >
    > The file exists, is called "file.in" and is in the right place - but the
    > code won't open it - can't find the file.
    >
    > Say what? Can't find the file? But it's right there, with the right
    > name, so why can't it find it?
    >
    > Some poking around reveals the problem. First, the file was created with
    > notepad - which insists upon appending a .txt to everything.


    <OT>
    It is rumored that enclosing the file name in "" in the save as dialog will
    prevent notepad from adding the .txt.
    <\OT>

    Tobias

    --
    unix http://www.faqs.org/faqs/by-newsgroup/comp/comp.unix.programmer.html
    clc http://www.eskimo.com/~scs/C-faq/top.html
    fclc (french): http://www.isty-info.uvsq.fr/~rumeau/fclc/
     
    Tobias Oed, Jul 22, 2003
    #9
  10. Kelsey Bjarnason

    Richard Bos Guest

    Re: [OT] Windows easier to use...

    "Russell Hanneken" <> wrote:

    > "Richard Heathfield" <> wrote in message
    > news:...
    > > Yesterday, I picked up a new computer for my sister, and set it up for
    > > her. We were horrified to discover that the operating system insisted on
    > > an Internet connection so that it could phone home. Since my sister
    > > doesn't /have/ an Internet connection, she has two choices - get one, in
    > > the next thirty days, or have an operating system, that she has paid for,
    > > refuse to "work" any more.

    >
    > Are you talking about Windows XP and the "product activation" system? If
    > so, your sister does not have to have an Internet connection. See Myth #4
    > on this page:
    >
    > http://www.microsoft.com/piracy/basics/activation/myths.asp


    Are we supposed to trust a page that states, amongst others, "Microsoft
    absolutely respects the privacy of its customers"? 'Cause I don't, no
    matter how pleasantly they smirk.

    Richard
     
    Richard Bos, Jul 22, 2003
    #10
  11. Kelsey Bjarnason

    Derk Gwen Guest

    # Some poking around reveals the problem. First, the file was created with
    # notepad - which insists upon appending a .txt to everything. Fine so
    # far... but Windows Explorer *shows* the file as being simply "file.in" -
    # because the default setting is to hide file extensions.

    MacOSX added a similar feature. The theory is that people are using double
    clicks and drag-drops to pass file paths to programs instead of typing in
    the file paths. That way the user doesn't need to know the actual file
    path.

    --
    Derk Gwen http://derkgwen.250free.com/html/index.html
    The whole world's against us.
     
    Derk Gwen, Jul 22, 2003
    #11
  12. Kelsey Bjarnason

    Derk Gwen Guest

    Re: [OT] Windows easier to use...

    # > an Internet connection so that it could phone home. Since my sister
    # > doesn't /have/ an Internet connection, she has two choices - get one, in
    # > the next thirty days, or have an operating system, that she has paid for,
    # > refuse to "work" any more.

    # http://www.microsoft.com/piracy/basics/activation/myths.asp

    Is that information available without making an internet connection?

    --
    Derk Gwen http://derkgwen.250free.com/html/index.html
    So basically, you just trace.
     
    Derk Gwen, Jul 22, 2003
    #12
  13. Kelsey Bjarnason

    Dan Pop Guest

    In <> Kelsey Bjarnason <> writes:

    >On Mon, 21 Jul 2003 21:52:33 -0700, Kelsey Bjarnason wrote:
    >
    >Arrgh. What is with this newsreader? Twice in one week, the post goes to
    >the wrong newsgroup... sigh.


    Is it the newsreader or is it you? ;-)

    Dan
    --
    Dan Pop
    DESY Zeuthen, RZ group
    Email:
     
    Dan Pop, Jul 22, 2003
    #13
  14. Re: [OT] Windows easier to use...

    Joona I Palaste wrote:
    >
    > And how would the Windows itself know that the information has been
    > provided, if there's no possibility of a data connection between it and
    > Microsoft? You could give your bank account number and bank card PIN to
    > Microsoft, and tell them it's all right to empty your whole bank account
    > into their pockets, and the Windows would be none the wiser, and accuse
    > you of stealing it.
    >

    Aw, c'mon ! Don't be ingenuous.
    Microsoft might have debatable business practices, but they're no fool
    as far as software development is concerned.
    --
    Bertrand Mollinier Toublet
    "No sea vivo, Buendia" -- El presidente del tribunal,
    in Cien anos de soledad, de Gabriel Garcia Marquez
     
    Bertrand Mollinier Toublet, Jul 22, 2003
    #14
  15. Kelsey Bjarnason

    Dan Pop Guest

    [OT] Re: Windows easier to use...

    In <> Derk Gwen <> writes:

    ># Some poking around reveals the problem. First, the file was created with
    ># notepad - which insists upon appending a .txt to everything. Fine so
    ># far... but Windows Explorer *shows* the file as being simply "file.in" -
    ># because the default setting is to hide file extensions.
    >
    >MacOSX added a similar feature. The theory is that people are using double
    >clicks and drag-drops to pass file paths to programs instead of typing in
    >the file paths. That way the user doesn't need to know the actual file
    >path.


    And it makes sense. The default settings are supposed to be optimised for
    the average user, not for programmers. And the average Windows/MacOS
    users are not supposed to ever type a file name (except when creating
    their own files).

    I have very little sympathy for people who want to program on a platform
    *before* becoming *competent* users of that platform. Once you're a
    competent user, you can alter the default settings in whatever way suits
    your needs best and the original problem simply goes away.

    I'm far from being a competent Windows user, yet one of the first things
    I've changed on my installation was the hidden file extensions. Soon
    after that, I've also enabled the listing of "hidden" files and
    directories.

    Dan
    --
    Dan Pop
    DESY Zeuthen, RZ group
    Email:
     
    Dan Pop, Jul 22, 2003
    #15
  16. Re: [OT] Re: Windows easier to use...

    Dan Pop wrote:

    <snip>
    >
    > [...] The default settings are supposed to be optimised for
    > the average user, not for programmers. And the average Windows/MacOS
    > users are not supposed to ever type a file name (except when creating
    > their own files).
    >
    > I have very little sympathy for people who want to program on a platform
    > *before* becoming *competent* users of that platform. Once you're a
    > competent user, you can alter the default settings in whatever way suits
    > your needs best and the original problem simply goes away.


    /One/ of the original problems, in this case. The other - the problem of
    Notepad appending an extension of .txt - can be solved with a little care,
    by saving via the *.* "template" (or whatever the word is) rather than
    *.txt, and surrounding the filename in "quotation.marks".

    > I'm far from being a competent Windows user, yet one of the first things
    > I've changed on my installation was the hidden file extensions. Soon
    > after that, I've also enabled the listing of "hidden" files and
    > directories.


    Quite so. In fact, IIRC just about all the default Explorer settings are
    "wrong" (as far as I'm concerned), and it is indeed a good idea to hack
    them into shape just as soon as the installation process is finally
    complete.

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
     
    Richard Heathfield, Jul 22, 2003
    #16
  17. Kelsey Bjarnason

    Malcolm Guest

    Re: [OT] Re: Windows easier to use...

    "Dan Pop" <> wrote in message
    >
    > I have very little sympathy for people who want to program on a platform
    > *before* becoming *competent* users of that platform.
    >

    Maybe you'll have some sympathy for me. We signed a contract for a prototype
    (chargeable demo) of a racing game. Management had no way of knowing whether
    that concept would be signed or not.
    Absolutely vital to the game was a track editor that would allow us to
    create and modify tracks easily. So someone had to produce an editor in
    double quick time.
    Now I had just finished work on the Sega Saturn. For market reasons, Saturn
    development came to an end. So I receive orders to develop a track editor as
    a 3ds max plug-in, despite having no experience of Windows programming and
    despite not knowing 3ds Max.
    These things happen, particularly in small companies. Ideally we'd have got
    an experienced Windows programmer to do it, but I happened to be the person
    most available.
     
    Malcolm, Jul 22, 2003
    #17
  18. Re: [OT] Re: Windows easier to use...

    Malcolm <> scribbled the following:
    > "Dan Pop" <> wrote in message
    >> I have very little sympathy for people who want to program on a platform
    >> *before* becoming *competent* users of that platform.
    >>

    > Maybe you'll have some sympathy for me. We signed a contract for a prototype
    > (chargeable demo) of a racing game. Management had no way of knowing whether
    > that concept would be signed or not.
    > Absolutely vital to the game was a track editor that would allow us to
    > create and modify tracks easily. So someone had to produce an editor in
    > double quick time.
    > Now I had just finished work on the Sega Saturn. For market reasons, Saturn
    > development came to an end. So I receive orders to develop a track editor as
    > a 3ds max plug-in, despite having no experience of Windows programming and
    > despite not knowing 3ds Max.
    > These things happen, particularly in small companies. Ideally we'd have got
    > an experienced Windows programmer to do it, but I happened to be the person
    > most available.


    I sometimes get selected to use a certain technology, even if I have no
    previous experience with it. But these technologies are usually simple
    stuff like XSLT, not an entirely new operating system API (or in a worst
    case, an entirely new computer architecture) like Windows or the Sega
    Saturn. So I usually learn the basics in about a week.

    --
    /-- Joona Palaste () ---------------------------\
    | Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
    | http://www.helsinki.fi/~palaste W++ B OP+ |
    \----------------------------------------- Finland rules! ------------/
    "That's no raisin - it's an ALIEN!"
    - Tourist in MTV's Oddities
     
    Joona I Palaste, Jul 22, 2003
    #18
  19. [OT] Windows easier to use...

    Richard Heathfield wrote:

    >> Some poking around reveals the problem. First, the file was
    >> created with notepad - which insists upon appending a .txt to
    >> everything.

    >
    > Suggested fix: remove notepad from your computer system.


    Alternate suggestion: Putting quotes around any filename prevents
    NOTEPAD from doing that.

    >> Fine so far... but Windows Explorer *shows* the file as being
    >> simply "file.in" - because the default setting is to hide file
    >> extensions.

    >
    > Suggested fix: remove Windows Explorer from your computer system.


    [grin] Less extreme suggestion: change the default. Programmers
    should probably see the whole filename anyway.


    > Well, a text editor better than Notepad.


    IOW, nearly *anything* else! ;-)


    --
    |_ CJSonnack <> _____________| How's my programming? |
    |_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL |
    |_____________________________________________|_______________________|
     
    Programmer Dude, Jul 22, 2003
    #19
  20. Re: [OT] Windows easier to use...

    "Derk Gwen" <> wrote in message
    news:...
    >
    > # http://www.microsoft.com/piracy/basics/activation/myths.asp
    >
    > Is that information available without making an internet connection?


    Yes, of course. Checking my wife's laptop, I see that the information is in
    the Windows help files. Plus there's a product activation wizard--I would
    guess the information is also there, though my wife hasn't given me enough
    access to run the program. :^( It wouldn't surprise me if Windows XP also
    came with paper documentation that discusses activation by phone.

    Regards,

    Russell Hanneken
     
    Russell Hanneken, Jul 22, 2003
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Norman Ackroyd
    Replies:
    1
    Views:
    551
  2. Kathy Burke
    Replies:
    0
    Views:
    343
    Kathy Burke
    Jul 31, 2003
  3. Raterus
    Replies:
    1
    Views:
    2,256
    Srinivas
    Feb 13, 2004
  4. bp
    Replies:
    0
    Views:
    318
  5. Kenneth McDonald
    Replies:
    1
    Views:
    302
    Skip Montanaro
    Jan 31, 2005
Loading...

Share This Page