DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 59

Thread: Bad programming practice? Advice needed ...

  1. #31
    Mark Alexander Bertenshaw Guest

    Re: Bad programming practice? Advice needed ...


    "Michael Culley" <m_culley@hotmail.com> wrote in message
    news:3c95b669@10.1.10.29...
    > > If I can type crap into my Word
    > > document, why can't I do the same in a database type application?

    >
    > Mark,
    >
    > I agree that this would be good but I don't think it would really be worth
    > the trouble. I've always got a stack of user requests coming in faster

    than
    > I will ever be able to add them (I think the pile will never get smaller).
    > To add this feature ahead of some other highly useful feature wouldn't be
    > the best idea.
    >
    > --
    > Michael Culley
    > www.vbdotcom.com


    Michael -

    To state the obvious, I would never force you to do this highly useful
    feature - but only because my thought control helmet took a nasty knock the
    other day :-) . A couple of years ago, I would have never questioned this
    kind of thing because I would have only looked from the technical viewpoint.
    But in the meantime, I have done courses in ergonomics, and have worked in
    QA, which has given me a different (and hopefully, enlightened) outlook.

    --
    Mark Alexander Bertenshaw
    Programmer/Analyst
    Chordiant Software, Inc.
    Brentford
    UK



  2. #32
    Caroline Guest

    Re: Bad programming practice? Advice needed ...


    My 2 cents just for laughs

    I was engrossed in reading this thread when, nearly to the last message ...
    guess what ... I clicked the dang 'x' button by accident! Now that is frustrating,
    because I meant to minimize and had to not only reload Explorer, search through
    my favorites and then a couple of newsgroups to return here, then page down
    4 times to get back to the message I was reading. My vote: msgbox "Are you
    sure?" requires only a couple lines of code compared to what it would require
    to correct an accidental close (at least when it's clear there's some activity
    going on) and the user only needs to type one additional keystroke. Even
    those of us of who (think we) know what we're doing make mistakes ...

    Caroline


  3. #33
    Gregory Silvano Guest

    RE: Bad programming practice? Advice needed ...

    I'd go insane if every program or file I closed was followed by "Are you
    sure?" I'd throw the computer out the window.

    If the application is the type that may warrant an "Are You Sure" message,
    just put a checkbox for "don't ask me again". That's how IE handles this,
    and I personally find it to be a very elegant solution. Put an option to
    Save on Close, too. VB has that option when you run a project in the IDE.
    You can have it not save, prompt to save, or save automatically.

    Give the user options, and don't believe a messagebox isn't obtrusive. They
    are.


    Regards,

    Gregory Silvano
    http://www.codehound.com
    ******************************************************
    Search the best Visual Basic Web sites and
    millions of developer newsgroup posts at
    CodeHound!

    Download our FREE Add-In for Visual Basic
    and search the Internet right from your VB IDE!
    ******************************************************

    -----Original Message-----


    My 2 cents just for laughs

    I was engrossed in reading this thread when, nearly to the last message ...
    guess what ... I clicked the dang 'x' button by accident! Now that is
    frustrating,
    because I meant to minimize and had to not only reload Explorer, search
    through
    my favorites and then a couple of newsgroups to return here, then page down
    4 times to get back to the message I was reading. My vote: msgbox "Are you
    sure?" requires only a couple lines of code compared to what it would
    require
    to correct an accidental close (at least when it's clear there's some
    activity
    going on) and the user only needs to type one additional keystroke. Even
    those of us of who (think we) know what we're doing make mistakes ...

    Caroline




  4. #34
    Jeff Pipes Guest

    Re: Bad programming practice? Advice needed ...


    "Mark Alexander Bertenshaw" <mark.bertenshaw@virgin.net> wrote:
    >
    >
    >It's nothing to do with prompting them!


    Actually it does. That's what we were talking about. If the user closes a
    form without saving their changes, should the program ask the user if they
    want to save their changes or should the program just automatically assume?


    >It is to do with allowing the user
    >to save partial or invalid data without this impacting on the rest of the
    >application. And what's all this talk of thousands and thousands of rows

    of
    >data?


    You've never used Excel? That's a situation where the user could easily have
    thousands of rows of data.

    > The user isn't going to input thousands of rows of invalid data.


    Maybe not yours, but mine can. The apps I write are for large clients with
    thousands of vendors.

    >Instead, the user can have the ability, for instance, to go easy on a screen
    >or two. It is quite possible that the user might have already spent time
    >typing in a lot of data, only to realise there is some data missing. Whilst
    >that user is waiting for the data, why shouldn't s/he be able to save that
    >on which he has been spending 10 minutes?


    I didn't say they couldn't. I'm just saying let the user decide.

    >Here's two examples in my daily work of this principle working and not
    >working:
    >
    >* Working: Outlook 2000.
    >I can write an email, address it, but not send it. Instead, I can save

    it,
    >and it goes into the Drafts folder. Later on, I can come back to my draft
    >email, alter it, and send it.


    Bad example. I don't know what version of Outlook you're using but when I
    close a e-mail without saving it, Outlook asks me if I want to save the changes.


    >* Not working: MKS Track Integrity:
    >Whilst I am working on a bug, I fill in a fairly large form in stages every
    >ten minutes or so, but I can't save the data since then the record would

    go
    >to Fix Applied, which would be invalid at that time. Therefore, I have

    to
    >hope my machine doesn't crash until I have finished the bug.


    >Note that this _does_ involve more programming. But in the final
    >assessment, who are you programming for: yourself, or the user?


    The user. Changing the users data without their permission is not a good
    idea no matter how you look at it. I find it arrogant for a program to assume
    they think they know what I'm thinking.

    >
    >And Jeff, I really wish you would read the post before commenting on it.

    I
    >specifically said that this data would not go in the final storage (database
    >or whatever), instead this would be saved to somewhere else (I was thinking
    >along the lines of saving on the local machine as opposed to a remote
    >database, but don't worry about specifics, I am deliberately generalising).


    Which goes back to my point that you still have to prompt the user which
    data they want.

    -Jeff

  5. #35
    Jeff Pipes Guest

    RE: Bad programming practice? Advice needed ...


    "Gregory Silvano" <gsilvano@codehound.com> wrote:
    >I'd go insane if every program or file I closed was followed by "Are you
    >sure?" I'd throw the computer out the window.


    Me too. What we're advocating is the prompt if the user has unsaved changes
    and didn't explicitly click the save or cancel button. So the above situation
    is sort of similar but not really.

    >If the application is the type that may warrant an "Are You Sure" message,
    >just put a checkbox for "don't ask me again". That's how IE handles this,
    >and I personally find it to be a very elegant solution. Put an option to
    >Save on Close, too. VB has that option when you run a project in the IDE.
    >You can have it not save, prompt to save, or save automatically.
    >
    >Give the user options, and don't believe a messagebox isn't obtrusive.

    They
    >are.


    When you go to a restaurant and order a steak, would you rather the waiter
    ask you how you want it cooked or do you just want the waiter to assume you
    want it well done or raw?

    -Jeff


  6. #36
    Gregory Silvano Guest

    RE: Bad programming practice? Advice needed ...

    Again, it depends on the program. As developers, we always look at the
    Microsoft products as our role models. How does Outlook do it? How does
    Word do it? How does Excel do it? When you're writing an application like
    Outlook, Word, or Excel, mimic Microsoft. Microsoft Office is the standard
    and Microsoft spent a whole lot more than we ever will on interface designs.


    That said, most developers *don't* write applications like Outlook, Word, or
    Excel. They write applications to update databases or make calculations -
    not create a document like a spreadsheet or word processor document. When
    you move from one record to the next in an Access form, does it ask you if
    you want to save? No. When you close Internet Explorer, does it ask you if
    you want to save the last window that was open? No. Don't think this is a
    crazy example: Opera does this and it drives me crazy.

    Look at the two most popular (I think) non-Microsoft applications created
    for end-users: Act and Quicken. Neither of them asks if you want to save
    (or at least give you the option) when you close it. They just save the
    data.

    Not that my opinions matter - just ask the users what they want. Period.
    If your user base wants it this way, write it this way. There's no clear
    cut answer - it really depends on the situation.

    By the way, there's nothing better than a waiter who knows what you want. I
    want him to ask me the first few times and then start to recognize my
    patterns. That's when he starts to get the big tips. <g>


    Regards,

    Gregory Silvano
    http://www.codehound.com
    ******************************************************
    Search the best Visual Basic Web sites and
    millions of developer newsgroup posts at
    CodeHound!

    Download our FREE Add-In for Visual Basic
    and search the Internet right from your VB IDE!
    ******************************************************

    -----Original Message-----


    "Gregory Silvano" <gsilvano@codehound.com> wrote:
    >I'd go insane if every program or file I closed was followed by "Are you
    >sure?" I'd throw the computer out the window.


    Me too. What we're advocating is the prompt if the user has unsaved changes
    and didn't explicitly click the save or cancel button. So the above
    situation
    is sort of similar but not really.

    >If the application is the type that may warrant an "Are You Sure" message,
    >just put a checkbox for "don't ask me again". That's how IE handles this,
    >and I personally find it to be a very elegant solution. Put an option to
    >Save on Close, too. VB has that option when you run a project in the IDE.
    >You can have it not save, prompt to save, or save automatically.
    >
    >Give the user options, and don't believe a messagebox isn't obtrusive.

    They
    >are.


    When you go to a restaurant and order a steak, would you rather the waiter
    ask you how you want it cooked or do you just want the waiter to assume you
    want it well done or raw?

    -Jeff




  7. #37
    Gregory Silvano Guest

    RE: Bad programming practice? Advice needed ...

    Speaking of not being able to please everybody: there was a thread on one of
    the Microsoft newsgroups in December about the new Visual Studio IDE. The
    subject was "I do not like the default setting for Visual Studio .NET" and
    his post said "change the default font from 10pt to a 9pt Courier New".

    They give him the option to change it, but he wants it *defaulted* to his
    favorite font size. I love it. Could be worse - you could be writing
    software for him. <g>


    Regards,

    Gregory Silvano
    http://www.codehound.com
    ******************************************************
    Search the best Visual Basic Web sites and
    millions of developer newsgroup posts at
    CodeHound!

    Download our FREE Add-In for Visual Basic
    and search the Internet right from your VB IDE!
    ******************************************************

    -----Original Message-----

    This belnds in well with what I said earlier.

    It takes more work to do things right.

    Know that there are atleast two types of people
    in the world, and code for both of them if you
    have the time, or concern, to do so. Put in a
    preferences dialog and let them decide if they want
    the prompting or not.

    Ever since I was a kid people have been telling me,
    "You can please most of the people most of the time".

    -But to please all of them, empower them to make
    the decisions. Everyone involved will be happier.

    Then there's always the ones who expect the
    defaults to be what they would have chosen
    and not what they got to begin with...

    So, I guess on the first ever run of the app you
    force them to provide their option choices
    or accept the defaults.

    Then theres the guy who didn't even want to choose
    Defaults from the initial dialog... You really can't win.

    Let's just pack it in for the day and get a drink.
    BarKeep, 97 K J Merlot, Please... :-)




  8. #38
    dnagel Guest

    Re: Bad programming practice? Advice needed ...

    This belnds in well with what I said earlier.

    It takes more work to do things right.

    Know that there are atleast two types of people
    in the world, and code for both of them if you
    have the time, or concern, to do so. Put in a
    preferences dialog and let them decide if they want
    the prompting or not.

    Ever since I was a kid people have been telling me,
    "You can please most of the people most of the time".

    -But to please all of them, empower them to make
    the decisions. Everyone involved will be happier.

    Then there's always the ones who expect the
    defaults to be what they would have chosen
    and not what they got to begin with...

    So, I guess on the first ever run of the app you
    force them to provide their option choices
    or accept the defaults.

    Then theres the guy who didn't even want to choose
    Defaults from the initial dialog... You really can't win.

    Let's just pack it in for the day and get a drink.
    BarKeep, 97 K J Merlot, Please... :-)

    D.

    "Gregory Silvano" <gsilvano@codehound.com> wrote in message
    news:3c964b38@10.1.10.29...
    > Again, it depends on the program. As developers, we always look at the
    > Microsoft products as our role models. How does Outlook do it? How does
    > Word do it? How does Excel do it? When you're writing an application

    like
    > Outlook, Word, or Excel, mimic Microsoft. Microsoft Office is the

    standard
    > and Microsoft spent a whole lot more than we ever will on interface

    designs.
    >
    >
    > That said, most developers *don't* write applications like Outlook, Word,

    or
    > Excel. They write applications to update databases or make calculations -
    > not create a document like a spreadsheet or word processor document. When
    > you move from one record to the next in an Access form, does it ask you if
    > you want to save? No. When you close Internet Explorer, does it ask you

    if
    > you want to save the last window that was open? No. Don't think this is

    a
    > crazy example: Opera does this and it drives me crazy.
    >
    > Look at the two most popular (I think) non-Microsoft applications created
    > for end-users: Act and Quicken. Neither of them asks if you want to save
    > (or at least give you the option) when you close it. They just save the
    > data.
    >
    > Not that my opinions matter - just ask the users what they want. Period.
    > If your user base wants it this way, write it this way. There's no clear
    > cut answer - it really depends on the situation.
    >
    > By the way, there's nothing better than a waiter who knows what you want.

    I
    > want him to ask me the first few times and then start to recognize my
    > patterns. That's when he starts to get the big tips. <g>
    >
    >
    > Regards,
    >
    > Gregory Silvano
    > http://www.codehound.com
    > ******************************************************
    > Search the best Visual Basic Web sites and
    > millions of developer newsgroup posts at
    > CodeHound!
    >
    > Download our FREE Add-In for Visual Basic
    > and search the Internet right from your VB IDE!
    > ******************************************************
    >
    > -----Original Message-----
    >
    >
    > "Gregory Silvano" <gsilvano@codehound.com> wrote:
    > >I'd go insane if every program or file I closed was followed by "Are you
    > >sure?" I'd throw the computer out the window.

    >
    > Me too. What we're advocating is the prompt if the user has unsaved

    changes
    > and didn't explicitly click the save or cancel button. So the above
    > situation
    > is sort of similar but not really.
    >
    > >If the application is the type that may warrant an "Are You Sure"

    message,
    > >just put a checkbox for "don't ask me again". That's how IE handles

    this,
    > >and I personally find it to be a very elegant solution. Put an option to
    > >Save on Close, too. VB has that option when you run a project in the

    IDE.
    > >You can have it not save, prompt to save, or save automatically.
    > >
    > >Give the user options, and don't believe a messagebox isn't obtrusive.

    > They
    > >are.

    >
    > When you go to a restaurant and order a steak, would you rather the waiter
    > ask you how you want it cooked or do you just want the waiter to assume

    you
    > want it well done or raw?
    >
    > -Jeff
    >
    >
    >




  9. #39
    Caroline Guest

    RE: Bad programming practice? Advice needed ...


    I've lost track of who prefers what, but I agree with whoever said 'let the
    customer decide." Gregory, thanks for the checkbox tip ... that is the simplest
    and most elegant solution, and lets each user make the decision without someone
    (ie, the developer) dictating their preferences or constantly asking them
    if that's really what they prefer. I have some users who are unsure of themselves
    and would like this feature and others who will disable an auto close/save
    immediately. We all have different preferences for different reasons - I
    prefer to be prompted because I feel more "in control" of my computer - this
    keeps everyone happy.

    The next time I order a steak at my favorite restaurant, the waiter will
    get a $10 tip (aka the checkbox) and a note "I like it well done, please
    don't ask me again" Let's just hope he doesn't ask me if I'm really really
    sure!

    ;-)
    Caroline

    "Gregory Silvano" <gsilvano@codehound.com> wrote:
    >Again, it depends on the program. As developers, we always look at the
    >Microsoft products as our role models. How does Outlook do it? How does
    >Word do it? How does Excel do it? When you're writing an application like
    >Outlook, Word, or Excel, mimic Microsoft. Microsoft Office is the standard
    >and Microsoft spent a whole lot more than we ever will on interface designs.
    >
    >
    >That said, most developers *don't* write applications like Outlook, Word,

    or
    >Excel. They write applications to update databases or make calculations

    -
    >not create a document like a spreadsheet or word processor document. When
    >you move from one record to the next in an Access form, does it ask you

    if
    >you want to save? No. When you close Internet Explorer, does it ask you

    if
    >you want to save the last window that was open? No. Don't think this is

    a
    >crazy example: Opera does this and it drives me crazy.
    >
    >Look at the two most popular (I think) non-Microsoft applications created
    >for end-users: Act and Quicken. Neither of them asks if you want to save
    >(or at least give you the option) when you close it. They just save the
    >data.
    >
    >Not that my opinions matter - just ask the users what they want. Period.
    >If your user base wants it this way, write it this way. There's no clear
    >cut answer - it really depends on the situation.
    >
    >By the way, there's nothing better than a waiter who knows what you want.

    I
    >want him to ask me the first few times and then start to recognize my
    >patterns. That's when he starts to get the big tips. <g>
    >
    >
    >Regards,
    >
    >Gregory Silvano
    >http://www.codehound.com
    >******************************************************
    >Search the best Visual Basic Web sites and
    >millions of developer newsgroup posts at
    >CodeHound!
    >
    >Download our FREE Add-In for Visual Basic
    >and search the Internet right from your VB IDE!
    >******************************************************
    >
    > -----Original Message-----
    >
    >
    >"Gregory Silvano" <gsilvano@codehound.com> wrote:
    >>I'd go insane if every program or file I closed was followed by "Are you
    >>sure?" I'd throw the computer out the window.

    >
    >Me too. What we're advocating is the prompt if the user has unsaved changes
    >and didn't explicitly click the save or cancel button. So the above
    >situation
    >is sort of similar but not really.
    >
    >>If the application is the type that may warrant an "Are You Sure" message,
    >>just put a checkbox for "don't ask me again". That's how IE handles this,
    >>and I personally find it to be a very elegant solution. Put an option

    to
    >>Save on Close, too. VB has that option when you run a project in the IDE.
    >>You can have it not save, prompt to save, or save automatically.
    >>
    >>Give the user options, and don't believe a messagebox isn't obtrusive.

    >They
    >>are.

    >
    >When you go to a restaurant and order a steak, would you rather the waiter
    >ask you how you want it cooked or do you just want the waiter to assume

    you
    >want it well done or raw?
    >
    >-Jeff
    >
    >
    >



  10. #40
    Anthony Jones Guest

    Re: Bad programming practice? Advice needed ...

    Well you're what Alan Cooper calls an apologist. Sorry to say. You believe
    putting the responsibilty for recovering this accident on the user because
    the poor computer can't cope. For the other 99% of the time when you do
    mean to close you have to deal with the cost of the program continuely
    protecting you from yourself the other 1% of the time.

    Wouldn't it simply be better to be able to open explorer and ask it to
    return to the exact state it was in before you closed? That would be handy
    anyway.

    --
    Anthony Jones
    Nuesoft Ltd



  11. #41
    Anthony Jones Guest

    Re: Bad programming practice? Advice needed ...

    >assume you want it well done or raw

    I'd expect to him to ask once, the first time. On subsequent though I'd
    expect him to remember my preference and not bother me with further
    questions.

    Ok maybe that's asking a bit much of human but remembering such details is
    not a problem for a computer.


    --
    Anthony Jones
    Nuesoft Ltd



  12. #42
    Jeff Pipes Guest

    Re: Bad programming practice? Advice needed ...


    I don't know if this was was addressed to me. If so I don't care what Alan
    Cooper says, a good ui puts the user in control of the program, not the other
    way around. Changing user data without permission is a bad idea, plain and
    simple. If I had a program that did that to me, I would stop using it real
    quick. Until microsoft or someone else starts making mind-reading hardware
    i think you're deluding yourself if you think your programs knows what the
    user is thinking.

    -Jeff

    "Anthony Jones" <anthony.jones@nonuesoft.spamco.uk> wrote:
    >Well you're what Alan Cooper calls an apologist. Sorry to say. You believe
    >putting the responsibilty for recovering this accident on the user because
    >the poor computer can't cope. For the other 99% of the time when you do
    >mean to close you have to deal with the cost of the program continuely
    >protecting you from yourself the other 1% of the time.
    >
    >Wouldn't it simply be better to be able to open explorer and ask it to
    >return to the exact state it was in before you closed? That would be handy
    >anyway.
    >
    >--
    >Anthony Jones
    >Nuesoft Ltd
    >
    >



  13. #43
    james_barbetti Guest

    Re: Bad programming practice? Advice needed ...


    >It takes more work to do things right.


    Way, way more work. A friend of mine has a poster over his desk, which says,
    "Why do it right once when you get paid more to do it wrong ten times?"
    Which is kind of weird, since he tends
    to do things right.

    >Know that there are at least two
    >types of people in the world, and
    >code for both of them if you have
    >the time, or concern, to do so. Put in
    >a preferences dialog and let them
    >decide if they want the prompting or not.


    The perspective doesn't have to be
    "from inside the program looking out".
    Sure, we're programmers and we tend
    to think from that perspective. But
    there's another possible take on the
    "query unload" question.

    Say you're *not* the programmer, and
    you have a program which is keen to
    "throw itself off a cliff" when you click
    on the close button. And you don't
    want it to. You *can't* change the
    source code.

    But you don't have to change the source code! A project for someone... write
    a program which, when you click on a
    hotkey, gets the handle of the active window, and either
    (a) removes the X button entirely; or
    (b) inserts a message handler into the
    window's message handler queue
    which preempts close clicks and
    queries the user via... a message box;
    or
    (c) undoes (a) or (b).

    That way the user is no longer at the
    mercy of the programmer - at least as far
    as the X button is concerned.

    Back in 1995 I saw a program that did the
    opposite: it looked for the "are you sure?" message boxes and told them,
    "yes I'm sure". A workmate was
    developing it. I wonder what he did with it. It was a cute idea.

    Seeya,
    James

  14. #44
    Jeff Pipes Guest

    Re: Bad programming practice? Advice needed ...


    "Anthony Jones" <anthony.jones@nonuesoft.spamco.uk> wrote:
    >Sorry to say. You believe
    >putting the responsibilty for recovering this accident on the user because
    >the poor computer can't cope.


    See this is where you are going wrong. You are _assuming_ it was an accident.
    Maybe it wasn't. You don't know.

    Have you ever thought about giving the user an option that says -

    When closing a form with unsaved changes
    @ Save changes
    @ Discard changes
    @ Ask me

    -Jeff


  15. #45
    Mark Alexander Bertenshaw Guest

    RE: Bad programming practice? Advice needed ...


    "Caroline" <cjust@io.com> wrote:
    >
    >I've lost track of who prefers what, but I agree with whoever said 'let

    the
    >customer decide."


    Caroline -

    That's always the best idea - give the user the greatest number of choices.
    It means more work for the programmer, but an easier ride for the user.

    --
    Mark Alexander Bertenshaw
    Programmer/Analyst
    Chordiant Software, Inc.
    Brentford
    UK

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center