Thread: Graceful Crash on Bad Pointer

  1. #46
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    So what you're saying is that nobody should be a programmer unless they are a GUI programmer?

    I wonder who we can enlist to write the GUI for the C library.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  2. #47
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    No, not really. But everyone should learn to program GUI? Yes, I do believe they should. It need not be that fancy, but any GUI is better than none.
    It's also possible to team up with someone or ask if someone can create a GUI or frontend for something, and bundle the frontend with the program all the time.

    It's a shame there's no standard GUI for C/C++, but there are plenty of good libraries out there, many cross-platform, so being able to write it should not provide that difficult.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #48
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by Elysia View Post
    The only problem might be if they want to use the decoder stand-alone to decode something.
    decoder does not works on something that simple user may have. decoder transfers h264 bitstream into notcompressed frames

    where simple user could possibly get the stream? any application able to produce this stream will be probably able to start the decoder and also to save or display result.


    I still do not see a reason to provide GUY to any application just because you think any user could be as crasy as you to want to double click any exe he has on disk

    anything accessable through Program/Start menu should have a GUY. Anything else - ... Why bother?
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  4. #49
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Quote Originally Posted by Elysia View Post
    It need not be that fancy, but any GUI is better than none.
    Wrong. Oh, so very wrong. A good, logical CLI is infinitely superior to an unstructured, illogical GUI, and a well-structured config file is far easier to manipulate than a convoluted options dialog with a complete control element overload.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #50
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    But I think it's just lazy and inexcusable, no matter towards who it's geared.
    Sure, having BOTH a GUI and a CLI is better than just CLI. But the problem is, developers have a finite amount of time. Writing and maintaining a GUI takes a lot of time and effort, and introduces complexity, so if the GUI is not really needed, why bother? Why not put the time into improving the program? If the program can provide the same functionality with CLI, with comparable (or even less) work on the user's side, why make a pretty GUI (besides the fact that it is pretty)?

    For a browser or graphics editor, a GUI is certainly important. For a compiler? certainly not nearly as important. The decoder is another example. It just takes an input file name and an output file name, and maybe a handful of parametres. Do we really need a GUI for that?

  6. #51
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    And navigating there, of course. Oh yes, and it might be in the path directory.
    Not all of it is in Windows.
    Don't you need to navigate there with GUI?

    I find navigation on the command line to be far easier, but maybe that's just me. Especially with large directories, it's infinitely easier on the eyes, especially if I know the name I am looking for. With a GUI you would have to search for it with your eyes, and that gets quite tiring (my dual monitor desktop has about 100 or so icons, searching for what I need is a pain, and can easily take up to 30 seconds). On the command line it's just typing a few letters and tab-complete it. Even when you don't know the exact name of what you are looking for, a "ls | grep asdf" (http://en.wikipedia.org/wiki/Grep) will usually make life a lot easier.

    The command line is quite powerful and efficient if you know what you are doing.

    And contrarily to popular belief, Linux (or GNOME) DOES have a pretty file manager that is comparable to the windows "explorer", but I rarely use it, since I find it easier to do file management on the command line.

  7. #52
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    Quote Originally Posted by cyberfish View Post
    The decoder is another example. It just takes an input file name and an output file name, and maybe a handful of parametres. Do we really need a GUI for that?
    you are talking about decoder application, I was talking about decoder object that accepts encoded frame and returns decoded frame. It is loaded by any Direct X application like MediaViewer when needed
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  8. #53
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by cyberfish View Post
    Don't you need to navigate there with GUI?
    Sure.

    I find navigation on the command line to be far easier, but maybe that's just me. Especially with large directories, it's infinitely easier on the eyes, especially if I know the name I am looking for. With a GUI you would have to search for it with your eyes, and that gets quite tiring (my dual monitor desktop has about 100 or so icons, searching for what I need is a pain, and can easily take up to 30 seconds). On the command line it's just typing a few letters and tab-complete it. Even when you don't know the exact name of what you are looking for, a "ls | grep asdf" (http://en.wikipedia.org/wiki/Grep) will usually make life a lot easier.
    It's not easier on the command line...
    Searching for folders can be tricky, but there are tools to help. Of course, most simple users aren't even aware it's possible, but for me, it beats the crap out of CLI.
    Like press the first key of the folder you're looking for. The Search feature is of great help, too--or would be, if Microsoft didn't make it so ridiculously slow.

    So again, there are two sides of the fence, and I want to appeal to my side of the fence because I hate the other side of the fence, hence my mindset.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #54
    Registered User
    Join Date
    Mar 2009
    Posts
    344
    Quote Originally Posted by cyberfish View Post
    For a browser or graphics editor, a GUI is certainly important. For a compiler? certainly not nearly as important. The decoder is another example. It just takes an input file name and an output file name, and maybe a handful of parametres. Do we really need a GUI for that?
    And how about engine management software? Printers? Microwaves? There are way more embedded systems than desktop computers, and for most of them the choice between a traditional CLI vs GUI doesn't even make any sense. For those you choose the right interface for the job instead of stubbornly trying to make everything look like a Mac without regard to how tough to use, expensive or slow it makes your application. The same is true for desktop computers.

  10. #55
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Quote Originally Posted by Elysia View Post
    Sure.
    Like press the first key of the folder you're looking for. The Search feature is of great help, too--or would be, if Microsoft didn't make it so ridiculously slow.
    You can press more than just the first key of a file or folder you are searching for. If you type multiple characters without pausing then it will jump to the closest match starting with those characters.
    Never noticed it being slow though.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  11. #56
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    I mean the search feature--the search box (Vista and later).
    Try searching for something in your folder. It will take several seconds for stuff to show up, if your folder is even in the search results. It's completely and utterly useless and broken. I don't know why they bother.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ban pointers or references on classes?
    By Elysia in forum C++ Programming
    Replies: 89
    Last Post: 10-30-2007, 03:20 AM
  2. sorting with pointer of pointers to array
    By dunpealslyr in forum C++ Programming
    Replies: 6
    Last Post: 10-01-2007, 11:26 PM
  3. Question About Pointer To Pointer
    By BlitzPackage in forum C++ Programming
    Replies: 2
    Last Post: 09-19-2005, 10:19 PM
  4. Compiler "Warnings"
    By Jeremy G in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 04-24-2005, 01:09 PM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM